I'm getting the following error when I try to set MODEL.MASK_ON as True.
Traceback (most recent call last):
File "tools/train_net.py", line 132, in
main()
File "tools/train_net.py", line 114, in main
checkpoints = detectron.utils.train.train_model()
File "/home/ubuntu/detectron/detectron/utils/train.py", line 53, in train_model
model, weights_file, start_iter, checkpoints, output_dir = create_model()
File "/home/ubuntu/detectron/detectron/utils/train.py", line 145, in create_model
model = model_builder.create(cfg.MODEL.TYPE, train=True)
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 124, in create
return get_func(model_type_func)(model)
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 89, in generalized_rcnn
freeze_conv_body=cfg.TRAIN.FREEZE_CONV_BODY
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 229, in build_generic_detection_model
optim.build_data_parallel_model(model, _single_gpu_build_func)
File "/home/ubuntu/detectron/detectron/modeling/optimizer.py", line 40, in build_data_parallel_model
all_loss_gradients = _build_forward_graph(model, single_gpu_build_func)
File "/home/ubuntu/detectron/detectron/modeling/optimizer.py", line 63, in _build_forward_graph
all_loss_gradients.update(single_gpu_build_func(model))
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 210, in _single_gpu_build_func
spatial_scale_conv
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 272, in _add_roi_mask_head
model, blob_in, dim_in, spatial_scale_in
TypeError: 'NoneType' object is not callable
This is my cfg file adapted from "e2e_faster_rcnn_R-50-FPN_1x.yaml":
I'm getting the following error when I try to set MODEL.MASK_ON as True.
Traceback (most recent call last): File "tools/train_net.py", line 132, in
main()
File "tools/train_net.py", line 114, in main
checkpoints = detectron.utils.train.train_model()
File "/home/ubuntu/detectron/detectron/utils/train.py", line 53, in train_model
model, weights_file, start_iter, checkpoints, output_dir = create_model()
File "/home/ubuntu/detectron/detectron/utils/train.py", line 145, in create_model
model = model_builder.create(cfg.MODEL.TYPE, train=True)
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 124, in create
return get_func(model_type_func)(model)
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 89, in generalized_rcnn
freeze_conv_body=cfg.TRAIN.FREEZE_CONV_BODY
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 229, in build_generic_detection_model
optim.build_data_parallel_model(model, _single_gpu_build_func)
File "/home/ubuntu/detectron/detectron/modeling/optimizer.py", line 40, in build_data_parallel_model
all_loss_gradients = _build_forward_graph(model, single_gpu_build_func)
File "/home/ubuntu/detectron/detectron/modeling/optimizer.py", line 63, in _build_forward_graph
all_loss_gradients.update(single_gpu_build_func(model))
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 210, in _single_gpu_build_func
spatial_scale_conv
File "/home/ubuntu/detectron/detectron/modeling/model_builder.py", line 272, in _add_roi_mask_head
model, blob_in, dim_in, spatial_scale_in
TypeError: 'NoneType' object is not callable
This is my cfg file adapted from "e2e_faster_rcnn_R-50-FPN_1x.yaml":
MODEL: TYPE: generalized_rcnn CONV_BODY: FPN.add_fpn_ResNet50_conv5_body NUM_CLASSES: 14 FASTER_RCNN: True MASK_ON: True NUM_GPUS: 4 SOLVER: WEIGHT_DECAY: 0.00001 LR_POLICY: steps_with_decay BASE_LR: 0.02 GAMMA: 0.1 MAX_ITER: 290000 STEPS: [0, 192000, 265000] FPN: FPN_ON: True MULTILEVEL_ROIS: True MULTILEVEL_RPN: True FAST_RCNN: ROI_BOX_HEAD: fast_rcnn_heads.add_roi_2mlp_head ROI_XFORM_METHOD: RoIAlign ROI_XFORM_RESOLUTION: 7 ROI_XFORM_SAMPLING_RATIO: 2 TRAIN: WEIGHTS: https://dl.fbaipublicfiles.com/detectron/ImageNetPretrained/MSRA/R-50.pkl DATASETS: ('deep_fashion_2_train',) SCALES: (800,) MAX_SIZE: 1333 BATCH_SIZE_PER_IM: 512 RPN_PRE_NMS_TOP_N: 2000 # Per FPN level TEST: DATASETS: ('deep_fashion_2_val',) SCALE: 800 MAX_SIZE: 1333 NMS: 0.5 RPN_PRE_NMS_TOP_N: 1000 # Per FPN level RPN_POST_NMS_TOP_N: 1000 OUTPUT_DIR: .
System information
python --version
output: 3.7.3