Python 3.7
- Clone the repo
git clone https://github.com/emanuilo/ADR-TABLE-RECOGNITION.git
cd ADR-TABLE-RECOGNITION
git submodule update --init
- Install the virtual environment and requirements
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- Install Darkflow
cd darkflow
pip install -e .
- Download model weights from here
- Put weights in ckpt directory
- Clone the repo
git clone https://github.com/emanuilo/ADR-TABLE-RECOGNITION.git
cd ADR-TABLE-RECOGNITION
git submodule update --init
- Download model weights from here
- Put weights in ckpt directory
- Build Docker image
docker build -t adr-table-extractor .
- Run Docker container
docker run --rm -it -v $(pwd)/out:/usr/src/app/out adr-table-extractor bash
Basic prediction. Results are generated in out/results.json
python main.py
Prediction with custom images directory and ground truth directory. Results are generated in out/results.json
python main.py --image-dir <test_images_dir>
Validation test with ground truth data. PDF test summary is generated in out/TestReport.pdf
python main.py --validation-test
Validation test with custom directories. PDF test summary is generated in out/TestReport.pdf
python main.py --validation-test --ground-truth-dir <ground_truth_dir> --image-dir <test_images_dir>