Open aditya-5842 opened 3 years ago
@aditya-5842 could you explain how you generate the weights file for your tiny3L? Can I use any of the pre trained darknet ones (https://github.com/AlexeyAB/darknet/releases) ?
@aditya-5842 could you explain how you generate the weights file for your tiny3L? Can I use any of the pre trained darknet ones (https://github.com/AlexeyAB/darknet/releases) ?
Yes, you can use the pre-trained YOLO-Tiny model (https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29) to initialize the weights.
@aditya-5842 could you explain how you generate the weights file for your tiny3L? Can I use any of the pre trained darknet ones (https://github.com/AlexeyAB/darknet/releases) ?
Yes, you can use the pre-trained YOLO-Tiny model (https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29) to initialize the weights. getting the following error with the above weights file. Command was
python save_model.py --weights ./data/yolov4-tiny-conv.29 --output ./checkpoints/yolov4-tiny-3l --input_size 416 --model yolov4-tiny-3l --tiny
(sorry for the screenshot)
@aditya-5842 could you explain how you generate the weights file for your tiny3L? Can I use any of the pre trained darknet ones (https://github.com/AlexeyAB/darknet/releases) ?
Yes, you can use the pre-trained YOLO-Tiny model (https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.conv.29) to initialize the weights. getting the following error with the above weights file. Command was
python save_model.py --weights ./data/yolov4-tiny-conv.29 --output ./checkpoints/yolov4-tiny-3l --input_size 416 --model yolov4-tiny-3l --tiny
(sorry for the screenshot)
Sorry, I could not give a detailed answer.
./data/yolov4-tiny-conv.29
is not the full Tiny-3l model. It contains only starting layers of the YOLOV4 (tiny) model.You can one of my trained model. This is for detecting the license-plate/s in image.
thanks for the clarification! Very helpful.
@aditya-5842 any reason why you changed the __C.YOLO.ANCHORS_TINY
in the config?
@ciklista
Look at line 17. It is anchor-boxes. YOLOV4-Tiny (i.e. by default Tiny-2l) has only 2 Yolo layers at the end and each layer YOLO layer needs 3 different anchor boxes. So total we need 6 boxes (3 *2=6). These anchors are going to be reshaped into 2 x 3 x 2
array. Each continuous pair will make a different anchor box and all anchor boxes should be different.
If you notice anchor 81,82
is repeating in line 17, so it should be corrected.
Now I'm not sure I got the first two values of line 18. May be I did some google search and found these values. But it worked for me.
NOTE: Initially, with line 17 as anchors, my YOLOV4-Tiny was not working. https://github.com/hunglc007/tensorflow-yolov4-tflite/blob/13e6adc274c408a6f1fed83b836b7e6452024d93/core/config.py#L17-L18
you are right. The original anchors where drawing bounding boxes a little too large. Looking better with yours, thanks for the fix :)
Thank you for the contribution, just tested and it's working!
@aditya-5842 Thank you for your great work, I have a question about the depthwise separable convolution convert from weights to tflite, do you have any idea about this?
Made the required changes to make the repo work for
yolov4-tiny-3l
.