Skip to content

Commit 0a61fe1

Browse files
committed
update readme
1 parent 477d814 commit 0a61fe1

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Image Translator
2+
3+
This project utilizes optical character recognition (OCR) and translation to translate text within images from one language to another. It performs the following steps:
4+
5+
1. **OCR Processing:** The project extracts text and its bounding boxes from input images using the EasyOCR library.
6+
2. **Translation:** It translates the extracted text using the Google Translator API.
7+
3. **Text Replacement:** The translated text is then overlaid onto the image, replacing the original text while maintaining its position and style.
8+
4. **Output:** Finally, the modified image with translated text is saved to an output folder.
9+
10+
111
## Usage
212

313
1. Place your input images in the `input` folder.
@@ -32,6 +42,31 @@ This script converts a series of images into a video file. It includes:
3242

3343
## The goal of this update is to be able to translate video to video with the combination of [OpenTranslator](https://github.com/overcrash66/OpenTranslator).
3444

45+
# Setup
46+
47+
## Installation
48+
49+
Clone this repository to your local machine.
50+
51+
```
52+
Install the required Python dependencies using pip install pipenv && pipenv install.
53+
```
54+
55+
or
56+
57+
```
58+
py -3.10 -m venv venv
59+
venv\Scripts\activate
60+
pip install -r requirements.txt
61+
```
62+
63+
If you like to use torch with cuda:
64+
65+
```
66+
pip uninstall torch torchvision
67+
pip install torch==2.5.1+cu118 torchaudio==2.5.1+cu118 torchvision==0.20.1+cu118 --index-url https://download.pytorch.org/whl/cu118
68+
```
69+
3570
## Notes
3671

3772
- Supported languages for OCR can be seen [here](https://www.jaided.ai/easyocr/)
@@ -44,8 +79,8 @@ This script converts a series of images into a video file. It includes:
4479

4580
## Examples
4681

47-
![image-1](https://github.com/boysugi20/python-image-translator/assets/53815726/cc2a52b3-2627-4f08-a428-c0dba4341bda)
48-
![image-1-translated](https://github.com/boysugi20/python-image-translator/assets/53815726/3ecafe2e-df19-4ca2-aeff-b05cc89394db)
82+
![image-1](./input/Untitled.png)
83+
![image-1-translated](output/Untitled-translated.png)
4984

5085
## Acknowledgments
5186

output/Untitled-translated.png

52.8 KB
Loading

0 commit comments

Comments
 (0)