-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5abaec2
Showing
16 changed files
with
1,085,379 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Touhou MMD Subtitle Generator v0.3 | ||
Created by [PatchyVideo](thvideo.tv)\ | ||
Based on [CRAFT](https://arxiv.org/pdf/1904.01941.pdf) scene text detector\ | ||
Translation is done using [Google Translate](https://translate.google.com/) with python package [googletrans](https://github.com/ssut/py-googletrans) | ||
# How to use | ||
You need an NVIDIA GPU no older than GTX 700 series | ||
1. Download `textdet_300k.pth` and `ocr_640k.pth` from release and put them into the project folder | ||
1. Install NVIDIA Driver | ||
1. Install CUDA 10.2 | ||
1. Install Python3 environment | ||
1. Install PyTorch 1.5.1 from [offical website](https://pytorch.org/) | ||
1. Run `pip3 install -r requirements.txt` | ||
1. Run `python main.py --out NUL --verbose --skip_frame 1 --video /path/to/video/file` and have fun | ||
# How to use in real life | ||
You can specifiy an output srt subtitle file of recognized texts using `--out /path/to/out/srt` parameter\ | ||
No windows will be shown if `--verbose` parameter is not given \ | ||
`--skip_frame 1` controls how many frames to skip in-between two frames used for recognition, higher the value faster the program will run, but the resulting srt file will not be as accurate as setting this value to 0 | ||
# Future works | ||
1. The current text detector is not very accurate, new model is being trained as you are reading this | ||
1. Support Korean | ||
1. Build multithreaded C++ version to fully utilized both CPU and GPU | ||
1. Integrate into [PatchyVideo](thvideo.tv) so people can use it online to enjoy Touhou videos made by people speaking another language |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.