Detecting objects in an image where there is a person and an object present in the image.
Note: The object should be present in the COCO classes.
Object detection with Yolo v3 using transfer learning on a class that doesn't belong to COCO dataset.
Class selected: LEGO Batman
Click on the video below to play
- Number of images: 500
- Batch size: 10
- Epochs: 300
For using the LEGO Batman dataset, follow the instructions mentioned here. To run the model on custom dataset, follow the steps below
- Annotating the images
- Clone the annotation tool from this link.
- Follow the steps mentioned in the README of the tool specified above.
- Annotate atleast 500 images with the tool.
- Creating dataset directory
- Download a short-duration video containing the class used during training.
- Extract frames from the video into the test directory
ffmpeg -i video.mp4 data/test/img%3d.jpg
- Extract audio from the video (this audio will be required later)
ffmpeg -i video.mp4 -f mp3 -ab 192000 -vn audio.mp3
Download the file named yolov3-spp-ultralytics.pt
from this link and place it in this directory.
- Combine the images from the output directory to form a video
ffmpeg -framerate 24 -i YoloV3/output/img%3d.jpg -r 24 -y out_video.mp4
- Combine the audio file extracted earlier with the output video to produce final output
ffmpeg -i out_video.mp4 -i audio.mp3 -shortest result.mp4
After running the algorithm for 300 epochs, the result is pretty amazing!
- Rakhee (Canvas ID: 25180625)
- Shantanu Acharya (Canvas ID: 25180630)