{"id":21802521,"url":"https://github.com/qengineering/opencv_ocr_dnn","last_synced_at":"2026-01-21T16:11:21.263Z","repository":{"id":112947225,"uuid":"550815527","full_name":"Qengineering/OpenCV_OCR_DNN","owner":"Qengineering","description":"Text recognition with OpenCV and deep learning","archived":false,"fork":false,"pushed_at":"2023-04-15T09:25:03.000Z","size":1054,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T00:08:09.116Z","etag":null,"topics":["deep-learning","ocr","ocr-recognition","opencv"],"latest_commit_sha":null,"homepage":"https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Qengineering.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":"2022-10-13T11:24:45.000Z","updated_at":"2025-01-28T14:05:38.000Z","dependencies_parsed_at":"2023-03-16T17:45:15.219Z","dependency_job_id":null,"html_url":"https://github.com/Qengineering/OpenCV_OCR_DNN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Qengineering/OpenCV_OCR_DNN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FOpenCV_OCR_DNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FOpenCV_OCR_DNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FOpenCV_OCR_DNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FOpenCV_OCR_DNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Qengineering","download_url":"https://codeload.github.com/Qengineering/OpenCV_OCR_DNN/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Qengineering%2FOpenCV_OCR_DNN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T15:01:31.228Z","status":"ssl_error","status_checked_at":"2026-01-21T14:42:58.942Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["deep-learning","ocr","ocr-recognition","opencv"],"created_at":"2024-11-27T11:29:17.361Z","updated_at":"2026-01-21T16:11:16.255Z","avatar_url":"https://github.com/Qengineering.png","language":"C++","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL"],"categories":[],"sub_categories":[],"readme":"# OpenCV_OCR_DNN\n![output image]( https://qengineering.eu/github/OpenCV_OCR_1.png )\n![output image]( https://qengineering.eu/github/OpenCV_OCR_2.png )\n## Recognize text with deep learning on a bare Raspberry Pi 4. \u003cbr/\u003e\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\u003cbr/\u003e\u003cbr/\u003e\nPaper: https://arxiv.org/pdf/1507.05717.pdf\u003cbr/\u003e\nSpecial made for a bare Raspberry Pi 4, see [Q-engineering deep learning examples](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html)\n\n------------\n\n## Tip.\n:point_right: See also [PaddleOCR-Lite](https://github.com/Qengineering/PaddleOCR-Lite-Document) solution. It is 5 times faster and more accurate.\n\n------------\n\n## Dependencies.\nTo run the application, you have to:\n- A raspberry Pi 4 with a 32 or 64-bit operating system. It can be the Raspberry 64-bit OS, or Ubuntu 18.04 / 20.04. [Install 64-bit OS](https://qengineering.eu/install-raspberry-64-os.html) \u003cbr/\u003e\n- OpenCV ***version 4.5.1 or higher*** 64-bit installed. [Install OpenCV 4.5](https://qengineering.eu/install-opencv-4.5-on-raspberry-64-os.html) \u003cbr/\u003e\n- Code::Blocks installed. (```$ sudo apt-get install codeblocks```)\n\n\n------------\n\n## Notes.\nThe image is resized to 100x32 pixels (line 56 at `main.cpp`) before being processed by OpenCV's deep learning engine.\u003cbr\u003e\nObvious, your text must be one line and not too long to be recognized properly.\u003cbr\u003e\nIn contrast to tesseract, deep learning models are less sensitive to font, colour, noise, scale, and skew.\u003cbr\u003e\nFor more models, check the [OpenCV tutorial](https://docs.opencv.org/4.x/d4/d43/tutorial_dnn_text_spotting.html). Most consume considerably more computer power, hence more significant interference times.\n\n------------\n\n## Installing the app.\nTo extract and run the network in Code::Blocks \u003cbr/\u003e\n$ mkdir *MyDir* \u003cbr/\u003e\n$ cd *MyDir* \u003cbr/\u003e\n$ wget https://github.com/Qengineering/OpenCV_OCR_DNN/archive/refs/heads/main.zip \u003cbr/\u003e\n$ unzip -j master.zip \u003cbr/\u003e\nRemove master.zip, LICENSE and README.md as they are no longer needed. \u003cbr/\u003e \n$ rm master.zip \u003cbr/\u003e\n$ rm LICENSE \u003cbr/\u003e\n$ rm README.md \u003cbr/\u003e \u003cbr/\u003e\nYour *MyDir* folder must now look like this: \u003cbr/\u003e \n*.png \u003cbr/\u003e\nalphabet_36.txt \u003cbr/\u003e\nalphabet_94.txt \u003cbr/\u003e\nOpenCV_OCR.cpb \u003cbr/\u003e\nmain.cpp \u003cbr/\u003e\nDenseNet_CTC.onnx \u003cbr/\u003e\n\n------------\n\n## Running the app.\nTo run the application load the project file OpenCV_OCR.cbp in Code::Blocks.\u003cbr/\u003e \nNext, follow the instructions at [Hands-On](https://qengineering.eu/deep-learning-examples-on-raspberry-32-64-os.html#HandsOn).\n\n------------\n\n[![paypal](https://qengineering.eu/images/TipJarSmall4.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=CPZTM5BB3FCYL) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Fopencv_ocr_dnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqengineering%2Fopencv_ocr_dnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqengineering%2Fopencv_ocr_dnn/lists"}