nqanh / affordance-net

AffordanceNet - Multiclass Instance Segmentation Framework - ICRA 2018
Other
123 stars 54 forks source link

Can't train pascal_voc #27

Open litingsjj opened 6 years ago

litingsjj commented 6 years ago

Hi, thanks for your codes! But when I run sh experiments/scripts/faster_rcnn_end2end.sh 1 VGG16 pascal_voc I got a error : Traceback (most recent call last): File "./tools/train_net.py", line 109, in <module> imdb, roidb = combined_roidb(args.imdb_name) File "./tools/train_net.py", line 74, in combined_roidb roidbs = [get_roidb(s) for s in imdb_names.split('+')] File "./tools/train_net.py", line 67, in get_roidb roidb = get_training_roidb(imdb) File "/tools/../lib/fast_rcnn/train.py", line 128, in get_training_roidb imdb.append_flipped_images() File "/tools/../lib/datasets/imdb.py", line 116, in append_flipped_images assert (boxes[:, 2] >= boxes[:, 0]).all() AssertionError

nqanh commented 6 years ago

Do you train on Pascal VOC dataset (not IIT-AFF)? If you train on a different dataset, then you have to prepare the input in the right way. Please see Readme file for details.

litingsjj commented 6 years ago

@nqanh Yes, I train on Pascal_voc dataset, but I have no problem when I train faster rcnn or rfcn with this dataset. So the input prepared a right way, I think.

thanhtoando commented 6 years ago

Hi, Faster RCNN and RFCN are only for detection. If you want to train with AffordanceNet, you should prepare the groundtruth mask for the segmentation. Please read the readme to create mask groundtruth.

litingsjj commented 6 years ago

@nqanh Hi, I solved this problem. But still have proble with training.

Traceback (most recent call last): File "./tools/train_net.py", line 117, in max_iters=args.max_iters) File "AffordanceNet/tools/../lib/fast_rcnn/train.py", line 172, in train_net model_paths = sw.train_model(max_iters) File "/AffordanceNet/tools/../lib/fast_rcnn/train.py", line 111, in train_model self.solver.step(1) File "/AffordanceNet/tools/../lib/rpn/proposal_target_layer.py", line 106, in forward rois_per_image, self._num_classes) #bbox_targets_oris: original gt of rois File "/AffordanceNet/tools/../lib/rpn/proposal_target_layer.py", line 606, in _sample_rois _get_bbox_regression_labels(bbox_target_data, num_classes) File "/AffordanceNet/tools/../lib/rpn/proposal_target_layer.py", line 532, in _get_bbox_regression_labels bbox_targets[ind, start:end] = bbox_target_data[ind, 1:] #gan gia tri tai class tuong ung la bbox_target_data, con lai la so 0 ValueError: could not broadcast input array from shape (4) into shape (0)

I think I haven't input top: 'seg_mask_inds'. And I have create .sm file, but how should I deal with it? Is put it into cache folder? It doesn't work. Can you help me? Thanks!