tusen-ai / simpledet

A Simple and Versatile Framework for Object Detection and Instance Recognition
Apache License 2.0
3.08k stars 488 forks source link

training issue using cascade_r101v1_fpn_1x.py config file. #271

Closed dragon515 closed 4 years ago

dragon515 commented 4 years ago

I use costom dataset, and change the class number, the gpu index parameters.

python detection_train.py --config config_cancer/cascade_r101v1_fpn_1x.py Traceback (most recent call last): File "detection_train.py", line 307, in train_net(parse_args()) File "detection_train.py", line 21, in train_net transform, data_name, label_name, metric_list = config.get_config(is_train=True) File "/home/www/simpledet/config_cancer/cascade_r101v1_fpn_1x.py", line 198, in get_config bbox_head_3rd File "/home/www/simpledet/models/cascade_rcnn/builder.py", line 25, in get_train_symbol rpn_loss = rpn_head.get_loss(rpn_feat, gt_bbox, im_info) File "/home/www/simpledet/models/FPN/builder.py", line 159, in get_loss image_anchor = p.anchor_assign.image_anchor AttributeError: 'NoneType' object has no attribute 'image_anchor

RogerChern commented 4 years ago

@huangzehao #224 caused this.

huangzehao commented 4 years ago

@dragon515 Hotfix: add the following codes in class RpnParam will solve this issue

class anchor_assign:
    image_anchor = 256
huangzehao commented 4 years ago

A PR will be created to solve this issue. The config files of fpn based cascade rcnn will be updated. Feel free to reopen the issue if it persists. @dragon515