Open rachitchokshi opened 4 years ago
Hey, in your command to run it, you have correctly given an input video but not the output video. You have given it a directory instead of a .mp4 file, maybe this could be the problem?
Try changing the --output to something like test.avi?
Hi, about the IndexError: list index out of range , I think that might be a variable naming problem.
checke the line 395
see the enumerate variable "n", it crashes with the upper variable "n" so you got a index problem, just change it to another name (for me I change it to "nn") and that would be fine.
Hoping it would help
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:712: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'cv::dnn::darknet::ReadDarknetFromWeightsStream'
what should i do?
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:712: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'cv::dnn::darknet::ReadDarknetFromWeightsStream'
what should i do?
go download any yolo-weight(approximately 280M) and replace the one in this directory
cv2.error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\dnn\src\darknet\darknet_io.cpp:712: error: (-213:The function/feature is not implemented) Transpose the weights (except for convolutional) is not implemented in function 'cv::dnn::darknet::ReadDarknetFromWeightsStream' what should i do?
go download any yolo-weight(approximately 280M) and replace the one in this directory
I solve that problem, thanks a lot
How do I slove this problem, and if its wrong it will told me
Traceback (most recent call last):
File "yolo_video_new.py", line 387, in
How do I slove this problem, and if its wrong it will told me
Traceback (most recent call last): File "yolo_video_new.py", line 387, in boxesTemp = updateTrackers(frame) File "yolo_video_new.py", line 320, in updateTrackers tracker, box = trackersList[n] IndexError: list index out of range
I am getting the same error. Can you tell me how did u solve it ?? Thank you..
Look above comments, @Yaoxiao1 has a solution which should work
How do I slove this problem, and if its wrong it will told me Traceback (most recent call last): File "yolo_video_new.py", line 387, in boxesTemp = updateTrackers(frame) File "yolo_video_new.py", line 320, in updateTrackers tracker, box = trackersList[n] IndexError: list index out of range
I am getting the same error. Can you tell me how did u solve it ?? Thank you..
Look above comments, @Yaoxiao1 has a solution which should work
How do I slove this problem, and if its wrong it will told me Traceback (most recent call last): File "yolo_video_new.py", line 387, in boxesTemp = updateTrackers(frame) File "yolo_video_new.py", line 320, in updateTrackers tracker, box = trackersList[n] IndexError: list index out of range
I am getting the same error. Can you tell me how did u solve it ?? Thank you..
Thank you for the solution. Can I increase the frame size or some other method which will increase the speed to get output faster? Please guide .
When i tried run the code: python ~/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py -i ~/Fully-Automated-red-light-Violation-Detection/videos/aziz1.MP4 -o ~/Fully-Automated-red-light-Violation-Detection/videos -y ~/Fully-Automated-red-light-Violation-Detection/yolo-coco/
there was an error like this :
Traceback (most recent call last):
File "yolo_video_new.py", line 115, in
Anyone can help me?
When i tried run the code: python ~/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py -i ~/Fully-Automated-red-light-Violation-Detection/videos/aziz1.MP4 -o ~/Fully-Automated-red-light-Violation-Detection/videos -y ~/Fully-Automated-red-light-Violation-Detection/yolo-coco/
there was an error like this : Traceback (most recent call last): File "yolo_video_new.py", line 115, in "csrt": cv2.TrackerCSRT_create, AttributeError: module 'cv2.cv2' has no attribute 'TrackerCSRT_create'
Anyone can help me?
You have install full opencv library for that you have to
Uninstall current opencv version by using pip uninstall opencv-python. Then install by using pip install opencv-contrib-python.
When i tried run the code: python ~/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py -i ~/Fully-Automated-red-light-Violation-Detection/videos/aziz1.MP4 -o ~/Fully-Automated-red-light-Violation-Detection/videos -y ~/Fully-Automated-red-light-Violation-Detection/yolo-coco/ there was an error like this : Traceback (most recent call last): File "yolo_video_new.py", line 115, in "csrt": cv2.TrackerCSRT_create, AttributeError: module 'cv2.cv2' has no attribute 'TrackerCSRT_create' Anyone can help me?
You have install full opencv library for that you have to
Uninstall current opencv version by using pip uninstall opencv-python. Then install by using pip install opencv-contrib-python.
u can use opencv-contrib-python==4.2.0.34 it will solve the issue for me
Hello,
While trying to run the project through below command
python ~/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py -i ~/Fully-Automated-red-light-Violation-Detection/videos/aziz1.MP4 -o ~/Fully-Automated-red-light-Violation-Detection/videos -y ~/Fully-Automated-red-light-Violation-Detection/yolo-coco/
The program crashes with below error
INFO] loading YOLO from disk... [INFO] 120 total frames in video Traceback (most recent call last): File "/home/xxxx/PR/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py", line 314, in <module> thresholdRedLight = getLightThresh(showStages=True) File "/home/xxxx/PR/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py", line 249, in getLightThresh im2, contours, hierarchy = cv2.findContours(th, cv2.RETR_TREE, cv2.CHAIN_APPROX_TC89_KCOS) ValueError: not enough values to unpack (expected 3, got 2)
After fixing this one it crashes with
Traceback (most recent call last): File "/home/xxxx/PR/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py", line 516, in <module> boxesTemp = updateTrackers(frame) File "/home/xxxx/PR/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py", line 411, in updateTrackers tracker, box = trackersList[n] IndexError: list index out of range
Steps to Reproduce on a linux x86_64 machine
cd $HOME git clone [https://github.com/AhmadYahya97/Fully-Automated-red-light-Violation-Detection](https://github.com/AhmadYahya97/Fully-Automated-red-light-Violation-Detection) cd Fully-Automated-red-light-Violation-Detection/ python3 -m virtualenv venv source venv/bin/activate pip install numpy imutils matplotlib opencv-python opencv-contrib-python python ~/Fully-Automated-red-light-Violation-Detection/yolo_video_new.py -i ~/Fully-Automated-red-light-Violation-Detection/videos/aziz1.MP4 -o ~/Fully-Automated-red-light-Violation-Detection/videos -y ~/Fully-Automated-red-light-Violation-Detection/yolo-coco/
how you solve the first error that u mentioned?
Anyone has ran this on windows? I am having trouble running it
Hi, i'm getting the same error how to solve this:
Traceback (most recent call last):
File "yolo_video_new.py", line 516, in <module>
boxesTemp = updateTrackers(frame)
File "yolo_video_new.py", line 411, in updateTrackers
tracker, box = trackersList[nn]
IndexError: list index out of range
Hello,
While trying to run the project through below command
The program crashes with below error
After fixing this one it crashes with
Steps to Reproduce on a linux x86_64 machine