mirror of
https://github.com/qurator-spk/ocrd-galley.git
synced 2025-06-09 22:59:53 +02:00
🚧 Use ocr-eval aka dinglehopper
This commit is contained in:
parent
be5750f4e1
commit
d5aa273b44
3 changed files with 20 additions and 1 deletions
|
@ -20,6 +20,10 @@ RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
|
||||||
COPY my_ocrd_workflow /usr/bin
|
COPY my_ocrd_workflow /usr/bin
|
||||||
COPY xsd /usr/bin/xsd
|
COPY xsd /usr/bin/xsd
|
||||||
|
|
||||||
|
# XXX Hack
|
||||||
|
COPY ../experiments/ocr-eval /usr/local/ocr-eval
|
||||||
|
RUN pip3 install --no-cache-dir -r /usr/local/ocr-eval/requirements.txt
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
CMD ["/usr/bin/my_ocrd_workflow"]
|
CMD ["/usr/bin/my_ocrd_workflow"]
|
||||||
|
|
2
build
2
build
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
podman build -t my_ocrd_workflow .
|
podman build --no-cache -t my_ocrd_workflow .
|
||||||
|
|
|
@ -153,4 +153,19 @@ do_validate
|
||||||
page_downgrade_to_2018 OCR-D-OCR-TESS
|
page_downgrade_to_2018 OCR-D-OCR-TESS
|
||||||
do_validate
|
do_validate
|
||||||
|
|
||||||
|
|
||||||
|
if ocrd workspace list-group | grep -q OCR-D-GT-PAGE; then
|
||||||
|
for g in `ocrd workspace list-page`; do
|
||||||
|
echo "== $g"
|
||||||
|
gt=`ocrd workspace find -G OCR-D-GT-PAGE -g $g`
|
||||||
|
ocr=`ocrd workspace find -G OCR-D-OCR-TESS -g $g`
|
||||||
|
|
||||||
|
if [ -n "$gt" ]; then
|
||||||
|
python3 /usr/local/ocr-eval/cli.py $gt $ocr
|
||||||
|
mv report.json report-$g.json
|
||||||
|
mv report.html report-$g.html
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
# vim:tw=120:
|
# vim:tw=120:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue