facebookresearch / Detectron

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

Using only bbox detection #140

Closed EgorAntonovich closed 6 years ago

EgorAntonovich commented 6 years ago

I know that caffe has opportunity discarding layers, but i don't know how to make it on caffe2 in detectron I need only bbox detection in my experiments, may be who know how to discard leyer which respond of mask detection?

uefall commented 6 years ago

Hello @EgorAntonovich:

You can follow those config yaml files which's name without "mask_rcnn" or "keypoint_rcnn" keyword,their config have no MRCNN or KRCNN part, while creating your model, it will no add ROI_MASK_HEAD or ROI_KEYPOINTS_HEAD to your detect backbone and becomes a bbox detect only model.

ir413 commented 6 years ago

@EgorAntonovich: to compute only the bounding boxes you can use one of the Fast/Faster R-CNN or RetinaNet models from the Model Zoo.

For example, you can run e2e Faster R-CNN with the default ResNet-101 config using:

python2 tools/infer_simple.py \
   --cfg configs/12_2017_baselines/e2e_faster_rcnn_R-101-FPN_2x.yaml \
   --output-dir /tmp/detectron-visualizations \
   --image-ext jpg \
   --wts https://s3-us-west-2.amazonaws.com/detectron/35857952/12_2017_baselines/e2e_faster_rcnn_R-101-FPN_2x.yaml.01_39_49.JPwJDh92/output/train/coco_2014_train:coco_2014_valminusminival/generalized_rcnn/model_final.pkl \
  demo