From b01e6d26fd8987e91b2dc1e6623c19c0b9b0bc96 Mon Sep 17 00:00:00 2001 From: yuyuyzl Date: Mon, 25 Apr 2022 01:15:46 +0800 Subject: [PATCH] default run --- README.md | 10 ++++++++-- main.py | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 17106d5..6fea8b1 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,12 @@ https://www.ifacialmocap.com/download/ ## Run -`python main.py --output_webcam --ifm 192.168.31.182:49983 --character y` +完全体运行命令`python main.py --output_webcam unitycapture --ifm 192.168.31.182:49983 --character y` -先自己玩一下,等我把原repo的opencv再搬回来再说参数的事 \ No newline at end of file +参数名 | 值类型 | 说明 +:---: | :---: | :---: +--character|字符串|`character`目录下的输入图像文件名,不需要带扩展名 +--debug|无|打开OpenCV预览窗口输出渲染结果,如果没有任何输出配置,该参数默认生效 +--input|字符串|不使用iOS面捕时,传入要使用的摄像头设备名称,默认为设备0,有ifm参数时无效 +--ifm|字符串|使用iOS面捕时,传入设备的`IP:端口号`,如`192.168.31.182:49983` +--output_webcam|字符串|可用值为`obs` `unitycapture`,选择对应的输出种类,不传不输出到摄像头 \ No newline at end of file diff --git a/main.py b/main.py index 80f79c3..3f0f117 100644 --- a/main.py +++ b/main.py @@ -25,11 +25,12 @@ from tha2.mocap.ifacialmocap_constants import * parser = argparse.ArgumentParser() parser.add_argument('--debug', action='store_true') parser.add_argument('--input', type=str, default='cam') -parser.add_argument('--character', type=str, default='test3') -parser.add_argument('--output_dir', type=str, default=f'dst') +parser.add_argument('--character', type=str, default='y') +parser.add_argument('--output_dir', type=str) parser.add_argument('--output_webcam', type=str) parser.add_argument('--ifm', type=str) args = parser.parse_args() +if args.output_webcam is None and args.output_dir is None: args.debug=True device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')