image file (576x384)
image file (576x384)
--task=segmentation
--task=monodepth
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
If you run by onnxruntime instead of ailia, you use --onnx
option.
This sample has monodepth and segmentation task. You have to add --task=segmentation
in the case of running segmentation task and --task=monodepth
in the case of running monodepth task.
Below is example of running segmentation task by cpu.
$ python3 dense_prediction_transformers.py -i input.jpg -s output.png --task=segmentation -e 0
$ python3 dense_prediction_transformers.py -i input.jpg -s output.png--task=monodepth -e 0
After running this program, the predicted image are saved in output.png.
PyTorch 1.8.1
ONNX opset = 11
dpt_hybrid_monodepth.onnx.prototxt
dpt_hybrid_segmentation.onnx.prototxt