Skip to content

emanuilo/ADR-TABLE-RECOGNITION

Repository files navigation

ADR Table Recognition

Dependencies

Python 3.7

Installation (MacOS)

  1. Clone the repo
    git clone https://github.com/emanuilo/ADR-TABLE-RECOGNITION.git
    cd ADR-TABLE-RECOGNITION
    git submodule update --init
  1. Install the virtual environment and requirements
    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  1. Install Darkflow
    cd darkflow
    pip install -e .
  1. Download model weights from here
  2. Put weights in ckpt directory

Installation (Docker)

  1. Clone the repo
    git clone https://github.com/emanuilo/ADR-TABLE-RECOGNITION.git
    cd ADR-TABLE-RECOGNITION
    git submodule update --init
  1. Download model weights from here
  2. Put weights in ckpt directory
  3. Build Docker image
    docker build -t adr-table-extractor .
  1. Run Docker container
    docker run --rm -it -v $(pwd)/out:/usr/src/app/out adr-table-extractor bash 

Usage

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>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published