WongKinYiu / yolor

implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks (https://arxiv.org/abs/2105.04206)
GNU General Public License v3.0
1.99k stars 518 forks source link

Will a darknet compatible .cfg file be avaiable? #87

Open Duarte-Nunes opened 3 years ago

Duarte-Nunes commented 3 years ago

Is there a way for us to get a darknet compatible cfg file or convert the format it is currently in to darknet?

Duarte-Nunes commented 3 years ago

After some exploring of the repository i found the files, sorry to bother.

dejongyeong commented 3 years ago

@Duarte-Nunes which .cfg file are you using that are compatible with the darknet repo? I am looking the same as well. Thanks!

Duarte-Nunes commented 3 years ago

I noticed the config files in the cfg folder but after some further analisys i noticed that there are new layer types in this project.

Perhaps i should re-open the issue to get some developer help.

Duarte-Nunes commented 3 years ago

In another note if cfg files compatible with darknet are ever available if a yolor-tiny ever came up it would be stellar since i mostly use the tiny versions on projects.

thunanguyen commented 2 years ago

Hi @WongKinYiu, I just write a cfg file for yolov4-tiny alternative of yolor that I named yolor_tiny.cfg (attached below). I can train it with a small dataset of mine and seem no problem so far. Can you check if the cfg file is correct?

yolor_tiny.txt

thuangb commented 2 years ago

Sorry I send wrong file, this is the correct one

yolor_tiny.txt

ashjostan commented 2 years ago

@thuangb @thunanguyen Tried running your yolor_tiny cfg file on my custom dataset- after changing number of classes and filters.

classes - line 247 & 304 filters - line 295, 238, 211 & 207

Also, had to comment the resize parameter (line 257 & 314) as it was throwing an error during parsing of the cfg file.

But - I still get an error and training does not start:

RuntimeError: The expanded size of the tensor (512) must match the existing size (256) at non-singleton dimension 1. Target sizes: [1, 512, 1, 1]. Tensor sizes: [1, 256, 1, 1].

Can you confirm if there are any other changes you made?

thuangb commented 2 years ago

@thuangb @thunanguyen Tried running your yolor_tiny cfg file on my custom dataset- after changing number of classes and filters.

classes - line 247 & 304 filters - line 295, 238, 211 & 207

Also, had to comment the resize parameter (line 257 & 314) as it was throwing an error during parsing of the cfg file.

But - I still get an error and training does not start:

RuntimeError: The expanded size of the tensor (512) must match the existing size (256) at non-singleton dimension 1. Target sizes: [1, 512, 1, 1]. Tensor sizes: [1, 256, 1, 1].

Can you confirm if there are any other changes you made?

I have to made some more changes for the model to work but it seems that yolor layers does not works well with yolov4-tiny. No matter what I try, the accuracy is too low so I abandon this approach and I does not recommend you try like me.