Skip to content

Commit

Permalink
更新readme
Browse files Browse the repository at this point in the history
  • Loading branch information
YaoFANGUK committed Dec 29, 2023
1 parent 063a896 commit dad37eb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 41 deletions.
41 changes: 3 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,52 +167,17 @@ python ./backend/main.py
```

## 常见问题
1. 提取速度慢怎么办

修改backend/config.py中的参数,可以大幅度提高去除速度
```python
MODE = InpaintMode.STTN # 设置为STTN算法
STTN_SKIP_DETECTION = True # 跳过字幕检测
```

2. 视频去除效果不好怎么办

修改backend/config.py中的参数,尝试不同的去除算法,算法介绍

> - InpaintMode.STTN 算法:对于真人视频效果较好,速度快,可以跳过字幕检测
> - InpaintMode.LAMA 算法:对于图片效果最好,对动画类视频效果好,速度一般,不可以跳过字幕检测
> - InpaintMode.PROPAINTER 算法: 需要消耗大量显存,速度较慢,对运动非常剧烈的视频效果较好


- 使用STTN算法

```python
MODE = InpaintMode.STTN # 设置为STTN算法
# 相邻帧数, 调大会增加显存占用,效果变好
STTN_NEIGHBOR_STRIDE = 10
# 参考帧长度, 调大会增加显存占用,效果变好
STTN_REFERENCE_LENGTH = 10
# 设置STTN算法最大同时处理的帧数量,设置越大速度越慢,但效果越好
# 要保证STTN_MAX_LOAD_NUM大于STTN_NEIGHBOR_STRIDE和STTN_REFERENCE_LENGTH
STTN_MAX_LOAD_NUM = 30
```
- 使用LAMA算法
```python
MODE = InpaintMode.LAMA # 设置为STTN算法
LAMA_SUPER_FAST = False # 保证效果
```

3. CondaHTTPError
1. CondaHTTPError

将项目中的.condarc放在用户目录下(C:/Users/<你的用户名>),如果用户目录已经存在该文件则覆盖

解决方案:https://zhuanlan.zhihu.com/p/260034241

4. 7z文件解压错误
2. 7z文件解压错误

解决方案:升级7-zip解压程序到最新版本

5. 4090使用cuda 11.7跑不起来
3. 4090使用cuda 11.7跑不起来

解决方案:改用cuda 11.8

Expand Down
24 changes: 22 additions & 2 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Video-subtitle-remover (VSR) is an AI-based software that removes hardcoded subt
- Fills in the removed subtitle text area using a powerful AI algorithm model (non-adjacent pixel filling and mosaic removal).
- Supports custom subtitle positions by only removing subtitles in the defined location (input position).
- Supports automatic removal of all text throughout the entire video (without inputting a position).
- Supports multi-selection of images for batch removal of watermark text.

<p style="text-align:center;"><img src="https://github.com/YaoFANGUK/video-subtitle-remover/raw/main/design/demo.png" alt="demo.png"/></p>

Expand Down Expand Up @@ -166,12 +167,31 @@ python ./backend/main.py
```

## Common Issues
1. CondaHTTPError

1. How to deal with slow removal speed

You can greatly increase the removal speed by modifying the parameters in backend/config.py:

```python
MODE = InpaintMode.STTN # Set to STTN algorithm
STTN_SKIP_DETECTION = True # Skip subtitle detection
```

2. What to do if the video removal results are not satisfactory

Modify the values in backend/config.py and try different removal algorithms. Here is an introduction to the algorithms:

> - **InpaintMode.STTN** algorithm: Good for live-action videos and fast in speed, capable of skipping subtitle detection
> - **InpaintMode.LAMA** algorithm: Best for images and effective for animated videos, moderate speed, unable to skip subtitle detection
> - **InpaintMode.PROPAINTER** algorithm: Consumes a significant amount of VRAM, slower in speed, works better for videos with very intense movement

3. CondaHTTPError

Place the .condarc file from the project in the user directory (C:/Users/<your_username>). If the file already exists in the user directory, overwrite it.

Solution: https://zhuanlan.zhihu.com/p/260034241

2. 7z file extraction error
4. 7z file extraction error

Solution: Upgrade the 7-zip extraction program to the latest version.

2 changes: 1 addition & 1 deletion backend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class InpaintMode(Enum):
# ×××××××××× 通用设置 start ××××××××××
# 【设置inpaint算法】
# - InpaintMode.STTN 算法:对于真人视频效果较好,速度快,可以跳过字幕检测
# - InpaintMode.LAMA 算法:对于动画类视频效果好,速度一般,不可以字幕检测
# - InpaintMode.LAMA 算法:对于动画类视频效果好,速度一般,不可以跳过字幕检测
# - InpaintMode.PROPAINTER 算法: 需要消耗大量显存,速度较慢,对运动非常剧烈的视频效果较好
MODE = InpaintMode.STTN
# 【设置像素点偏差】
Expand Down

0 comments on commit dad37eb

Please sign in to comment.