{"id":13399954,"url":"https://github.com/qurator-spk/sbb_binarization","last_synced_at":"2026-01-14T12:45:51.467Z","repository":{"id":40533815,"uuid":"227107364","full_name":"qurator-spk/sbb_binarization","owner":"qurator-spk","description":"Document Image Binarization","archived":false,"fork":false,"pushed_at":"2024-10-17T14:09:42.000Z","size":163,"stargazers_count":78,"open_issues_count":11,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-11-10T09:27:04.219Z","etag":null,"topics":["binarization","ocr","qurator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qurator-spk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-12-10T11:49:01.000Z","updated_at":"2025-09-30T08:34:58.000Z","dependencies_parsed_at":"2024-10-19T16:35:44.370Z","dependency_job_id":"571a325c-6aa1-48a3-8535-56461f715f0a","html_url":"https://github.com/qurator-spk/sbb_binarization","commit_stats":{"total_commits":113,"total_committers":14,"mean_commits":8.071428571428571,"dds":0.5663716814159292,"last_synced_commit":"39ef3fd7bbda76fc1d8531e9c40fac3b6650dbae"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/qurator-spk/sbb_binarization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qurator-spk%2Fsbb_binarization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qurator-spk%2Fsbb_binarization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qurator-spk%2Fsbb_binarization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qurator-spk%2Fsbb_binarization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qurator-spk","download_url":"https://codeload.github.com/qurator-spk/sbb_binarization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qurator-spk%2Fsbb_binarization/sbom","scorecard":{"id":756325,"data":{"date":"2025-08-11","repo":{"name":"github.com/qurator-spk/sbb_binarization","commit":"b2d0d5cb1c4002ca798ad99f51e98de51d14adc6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 2/13 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/docker-image.yml:22","Warn: no topLevel permission defined: .github/workflows/docker-image.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker-image.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/docker-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/docker-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/docker-image.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/docker-image.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/qurator-spk/sbb_binarization/test.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:26","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker-image.yml:17"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.0.11 not signed: https://api.github.com/repos/qurator-spk/sbb_binarization/releases/80804277","Warn: release artifact v0.0.11 does not have provenance: https://api.github.com/repos/qurator-spk/sbb_binarization/releases/80804277"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"21 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h","Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6","Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf","Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc","Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52","Warn: Project is vulnerable to: GHSA-3448-vrgh-85xr","Warn: Project is vulnerable to: GHSA-8849-5h85-98qw","Warn: Project is vulnerable to: GHSA-fm39-cw8h-3p63","Warn: Project is vulnerable to: GHSA-fw99-f933-rgh8","Warn: Project is vulnerable to: GHSA-hxfw-jm98-v4mq","Warn: Project is vulnerable to: GHSA-jggw-2q6g-c3m6","Warn: Project is vulnerable to: GHSA-jh2j-j4j9-crg3","Warn: Project is vulnerable to: GHSA-m6vm-8g8v-xfjh","Warn: Project is vulnerable to: GHSA-q799-q27x-vp7w","Warn: Project is vulnerable to: GHSA-x3rm-644h-67m8","Warn: Project is vulnerable to: PYSEC-2023-184","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T21:46:43.499Z","repository_id":40533815,"created_at":"2025-08-22T21:46:43.499Z","updated_at":"2025-08-22T21:46:43.499Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["binarization","ocr","qurator"],"created_at":"2024-07-30T19:00:45.570Z","updated_at":"2026-01-14T12:45:51.447Z","avatar_url":"https://github.com/qurator-spk.png","language":"Python","readme":"# sbb_binarization\n\n\u003e Document Image Binarization\n\n[![pip release](https://img.shields.io/pypi/v/sbb-binarization.svg)](https://pypi.org/project/sbb-binarization/)\n[![GHActions CI](https://github.com/qurator-spk/sbb_binarization/actions/workflows/test.yml/badge.svg)](https://github.com/qurator-spk/sbb_binarization/actions/workflows/test.yml)\n[![GHActions CD](https://github.com/qurator-spk/sbb_binarization/actions/workflows/docker-image.yml/badge.svg)](https://github.com/qurator-spk/sbb_binarization/actions/workflows/docker-image.yml)\n\n\u003cimg src=\"https://user-images.githubusercontent.com/952378/63592437-e433e400-c5b1-11e9-9c2d-889c6e93d748.jpg\" width=\"180\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/952378/63592435-e433e400-c5b1-11e9-88e4-3e441b61fa67.jpg\" width=\"180\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/952378/63592440-e4cc7a80-c5b1-11e9-8964-2cd1b22c87be.jpg\" width=\"220\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/952378/63592438-e4cc7a80-c5b1-11e9-86dc-a9e9f8555422.jpg\" width=\"220\"\u003e\n\n## Installation\n\nPython `3.8-3.11` with Tensorflow `\u003c2.13` are currently supported. While newer versions might also work, we currently don't test this.\n\nYou can either install from PyPI via \n\n    pip install sbb-binarization\n\n\nor clone the repository, enter it and install (editable) with\n\n    git clone git@github.com:qurator-spk/sbb_binarization.git\n    cd sbb_binarization; pip install -e .\n\n\nAlternatively, download the prebuilt image from Dockerhub:\n\n    docker pull ocrd/sbb_binarization\n\n\n### Models\n\nPre-trained models can be downloaded from the locations below. We also provide models and [model cards](https://huggingface.co/SBB/sbb_binarization) on 🤗 \n\n| Version    |      Format   |  Download                                                                                            |\n|------------|:-------------:|------------------------------------------------------------------------------------------------------|\n| 2021-03-09 |  `SavedModel` | https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2021_03_09.zip |\n| 2021-03-09 |  `HDF5`       | https://qurator-data.de/sbb_binarization/2021-03-09/models.tar.gz                                    |\n| 2020-01-16 | `SavedModel`  | https://github.com/qurator-spk/sbb_binarization/releases/download/v0.0.11/saved_model_2020_01_16.zip |\n| 2020-01-16 |  `HDF5`       | https://qurator-data.de/sbb_binarization/2020-01-16/models.tar.gz                                    |\n\nWith [OCR-D](https://ocr-d.de/), you can also use the [Resource Manager](https://ocr-d.de/en/models), e.g.\n\n    ocrd resmgr download ocrd-sbb-binarize \"*\"\n\n\n## Usage\n\n```sh\nsbb_binarize \\\n  -m \u003cpath to directory containing model files\u003e \\\n  \u003cinput image\u003e \\\n  \u003coutput image\u003e\n```\n\n**Note:** the output image MUST use either `.tif` or `.png` as file extension to produce a binary image. Input images can also be JPEG.\n\nImages containing a lot of border noise (black pixels) should be cropped beforehand to improve the quality of results.\n\n### Example\n\n\n    sbb_binarize -m /path/to/model/ myimage.tif myimage-bin.tif\n\n\nTo use the [OCR-D](https://ocr-d.de/en/spec/cli) interface:\n\n    ocrd-sbb-binarize -I INPUT_FILE_GRP -O OCR-D-IMG-BIN -P model default\n\n\n## Testing\n\nFor simple smoke tests, the following will\n- download models\n- download test data\n- run the OCR-D wrapper (on page and region level):\n    \n        make models\n        make test\n    \n## How to cite\nIf you find this tool useful in your work, please consider citing our paper:\n\n```bibtex\n@inproceedings{hip23rezanezhad2,\nauthor    = {Vahid Rezanezhad and Konstantin Baierer and Clemens Neudecker},\neditor    = {Apostolos Antonacopoulos and Christian Clausner and Maud Ehrmann and Kai Labusch and Clemens Neudecker},\ntitle     = {A hybrid CNN-Transformer Model for Historical Document Image Binarization},\nbooktitle = {Proceedings of the 7th International Workshop on Historical Document Imaging and Processing {HIP} 2023, \n             San José, CA, USA, August 26, 2023},\nyear      = {2023},\nurl       = {https://doi.org/10.1145/3604951.3605508}\n}\n```\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqurator-spk%2Fsbb_binarization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqurator-spk%2Fsbb_binarization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqurator-spk%2Fsbb_binarization/lists"}