language: cn
model_unique_abbr: U-Net_CPU_pytorch
version: 1.0
identification:
  docker_image_name: unet_cpu:1.0.5-cpu
  model_name: U型卷积网络（CPU）
  semantic: U-shaped convolutional network
  description: 以监督学习方式对图像进行语义分割，实现对图像中对象的识别与分类
  category_application: 预测型
  category_data:
  - 遥感影像数据
  - 图像数据
  keywords:
  - 语义分割
  - 图像分类
  - 对象识别
parameter_info:
  parameters:
  - arg_name: i
    param_type: input_data
    name: 图像路径
    description: 训练的图像路径,训练图像格式为png
    data_type: png
    data_semantic: Training image path

  - arg_name: l
    param_type: input_data
    name: 标签路径
    description: 训练的标签路径,标签数据格式为npy
    data_type: csv
    data_semantic: Training label path

  - arg_name: t
    param_type: input_data
    name: 测试数据路径
    description: 用来测试的数据路径,测试图像格式为png
    data_type: png
    data_semantic: Data path for testing

  - arg_name: r
    param_type: output_data
    name: 训练结果
    description: 训练结果文件
    data_type: jpeg
    data_semantic: Training result

  - arg_name: m
    param_type: output_data
    name: 训练好的网络
    description: 训练好的网络
    data_type: str
    data_semantic: Trained network

  - arg_name: a
    param_type: output_data
    name: 精度文件路径
    description: 精度文件的输出路径,精度文件为txt格式
    data_type: str
    data_semantic: Precision file path

  - arg_name: base_lr
    param_type: param
    name: 学习率
    description: 决定目标函数能否收敛到局部最小值以及何时收敛到最小值，可根据需求取值，取值范围（0，1）
    is_required: false
    data_type: float
    data_semantic: Learning rate
    specification:
      default: 0.0001
      range:
      - (0,1)

  - arg_name: momentum
    param_type: param
    name: 动量因子
    description: 动量因子影响着梯度下降到最优值的速度待聚类的空间点数据，可根据需求取值，取值范围（0，2）
    is_required: false
    data_type: float
    data_semantic: Momentum factor
    specification:
      default: 0.9
      range:
      - (0,2)

  - arg_name: w
    param_type: param
    name: 重量衰减
    description: 权重衰减正则项，防止过拟合，可根据需求取值，取值范围（0，1）
    is_required: false
    data_type: float
    data_semantic: Weight decay
    specification:
      default: 0.0005
      range:
      - (0,1)

  - arg_name: s
    param_type: param
    name: 学习率衰减步长
    description: 学习率保持衰减的步数范围权重衰减正则项，防止过拟合，可根据需求取值，取值范围[1,max_steps]
    is_required: false
    data_type: int
    data_semantic: Learning rate decay step size
    specification:
      default: 100
      range:
      - "[1,max_steps]"

  - arg_name: g
    param_type: param
    name: 伽玛
    description: 学习率衰减的乘法因子,可根据需求取值，取值范围（0，1）
    is_required: false
    data_type: float
    data_semantic: Multiplicative factor for learning rate decay
    specification:
      default: 0.1
      range:
      - (0,1)

  - arg_name: input_size
    param_type: param
    name: 网络输入大小
    description: 网络输入大小
    is_required: false
    data_type: str
    data_semantic: Network input size
    specification:
      default: '512, 512'

  - arg_name: c
    param_type: param
    name: 类别
    description: 分割目标类别数,可根据需求取值，取值范围[2,]
    is_required: false
    data_type: int
    data_semantic: Number of segmentation target categories
    specification:
      default: 2
      range:
      - "[2,]"

  - arg_name: b
    param_type: param
    name: 批量大小
    description: 每批加载多少个样本，根据数据集的大小和样本数目确定,可根据需求取值，取值范围[1,]
    is_required: false
    data_type: int
    data_semantic: Batch size
    specification:
      default: 1
      range:
      - "[1,]"

  - arg_name: max_steps
    param_type: param
    name: 最大步数
    description: 最大训练步数,可根据需求取值，取值范围[200,]
    is_required: false
    data_type: int
    data_semantic: Max steps
    specification:
      default: 200
      range:
      - "[200,]"

  - arg_name: save_steps
    param_type: param
    name: 保存步骤
    description: 模型保存间隔步数,可根据需求取值，取值范围[1,max_steps]
    is_required: false
    data_type: int
    data_semantic: Save steps
    specification:
      default: 100
      range:
      - "[1,max_steps]"

  - arg_name: print_steps
    param_type: param
    name: 打印步骤
    description: 信息打印间隔步数,可根据需求取值，取值范围[1,max_steps]
    is_required: false
    data_type: int
    data_semantic: Print steps
    specification:
      default: 100
      range:
      - "[1,max_steps]"

  - arg_name: mean
    param_type: param
    name: 均值
    description: 每个通道的平均值,可根据需求取值，取值范围[0,1]
    is_required: false
    data_type: str
    data_semantic: Average per channel
    specification:
      default: 0.5
      range:
      - "[0,1]"

  - arg_name: std
    param_type: param
    name: 标准差
    description: 每个通道的标准偏差序列,可根据需求取值，取值范围[0,1]
    is_required: false
    data_type: str
    data_semantic: Standard deviation
    specification:
      default: 0.5
      range:
      - "[0,1]"

application:
  domain: 图像语义分割
  objective: 依据先验信息对影像数据分割成具有一定语义含义的区域块，并识别出每个区域块的语义类别。
  link_models:
    alternative:
    - U-Net_GPU_pytorch
  mechanism: 对输入影像数据集使用编码器进行深度特征提取，再使用解码器从特征中获取各区域块的空间和语义信息。
operation:
  usage: 在命令行中用代码指定最大步数,图像路径，标签路径,测试数据路径,训练结果路径路径,完成算法运行。
  exec_example:
  - docker run -v $(pwd):/data unet_cpu:1.0.5-cpu -max_steps /2000 [-i <png>] [-l <csv>] [-t <png>] [-r <csv>]
  output_display:
  - 将预测得到的图像文件显示在前端页面中
  license:
  - BSD-3-Clause
  - MIT
  - HPND
technique:
  language:
  - Python
  os:
  - Linux
  - Windows
  hardware:
  - CPU
  dependencies:
  - name: python
    version: 3.8
  - name: numpy
    version: 1.18.5
  - name: opencv-contrib-python
    version: 4.1.2.30
  - name: pillow
    version: 7.2.0
  - name: tqdm
    version: 4.47.0
  - name: torch
    version: 1.6.0+cpu
  - name: torchvision
    version: 0.7.0+cpu
source:
  maintainer: Tianming Zhao
  organization: Beijing University of Civil Engineering and Architecture
  contact: 2108570020097@stu.bucea.edu.cn
  references:
  - Ronneberger, O., Fischer, P., Brox, T. 2015. U-net:Convolutional networks for biomedical image segmentation. International Conference on Medical Image Computing and Computer-Assisted Intervention, 234–241.
