synthetics_handwritten_OCR/OCR_earsing/README.md

21 lines
727 B
Markdown
Raw Permalink Normal View History

# OCR Earsing
This repository contains the code for erasing the OCR text from the images. Code is written based on
[OCR_SAM]("https://github.com/yeungchenwa/OCR-SAM")
Have 2 method to earse the text from the image:
- Traditional method: using the bounding box of the text to earse the text, and use function OpenCV to earse the text.
- Deep learning method: using the bounding box of the text, segment the text based on [SAM]("https://github.com/facebookresearch/segment-anything") (Segment Anything) and use diffuse model to earse the text.
In my code, I use the deep learning method to earse the text from the image.
## Installation
```shell
pip install -r requirements.txt
```
## Run
```shell
python ocr_eraser.py
```