globals:
  repo_url: https://github.com/open-mmlab/mmsegmentation/tree/main
  codebase_dir: ../mmsegmentation
  checkpoint_force_download: False
  images:
    img_leftImg8bit: &img_leftImg8bit ../mmsegmentation/tests/data/pseudo_cityscapes_dataset/leftImg8bit/val/frankfurt/frankfurt_000000_000294_leftImg8bit.png
    img_loveda_0: &img_loveda_0 ../mmsegmentation/tests/data/pseudo_loveda_dataset/img_dir/0.png

  metric_info: &metric_info
    mIoU: # named after metafile.Results.Metrics
      metric_key: mIoU # eval OrderedDict key name
      tolerance: 1 # metric ±n%
  convert_image: &convert_image
    input_img: *img_leftImg8bit
    test_img: *img_loveda_0
  backend_test: &default_backend_test True
  sdk:
    sdk_dynamic: &sdk_dynamic configs/mmseg/segmentation_sdk_dynamic.py

onnxruntime:
  pipeline_ort_static_fp32: &pipeline_ort_static_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_onnxruntime_static-1024x2048.py

  pipeline_ort_static_fp32_512x512: &pipeline_ort_static_fp32_512x512
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_onnxruntime_static-512x512.py

  pipeline_ort_dynamic_fp32: &pipeline_ort_dynamic_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_onnxruntime_dynamic.py

tensorrt:
  pipeline_trt_static_fp32: &pipeline_trt_static_fp32
    convert_image: *convert_image
    backend_test: *default_backend_test
    sdk_config: *sdk_dynamic
    deploy_config: configs/mmseg/segmentation_tensorrt_static-1024x2048.py

  pipeline_trt_static_fp32_512x512: &pipeline_trt_static_fp32_512x512
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_tensorrt_static-512x512.py

  pipeline_trt_static_fp16: &pipeline_trt_static_fp16
    convert_image: *convert_image
    backend_test: *default_backend_test
    sdk_config: *sdk_dynamic
    deploy_config: configs/mmseg/segmentation_tensorrt-fp16_static-1024x2048.py

  pipeline_trt_static_int8: &pipeline_trt_static_int8
    convert_image: *convert_image
    backend_test: *default_backend_test
    sdk_config: *sdk_dynamic
    deploy_config: configs/mmseg/segmentation_tensorrt-int8_static-1024x2048.py

  pipeline_trt_static_fp16_512x512: &pipeline_trt_static_fp16_512x512
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_tensorrt-fp16_static-512x512.py

  pipeline_trt_dynamic_fp32: &pipeline_trt_dynamic_fp32
    convert_image: *convert_image
    backend_test: *default_backend_test
    sdk_config: *sdk_dynamic
    deploy_config: configs/mmseg/segmentation_tensorrt_dynamic-512x1024-2048x2048.py

  pipeline_trt_dynamic_fp16: &pipeline_trt_dynamic_fp16
    convert_image: *convert_image
    backend_test: *default_backend_test
    sdk_config: *sdk_dynamic
    deploy_config: configs/mmseg/segmentation_tensorrt-fp16_dynamic-512x1024-2048x2048.py

  pipeline_trt_dynamic_int8: &pipeline_trt_dynamic_int8
    convert_image: *convert_image
    backend_test: *default_backend_test
    sdk_config: *sdk_dynamic
    deploy_config: configs/mmseg/segmentation_tensorrt-int8_dynamic-512x1024-2048x2048.py

openvino:
  pipeline_openvino_dynamic_fp32: &pipeline_openvino_dynamic_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_openvino_dynamic-1024x2048.py

  pipeline_openvino_static_fp32: &pipeline_openvino_static_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_openvino_static-1024x2048.py

  pipeline_openvino_static_fp32_512x512: &pipeline_openvino_static_fp32_512x512
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_openvino_static-512x512.py

ncnn:
  pipeline_ncnn_static_fp32: &pipeline_ncnn_static_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_ncnn_static-512x512.py

pplnn:
  pipeline_pplnn_dynamic_fp32: &pipeline_pplnn_dynamic_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_pplnn_dynamic-1024x2048.py

  pipeline_pplnn_static_fp32: &pipeline_pplnn_static_fp32
    convert_image: *convert_image
    backend_test: False
    deploy_config: configs/mmseg/segmentation_pplnn_static-1024x2048.py

torchscript:
  pipeline_ts_fp32: &pipeline_ts_fp32
    convert_image: *convert_image
    backend_test: True
    deploy_config: configs/mmseg/segmentation_torchscript.py


