ASCII art generation based on YOLO and PaddleOCR
input image
Output text
/\
/ \PSYANGILCOM
/_ _\
- paddlepaddle
- paddleocr
- opencv
- pytorch
- flask
-
environment setup
conda create -n logo conda activate logo conda install pip pip install -r requirements.txt
-
run python logo.py
-
Run the docker container
docker pull jordane95/logo:latest docker run -dp 2333:7595 --name logo_server logo
-
Use the web service on your host with curl
curl -X POST -F image=@your_image.jpg 'http://localhost:2333'
Note: only support .jpg .jpeg images
logo
├── images // input images
│ ├── input.jpg
│ ...
├── predefined // some predefined shapes for making rule
│ ├── plus.txt // PaddleOCR
│ ...
├── results // output text
│ ├── input_text.txt // only text
│ ├── input_logo.txt // whole logo = shape + text
│ ...
├── yolov5 // customized yolov5 model
│ ├── weights // pre-trained weights
│ │ └── best.pt // pre-trained weights on logo dataset for logo detection
│ ...
├── Dockerfile // build docker image
├── functions.py // some useful functions used in logo.py
├── logo.py // core code
├── app.py // web service
├── README.md // documentation
...