This server provides endpoints to detect:
- Blocks (text blocks and images)
- Text lines
- Words
- Glyphs
Each detection is independent - it's up to the client software to combine them.
Only block detection provides two different classes, "TopLevelTextBlock" and "Illustration".
Behind-the-scenes, all models were constructed using YOLOv8.
If you haven't done so, create a pyenv environment.
Install pyenv
pyenv update
pyenv install 3.11.10
pyenv local 3.11.10
pyenv virtualenv jochre3-dla-server
pyenv activate jochre3-dla-server
To install all Python requirements:
pip install -r requirements.txt
To run locally:
python -m uvicorn app.main:app --host 0.0.0.0 --port 8444
Then navigate to:
http://localhost:8444/docs
docker build -t registry.gitlab.com/jochre/jochre3-dla-server:[YOUR-TAG] .
docker run --rm -it -p 8444:8444/tcp registry.gitlab.com/jochre/jochre3-dla-server:[YOUR_TAG]
Then navigate to:
http://localhost:8444/docs
docker login registry.gitlab.com
After login, to download the docker image from the repository and run it locally:
docker pull registry.gitlab.com/jochre/jochre3-dla-server:[YOUR_TAG]
docker run --rm -it -p 8444:8444/tcp registry.gitlab.com/jochre/jochre3-dla-server:[YOUR_TAG]
Then navigate to:
http://localhost:8444/docs
After login, to build the image and push it, run the commands below.
If you don't enter a tag (below [YOUR_TAG]
, the tag latest
is added automatically).
docker build -t registry.gitlab.com/jochre/jochre3-dla-server:[YOUR-TAG] .
docker push registry.gitlab.com/jochre/jochre3-dla-server:[YOUR-TAG]