# Metadata for U-VGG_Net_pytorch
language: cn
model_unique_abbr: u-vgg_net_pytorch
version: 1.0
identification:
  docker_image_name: vgg_cpu:1.0.5-cpu
  model_name: vgg_cpu
  semantic: u-shaped convolutional network
  description: 是一类包含卷积计算且具有深度结构的前馈神经网络
  category_application: 预测型
  category_data:
    - 图像数据
  keywords:
    - 语义分割
    - 图像分类
    - 对象识别
parameter_info:
  parameters:
  - arg_name: -data-path
    param_type: input_data
    name: 数据根目录
    description: 存储训练和验证数据的根目录,训练和验证数据均为jpg格式
    data_type: str
    data_semantic: data root directory
    specification:
      default: "./flower_data"

  - arg_name: -image_path
    param_type: input_data
    name: 测试数据路径
    description: 存储测试数据图片的路径，测试数据为jpg格式
    data_type: str
    data_semantic: data root directory
    specification:
      default: "./flower_data/flower_photos/tulips/10791227_7168491604.jpg"

  - arg_name: -num-classes
    param_type: param
    name: 类别数
    description: 检测目标类别数（不包含背景）,默认值为5
    is_required: false
    data_type: int
    data_semantic: number of classes
    specification:
      default: 5

  - arg_name: -epochs
    param_type: param
    name: 迭代次数
    description: 模型训练的总迭代周期，可根据需求取值，取值范围[1,）
    is_required: false
    data_type: int
    data_semantic: number of epochs
    specification:
      default: 2
      range:
        - \[1,)

  - arg_name: -lr
    param_type: param
    name: 学习率
    description: 优化器的学习率，可根据需求取值，取值范围（0,1）
    is_required: false
    data_type: float
    data_semantic: learning rate
    specification:
      default: 0.02
      range:
        - (0,1)

  - arg_name: -momentum
    param_type: param
    name: 动量
    description: SGD的momentum参数，可根据需求取值，取值范围（0,2）
    is_required: false
    data_type: float
    data_semantic: momentum for sgd
    specification:
      default: 0.9
      range:
        - (0,2)

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

  - arg_name: -batch-size
    param_type: param
    name: 批次大小
    description: 每个批次处理的图像数量，可根据需求取值，取值范围[1,）
    is_required: false
    data_type: int
    data_semantic: batch size
    specification:
      default: 32
      range:
        - \[1,)

  - arg_name: -save-path
    param_type: output_data
    name: 模型保存路径
    description: 训练完成后模型的保存路径
    data_type: str
    data_semantic: model save path
    specification:
      default: "./vgg16Net.pth"

  - arg_name: -output_image
    param_type: output_data
    name: 输出图像文件
    description: 预测结果图像的文件
    data_type: str
    data_semantic: filename for the output prediction image
    specification:
      default: "result"

application:
  domain: 图像分类
  objective: 根据图像信息中所反映的不同特征，把不同类别的图像进行区分
  link_models:
    alternative:
      - vgg_cpu_pytorch
  mechanism: 对输入影像数据集使用编码器进行深度特征提取，再使用解码器从特征中获取各区域块的空间和语义信息。

operation:
  usage: 在命令行中用代码指定最大步数,图像路径，标签路径,测试数据路径,训练结果路径路径,完成算法运行。
  exec_example:
    - docker run -it vgg_cpu:1.0.5-cpu /bin/bash
  output_display:
    - 将预测得到的图像文件显示在前端页面中
  license:
    - BSD-3-Clause
    - MIT
    - HPND

technique:
  language:
    - Python
  os:
    - Linux
    - Windows
  hardware:
    - CPU
  dependencies:
    - name: python
      version: 3.8
    - name: matplotlib
      version: 3.7.2
    - name: pillow
      version: 10.1.0
    - name: torch
      version: 2.1.0
    - name: torchvision
      version: 0.16.0
    - name: tqdm
      version: 4.66.1

source:
  maintainer: bingsai liu
  organization: beijing university of civil engineering and architecture
  contact: liubingsai2023@163.com
  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."
