{"id":20824581,"url":"https://github.com/glenrobson/iiif2annos","last_synced_at":"2026-05-02T01:05:11.117Z","repository":{"id":153937752,"uuid":"631018535","full_name":"glenrobson/iiif2annos","owner":"glenrobson","description":"OCR a IIIF images in a manifest and generate annotations","archived":false,"fork":false,"pushed_at":"2026-04-23T14:11:00.000Z","size":391,"stargazers_count":26,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-23T16:04:29.544Z","etag":null,"topics":["annotations","iiif"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glenrobson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-21T17:58:37.000Z","updated_at":"2026-04-23T14:12:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dacb711-630a-4daa-88dd-974cdde50613","html_url":"https://github.com/glenrobson/iiif2annos","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/glenrobson/iiif2annos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glenrobson%2Fiiif2annos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glenrobson%2Fiiif2annos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glenrobson%2Fiiif2annos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glenrobson%2Fiiif2annos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glenrobson","download_url":"https://codeload.github.com/glenrobson/iiif2annos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glenrobson%2Fiiif2annos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32518746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotations","iiif"],"created_at":"2024-11-17T22:22:57.467Z","updated_at":"2026-05-02T01:05:11.034Z","avatar_url":"https://github.com/glenrobson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iiif2annos\nRead a manifest, OCR the images, create AnnotationLists and add them to a copy of the manifest\n\nThis tool uses the [tesseract](https://tesseract-ocr.github.io/) OCR engine. Ensure you have this installed and on your $PATH before running the code below. \n\n```\nusage: ocr.py [-h] [--base-output-uri OUTPUTURI] [--lang LANG] [-c] manifest output\n\nRead a manifest, OCR all the pages then adds the results as annotation lists\n\npositional arguments:\n  manifest              URL to Manifest file\n  output                Output directory for annotation lists\n\noptions:\n  -h, --help            show this help message and exit\n  --base-output-uri OUTPUTURI\n                        Output URI for annotations and annotation list\n  --lang LANG           Language to pass to the OCR engine see: https://tesseract-ocr.github.io/tessdoc/Data-Files-in-different-versions.html\n  -c, --confidence      Include OCR confidence value in text of the annotation?\n```\n\nThis should work with v2 manifests and v3 manifest. For v2 AnnotationLists are created for v3 AnnotationPages are created. \n\n## Example\n\n```\npython iiif2annos/ocr.py --lang frk --base-output-uri http://localhost:5500/newspaper https://preview.iiif.io/cookbook/update_newspaper/recipe/0068-newspaper/newspaper_issue_1-manifest.json  newspaper\n```\n\n\nUsing these blogs as a guide:\n\n * https://nanonets.com/blog/ocr-with-tesseract/#ocr-with-pytesseract-and-opencv \n * https://pypi.org/project/pytesseract/\n\n\n# Testing\n\nUnit tests are in the tests folder and can be run with:\n\npython -m unittest discover -s tests\n\nRun single test:\n\npython -m unittest tests.testImages.TestImage.testCanvasImageMissmatch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglenrobson%2Fiiif2annos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglenrobson%2Fiiif2annos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglenrobson%2Fiiif2annos/lists"}