AlexeyAB / darknet

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

tiny-yolo not giving results after fine tuning #1877

Open sharoseali opened 5 years ago

sharoseali commented 5 years ago

@AlexeyAB writing stopbackward=1 in cfg file and then fine tuning isn't giving results as yolov2 23 layer architecture. mAP is 0.0% before and after fine tuning yolov2-tiny-voc.cfg and corresponding weights image this result in a pic is after first 100 iterations......... After 2400 iteration the avg loss donot decrease below 0.2 and mAP is 0.00% ..................extremely un-understandable Alexey. after run this command darknet partial cfg/yolov2-tiny-voc.cfg yolov2-tiny-voc.weights yolov2-tiny.conv.13 13 the weights are saved as yolov2-tiny.conv.13 and when i tested this weight file for detection it gives me this result image if this command only save the weight file than why results are so bad??

AlexeyAB commented 5 years ago

after run this command darknet partial cfg/yolov2-tiny-voc.cfg yolov2-tiny-voc.weights yolov2-tiny.conv.13 13 the weights are saved as yolov2-tiny.conv.13 and when i tested this weight file for detection it gives me this result

This command creates weights file yolov2-tiny.conv.13 that is suitable only for Training, not for Detection: darknet partial cfg/yolov2-tiny-voc.cfg yolov2-tiny-voc.weights yolov2-tiny.conv.13 13


You must follow exactly this sequence:

  1. Set stopbackward=1
  2. do darknet partial to get yolov2-tiny.conv.13 file
  3. Train your model yolo-obj.weights
  4. use yolo-obj.weights for Detection

Read more: https://github.com/AlexeyAB/darknet#how-to-train-tiny-yolo-to-detect-your-custom-objects and: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection

sharoseali commented 5 years ago

@AlexeyAB Thanks for replying... i set stopbackward=1 in my new cfg file to train with 4 classes. Now i will try again by setting stopbackward=1 in tiny-yolo-voc.cfg before partial command. Let see what happens??

sharoseali commented 5 years ago

@Alexey not getting the results even then...... i don't understand what's wrong with tiny- yolo-voc.cfg.. Avg loss decreases in several minutes and struck around 2.0.... mAP is 0.0%...