opencv-for-darknet icon indicating copy to clipboard operation
opencv-for-darknet copied to clipboard

help, Unsupported activation: relu in function 'ReadDarknetFromCfgStream'

Open x931890193 opened this issue 4 years ago • 3 comments

cv2.error: OpenCV(4.0.1) /root/ocr/opencv-4.0.1/modules/dnn/src/darknet/darknet_io.cpp:552: error: (-212:Parsing error) Unsupported activation: relu in function 'ReadDarknetFromCfgStream'

x931890193 avatar May 11 '20 11:05 x931890193

@x931890193 I have the same problem, so did u solved it ?

joawa avatar May 21 '20 08:05 joawa

@x931890193 I have the same problem, so did u solved it ?

hey, I run in jetson nano, this my env.

(camera) [email protected] /data/ocr/darknet-ocr$ python app.py 
learning_rate: Using default '0.001000'
momentum: Using default '0.900000'
policy: Using default 'constant'
max_batches: Using default '0'
layer     filters    size                  input                output
    0 conv     64  3 x 3 / 1   256 x  32 x   1   ->   256 x  32 x  64  0.009 BFLOPs
    1 max          2 x 2 / 2 x 2   256 x  32 x  64   ->   128 x  16 x  64
    2 conv    128  3 x 3 / 1   128 x  16 x  64   ->   128 x  16 x 128  0.302 BFLOPs
    3 max          2 x 2 / 2 x 2   128 x  16 x 128   ->    64 x   8 x 128
    4 conv    256  3 x 3 / 1    64 x   8 x 128   ->    64 x   8 x 256  0.302 BFLOPs
    5 conv    256  3 x 3 / 1    64 x   8 x 256   ->    64 x   8 x 256  0.604 BFLOPs
    6 max          2 x 2 / 2 x 1    64 x   8 x 256   ->    63 x   4 x 256
Unused field: 'strideW = 1'
Unused field: 'strideH = 2'
    7 conv    512  3 x 3 / 1    63 x   4 x 256   ->    63 x   4 x 512  0.595 BFLOPs
    8 conv    512  3 x 3 / 1    63 x   4 x 512   ->    63 x   4 x 512  1.189 BFLOPs
    9 max          2 x 2 / 2 x 1    63 x   4 x 512   ->    62 x   2 x 512
Unused field: 'strideW = 1'
Unused field: 'strideH = 2'
   10 conv    512  2 x 2 / 1    62 x   2 x 512   ->    61 x   1 x 512  0.128 BFLOPs
   11 conv  11316  1 x 1 / 1    61 x   1 x 512   ->    61 x   1 x11316  0.707 BFLOPs
Loading weights from models/ocr/chinese/ocr.weights...Done!
learning_rate: Using default '0.001000'
momentum: Using default '0.900000'
policy: Using default 'constant'
max_batches: Using default '0'
layer     filters    size                  input                output
    0 conv     64  3 x 3 / 1    32 x  32 x   3   ->    32 x  32 x  64  0.004 BFLOPs
    1 conv     64  3 x 3 / 1    32 x  32 x  64   ->    32 x  32 x  64  0.075 BFLOPs
    2 max          2 x 2 / 2 x 2    32 x  32 x  64   ->    16 x  16 x  64
    3 conv    128  3 x 3 / 1    16 x  16 x  64   ->    16 x  16 x 128  0.038 BFLOPs
    4 conv    128  3 x 3 / 1    16 x  16 x 128   ->    16 x  16 x 128  0.075 BFLOPs
    5 max          2 x 2 / 2 x 2    16 x  16 x 128   ->     8 x   8 x 128
    6 conv    256  3 x 3 / 1     8 x   8 x 128   ->     8 x   8 x 256  0.038 BFLOPs
    7 conv    256  3 x 3 / 1     8 x   8 x 256   ->     8 x   8 x 256  0.075 BFLOPs
    8 conv    256  3 x 3 / 1     8 x   8 x 256   ->     8 x   8 x 256  0.075 BFLOPs
    9 max          2 x 2 / 2 x 2     8 x   8 x 256   ->     4 x   4 x 256
   10 conv    512  3 x 3 / 1     4 x   4 x 256   ->     4 x   4 x 512  0.038 BFLOPs
   11 conv    512  3 x 3 / 1     4 x   4 x 512   ->     4 x   4 x 512  0.075 BFLOPs
   12 conv    512  3 x 3 / 1     4 x   4 x 512   ->     4 x   4 x 512  0.075 BFLOPs
   13 max          2 x 2 / 2 x 2     4 x   4 x 512   ->     2 x   2 x 512
   14 conv    512  3 x 3 / 1     2 x   2 x 512   ->     2 x   2 x 512  0.019 BFLOPs
   15 conv    512  3 x 3 / 1     2 x   2 x 512   ->     2 x   2 x 512  0.019 BFLOPs
   16 conv    512  3 x 3 / 1     2 x   2 x 512   ->     2 x   2 x 512  0.019 BFLOPs
   17 conv    512  3 x 3 / 1     2 x   2 x 512   ->     2 x   2 x 512  0.019 BFLOPs
   18 conv     40  1 x 1 / 1     2 x   2 x 512   ->     2 x   2 x  40  0.000 BFLOPs
Loading weights from models/text/text.weights...Done!
http://0.0.0.0:8080/

env:

^C^C(camera) [email protected] /data/ocr/darknet-ocr$ 
(camera) [email protected] /data/ocr/darknet-ocr$ python
Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.1.1'
>>> 

x931890193 avatar May 21 '20 11:05 x931890193