From 3dcabc4854a5ab8f0b9b3f1822559a8ae726dd9a Mon Sep 17 00:00:00 2001 From: wangna11BD <79366697+wangna11BD@users.noreply.github.com> Date: Fri, 8 Apr 2022 11:17:52 +0800 Subject: [PATCH] add model export doc for msvsr (#608) --- docs/en_US/tutorials/video_super_resolution.md | 12 ++++++++++++ docs/zh_CN/tutorials/video_super_resolution.md | 13 +++++++++++++ 2 files changed, 25 insertions(+) diff --git a/docs/en_US/tutorials/video_super_resolution.md b/docs/en_US/tutorials/video_super_resolution.md index 5ad4751..099c287 100644 --- a/docs/en_US/tutorials/video_super_resolution.md +++ b/docs/en_US/tutorials/video_super_resolution.md @@ -119,6 +119,18 @@ To train or test other VSR model, you can find the config file of the corresponding VSR model in the ``PaddleGAN/configs``, then change the config file in the command to the config file of corresponding VSR model. +### 1.2.3 Model export + +Take the msvsr model as an example, ``inputs_size`` is the input size, ``model_name`` is the name of the exported model, and ``model_path`` is the path of the model weight. +``` +python tools/export_model.py -c configs/msvsr_reds.yaml --inputs_size="1,2,3,180,320" --model_name inference --load model_path +``` + +### 1.2.4 Model inference +Take the msvsr model as an example. +``` +python tools/inference.py --model_type msvsr -c configs/msvsr_reds.yaml --output_path output_dir +``` ## 1.3 Results The experimental results are evaluated on RGB channel. diff --git a/docs/zh_CN/tutorials/video_super_resolution.md b/docs/zh_CN/tutorials/video_super_resolution.md index 7d0b523..7789644 100644 --- a/docs/zh_CN/tutorials/video_super_resolution.md +++ b/docs/zh_CN/tutorials/video_super_resolution.md @@ -118,6 +118,19 @@ 训练或测试其他视频超分模型,可以在``PaddleGAN/configs``文件夹下找到对应模型的配置文件,将命令中的配置文件改成该视频超分模型的配置文件即可。 +### 1.2.3 模型导出 + +以msvsr模型为例,``inputs_size``为模型输入size,``model_name``为导出模型的命名,``model_path``为模型权重的路径. +``` +python tools/export_model.py -c configs/msvsr_reds.yaml --inputs_size="1,2,3,180,320" --model_name inference --load model_path +``` + +### 1.2.4 模型推理 +以msvsr模型为例 +``` +python tools/inference.py --model_type msvsr -c configs/msvsr_reds.yaml --output_path output_dir +``` + ## 1.3 实验结果展示 实验数值结果是在 RGB 通道上进行评估。 -- GitLab