YOLOv5 object detection performance boosting!

Hello,

I am trying to develop an object detection model using yolov5s. The challenging object under consideration include cables. All other objects are massive in size, therefore easy to detect. But the cables are a bit complicated. It includes cables of various colours, shapes, sizes, types, etc. It includes electric wires, normal tubes, rubber pipes, etc… all are classified into a single class: ‘cable’. Currently I have collected almost 1157 images manually in such a way that the background information is retained in every image. Currently, I have done a training session with epochs=500, patience=50 and batchsize=32. The training stopped at epoch 247. The training is done on top of COCO trained weight file. The training images are of the size 1280x720p and the training is done with imgsz=(360, 640). The overall mAP50 obtained is 86.9% and the mAP50 for cable is 73.6%. Still I am not content with the detection of cable class. What is the best strategy to increase the performance of the model on the cable class? What is the possibility of getting above 95% mAP score for the cable class through the increasing the cable instances in the training dataset? In the above mentioned training, augment=False. I am confused on how to use augmentation while objects under training are of different nature.(For Eg: cable, person,)
Another question: Do I have to retrain on the entire dataset every time new images are collected or Can I transfer learn on the previous weight file?(Does both have the same effect?)

Thanks in Advance,
Shaheem Backer.

Is there a reason for using YOLOv5? You can try YOLO11.

training is done with imgsz=(360, 640)

Training doesn’t use non-square imgsz. You will see a warning in the beginning.

In the above mentioned training, augment=False.

augment=False doesn’t disable augmentation. You should refer to the docs for what the arguments do.

What is the possibility of getting above 95% mAP score for the cable class through the increasing the cable instances in the training dataset?

You can try, but mAP greater than 0.95 is hard to achieve. You should find out what the errors are currently. You can run validation with visualize=True to visualize the errors on the images.

Another question: Do I have to retrain on the entire dataset every time new images are collected or Can I transfer learn on the previous weight file?(Does both have the same effect?)

You need the whole dataset.

2 Likes