Trained YOLO models to enhance Object Detection capabilities in Robots using both custom datasets and a dataset with a predefined boundaries
- YOLOv5 and YOLOv7 Libraries
- Access to Jupyter Notebook or Google Colab
In order to perform Object detection on images using Roboflow we must first preprocess the Images. This can be done by either using Roboflow to create a custom boundaries or creating a JSON file with boundaries defined
Roboflow can be used to preprocess images for training. In this project images over 100 images were preprocessed by segregating them into multiple categories based on color, robot type, size, etc. Images were labelled in Roboflow and custom boundaries were drawn based on what the robot needs to detect. The datasets were then segregated into Training, Validation, and Testing with a split of 70-15-15
JSON files can be created which store various information about the robots such as the image number, the labeled group, as well their the co-ordinates of the boundary being detected. The JSON files were analyzed using the python script through libraries such as OpenCV and JSON.
First Clone the YOLOv7 repo
git clone https://github.com/WongKinYiu/yolov7.git
Then Install the neccessary packages
!python train.py --batch 16 --cfg cfg/training/yolov7.yaml --epochs 100 --data yolov7_Dataset/data.yaml --weights 'yolov7x.pt' --device 0
!python detect.py --weights runs/train/exp2/weights/best.pt --conf 0.1 --source yolov7_Dataset/test/images