JKBox / YOLOv3-quadrangle

YOLOv3 detector with quadrangle in PyTorch
88 stars 29 forks source link

detect.py is not working #7

Open vigneshgig opened 4 years ago

vigneshgig commented 4 years ago

python3.7 detect.py -image_folder ./test/ -output_folder ./out Namespace(batch_size=1, cfg='cfg/yolov3.cfg', class_path='data/icdar.names', conf_thres=0.2, image_folder='./test/', img_size=608, nms_thres=0.1, output_folder='./out', plot_flag=True, txt_out=False, weights_path='weights/latest.pt')

when I runned the cmd it get stuck and does not show any message. so I did cltr + c to interrupt the program. got this message

python3.7 detect.py -image_folder ./test/ -output_folder ./out Namespace(batch_size=1, cfg='cfg/yolov3.cfg', class_path='data/icdar.names', conf_thres=0.2, image_folder='./test/', img_size=608, nms_thres=0.1, output_folder='./out', plot_flag=True, txt_out=False, weights_path='weights/latest.pt') ^C0 (3, 608, 608) Traceback (most recent call last): File "detect.py", line 136, in detect(opt) File "detect.py", line 63, in detect detections = non_max_suppression(pred.unsqueeze(0), 0.1, opt.nms_thres) File "/home/giuser/YOLOv3-quadrangle/utils/utils.py", line 323, in non_max_suppression ious = bbox_iou_nms(max_detections[-1].squeeze(0)[0:8], detections_class[1:][:, 0:8]) File "/home/giuser/YOLOv3-quadrangle/utils/utils.py", line 269, in bbox_iou_nms polygon2 = Polygon(box2[i,:].view(4,2)).convex_hull File "/usr/local/lib/python3.7/site-packages/shapely/geometry/polygon.py", line 242, in init self._geom, self._ndim = ret File "/usr/local/lib/python3.7/site-packages/shapely/geometry/base.py", line 257, in _geom @_geom.setter KeyboardInterrupt

thanks

anmol4210 commented 4 years ago

Hi, I was also facing the same problem. I changed the conf_thres and increased to 0.6 from 0.1. With the confidence value of 0.1 model was predicting around 51000 bounding boxes which were taking time in post processing in nms. As I changed the conf_thres to 0.6 number of bounding boxes decreased to 20.

I hope this helps..