mirror of
https://github.com/VikParuchuri/surya.git
synced 2026-06-04 21:03:53 +08:00
46 lines
1.6 KiB
YAML
46 lines
1.6 KiB
YAML
name: Integration test
|
|
|
|
on: [push]
|
|
|
|
env:
|
|
TORCH_DEVICE: "cpu"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python 3.11
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.11
|
|
- name: Install apt dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y tesseract-ocr tesseract-ocr-eng
|
|
- name: Install python dependencies
|
|
run: |
|
|
pip install poetry
|
|
poetry install
|
|
poetry remove torch
|
|
poetry run pip install torch --index-url https://download.pytorch.org/whl/cpu
|
|
- name: Run detection benchmark test
|
|
run: |
|
|
poetry run python benchmark/detection.py --max 2
|
|
poetry run python scripts/verify_benchmark_scores.py results/benchmark/det_bench/results.json --bench_type detection
|
|
- name: Run recognition benchmark test
|
|
run: |
|
|
poetry run python benchmark/recognition.py --max 2
|
|
poetry run python scripts/verify_benchmark_scores.py results/benchmark/rec_bench/results.json --bench_type recognition
|
|
- name: Run layout benchmark test
|
|
run: |
|
|
poetry run python benchmark/layout.py --max 5
|
|
poetry run python scripts/verify_benchmark_scores.py results/benchmark/layout_bench/results.json --bench_type layout
|
|
- name: Run ordering benchmark text
|
|
run: |
|
|
poetry run python benchmark/ordering.py --max 5
|
|
poetry run python scripts/verify_benchmark_scores.py results/benchmark/order_bench/results.json --bench_type ordering
|
|
|
|
|
|
|