diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 8d35599..6b81052 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,65 +7,108 @@ body: - type: markdown attributes: value: | - 创建一个反馈报告以帮助我们改进 / Create a feedback report to help us improve + 创建一个反馈报告以帮助我们改进 + + Create a feedback report to help us improve - type: checkboxes id: checkboxes attributes: - label: 一些验证 / Some verifications - description: 在提交问题之前,请确保您完成以下操作 / Before submitting an issue, please ensure you have completed the following + label: | + 一些验证 + + Some verifications + description: | + 在提交问题之前,请确保您完成以下操作 + + Before submitting an issue, please ensure you have completed the following options: - - label: 是否查看 wiki、issues 后自己尝试解决 / Have you tried to resolve the issue by checking the wiki and existing issues? + - label: | + 是否查看 wiki、issues 后自己尝试解决 + + Have you tried to resolve the issue by checking the wiki and existing issues? required: true - - label: 请 **确保** 您的问题能在 [releases](https://github.com/aoguai/LiYing/releases/latest) 发布的最新版本(包含测试版本)上复现 (如果不是请先更新到最新版本复现后再提交问题) / Please **ensure** your issue can be reproduced on the latest version (including test versions) released in [releases](https://github.com/aoguai/LiYing/releases/latest) (if not, please update to the latest version and reproduce the issue before submitting it) + - label: | + 请 **确保** 您的问题能在 [releases](https://github.com/aoguai/LiYing/releases/latest) 发布的最新版本(包含测试版本)上复现 (如果不是请先更新到最新版本复现后再提交问题) + + Please **ensure** your issue can be reproduced on the latest version (including test versions) released in [releases](https://github.com/aoguai/LiYing/releases/latest) (if not, please update to the latest version and reproduce the issue before submitting it) required: true - - label: 搜索检查是否已经存在请求相同功能的问题/讨论,以避免重复创建问题 / Search to check if there are already issues/discussions requesting the same feature to avoid duplication + - label: | + 搜索检查是否已经存在请求相同功能的问题/讨论,以避免重复创建问题 + + Search to check if there are already issues/discussions requesting the same feature to avoid duplication required: true - - label: 确认知晓并同意维护者直接关闭不符合 issue 规范的问题 / Acknowledge and agree that maintainers can directly close issues that do not follow the issue guidelines + - label: | + 确认知晓并同意维护者直接关闭不符合 issue 规范的问题 + + Acknowledge and agree that maintainers can directly close issues that do not follow the issue guidelines required: true - - label: 确保提供下列BUG描述及其复现步骤, 否则我同意维护者直接关闭问题 / Ensure to provide the following bug description and reproduction steps, otherwise, I agree that maintainers can directly close the issue + - label: | + 确保提供下列BUG描述及其复现步骤, 否则我同意维护者直接关闭问题 + + Ensure to provide the following bug description and reproduction steps, otherwise, I agree that maintainers can directly close the issue required: true - type: textarea id: bug-description attributes: label: | - BUG 描述或反馈描述 / Bug description or feedback description + BUG 描述或反馈描述 + + Bug description or feedback description description: | - 请输入 BUG 描述或反馈描述及其复现步骤,请使用尽量准确的描述。 / Please enter the bug description or feedback description and its reproduction steps. Use as accurate a description as possible. + 请输入 BUG 描述或反馈描述及其复现步骤,请使用尽量准确的描述。 + + Please enter the bug description or feedback description and its reproduction steps. Use as accurate a description as possible. validations: required: true - type: textarea id: expected-behavior attributes: label: | - 预期的效果 / Expected behavior + 预期的效果 + + Expected behavior description: | - 简明扼要地描述你原来希望的效果。 / Briefly describe what you originally expected to happen. + 简明扼要地描述你原来希望的效果。 + + Briefly describe what you originally expected to happen. validations: required: true - type: textarea id: screenshots attributes: label: | - 截图 / Screenshots + 截图 + + Screenshots description: | - 添加截图以帮助解释你的问题。 / Add screenshots to help explain your issue. + 添加截图以帮助解释你的问题。 + + Add screenshots to help explain your issue. validations: required: true - type: textarea id: system-info attributes: label: | - 系统信息 / System information + 系统信息 + + System information description: | - 请说明您的操作系统: [例如.Windows]以及软件版本 [例如. V1.6] / Please specify your operating system: [e.g., Windows] and software version [e.g., V1.6] + 请说明您的操作系统: [例如.Windows]以及软件版本 [例如. V1.6] + + Please specify your operating system: [e.g., Windows] and software version [e.g., V1.6] validations: required: true - type: textarea id: additional-info attributes: label: | - 额外的信息 / Additional information + 额外的信息 + + Additional information description: | - 在此添加关于问题的任何其他背景、猜想、推断。 / Add any other context, assumptions, or inferences about the issue here. + 在此添加关于问题的任何其他背景、猜想、推断。 + + Add any other context, assumptions, or inferences about the issue here. validations: required: false diff --git a/docs/README-EN.md b/docs/README-EN.md index 26cc020..43ff351 100644 --- a/docs/README-EN.md +++ b/docs/README-EN.md @@ -104,8 +104,11 @@ Options: -b, --rgb-list RGB_LIST RGB channel values list (comma-separated) for image composition -s, --save-path PATH Path to save the output image - -p, --photo-type TEXT Type of photo - --photo-sheet-size TEXT Size of the photo sheet + -p, --photo-type TEXT Photo types(supporting formats of XXpx x + XXpx or those specified in the data.ini) + --photo-sheet-size TEXT Size of the photo sheet(supporting formats + of XXpx x XXpx or those specified in the + data.ini) -c, --compress / --no-compress Whether to compress the image -sc, --save-corrected / --no-save-corrected Whether to save the corrected image @@ -121,6 +124,7 @@ Options: -srz, --save-resized / --no-save-resized Whether to save the resized image --help Show this message and exit. + ``` ### Other Configuration diff --git a/docs/README.md b/docs/README.md index 33ad00d..19c6699 100644 --- a/docs/README.md +++ b/docs/README.md @@ -94,7 +94,7 @@ run.bat ./images/test1.jpg #### CIL 参数信息与帮助 ```shell -python main.py --help +python main.py --help Usage: main.py [OPTIONS] IMG_PATH Options: @@ -103,9 +103,10 @@ Options: -r, --rmbg-model-path PATH RMBG 模型路径 -b, --rgb-list RGB_LIST RGB 通道值列表(英文逗号分隔),用于图像合成 -s, --save-path PATH 保存路径 - -p, --photo-type TEXT 照片类型 - --photo-sheet-size TEXT 选择照片表格的尺寸 - -c, --compress / --no-compress 是否压缩图像 + -p, --photo-type TEXT 照片类型(支持 XXpx x XXpx 格式或 data.ini 中指定的格式) + --photo-sheet-size TEXT 选择照片表格的尺寸(支持 XXpx x XXpx 格式或 data.ini + 中指定的格式) + -c, --compress / --no-compress 是否压缩图像(使用 AGPicCompress 压缩) -sc, --save-corrected / --no-save-corrected 是否保存修正图像后的图片 -bg, --change-background / --no-change-background diff --git a/src/main.py b/src/main.py index 00d2b19..f802c66 100644 --- a/src/main.py +++ b/src/main.py @@ -86,11 +86,11 @@ def echo_message(key, **kwargs): @click.option('-s', '--save-path', type=click.Path(), default='output.jpg', help='Path to save the output image' if get_language() == 'en' else '保存路径') @click.option('-p', '--photo-type', type=str, default='one_inch_photo' if get_language() == 'en' else '一寸照片', - help='Type of photo' if get_language() == 'en' else '照片类型') + help='Photo types(supporting formats of XXpx x XXpx or those specified in the data.ini)' if get_language() == 'en' else '照片类型(支持 XXpx x XXpx 格式或 data.ini 中指定的格式)') @click.option('--photo-sheet-size', type=str, default='five_inch_photo' if get_language() == 'en' else '五寸照片', - help='Size of the photo sheet' if get_language() == 'en' else '选择照片表格的尺寸') + help='Size of the photo sheet(supporting formats of XXpx x XXpx or those specified in the data.ini)' if get_language() == 'en' else '选择照片表格的尺寸(支持 XXpx x XXpx 格式或 data.ini 中指定的格式)') @click.option('-c', '--compress/--no-compress', default=False, - help='Whether to compress the image' if get_language() == 'en' else '是否压缩图像') + help='Whether to compress the image' if get_language() == 'en' else '是否压缩图像(使用 AGPicCompress 压缩)') @click.option('-sc', '--save-corrected/--no-save-corrected', default=False, help='Whether to save the corrected image' if get_language() == 'en' else '是否保存修正图像后的图片') @click.option('-bg', '--change-background/--no-change-background', default=False, diff --git a/src/tool/ImageSegmentation.py b/src/tool/ImageSegmentation.py index 9691ba0..817d1a5 100644 --- a/src/tool/ImageSegmentation.py +++ b/src/tool/ImageSegmentation.py @@ -100,7 +100,6 @@ def infer(self, image: np.ndarray) -> np.ndarray: except Exception as e: raise RuntimeError(f"Error processing images: {e}") - print(self.rgb_list) no_bg_image = Image.new("RGBA", orig_image.size, self.rgb_list) # Paste the original image using the mask