I tried to run the Openpose on darknet with weights and cfg downloaded from this place: https://github.com/lincolnhard/openpose-darknet
This is the error when I tried to create a net in Opencv
modelConfiguration = path to cfg file
modelWeights = path to weights file
darknet = cv2.dnn.readNetFromDarknet(modelConfiguration, modelWeights)
error Traceback (most recent call last) in () ----> 1 darknet = cv2.dnn.readNetFromDarknet(modelConfiguration, modelWeights)
error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:552: error: (-212:Parsing error) Unsupported activation: relu in function 'cv::dnn::darknet::ReadDarknetFromCfgStream'
The fix is either you install the latest master branch of openCV or OpenCV version 3.4.XX.XX Only these branches support yolo4.
You can install another version of OpenCV by the following snippet:
!pip install opencv-contrib-python==3.4.13.47 --force-reinstall
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With