I'm trying to try the CSPN weights as the docs say they are more accurate than the standard YOLOV ones (which have had a few false positives for me).
I'm getting the following error:
Code: Select all
Traceback (most recent call last):
File "/var/cache/zoneminder/zmeventnotification/bin/zm_detect.py", line 398, in <module>
b, l, c = m.detect(image)
File "/usr/local/lib/python3.8/dist-packages/zmes_hook_helpers/yolo.py", line 64, in detect
self.net = cv2.dnn.readNet(weights_file_abs_path,
cv2.error: OpenCV(4.4.0-pre) /var/cache/zoneminder/OpenCVinstall/opencv/modules/dnn/src/darknet/darknet_importer.cpp:214: error: (-212:Parsing error) Failed to parse NetParameter file: /var/cache/zoneminder/zmeventnotification/models/cspn/csresnext50-panet-spp-original-optimal_final.weights in function 'readNetFromDarknet'
I'm currently running OpenCV V4.4
Have I missed something else here? From the docs it says to leave the model type as Yolov and just change the weights, maybe I misunderstood this?
Here's what I changed in objectconfig.ini
Code: Select all
#remove temp
#config={{base_data_path}}/models/yolov3/yolov3.cfg
#weights={{base_data_path}}/models/yolov3/yolov3.weights
#labels={{base_data_path}}/models/yolov3/yolov3_classes.txt
#End rem
#Copied from the git:
# FOR CSPN. Note that model name is yolo
config={{base_data_path}}/models/cspn/csresnext50-panet-spp-original-optimal.cfg
weights={{base_data_path}}/models/cspn/csresnext50-panet-spp-original-optimal_final.weights
labels={{base_data_path}}/models/cspn/coco.names