Skip to content

Commit

Permalink
fix: argparse
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin committed Sep 6, 2024
1 parent 79ad89f commit f222a42
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ python inference.py -i demo/images/test.jpg -o ./idphoto.png --height 413 --widt
## 2. 人像抠图

```python
python inference.py -i -t human_matting demo/images/test.jpg -o ./idphoto_matting.png --matting_model hivision_modnet
python inference.py -t human_matting -i demo/images/test.jpg -o ./idphoto_matting.png --matting_model hivision_modnet
```

## 3. 透明图增加底色
Expand Down
5 changes: 3 additions & 2 deletions inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@

parser.add_argument(
"-t",
"--type",
help="请求 API 的种类",
choices=INFERENCE_TYPE,
default="idphoto",
)
parser.add_argument("-i", help="输入图像路径", required=True)
parser.add_argument("-o", help="保存图像路径", required=True)
parser.add_argument("-i", "--input_image_dir", help="输入图像路径", required=True)
parser.add_argument("-o", "--output_image_dir", help="保存图像路径", required=True)
parser.add_argument("--height", help="证件照尺寸-高", default=413)
parser.add_argument("--width", help="证件照尺寸-宽", default=295)
parser.add_argument("-c", "--color", help="证件照背景色", default="638cce")
Expand Down

0 comments on commit f222a42

Please sign in to comment.