Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.54 KB

README.md

File metadata and controls

33 lines (25 loc) · 1.54 KB

Getting Started with MaskDINO

This document provides a brief intro of the usage of MaskDINO.

Please see Getting Started with Detectron2 for full usage.

Inference Demo with Pre-trained Models

  1. Pick a model and its config file
  • for example
    • config file at /configs/gsd-s/semantic-segmentation/gem_sam_tiny_bs32_iter1w_steplr.yaml.
    • Model file GEM
  1. We provide demo.py that is able to demo builtin configs.
  2. Run it with:
cd demo/
python demo.py --config-file /configs/gsd-s/semantic-segmentation/gem_sam_tiny_bs32_iter1w_steplr.yaml \
  --input input1.jpg input2.jpg \
  [--other-options]
  --opts MODEL.WEIGHTS /path/to/model_file

The configs are made for training, therefore we need to specify MODEL.WEIGHTS to a model from model zoo for evaluation. This command will run the inference and show visualizations in an OpenCV window.

For details of the command line arguments, see demo.py -h or look at its source code to understand its behavior. Some common arguments are:

  • To run on your webcam, replace --input files with --webcam.
  • To run on a video, replace --input files with --video-input video.mp4.
  • To run on cpu, add MODEL.DEVICE cpu after --opts.
  • To save outputs to a directory (for images) or a file (for webcam or video), use --output.