tf2-yolov4 icon indicating copy to clipboard operation
tf2-yolov4 copied to clipboard

Cannot convert-darknet-weights from darknet to h5 format

Open vanchung1995 opened this issue 4 years ago • 2 comments

I trained my own detector follow the instruction of https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects I set my classes = 1, image width=height=384. But I cannot convert my weight to .h5 format

Screenshot from 2020-10-09 17-30-22

vanchung1995 avatar Oct 09 '20 10:10 vanchung1995

have you been able to solve this issue? if not... I had the same problem... turns out that for some reason, yolov4 wieghts have to be placed in home directory, also you need to flag explicitly how many classes are there as shown in image, I have only one class so "-n 1" at the end...

i converted them using gpu on colab and also a vmware virtual machine with ubuntu 18/python 3.6.

edit: I used colab without gpu image

migueBC avatar Dec 29 '20 18:12 migueBC

have you been able to solve this issue? if not... I had the same problem... turns out that for some reason, yolov4 wieghts have to be placed in home directory, also you need to flag explicitly how many classes are there as shown in image, I have only one class so "-n 1" at the end...

i converted them using gpu on colab and also a vmware virtual machine with ubuntu 18/python 3.6.

edit: I used colab without gpu image

I can confirm that adding my number of classes after the -n flag solved this problem for me.

Michael-Shepherd avatar Feb 23 '21 19:02 Michael-Shepherd