Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translated to Chinese. Fixed the problem of incorrect versions of libraries such as torch. Added support for Python 3.12.2. #285

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

nitsc
Copy link

@nitsc nitsc commented Aug 13, 2024

Translated to Chinese. Modified requirements.txt. Fixed the problem of incorrect versions of libraries such as torch. Added support for Python 3.12.2.
However, there are still some issues, such as a buggy function for non-real-time face changes and error logs not being saved.

Summary by Sourcery

Translate the application to Chinese, fix library version issues, and add support for Python 3.12.2. Update the README and user interface to reflect these changes, enhancing accessibility and compatibility.

New Features:

  • Add support for Python 3.12.2, allowing the application to run on the latest Python version.

Bug Fixes:

  • Fix incorrect versions of libraries such as torch in the requirements, ensuring compatibility and stability.

Enhancements:

  • Translate the user interface and documentation to Chinese, improving accessibility for Chinese-speaking users.

Documentation:

  • Translate README.md to Chinese, providing installation and usage instructions in Chinese.

Copy link
Contributor

sourcery-ai bot commented Aug 13, 2024

Reviewer's Guide by Sourcery

This pull request includes several significant changes to the Deep-Live-Cam project. The main updates are:

  1. Translation of the README.md file to Chinese, making the project more accessible to Chinese-speaking users.
  2. Modification of the requirements.txt file to fix issues with incorrect versions of libraries, particularly torch.
  3. Addition of support for Python 3.12.2.
  4. Updates to the UI text in modules/ui.py, translating button and label text to Chinese.
  5. Minor changes to run.py to set the Keras backend to TensorFlow.

The changes primarily focus on improving accessibility for Chinese users and updating the project's compatibility with newer Python versions and libraries. However, it's noted that there are still some unresolved issues, such as a buggy function for non-real-time face changes and error logs not being saved.

File-Level Changes

Files Changes
README.md Translated README.md to Chinese, including installation instructions, usage guide, and disclaimers
requirements.txt Updated requirements.txt to fix incorrect library versions and added support for Python 3.12.2
modules/ui.py Translated UI text in the application to Chinese
run.py Added environment variable setting for Keras backend in the main run script

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @nitsc - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider implementing a proper localization system instead of maintaining separate language versions to avoid potential synchronization issues.
  • Please address the mentioned bugs (non-real-time face changes and error log saving) before merging this PR.
  • The addition of the KERAS_BACKEND environment variable in run.py should be explained or made configurable rather than hardcoded.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 4 issues found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