models:
  - name: FCN
    metafile: configs/fcn/metafile.yaml
    model_configs:
      - configs/fcn/fcn_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ts_fp32
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_pplnn_dynamic_fp32
      - *pipeline_openvino_dynamic_fp32

  - name: PSPNet
    metafile: configs/pspnet/metafile.yaml
    model_configs:
      - configs/pspnet/pspnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ts_fp32
      - *pipeline_ort_static_fp32
      - *pipeline_trt_static_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_pplnn_static_fp32
      - *pipeline_openvino_static_fp32

  - name: deeplabv3
    metafile: configs/deeplabv3/metafile.yaml
    model_configs:
      - configs/deeplabv3/deeplabv3_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ts_fp32
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_pplnn_dynamic_fp32
      - *pipeline_openvino_dynamic_fp32

  - name: deeplabv3+
    metafile: configs/deeplabv3plus/metafile.yaml
    model_configs:
      - configs/deeplabv3plus/deeplabv3plus_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ts_fp32
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_pplnn_dynamic_fp32
      - *pipeline_openvino_dynamic_fp32

  - name: Fast-SCNN
    metafile: configs/fastscnn/metafile.yaml
    model_configs:
      - configs/fastscnn/fast_scnn_8xb4-160k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ts_fp32
      - *pipeline_ort_static_fp32
      - *pipeline_trt_static_fp16
      - *pipeline_pplnn_static_fp32
      - *pipeline_openvino_static_fp32

  - name: UNet
    metafile: configs/unet/metafile.yaml
    model_configs:
      - configs/unet/unet-s5-d16_fcn_4xb4-160k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ts_fp32
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_pplnn_dynamic_fp32

  - name: ANN
    metafile: configs/ann/metafile.yaml
    model_configs:
      - configs/ann/ann_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_static_fp32
      - *pipeline_trt_static_fp16
      - *pipeline_ts_fp32

  - name: APCNet
    metafile: configs/apcnet/metafile.yaml
    model_configs:
      - configs/apcnet/apcnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_static_fp32
      - *pipeline_trt_static_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_ts_fp32

  - name: BiSeNetV1
    metafile: configs/bisenetv1/metafile.yaml
    model_configs:
      - configs/bisenetv1/bisenetv1_r18-d32_4xb4-160k_cityscapes-1024x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: BiSeNetV2
    metafile: configs/bisenetv2/metafile.yaml
    model_configs:
      - configs/bisenetv2/bisenetv2_fcn_4xb4-160k_cityscapes-1024x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: CGNet
    metafile: configs/cgnet/metafile.yaml
    model_configs:
      - configs/cgnet/cgnet_fcn_4xb8-60k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: EMANet
    metafile: configs/emanet/metafile.yaml
    model_configs:
      - configs/emanet/emanet_r50-d8_4xb2-80k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: EncNet
    metafile: configs/encnet/metafile.yaml
    model_configs:
      - configs/encnet/encnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: ERFNet
    metafile: configs/erfnet/metafile.yaml
    model_configs:
      - configs/erfnet/erfnet_fcn_4xb4-160k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp32
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: FastFCN
    metafile: configs/fastfcn/metafile.yaml
    model_configs:
      - configs/fastfcn/fastfcn_r50-d32_jpu_aspp_4xb2-80k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: GCNet
    metafile: configs/gcnet/metafile.yaml
    model_configs:
      - configs/gcnet/gcnet_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ts_fp32

  - name: ICNet
    metafile: configs/icnet/metafile.yaml
    model_configs:
      - configs/icnet/icnet_r18-d8_4xb2-80k_cityscapes-832x832.py
    pipelines:
      - *pipeline_ort_static_fp32
      - *pipeline_trt_static_fp16
      - *pipeline_openvino_static_fp32
      - *pipeline_ts_fp32

  - name: ISANet
    metafile: configs/isanet/metafile.yaml
    model_configs:
      - configs/isanet/isanet_r50-d8_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_static_fp32_512x512
      - *pipeline_trt_static_fp16_512x512
      - *pipeline_openvino_static_fp32_512x512

  - name: OCRNet
    metafile: configs/ocrnet/metafile.yaml
    model_configs:
      - configs/ocrnet/ocrnet_hr18s_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp32
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: PointRend
    metafile: configs/point_rend/metafile.yaml
    model_configs:
      - configs/point_rend/pointrend_r50_4xb2-80k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_static_fp32_512x512
      - *pipeline_trt_static_fp16
      - *pipeline_ts_fp32

  - name: Semantic FPN
    metafile: configs/sem_fpn/metafile.yaml
    model_configs:
      - configs/sem_fpn/fpn_r50_4xb2-80k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp32
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: STDC
    metafile: configs/stdc/metafile.yaml
    model_configs:
      - configs/stdc/stdc1_in1k-pre_4xb12-80k_cityscapes-512x1024.py
      - configs/stdc/stdc2_in1k-pre_4xb12-80k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_dynamic_fp32
      - *pipeline_trt_dynamic_fp16
      - *pipeline_ncnn_static_fp32
      - *pipeline_openvino_dynamic_fp32
      - *pipeline_ts_fp32

  - name: UPerNet
    metafile: configs/upernet/metafile.yaml
    model_configs:
      - configs/upernet/upernet_r50_4xb2-40k_cityscapes-512x1024.py
    pipelines:
      - *pipeline_ort_static_fp32
      - *pipeline_trt_static_fp16
  - name: Segmenter
    metafile: configs/segmenter/metafile.yaml
    model_configs:
      - configs/segmenter/segmenter_vit-s_fcn_8xb1-160k_ade20k-512x512.py
    pipelines:
      - *pipeline_ort_static_fp32_512x512
      - *pipeline_trt_static_fp32_512x512
      - *pipeline_openvino_static_fp32_512x512
      - *pipeline_ncnn_static_fp32
