Open Zumbalamambo opened 7 years ago
I got the following error
detection
test/person.jpg
image
Detect from test/person.jpg
Traceback (most recent call last):
File "network/YOLO_small_tf.py", line 513, in <module>
yolo = YOLO_TF(sys.argv)
File "network/YOLO_small_tf.py", line 67, in __init__
self.detect_from_file(self.fromfile)
File "network/YOLO_small_tf.py", line 241, in detect_from_file
self.detect_from_cvmat(img)
File "network/YOLO_small_tf.py", line 179, in detect_from_cvmat
self.h_img, self.w_img, _ = img.shape
AttributeError: 'NoneType' object has no attribute 'shape'
Hi,
This code does not have real-time features. The error you are getting is the test image file cannot be found. If you execute the same command while being on the ´network´ folder it works.
Thanks it works. is it possible to make it realtime by adding cv2.VideoCapture?
Yeah, something like that should work.
Can you post the code or gist with VideoCapture? Im having hard time while trying to implement it
Can you test this code ? Thank you for the remark of this test
Replace the YOLO_tensorflow/network/YOLO_small_tf.py by this code and run with the next argument : python network/YOLO_small_tf.py -camera "name of input file or id of detection" -tofilevid "name of output file" => argument after camera : filename – name of the opened video file (eg. video.avi) or image sequence (eg. img%02d.jpg, which will read samples like img_00.jpg, img_01.jpg, img_02.jpg, ...) device – id of the opened video capturing device (i.e. a camera index). If there is a single camera connected, just pass 0. the function use for the camera : http://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html YOLO_small_tf.zip
Sweet. Can you verify that it works, and if that's the case, push the changes to master?
Thanks, Daniyal
How do I process it in realtime basis?