facebookresearch / Detectron

FAIR's research platform for object detection research, implementing popular algorithms like Mask R-CNN and RetinaNet.
Apache License 2.0
26.25k stars 5.45k forks source link

Increasing segmentation mask resolution #1004

Open predrag12 opened 4 years ago

predrag12 commented 4 years ago

Hello,

Trying to train Detectron1 Mask R-CNN with R-50-FPN backbone at regular 1333x800 resolution but higher segmentation masks resolution, higher than 28. Training at defaults works fine, but modifying configuration in yaml file MRCNN section, produces either

[E net_async_base.cc:377] [enforce fail at sigmoid_cross_entropy_loss_op.cu:81] X.size() == T.size(). Logit and target must have the same size(636608 vs. 159152) or RuntimeError: [enforce fail at context_gpu.cu:415] error == cudaSuccess. 2 vs 0. Error at: /tmp/pytorch/caffe2/core/context_gpu.cu:415: out of memory even for batch 1.

Could you provide a pointer to description of usage of following fields or pairs of fields that need to be modified together in order to increase the mask resolution?

Thanks.

MRCNN: CONV_INIT: MSRAFill DILATION: 1 DIM_REDUCED: 256 RESOLUTION: 28 ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs ROI_XFORM_METHOD: RoIAlign ROI_XFORM_RESOLUTION: 14 ROI_XFORM_SAMPLING_RATIO: 2 THRESH_BINARIZE: 0.5 UPSAMPLE_RATIO: 1 USE_FC_OUTPUT: false WEIGHT_LOSS_MASK: 1.0

JulietteMoreau commented 3 years ago

Hi, I encounter the same problem, so I wanted to know if you found the solution as it was more than one year ago... Thanks.