XinzeLee / PolygonObjectDetection

This repository is based on Ultralytics/yolov5, with adjustments to enable polygon prediction boxes.
355 stars 96 forks source link

Some questions about how to change the backbone and decouple the cls head #28

Open Hezhexi2002 opened 2 years ago

Hezhexi2002 commented 2 years ago

Hi, thanks for the great works.I am a sophomore, and I was in the robomaster team of North University of China in charge of using neural networks to identify armor plates to achieve automatic targeting.But using the model I trained with the yolo series,The obtained bbox and the outline of the armor plate cannot be well fitted, resulting in a large error in the subsequent use of pnp for attitude calculation, so I want to change the traditional yolo data set format to the normalization of four corner points The current data set format is like this: 1 0.673029 0.373564 0.678429 0.426232 0.830433 0.401262 0.824525 0.351212, the first number is the class id, the last eight numbers are the coordinates of the four corners of the normalized armor plate, and this just match the label format in polyobjectdetection.Before this moment I have used yolov5-face to train a model that can directly locate the four corners of the armor plate. The effect is as follows: image Then because we need to recognize numbers and colors at the same time, I want to decouple the color and the number, that is, add a 1x1conv to the head to output the color separately, which will improve the recognition accuracy of the model.At the same time,I also want to change the backbone of yolov5s to some cpu friendly backbone like shufflenet or ghostnet and so on,So I would really appreciate it if you can give me some advice,looking forward to your reply.

XinzeLee commented 2 years ago

Hi, thanks for your interests in the polygon-yolov5. Regarding the problem of changing model backbone, I have two steps for you to try on:

  1. Try with existing yolov5 backbones first, including yolov5-m, yolov5-l, etc.
  2. If you want to use other backbones like ResNet, etc. You go to ./model folder and build a new .yaml file for your specific backbone.
Hezhexi2002 commented 2 years ago

ok,thanks for your sincere reply.I will try to change the backbone first follow your advice,and I will give you the feedbacks if there is any progress!:-)