Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PaddleOCR with RestAPI

Use FastAPI to allow sending requests to PaddleOCR service

Build Docker Image

docker build -t paddle_ocr_restapi:latest -f Dockerfile .

Run Docker Container from Docker Image

  • modify host, port and source language in docker-compose.yaml
# default --host 0.0.0.0
# default --port 20000
# default --lang japan

docker compose up -d

# check log under log/ folder
  • request
curl -X POST "http://localhost:20000/ocr/dict" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "file=@test.png"
  • response

with coordinates [x1, y1], [x2, y2], [x3, y3], [x4, y4]

[
	{
		"transcription": "text1",
		"points": [
			[],
			[],
			[],
			[]
		]
	}
]

References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages