未验证 提交 9e22482f 编写于 作者: W wangna11BD 提交者: GitHub

support cpu infer for vsr (#725)

上级 c2a79feb
......@@ -109,9 +109,15 @@ parser.add_argument('--process_order',
default='none',
nargs='+',
help='Process order')
parser.add_argument("--cpu",
dest="cpu",
action="store_true",
help="cpu mode.")
if __name__ == "__main__":
args = parser.parse_args()
if args.cpu:
paddle.set_device('cpu')
orders = args.process_order
temp_video_path = None
......
......@@ -12,6 +12,7 @@ python tools/video-enhance.py --input you_video_path.mp4 --process_order DAIN De
- `--input (str)`: path of the input video.
- `--output (str)`: path of the output video.
- `--process_order`: name and order of called model. For example, if the input is `DAIN DeOldify EDVR`, then `DAINPredictor` `DeOldifyPredictor` `EDVRPredictor` will be called in sequence.
- `--cpu`: use cpu inference, GPU inference is used by default.
#### Results
![](../../imgs/color_sr_peking.gif)
......
......@@ -16,6 +16,7 @@ python tools/video-enhance.py --input you_video_path.mp4 --process_order DAIN De
- `--input (str)`: 输入的视频路径。
- `--output (str)`: 输出的视频路径。
- `--process_order`: 调用的模型名字和顺序,比如输入为 `DAIN DeOldify PPMSVSR`,则会顺序调用 `DAINPredictor` `DeOldifyPredictor` `PPMSVSRPredictor`
- `--cpu`: 开启cpu推理,默认使用GPU推理。
<div align='center'>
<img src='https://user-images.githubusercontent.com/48054808/117925494-e9a70400-b329-11eb-9f38-a48ef946a3a4.gif' width='600'>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册