Open bertsky opened 6 months ago
@mikegerber
Thanks for digging and sharing the data! Indeed, that's a bug (if a different one). Something really weird is going on during ocrd-tesserocr-crop: It removes the binarized image as AlternativeImage
, and replaces the original @imageFilename
with the binarized image...
Looking deeper, the most astonishing fact about this workspace is that – somehow – your METS now contains a broken (invalid) physical structMap, which repeats the page ID divs across fptrs (instead of subsuming all fptrs under one div):
<mets:structMap TYPE="PHYSICAL">
<mets:div TYPE="physSequence">
<mets:div TYPE="page" ID="P_1879_45_0344">
<mets:fptr FILEID="OCR-D-IMG_1879_45_0344"/>
<mets:fptr FILEID="OCR-D-GT-SEG-LINE_1879_45_0344"/>
...
<mets:div TYPE="page" ID="P_1879_45_0344">
<mets:fptr FILEID="OCR-D-BIN_1879_45_0344.IMG-BIN"/>
</mets:div>
...
<mets:div TYPE="page" ID="P_1879_45_0344">
<mets:fptr FILEID="OCR-D-CROP_1879_45_0344.IMG-BIN.IMG-CROP"/>
</mets:div>
...
<mets:div TYPE="page" ID="P_1879_45_0344">
<mets:fptr FILEID="OCR-D-BIN2_1879_45_0344.IMG-BIN.IMG-CROP.IMG-BIN"/>
</mets:div>
Could this be related to https://github.com/OCR-D/quiver-benchmarks/issues/29?
Sorry, I cannot reproduce how you got here. The broken METS is definitely the reason for the cropper to misbehave, which in turn is the reason for second binarizer to fail. But if I manually do the prepare_reichsanzeiger_sets.sh for the reichsanzeiger_random.list
, I get a correct METS (and correct workflow results).
The workspace was originally from https://ub-backup.bib.uni-mannheim.de/~stweil/quiver-benchmark/workflows/workspaces, I just remove-group
ed everything except images and GT and then tried to reproduce @stweil's latest problem by running the selected_page_ocr
workflow (see OCR-D/quiver-benchmarks#22 for the details).
This looks like, at some point, the physical structMap
seems to have been corrupted and this led to this problem. Because I also got a similar problem with add
(see OCR-D/core#1179), I would say there's a problem in core/ocrd workspace
.
The original METS (https://ub-backup.bib.uni-mannheim.de/~stweil/quiver-benchmark/workflows/workspaces/reichsanzeiger_random_selected_pages_ocr/data/reichsanzeiger_random/mets.xml) looks OK.
(I'll investigate and open an issue at core for this)
@mikegerber I think we established that the root cause was an outdated OCR-D version in Quiver, which had a bug that produced broken METS prior to this step. Is that correct? Can we close then?
@mikegerber I think we established that the root cause was an outdated OCR-D version in Quiver, which had a bug that produced broken METS prior to this step. Is that correct? Can we close then?
Yes, this was "the METS caching bug".
I tried to run the
selected_page_ocr
workflow onreichsanzeiger_random_selected_pages_ocr
(removed all filegroups except OCR-D-IMG and OCR-D-GT-SEG-LINE to start with) and encountered a different problem (using latest ocrd/all:maximum image):Workspace at this point - if someone wants to have a look: https://qurator-data.de/~mike.gerber/2024-02-quiver-benchmarks-issue-22/reichsanzeiger_random_selected_pages_ocr.zip (Includes a
ocrd.log
)Originally posted by @mikegerber in https://github.com/OCR-D/quiver-benchmarks/issues/22#issuecomment-1969374213