/detectron2

Primary LanguagePythonApache License 2.0Apache-2.0

detectron2 for PubLayNet

Installation

build detectron2

  1. python3 setup.py install

Usage

  1. document layout analysis
  • python3 demo/demo.py --config-file configs/DLA_mask_rcnn_X_101_32x8d_FPN_3x.yaml --input test.png --output ./ --confidence-threshold 0.5 --opts MODEL.WEIGHTS model_final_trimmed.pth MODEL.DEVICE cpu
  1. object detection by faster-rcnn
  • python3 demo/demo.py --config-file configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml --input test.jpg --output ./ --opts MODEL.WEIGHTS model_final_faster_rcnn.pkl MODEL.DEVICE cpu
  1. object detection by mask-rcnn
  • python3 demo/demo.py --config-file configs/COCO-Detection/faster_rcnn_R_50_FPN_3x.yaml --input test.jpg --output ./ --opts MODEL.WEIGHTS model_final_mask_rcnn.pkl MODEL.DEVICE cpu
  1. human joint keypoint detection
  • python3 demo/demo.py --config-file configs/COCO-Keypoints/keypoint_rcnn_R_50_FPN_3x.yaml --input test.jpg --output ./ --opts MODEL.WEIGHTS model_final_keypoint_rcnn.pkl MODEL.DEVICE cpu

Reference