WongKinYiu / ScaledYOLOv4

Scaled-YOLOv4: Scaling Cross Stage Partial Network
GNU General Public License v3.0
2.02k stars 574 forks source link

how do i change the hue,saturation and all ? #95

Open saikrishnadas opened 3 years ago

WongKinYiu commented 3 years ago

https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-csp/data/hyp.scratch.yaml#L17-L19

saikrishnadas commented 3 years ago

The main advantage of Scaled-Yolo was its speed. I tried training a p7 model with 2 classes with 500 images each (total 1000 images) , 64 batch-size and 1000 epochs, but i took me around 20hrs to complete the training process which is slower than darknet yolov4 model. Why is it so ? I use single Nvidia tesla GPU.

WongKinYiu commented 3 years ago

it because p7 model is 5 times larger than yolov4 model. for similar model scale, please use yolov4-csp.

saikrishnadas commented 3 years ago

Okay, And why do i get multiple predictions on a single object? I trained plum and apple as a model and while inference I get multiple predictions on a single object inside the image.

Attaching the images, test1

the one in the top gives 2 predictions

  1. Which script and weight i shld use ? Shoud i use detect.py or test.py script ? shld be last_yolov4-p7_strip.pt or last_yolov4-p7.pt (not using best.pt because i may be due to overfiitting )
WongKinYiu commented 3 years ago
  1. binary cross entropy loss enable multiple label for single bbox, if your case only have one label for one bbox, you can use cross entropy loss.
  2. last usually more over-fitting than best.
saikrishnadas commented 3 years ago

So, you recommend me to use the best and not last? But sometimes best comes with at 500 epochs from 2000 epochs. !! And how do I calculate MAP for each weight after the training is completed?

  1. Which one is suitable for final production? And what's the difference between a normal and strip weight? Screenshot (135)_LI

  2. Where do I change the loss function? I wanted to use Cross entropy instead of binary CE , where do i change it ?