Downloading a pretrained object detection model
We've pretrained and uploaded an object detection model called You only look once, or YOLO, so you can download it into this tutorial and deploy it. Just run:
curl -o ./yolo_v2.pb https://github.com/deeplearning4j/dl4j-test-resources/raw/4fbca7f8286b7e0856903828193f50c08ceb1cee/src/main/resources/tf_graphs/examples/yolov2_608x608/frozen_model.pb
YOLO can detect objects in images by making bounding boxes around those objects, together with a probability assessing how likely the model thinks this box actually contains that object. The version of YOLO is trained on the so-called COCO dataset, which contains 80 real-world categories like person, dog or cat. If you take the following image, you can expect the model to find all people, cars, bikes and umbrellas in it.
Next, you'll see how to deploy your downloaded model quickly to get an image with labeled bounding boxes for this input image. Go ahead and download it here:
curl -o input.jpg https://raw.githubusercontent.com/SkymindIO/skil-python/cc99a0d9bb67d63f21233fad264a0fa5c1eae4c9/examples/tensorflow-yolo/input.jpg