For object detection, a huge number of bounding boxes spanning the full image are made. Visual features are then extracted for each of the bounding box. They are evaluated and it is determined that which objects are present in the boxes. At the end, overlapping boxes are combined into a single bounding box and various objects are detected.
Here, I used a model that was pretrained on the COCO dataset.
Step-1: Imported necessary libraries and cloned various pretrained models.
Step-2: Installed the TensorFlow Object Detection API.
Step-3: Loaded the model. Arranged the path of the test images.
Step-4: Added functions to loop through all images, detect frames according to classes in them.
Step-5: Performed object detection on test images.
As it can be seen, only people are getting detected.
Step-6: Testing it on a new, random picture.