language: cn
model_unique_abbr: ResNet_GPU_pytorch
version: 1.0
identification:
  docker_image_name: resnet:1.0
  model_name: 残差卷积网络（GPU）
  semantic: Residual Convolutional Neural Network
  description: 以监督学习方式对图像进行分类
  category_application: 预测型
  category_data:
  - 图像数据
  keywords:
  - 图像分类
  - 对象识别
parameter_info:
  parameters:
  - arg_name: image
    is_single_en_dash: false
    param_type: input_data
    name: 待预测图
    description: 选择你的待预测图（测试图为flower.jpg）
    data_type: jpg
    data_semantic: The picture you want to predict

  - arg_name: img_out
    is_single_en_dash: false
    param_type: output_data
    name: 预测结果输出路径
    description: 输出路径
    data_type: str
    data_semantic: Path to save the result images

  - arg_name: data-dir
    is_single_en_dash: false
    param_type: input_data
    name: 数据集路径
    description: 用于训练的数据集路径（测试数据集为花卉数据集flower_data）
    data_type: str
    data_semantic: The directory used to save your own dataset

  - arg_name: save-dir
    is_single_en_dash: false
    param_type: output_data
    name: 保存目录
    description: 保存训练结果的目录
    data_type: str
    data_semantic: The directory used to save the trained models
    specification:
      default: save_temp

  - arg_name: epochs
    is_single_en_dash: false
    param_type: param
    name: 模型训练次数
    description: 训练次数，范围：[1,  )，推荐默认5
    data_type: int
    data_semantic: number of iteration
    specification:
      default: 5
      range :
        - \[1,)

  - arg_name: lr
    is_single_en_dash: false
    param_type: param
    name: 学习率
    description: 决定目标函数能否收敛到局部最小值以及何时收敛到最小值，范围：(0, 1)。推荐默认0.0001
    data_type: float
    data_semantic: learning rate
    specification:
      default: 0.0001
      range:
      - (0,1)

  - arg_name: batch-size
    is_single_en_dash: false
    param_type: param
    name: 批量大小
    description: 每批加载多少个样本，根据数据集的大小和样本数目确定，范围：[1,  )。推荐默认64
    data_type: int
    data_semantic: batch size
    specification:
      default: 64
      range:
      - \[1,)

  - arg_name: weight-decay
    is_single_en_dash: false
    param_type: param
    name: 权重衰减因子
    description: 权重衰减正则项，防止过拟合，范围：(0,1)。推荐默认1e-4
    data_type: float
    data_semantic: Weight decay
    specification:
      default: 1e-4
      range:
      - (0,1)

  - arg_name: save-every
    is_single_en_dash: false
    param_type: param
    name: 保存检查点
    description: 指定每隔多少训练轮次保存一次检查点，范围：(0,100)。推荐默认2
    data_type: int
    data_semantic: Saves checkpoints at every specified number of epochs
    specification:
      default: 2
      range :
      - (0,100)

application:
  domain: 图像分类
  objective: 依据先验信息对数据进行分类
  link_models:
    alternative:
    - resnet_pytorch
  mechanism: 对输入影像数据集使用编码器进行深度特征提取，再使用解码器从特征中获取各区域块的空间和语义信息。
operation:
  usage: 在命令行中用代码指定最大步数,图像路径，标签路径,测试数据路径,训练结果路径路径,完成算法运行。
  exec_example:
  - python resnet.py --data-dir data/flower_data --save-dir data/ckpt --image data/image/flower.jpg --img_out data/result --epochs 5 --save-every 2 --batch-size 64
  output_display:
  - 将预测得到的图像文件显示在前端页面中
  license:
  - If you use this implementation in you work, please don't forget to mention the
    author, Yerlan Idelbayev.
    '''
    '''Copyright (c) 2018, Yerlan Idelbayev
    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.'''
technique:
  language:
  - Python
  os:
  - Linux
  hardware:
  - GPU
#numpy==1.24.4 pillow==10.1.0 cython==0.29.21 setuptools==68.2.2 six==1.16.0 wheel==0.41.2 typing_extensions==4.8.0
  dependencies:
  - name: python
    version: 3.8
  - name: numpy
    version: 1.24.4
  - name: pillow
    version: 10.1.0
  - name: setuptools
    version: 68.2.2
  - name: cython
    version: 0.29.21
  - name: six
    version: 1.16.0
  - name: wheel
    version: 0.41.2
  - name: typing_extensions
    version: 4.8.0
  - name: cuda
    version: 11.0
  - name: torch
    version: 1.7.0+cu110
  - name: torchvision
    version: 0.8.0
source:
  maintainer: HaiPeng Yang
  organization: Beijing University of Civil Engineering and Architecture
  contact: 2108160223006@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.