longcw / faster_rcnn_pytorch

Faster RCNN with PyTorch
MIT License
1.71k stars 466 forks source link

AssertionError: Single batch only #16

Closed abhiML closed 7 years ago

abhiML commented 7 years ago

<bound method pascal_voc.default_roidb of <faster_rcnn.datasets.pascal_voc.pascal_voc object at 0x7fd20fbaf0d0>> voc_2007_trainval gt roidb loaded from /home/ubuntu/faster_rcnn_pytorch/data/cache/voc_2007_trainval_gt_roidb.pkl Traceback (most recent call last): File "train.py", line 115, in blobs = data_layer.forward() File "/home/ubuntu/faster_rcnn_pytorch/faster_rcnn/roi_data_layer/layer.py", line 74, in forward blobs = self._get_next_minibatch() File "/home/ubuntu/faster_rcnn_pytorch/faster_rcnn/roi_data_layer/layer.py", line 70, in _get_next_minibatch return get_minibatch(minibatch_db, self._num_classes) File "/home/ubuntu/faster_rcnn_pytorch/faster_rcnn/roi_data_layer/minibatch.py", line 39, in get_minibatch assert len(im_scales) == 1, "Single batch only" AssertionError: Single batch only ubuntu@ip-172-31-26-170:~/faster_rcnn_pytorch$

abhiML commented 7 years ago

@longcw any help?

acgtyrant commented 7 years ago

Check your train.py, is it contains cfg_from_file('experiments/cfgs/faster_rcnn_end2end.yml')?

If so, check your yml file, is its IMS_PER_BATCH 1?

abhiML commented 7 years ago

Hey @acgtyrant could you tell me where the function detect() is being called and what is its use? you will find it in faster_rcnn.py

acgtyrant commented 7 years ago

https://github.com/longcw/faster_rcnn_pytorch/blob/master/demo.py#L30

Just as its literally means.

abhiML commented 7 years ago

Thanks. Also where are the coordinates of the final pred boxes evaluated during training?

acgtyrant commented 7 years ago

Read the source code by yourself.

blitu12345 commented 7 years ago

The reg layer in RPN has 4k outputs encoding the coordinates of k boxes.(from the paper) So what actually this layer predicts?Is it predicting the 4 coordinates of boundary boxes directly or predicting the 4 parameterized coordinates of the bounding box.

@acgtyrant Any help is appreciated.

acgtyrant commented 7 years ago

@blitu12345 I think it is 4 parameterized coordinates of the bounding box.

brisker commented 6 years ago

@acgtyrant @longcw
does this project support batch_size larger than 1?

acgtyrant commented 6 years ago

@brisker No.

brisker commented 6 years ago

@acgtyrant does the original python implementation https://github.com/rbgirshick/py-faster-rcnn support batch_size>1 ? if Yes, why does this project do not support?

acgtyrant commented 6 years ago

@brisker I think it does. This project is bad.

ParanoidW commented 6 years ago

@abhiML How did you solve the problem in the end? Same error occurs to me now.