philip-huang / PIXOR

PyTorch Implementation of PIXOR
MIT License
285 stars 59 forks source link

pool.starmap(filter_pred, [(config, pred) for pred in predictions])ZeroDivisionError: float division by zero #10

Open chowkamlee81 opened 5 years ago

chowkamlee81 commented 5 years ago

Hi I trained your PIXOR network for 40 epoch with decrease in loss curves.

How when i execute python main.py --mode=val --name=default , the below error occurs.. Kindly help please

Traceback (most recent call last): File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/usr/lib/python3.5/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/home/Tracking/PIXOR-master/srcs/postprocess.py", line 129, in filter_pred selected_ids = non_max_suppression(corners, scores, config['nms_iou_threshold']) File "/home/Tracking/PIXOR-master/srcs/postprocess.py", line 96, in non_max_suppression iou = compute_iou(polygons[i], polygons[ixs[1:]]) File "/home/Tracking/PIXOR-master/srcs/postprocess.py", line 51, in compute_iou iou = [box.intersection(b).area / box.union(b).area for b in boxes] File "/home/Tracking/PIXOR-master/srcs/postprocess.py", line 51, in iou = [box.intersection(b).area / box.union(b).area for b in boxes] ZeroDivisionError: float division by zero

HenryJunW commented 4 years ago

Did you fix it? Got the same problem.

AndreLYL commented 4 years ago

@HenryJunW @chowkamlee81 did you find the reason? I also meet this problem. According to the definition of IOU, I think that the divisor cannot be 0

caimumuxin commented 3 years ago

I can't understand why intersection.area/union.area have this problem too.Did you fix it?