facebookresearch / maskrcnn-benchmark

Fast, modular reference implementation of Instance Segmentation and Object Detection algorithms in PyTorch.
MIT License
9.29k stars 2.5k forks source link

AttributeError: STAGE_WITH_DCN #968

Open YuhanLiu11 opened 5 years ago

YuhanLiu11 commented 5 years ago

❓ Questions and Help

Hi! I was able to train the model with customized datasets but recently when I tried to train the model with pretrained Mask RCNN Res101 weights with last layers deleted, the error "Traceback (most recent call last): File "tools/train_net.py", line 179, in main() File "tools/train_net.py", line 172, in main model = train(cfg, args.local_rank, args.distributed) File "tools/train_net.py", line 35, in train model = build_detection_model(cfg) File "/srv/home/yliu/newMask/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/detectors.py", line 10, in build_detection_model return meta_arch(cfg) File "/srv/home/yliu/newMask/maskrcnn-benchmark/maskrcnn_benchmark/modeling/detector/generalized_rcnn.py", line 29, in init self.backbone = build_backbone(cfg) File "/srv/home/yliu/newMask/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/backbone.py", line 79, in build_backbone return registry.BACKBONEScfg.MODEL.BACKBONE.CONV_BODY File "/srv/home/yliu/newMask/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/backbone.py", line 27, in build_resnet_fpn_backbone body = resnet.ResNet(cfg) File "/srv/home/yliu/newMask/maskrcnn-benchmark/maskrcnn_benchmark/modeling/backbone/resnet.py", line 110, in init stage_with_dcn = cfg.MODEL.RESNETS.STAGE_WITH_DCN[stage_spec.index -1] File "/srv/home/yliu/anaconda3/envs/mask/lib/python3.6/site-packages/yacs/config.py", line 141, in getattr raise AttributeError(name) AttributeError: STAGE_WITH_DCN" occurs. Any ideas on what's the problem?

Thanks a lot for your help!

yx3266 commented 4 years ago

Hello, do you know how to solve the error? I have the same problem.

yx3266 commented 4 years ago

@YuhanLiu11

Ericwyl commented 4 years ago

I have the same problem.