AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.64k stars 7.96k forks source link

yolov3.conv.105 vs yolov3.conv.81vs darknet53.conv.74 #1023

Open ghost opened 6 years ago

ghost commented 6 years ago

I am trying to learn the 2 class problem. One is person and the other is a minor class which is neither in imagenet nor coco.

In yolov3, I know the following three pre-trained models, Which do you think is the best in this case? The reason for this is also?

yolov3.conv.105 yolov3.conv.81 darknet53.conv.74

AlexeyAB commented 6 years ago

Try to use yolov3.conv.81

baolinhu commented 6 years ago

where can i get the yolov3.conv.81 or yolov3.conv.105?I only find darknet53.conv.74. thanks.

ghost commented 6 years ago

no download link.see below.

https://github.com/AlexeyAB/darknet/commit/ba70801e982ada241ced55bedad2a411da1896c4#diff-2a86661590614a8bbb5321cf28e9ed97

AlexeyAB commented 6 years ago

@baolinhu

Download file: https://pjreddie.com/media/files/yolov3.weights

How to get file yolov3.conv.81 https://github.com/AlexeyAB/darknet/blob/eff487ba3626a39e135d13929117e04bc4cf5823/build/darknet/x64/partial.cmd#L21

lvshuaigg commented 6 years ago

What is the difference between yolov3.conv.105 and yolov3.conv.81.Thanks.

AlexeyAB commented 6 years ago

@lvshuaigg

yolov3.conv.105 is incorrect - because layer-81 depends on number of classes, so higher layers will be shifted if number of classes will be changed.

lvshuaigg commented 6 years ago

Thank you very much.

  1. If I only train one class, what's the difference between yolov3.conv.81 and darknet53.conv.74?
  2. What is the difference if I train a lot of classes?
AlexeyAB commented 6 years ago

@lvshuaigg You can use any of them: yolov3.conv.81 (is Trained on MS COCO) or darknet53.conv.74 (is trained on Imagenet)

kmsravindra commented 5 years ago

@AlexeyAB , Can I use darknet53.conv.74 for 832 x 480 aspect ratio? If darknet53.conv.74 is obtained from imagenet (I understand the image aspect ratio here is mostly 1:1) / Pascal VOC data, does it reduce the accuracy when I train the custom images of 832 x 480 aspect?

AlexeyAB commented 5 years ago

@kmsravindra Yes, you can. darknet53 is trained with crop-data-augmentation (like jitter in the Yolo): https://github.com/AlexeyAB/darknet/blob/21a4ec9390b61c0baa7ef72e72e59fa143daba4c/cfg/darknet53.cfg#L13-L14 So it is slightly invariant to aspect ratio.

I think it will be better to use darknet53.conv.74 than not to use darknet53.conv.74 in your case.

kmsravindra commented 5 years ago

Thanks for your reply @AlexeyAB.

  1. I assume that the min_crop and max_crop are cropping the original dimensions of the image (maybe both width wise and height wise)?
  2. I also meant to ask if you are aware of any other pre-trained weights for yolov3 that work better than darknet53.conv.74 for 832 x 480 aspect ratio.