Darknet: How to change filter size of Final layer?

Created on 19 Apr 2018  路  5Comments  路  Source: pjreddie/darknet

@pjreddie I am using Yolo V3 for my own dataset. In its config file I need to change the final filter size according to my classes using the formulae : (classes+5)X5. But in the yolo v3.cfg file to where change the filter size?

It's giving me this error : darknet: ./src/parser.c:312: parse_yolo: Assertion `l.outputs == params.inputs' failed

Most helpful comment

i encounter the same question, could any body can share the solution? Thank you very much @ChongZhangZC @ralek67 @R1234A

All 5 comments

In YoloV3 you have to change each filters= in 3 convolutional layers before [yolo] layer and classes in [yolo] layer
Formula is filters = (classes+5)*3 in yoloV3 (3 masks only)

@ralek67 I change the number of classes and filters according to your suggestion (21 for 2 classes). But the same error still occurs when I train on my own dataset. Do I need to change other parameters?
Thank you!

i encounter the same question, could any body can share the solution? Thank you very much @ChongZhangZC @ralek67 @R1234A

https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects
@R1234A @ChongZhangZC @liyuanyaun
Hope this helps

@R1234A I think it's because there's some kind of discrepancy in your cfg file. for example: if you change filter to a different value, like 34 instead of 33 that error occurs. have good lookat your cfg file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryuzakinho picture ryuzakinho  路  4Comments

job2003 picture job2003  路  3Comments

ivomarvan picture ivomarvan  路  3Comments

sujithm picture sujithm  路  3Comments

Vikalp-Reorder picture Vikalp-Reorder  路  3Comments