- Pick a model and its config file from. For example,
configs/ade20k/swin/oneformer_swin_large_IN21k_384_bs16_160k.yaml
. - We provide
demo.py
that is able to demo builtin configs. - You need to specify the
task
token value during inference, The outputs will be saved accordingly in the specifiedOUTPUT_DIR
:panoptic
: Panoptic, Semantic and Instance Predictions when the value oftask
token ispanoptic
.instance
: Instance Predictions when the value oftask
token isinstance
.semantic
: Semantic Predictions when the value oftask
token issemantic
.-
Note: You can change the outputs to be saved on line 60 in predictor.py.
export task=panoptic
python demo.py --config-file ../configs/ade20k/swin/oneformer_swin_large_bs16_160k.yaml \
--input <path-to-images> \
--output <output-path> \
--task $task \
--opts MODEL.IS_TRAIN False MODEL.IS_DEMO True MODEL.WEIGHTS <path-to-checkpoint>
For details of the command line arguments, see demo.py -h
or look at its source code
to understand its behavior.