-
Notifications
You must be signed in to change notification settings - Fork 75
yolov4-custom cfg is not parsed correctly using the provided parser #89
Comments
@hhk7734 @eunjins @JayantGoel001 Hi I have a weight file trained using yolov4-custom.cfg file and I want to use that file during the model development but the cfg-parser is not correctly parsing the file. does it only work for the cfg files provided in your repo? |
@Fetulhak Actually the issue you are facing is because the original cfg also contains code for training parameters but tensorflow-yolov4 doesn't support training. So If you just remove the training parameters from your |
@JayantGoel001 thanks for your replay. here is the yolov4-custom cfg file. which layers should I have to remove? |
Can you please tell me which model of yolo you are using? |
I am using YOLOv4 with initial weight of yolov4.conv.137. with CSPDarkNet53 backbone |
Try This once. |
Thank you very much let me load the model using the modified cfg file. |
1 similar comment
Thank you very much let me load the model using the modified cfg file. |
@JayantGoel001 the parser works fine now but the model is not accepting the input shape.
|
https://drive.google.com/file/d/1Jz35Sln3FPjMNH7kYzTuzv0lyiyECM53/view?usp=sharing link to my pre-trained weight. |
@Fetulhak Provide the access of the drive link |
Yes I just accessed it. I think CFG You used for training is wrong.
Same goes for
I recommend you try to follow this tutorial to create custom CFG file. Then Train the model. 🙂 |
@JayantGoel001 Both the cfg file and my weight files work fine when I use AlexeyAB darknet command for inference |
@JayantGoel001 as alexeyab said we can change some of the values inorder to detect small objects and that is why I changed the strides and anchor box sizes. |
@JayantGoel001 is that possible for your class in class UpsampleLayer(BaseLayer): to accept upsample values with stride 4. I think the problem is that class it accepts only stride of 2 |
|
Ya, I checked that too but the thing is I don't think a changing stride is a good option because in the training tutorial of darknet there is no mention of that. |
If you want to do it |
@JayantGoel001 I have solved the issue related with modified yolov4 config file by modifying the UpSampleLayer as follows. In my case, I have modified the feature concatenation layers after upsampling by modifying the strides
|
@JayantGoel001 I got into trouble loading the weight file
|
Looks like cfg file and weight file are not same🤔 |
@JayantGoel001 Thanks it was my mistake which I upload wrong weight file. |
@JayantGoel001 now i have got in to another problem. When I use AlexeyAb darknet detector test command and when I use your model.inference command for the same prob_thresh=0.075 I got different prediction results. I tried a lot what the problem will be but I cannot able to solve. I have used my custom weight file trained using CSP darknet. Here are my results |
Hello @Fetulhak |
No description provided.
The text was updated successfully, but these errors were encountered: