@inproceedings{oliveiraseguinkaplan2018dhsegment, title={dhSegment: A generic deep-learning approach for document segmentation}, author={Ares Oliveira, Sofia and Seguin, Benoit and Kaplan, Frederic}, booktitle={Frontiers in Handwriting Recognition (ICFHR), 2018 16th International Conference on}, pages={7--12}, year={2018}, organization={IEEE} }
Mandlagore aims to extract the illuminations from the manuscripts
Have a try at the demo to train (optional) and apply dhSegment in page extraction using the demo.py
script.
Use the command:
docker build --rm -f "Dockerfile" -t mdlg:latest "."
Ensure you have a docker server running:
docker run --rm -it -p 3000:3000/tcp -v mdlg-data:/data --name mdlg-engine-server mdlg:latest
In fact, the volume is ceate with the first container using it.
docker volume rm mdlg-data
docker volume create mdlg-data
Run an Ubuntu container that share the same volume mdlg-data
docker run -it -v mdlg-data:/data --name mdlg-data-linux ubuntu /bin/bash
once you have the prompt of this container, download and expand the files for demo:
apt-get update
apt-get install unzip -y
apt-get install wget -y
cd /data/demo && wget https://github.com/dhlab-epfl/dhSegment/releases/download/v0.2/pages.zip && unzip pages.zip
cd /data/demo && wget https://github.com/dhlab-epfl/dhSegment/releases/download/v0.2/model.zip && unzip model.zip
Keep open this terminal, to be able to share data with the mdlg-engine container that run predictions and trainings.
# verify the server is up by calling the hello world
curl http://127.0.0.1:3000/hello
# run your own training/prediction for the demo process. You need to initialize properly the volume
# -> below, will run the demo program on the folder 'whatever' of the mdlg-data volume
curl http://127.0.0.1:3000/run/[whatever-path-in-sub-dirs]
# to run the given demo samples : curl http://127.0.0.1:3000/run/demo
# list files in the data folder
curl http://127.0.0.1:3000/files
curl http://127.0.0.1:3000/files/[whatever-path-in-sub-dirs]
# help for available commands
curl http://127.0.0.1:3000/help