Computer vision is a rapidly growing field in the technology and computer science world. An object detection system consists of recognizing, classifying, and localizing, not only one piece of furniture in an image but every referenced piece of the furniture mentioned. One of the most popular algorithms to date for real-time object detection is YOLO (You Only Look Once). The great thing about this Deep Neural Network is that it is very easy to retrain the network on your own custom dataset. In this project, we have made a custom dataset consisting of 6 classes of furnitures. They are as follows :
- Chair
- Table
- Sofa
- Bed
- Light Stand
- Shoe Table
In each class, there are around 160 labelled images for training our model. In total we have 977 images.
- Annotated Furniture Images
- Data Source: Google Images ( web scraped )
- Obtained around 977 images across 6 categories
- The Images were labelled using LabelImg, object bounding boxes
- For this project we have used YOLOv5 Model Architecture.
- YOLO an acronym for 'You only look once', is an object detection algorithm that divides images into a grid system. Each cell in the grid is responsible for detecting objects within itself.
- YOLO is one of the most famous object detection algorithms due to its speed and accuracy.
- It can be used to detect usable furniture such as
- Chair
- Table
- Sofa
- Shoe Stand
- Bed
- Light Stand
- If you want to train a custom model, clone this repo, and follow this link. You'll end up with the weights file of your custom trained model.
- In order to check your custom model,
cd yolov5
and run the below command:python detect.py --source 0 # webcam img.jpg # image vid.mp4 # video path/ # directory path/*.jpg # glob 'https://youtu.be/Zgi9g1ksQHc' # YouTube 'rtsp://example.com/media.mp4' # RTSP, RTMP, HTTP stream
- Install Deepstream on the Jetson board.
- Once the PyTorch model works fine, follow this link to convert the PyTorch model into cpp, and compatible with Jetson board, using Deepsteam.
- Run the below command to run the custom YOLOv5 model on Jetson, in real time:
deepstream-app -c deepstream_app_config.txt
From the above graphs, we can see that the Mean Average Precision keeps increasing as we train the model for longer. The loss also goes down significantly.
We have also attached a video of our model. Follow the link given below:
https://drive.google.com/file/d/13aBa3yXtUdYtLMK0YUIBTHaB_fk9L4-J/view?usp=sharing