Open mdatre opened 3 years ago
@mdatre what's your cfg and weights? I double checked with official COCO pretrained yolo2_darknet weights and it works fine.
@mdatre what's your cfg and weights? I double checked with official COCO pretrained yolo2_darknet weights and it works fine.
@david8862 I am using this Yolo2 weights and cfg file mentioned on this blog.
But I changed a few things in your code. I created a yolo2 model from the JSON file and loaded weights from h5 file (saved separately by modifying convert.py
), without building Darknet19 as done in your code. Then I ran yolo.py
detection with --image
option using yolo2 VOC anchors file. That worked for a couple of examples I tried. I am wondering what is the difference between your Darknet19 model and AlexyAB's one on which the above weights were trained.
Why the VOC anchor file generated after running convert.py
on PJ Reddie's Yolo2 cfg and weights does not work with yolo.py
detection?
I noticed that you have a different VOC anchor file yolo2-voc_anchors.txt
in configs folder. yolo2_anchors.txt
does not produce good detection on the above mentioned model/weights. Why don't the extracted anchors from original Darknet's cfg files do not work?
Could you please clarify these doubts?
@david8862 Also I wanted to know what is the minimal computing configuration expected to do training from scratch using train.py
script? We tried to run it on a modest 1 GPU, 16 GB GPU mem and 32 GB RAM, and the script was killed by the OS within a few minutes with "out of memory" error message.
On a slightly higher configuration machine, the speed seemed quite slow with 11 epochs per hour, when we wanted to train for a few thousand epochs.
@mdatre Oh for yolo2 I change anchor definition to align YOLOv2/v3 anchor definitions and postprocess. You can refer #108 For GPU consumption in training, it depends on related config (model_type, batch_size, etc.). And the time for 1 epoch depends on dataset size.
Hi,
I have Yolo2 darknet19 weights and cfg files pretrained on a custom dataset. I converted those to TF h5 weights using the
convert.py
script, which also created an anchors file. However when I try to use these withyolo.py
script for detection, it gives errors as follows:I tried using other Yolo2 model types too like
yolo2_mobilenet
but none is working. The default onetiny_yolo3_darknet
andyolo3_darknet
worked as per the examples given on readme as well in some other issues logged here.Any idea how to get custom trained Yolo2 darknet weights and cfg file working with this or am I missing something?