Human-detection-and-Tracking icon indicating copy to clipboard operation
Human-detection-and-Tracking copied to clipboard

main.py returns assertion failed

Open priyankansrivastav opened this issue 5 years ago • 5 comments

Issues should contain the following details which increases the probability of it get resolved quickly

  • Exact error or Issue details
D:\python\Human-detection-and-Tracking-master>python main.py -v D:\python\Human-detection-and-Tracking-master\videos
D:\python\Human-detection-and-Tracking-master\videos\VID-20181220-WA0006.mp4*.mp4
['D:\\python\\Human-detection-and-Tracking-master\\videos\\VID-20181220-WA0006.mp4']
Traceback (most recent call last):
  File "main.py", line 140, in <module>
    recognizer.read("model.yaml")
cv2.error: OpenCV(4.0.0) C:\projects\opencv-python\opencv\modules\core\src\persistence.cpp:2047: error: (-215:Assertion failed) isMap() in function 'cv::FileNode::operator []'
  • OpenCV Version - 4.0
  • Python 3.x ** Windows 10*
  • Changes done, if any in the original code - nope !

priyankansrivastav avatar Mar 13 '19 06:03 priyankansrivastav

Have you created your own "model.yaml" or using the one provided in the repository? Please make sure that you can sucessfully read and display the frame of the video you are using.

prsntmaurya avatar Mar 13 '19 06:03 prsntmaurya

I am using the same model.yaml file but i am still facing that issue

priyankansrivastav avatar Mar 13 '19 07:03 priyankansrivastav

I had the same exact issue, but then I fixed it by reading better the docs! :) I just had to rebuild model.yaml by running python create_face_model.py

stawo avatar Apr 08 '19 12:04 stawo

I think this is opencv incompatible. Maybe you are installing some models using conda and some models using pip? I hope this will help: pip install opencv-python

freedom9393 avatar May 07 '19 07:05 freedom9393

i met this error too,do you solve it?

leijuzi avatar Jun 27 '19 08:06 leijuzi