Human-detection-and-Tracking
Human-detection-and-Tracking copied to clipboard
main.py returns assertion failed
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 !
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.
I am using the same model.yaml
file but i am still facing that issue
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
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
i met this error too,do you solve it?