yolo2-pytorch icon indicating copy to clipboard operation
yolo2-pytorch copied to clipboard

Training sample without object

Open littlekittel opened this issue 6 years ago • 0 comments

I want to manipulate input images, so that the algo thinks there is no object in the image. So I want to set: gt_boxes = [[]] classes = [[]] after loading each training sample. I am getting the following dimensions error which I can not solve. Any suggestions?

`Traceback (most recent call last): File "/home/markus/anaconda3/envs/dpatch/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, **kwds)) File "/home/markus/anaconda3/envs/dpatch/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(*args)) File "/home/markus/DPatch-master/darknet.py", line 83, in _process_batch np.ascontiguousarray(gt_boxes_b, dtype=np.float) File "/utils/bbox.pyx", line 116, in cython_bbox.bbox_ious (bbox.c:2878) File "/utils/bbox.pyx", line 140, in cython_bbox.bbox_ious_c (bbox.c:3114) IndexError: Out of bounds on buffer access (axis 1) """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/markus/DPatch-master/train.py", line 100, in bbox_pred, iou_pred, prob_pred = net(im_data, gt_boxes, gt_classes, dontcare, size_index, attack="targeted") File "/home/markus/anaconda3/envs/dpatch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/home/markus/DPatch-master/darknet.py", line 269, in forward size_index) File "/home/markus/DPatch-master/darknet.py", line 306, in _build_target for b in range(bsize))) File "/home/markus/anaconda3/envs/dpatch/lib/python3.6/multiprocessing/pool.py", line 266, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/home/markus/anaconda3/envs/dpatch/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value IndexError: Out of bounds on buffer access (axis 1)

Process finished with exit code 1`

littlekittel avatar May 03 '19 10:05 littlekittel