-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
darknet_io.cpp:250: error: (-212:Parsing error) Unsupported activation: silu in function 'setActivation' #22409
Copy link
Copy link
Closed
Labels
Description
System information (version)
- OpenCV => 4.6.0
- Operating System / Platform => Ubuntu 20.04
- Compiler => gcc10
Detailed description
Using Opencv 4.6.0 and the new yolov7 .weights and config (.cfg) from https://github.com/WongKinYiu/yolov7/tree/darknet causes the error -> cv2/opencv-4.6.0/modules/dnn/src/darknet/darknet_io.cpp:250: error: (-212:Parsing error) Unsupported activation: silu in function 'setActivation'
weights -> https://github.com/WongKinYiu/yolov7/releases/download/v0.1/yolov7x.weights
config -> https://github.com/WongKinYiu/yolov7/blob/darknet/cfg/yolov7x_darknet.cfg
alternate config -> https://github.com/WongKinYiu/yolov7/blob/darknet/cfg/yolov7x.cfg
Steps to reproduce
# python3.9 code
import cv2
## ommited irrelevant code, the readNet method is where the issue occurs.
model_input_file = "path/to/yolov7x.weights"
model_config_file = "path/to/yolov7x_darknet.cfg" or "path/to/yolov7x.cfg"
try:
net = cv2.dnn.readNet(model_input_file, model_config_file)
except Exception as e:
print(f"exception when loading in weights and config -> {e}")
#### code continues
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found any solution - I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable