Ask Your Question
0

Parsing error (Unsupported activation: relu) in ReadDarknetFromCfgStream

asked 2020-10-30 23:32:35 -0600

arsh gravatar image

Hi. i used opencv 3.4.8 and alexnet.weights and alexnet.cfg. when i want to load it this error happen. i want to ask you why opencv not work with all dnn model correctly ? it have worked with yolo3 model but not detect any object in darknet19 model. please give me a models list which supported by opencv that have worked on imagenet dataset.

thanks in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-10-31 02:54:25 -0600

berak gravatar image

this is a known issue which has been fixed already.

please update your opencv version

edit flag offensive delete link more

Comments

thanks for your answer but i already installed opencv 4.1.1 and same error still exist.

arsh gravatar imagearsh ( 2020-11-01 08:38:06 -0600 )edit

indeed, 4.1.1 won't do the trick, since you need this fix

so, 3.4.12 or 4.5.0 will have it

berak gravatar imageberak ( 2020-11-01 09:28:20 -0600 )edit

oh i got it now. i using dll libraryand not copile opencv myself to do that change. is there a way to add that relu parameter in my code?

arsh gravatar imagearsh ( 2020-11-01 10:28:25 -0600 )edit

is there a way to add that relu parameter in my code?

no. error comes from the darknet importer, which is part of the opencv dnn module, not from your code

you could try to replace the relu with preluleaky activations in the cfg file, but the quality will probably degrade ;(

berak gravatar imageberak ( 2020-11-01 10:48:31 -0600 )edit

thank you very much ... but unfurtunatlly (Unsupported activation: prelu)

arsh gravatar imagearsh ( 2020-11-01 10:54:09 -0600 )edit

sorry, my bad -- leaky not prelu (what all other yolo networks use ...)

berak gravatar imageberak ( 2020-11-01 11:48:40 -0600 )edit

i test all other activation function but no one work . Parsing error (Unknown layer type: connected) in ReadDarknetFromCfgStream. i think i have to build opencv myself. thanks

arsh gravatar imagearsh ( 2020-11-01 11:53:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-10-30 23:32:35 -0600

Seen: 778 times

Last updated: Oct 31 '20