gliese581gg / YOLO_tensorflow

tensorflow implementation of 'YOLO : Real-Time Object Detection'
Other
1.72k stars 656 forks source link

conv weights -> ckpt have some error #13

Open haoran1062 opened 7 years ago

haoran1062 commented 7 years ago

hi,I try to convert the yolo-tiny.weights(download form YOLO),and it success to create the yolo-tiny.ckpt,but when I test that yolo-tiny.ckpt(python YOLO_tiny_tf.py): Detect from person.jpg class : aeroplane , [x,y,w,h]=[168759,167882,13921232896,8060527616], Confidence = 92084104.0 Traceback (most recent call last): File "YOLO_tiny_tf.py", line 237, in <module> main(sys.argv) File "YOLO_tiny_tf.py", line 232, in main yolo = YOLO_TF(argvs) File "YOLO_tiny_tf.py", line 30, in __init__ if self.fromfile is not None: self.detect_from_file(self.fromfile) File "YOLO_tiny_tf.py", line 124, in detect_from_file self.detect_from_cvmat(img) File "YOLO_tiny_tf.py", line 116, in detect_from_cvmat self.show_results(img,self.result) File "YOLO_tiny_tf.py", line 203, in show_results cv2.rectangle(img_cp,(x-w,y-h),(x+w,y+h),(0,255,0),2) OverflowError: signed integer is less than minimum

suryafyi commented 7 years ago

I get the same error while trying to use the converted weights on the network. Any possible workaround to this problem? @haoran1062 Were you able to find a solution?

suryafyi commented 7 years ago

I realized I was doing a huge mistake directly converting the weights with the default network configuration. The key is to change your YOLO_tensorflow according to your own cfg. Otherwise, obviously it is going to produce such junk results