README.md Outdated
- git
- [ffmpeg](https://www.youtube.com/watch?v=OlNWCpFdVMA)
- [visual studio 2022 runtimes (windows)](https://visualstudio.microsoft.com/visual-cpp-build-tools/)
- C:\Users\<用户名>\.keras\keras.json 改为以下内容:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Consider explaining why the keras.json file needs to be modified.

It would be helpful for users to understand the reason for this change and its impact on the software's functionality.

Suggested change
- C:\Users\<用户名>\.keras\keras.json 改为以下内容:
- Modify C:\Users\<username>\.keras\keras.json to configure Keras backend:
This ensures compatibility with the project's deep learning framework.
- Replace the content with:

README.md Outdated
Comment on lines 38 to 42
pip install -r requirements.txt
```
(适用于 Python3.10.x)
```
pip install -r orginal_requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Clarify the difference between requirements.txt and orginal_requirements.txt.

It's not clear why there are two different requirements files or when each should be used. Consider explaining the purpose of each file.

Suggested change
pip install -r requirements.txt
```
(适用于 Python3.10.x)
```
pip install -r orginal_requirements.txt
pip install -r requirements.txt
```
(适用于 Python3.12.x,包含最新的依赖项)
```
pip install -r original_requirements.txt
```
(适用于 Python3.10.x,使用较旧但稳定的依赖项版本)

README.md Outdated
Comment on lines 103 to 110
**网络摄像头模式**
只需按照屏幕截图上的步骤操作:
1. 选择一个面部
2. 单击“实时”
3. 等待几秒钟 (通常需要 10 到 30 秒才能显示预览)
![demo-gif](demo.gif)

Just use your favorite screencapture to stream like OBS
> Note: In case you want to change your face, just select another picture, the preview mode will then restart (so just wait a bit).


Additional command line arguments are given below. To learn out what they do, check [this guide](https://github.com/s0md3v/roop/wiki/Advanced-Options).

只需使用您喜欢的屏幕录制软件进行直播,例如 OBS。
> 注意:如果您想更改您的面部,只需选择另一张图片,预览模式将重新启动 (所以只需等待一会儿)。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Consider expanding the webcam mode section with more details.

The webcam mode section is quite brief. It might be helpful to provide more information about this feature, its capabilities, and any limitations.

**网络摄像头模式**
网络摄像头模式允许您实时替换视频流中的面部。使用步骤:

1. 选择一个面部图像作为替换源
2. 单击"实时"按钮启动网络摄像头
3. 等待 10-30 秒加载预览
4. 使用 OBS 等软件捕获屏幕进行直播

预览中会显示替换后的实时视频流。如需更换面部,选择新图片后等待重新加载。

注意:网络摄像头模式可能受硬件性能和网络状况影响。

![demo-gif](demo.gif)

README.md Outdated
Comment on lines 133 to 139
**致谢**
- [ffmpeg](https://ffmpeg.org/): 让视频相关操作变得容易
- [deepinsight](https://github.com/deepinsight): 他们的 [insightface](https://github.com/deepinsight/insightface) 项目提供了一个制作精良的库和模型。
- [havok2-htwo](https://github.com/havok2-htwo) : 分享用于网络摄像头的代码
- [GosuDRM](https://github.com/GosuDRM/nsfw-roop) : 解除 roop 的审查
- 以及 [所有开发者](https://github.com/hacksider/Deep-Live-Cam/graphs/contributors) 在该项目中使用的库背后的所有开发者。
- 脚注:[这原本是 roop-cam,请在此处查看代码的完整历史。](https://github.com/hacksider/roop-cam) 请注意,代码的基础作者是 [s0md3v](https://github.com/s0md3v/roop)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (documentation): Consider keeping names and links in their original form in the credits section.

While the text has been translated to Chinese, it might be clearer to keep the names of people, projects, and links in their original form to ensure they are easily recognizable and searchable.

Suggested change
**致谢**
- [ffmpeg](https://ffmpeg.org/): 让视频相关操作变得容易
- [deepinsight](https://github.com/deepinsight): 他们的 [insightface](https://github.com/deepinsight/insightface) 项目提供了一个制作精良的库和模型。
- [havok2-htwo](https://github.com/havok2-htwo) : 分享用于网络摄像头的代码
- [GosuDRM](https://github.com/GosuDRM/nsfw-roop) : 解除 roop 的审查
- 以及 [所有开发者](https://github.com/hacksider/Deep-Live-Cam/graphs/contributors) 在该项目中使用的库背后的所有开发者。
- 脚注:[这原本是 roop-cam,请在此处查看代码的完整历史。](https://github.com/hacksider/roop-cam) 请注意,代码的基础作者是 [s0md3v](https://github.com/s0md3v/roop)
**Credits**
- [ffmpeg](https://ffmpeg.org/): Makes video-related operations easy
- [deepinsight](https://github.com/deepinsight): Their [insightface](https://github.com/deepinsight/insightface) project provides a well-made library and models
- [havok2-htwo](https://github.com/havok2-htwo): Shared code for webcam
- [GosuDRM](https://github.com/GosuDRM/nsfw-roop): Uncensored roop
- [All developers](https://github.com/hacksider/Deep-Live-Cam/graphs/contributors) behind the libraries used in this project
- Footnote: [This was originally roop-cam, see full code history here](https://github.com/hacksider/roop-cam). Note that the base author of the code is [s0md3v](https://github.com/s0md3v/roop)

@AVGRadmin
Copy link

Hey! I saw this pull request and wanted to just ask if you don't mind.
I've added support for multiple languages in the fork I am working on, but I do not have Chinese (yet). I'm having some trouble trying to translate and actually using the characters in Python. All characters just end up as squares 🙄

But it would be really sweet if you would consider adding a Chinese template for me! You can just use the English template as a starting point in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants