diff --git a/CHANGELOG.md b/CHANGELOG.md index 97f7b8e..d3f81ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - workarounds for broken models (DocBank_X101, Jambo-sudo_X101) - `make deps`: add explicit reqs prior to pip step with Torch index +- set `pc:PcGts/@pcGtsId` from `mets:file/@ID` ### Added - CI for CLI tests (with cached models and stored result artifacts) diff --git a/ocrd_detectron2/segment.py b/ocrd_detectron2/segment.py index 7cf70b2..73f4b01 100644 --- a/ocrd_detectron2/segment.py +++ b/ocrd_detectron2/segment.py @@ -201,6 +201,7 @@ class id to a new PAGE region type (and subtype). page_id = input_file.pageId or input_file.ID LOG.info("INPUT FILE %i / %s", n, page_id) pcgts = page_from_file(self.workspace.download_file(input_file)) + pcgts.set_pcGtsId(file_id) self.add_metadata(pcgts) page = pcgts.get_Page()