language: cn
model_unique_abbr: Densenet_pytorch
version: 1.0
identification:
  docker_image_name: densennet:1.0
  model_name: densenet卷积网络
  semantic: Densely Connected Convolutional Networks
  description: 把网络中前面的层与后面的层进行连接，让前面的层的输出成为后面的层的输入，解决梯度消失和参数过多问题，实现图像分类
  category_application: 预测型
  category_data:
  - 遥感影像数据
  - 图像数据
  keywords:
  - 语义分割
  - 图像分类
  - 对象识别
parameter_info:
  parameters:
  - arg_name: -data_dir
    param_type: input_data
    name: 图像路径
    description: 训练的图像路径，数据类型为cifar10数据集标准格式
    data_type: str
    data_semantic: Training image path

  - arg_name: -result_dir
    param_type: output_data
    name: 训练结果
    description: 训练结果文件夹，保存训练权重文件
    data_type: str
    data_semantic: Training result

  - arg_name: -accuracy_dir
    param_type: output_data
    name: 训练精度结果
    description: 训练结果精度文件,格式为.txt文件
    data_type: str
    data_semantic: Accuracy result

  - arg_name: -lr
    param_type: param
    name: 学习率
    description: 决定目标函数能否收敛到局部最小值以及何时收敛到最小值，取值范围(0,1)
    is_required: false
    data_type: float
    data_semantic: Learning rate
    specification:
      default: 0.1
      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: -weight-decay
    param_type: param
    name: 重量衰减
    description: 权重衰减正则项，防止过拟合，取值范围(0,1)
    is_required: false
    data_type: float
    data_semantic: Weight decay
    specification:
      default: 0.0004
      range:
      - (0,1)

  - arg_name: b
    param_type: param
    name: 批量大小
    description: 每批加载多少个样本，根据数据集的大小和样本数目确定，一般取值为2的幂次方，取值范围[1,）
    is_required: false
    data_type: int
    data_semantic: Batch size
    specification:
      default: 64
      range:
      - \[1,)

  - arg_name: -print-freq
    param_type: param
    name: 保存步骤
    description: 模型保存间隔步数，取值范围[1,)
    is_required: false
    data_type: int
    data_semantic: Save steps
    specification:
      default: 10
      range:
      - \[1,)

  - arg_name: -epochs
    param_type: param
    name: 模型训练次数
    description: 当一个完整的数据集通过神经网络一次并且返回一次，这个过程称为一个epoch，不同的训练迭代次数可影响模型精度，可根据需求选择，取值范围[1,)
    is_required: false
    data_type: int
    data_semantic: Number of epochs
    specification:
      default: 2
      range:
      - \[1,)

  - arg_name: -layers
    param_type: param
    name: 模型总层数
    description: 可指定模型总层数，取值范围(0,100)
    is_required: false
    data_type: int
    data_semantic: Number of layers
    specification:
      default: 99
      range:
      - (0,100)

  - arg_name: -growth
    param_type: param
    name: 每层新增通道的数量
    description: 可指定每层新增通道的数量，取值范围[1,)
    is_required: false
    data_type: int
    data_semantic: number of new channels per layer
    specification:
      default: 12
      range:
      - \[1,)

  - arg_name: -reduce
    param_type: param
    name: 压缩率
    description: 用于控制在过渡阶段的压缩率,减少特征图的尺寸和数量，以降低计算成本，取值范围(0,1)
    is_required: false
    data_type: float
    data_semantic: Compression rate
    specification:
      default: 0.5
      range:
      - (0,1)

application:
  domain: 图像语义分割
  objective: 依据先验信息对影像数据分割成具有一定语义含义的区域块，并识别出每个区域块的语义类别。
  link_models:
  mechanism: 对输入影像数据集使用编码器进行深度特征提取，再使用解码器从特征中获取各区域块的空间和语义信息。
operation:
  usage: 在命令行中用代码指定图像路径,批量大小,训练周期，模型总层数，训练结果路径路径,完成算法运行。
  exec_example:
  - docker run densennet:1.0 -v $(pwd):/data --data_dir ./data --layers 99 --growth 12 -b 64 --reduce 1.0 --epochs 5 --result_dir ./results
  output_display:
  - 将预测得到的图像文件显示在前端页面中
  license:
  - BSD-3-Clause
  - MIT
  - HPND
technique:
  language:
  - Python
  os:
  - Linux
  - Windows
  hardware:
  - GPU
  dependencies:
  - name: python
    version: 3.8
  - name: numpy
    version: 1.24.4
  - name: opencv-contrib-python
    version: 4.9.0.80
  - name: tqdm
    version: 4.66.1
  - name: cuda
    version: 11.7
  - name: cudnn
    version: 8
source:
  maintainer: Ding Wenjing
  organization: Beijing University of Civil Engineering and Architecture
  contact: wjd1009@163.com
  references:
  - Gao Huang, Zhuang Liu, Laurens van der Maaten, Kilian Q. Weinberger.2018.Densely Connected Convolutional Networks.Computer Vision and Pattern Recognition.
