{"id":13825986,"url":"https://github.com/theos-ai/easy-paddle-ocr","last_synced_at":"2025-07-08T23:30:50.949Z","repository":{"id":169423129,"uuid":"603587263","full_name":"theos-ai/easy-paddle-ocr","owner":"theos-ai","description":"This a clean and easy-to-use implementation of Paddle OCR. Made with ❤️ by Theos AI.","archived":false,"fork":false,"pushed_at":"2023-03-27T09:19:53.000Z","size":15499,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-20T04:33:28.675Z","etag":null,"topics":["custom-ocr","license-plate-recognition","machine-learning","ocr","optical-character-recognition","paddle","paddleocr","paddlepaddle","python","text-recognition"],"latest_commit_sha":null,"homepage":"https://theos.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theos-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-02-19T00:41:51.000Z","updated_at":"2024-10-29T14:19:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"d9581b36-ae90-4980-894e-04c4d950cb49","html_url":"https://github.com/theos-ai/easy-paddle-ocr","commit_stats":null,"previous_names":["theos-ai/easy-paddle-ocr"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/theos-ai/easy-paddle-ocr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theos-ai%2Feasy-paddle-ocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theos-ai%2Feasy-paddle-ocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theos-ai%2Feasy-paddle-ocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theos-ai%2Feasy-paddle-ocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theos-ai","download_url":"https://codeload.github.com/theos-ai/easy-paddle-ocr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theos-ai%2Feasy-paddle-ocr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264365421,"owners_count":23596823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["custom-ocr","license-plate-recognition","machine-learning","ocr","optical-character-recognition","paddle","paddleocr","paddlepaddle","python","text-recognition"],"created_at":"2024-08-04T09:01:30.357Z","updated_at":"2025-07-08T23:30:50.942Z","avatar_url":"https://github.com/theos-ai.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# 🤙🏻 Easy Paddle OCR ⚡️\n\n![Easy Paddle OCR by Theos AI](https://raw.githubusercontent.com/theos-ai/easy-paddle-ocr/main/assets/cover.jpg)\n\nThis a clean and easy-to-use implementation of [Paddle OCR](https://github.com/PaddlePaddle/PaddleOCR). Made with ❤️ by [Theos AI](https://theos.ai).\n\nDon't forget to subscribe to our [YouTube Channel](https://www.youtube.com/@theos-ai/)!\n\n### Install the package\n\n```\npip install easy-paddle-ocr\n```\n\n### How does it work?\n\nThe text recognition is made on a cropped part of a larger image, usually these crops are made with the bounding box output of an [Object Detection](https://docs.theos.ai/get-started/object-detection) model. You can learn how to build a license plate recogition model on the following [YouTube Tutorial](https://www.youtube.com/watch?v=GVLUVxTpqG0). You can easily train a model to make bounding boxes around any kind of text, not just license plates. After training your own object detection model, you can pass those cropped bounding boxes to Easy Paddle OCR in order to perform text recognition and read the text they contain.\n\n### Read the text\nOn the **read.py** file we recognize the text of 3 different cropped bounding boxes, each taken from larger images.\n\n![broadway.jpeg](https://raw.githubusercontent.com/theos-ai/easy-paddle-ocr/main/broadway.jpeg)\n*broadway.jpeg*\n\n![brooklyn.jpeg](https://raw.githubusercontent.com/theos-ai/easy-paddle-ocr/main/brooklyn.jpeg)\n*brooklyn.jpeg*\n\n![casino.jpeg](https://raw.githubusercontent.com/theos-ai/easy-paddle-ocr/main/casino.jpeg)\n*casino.jpeg*\n\nLet's recognize all of them with the following script.\n\n``` python\nfrom easy_paddle_ocr import TextRecognizer\nimport time\nimport cv2\n\ntext_recognizer = TextRecognizer() # for custom weights do TextRecognizer(weights='folder_path')\nimages = ['broadway.jpeg', 'brooklyn.jpeg', 'casino.jpeg']\n\nfor filename in images:\n  image = cv2.imread(filename)\n  start = time.time()\n  prediction = text_recognizer.read(image)\n  print(f'\\n[+] image: {filename}')\n  print(f'[+] text: {prediction[\"text\"]}')\n  print(f'[+] confidence: {int(prediction[\"confidence\"]*100)}%')\n  print(f'[+] inference time: {int((time.time() - start)*1000)} milliseconds')\n\nprint()\n```\n\nAfter running the **read.py** script you should see the following output.\n\n```\n[+] image: broadway.jpeg\n[+] text: BROADWAY\n[+] confidence: 98%\n[+] inference time: 39 milliseconds\n\n[+] image: brooklyn.jpeg\n[+] text: BROOKLYN\n[+] confidence: 96%\n[+] inference time: 31 milliseconds\n\n[+] image: casino.jpeg\n[+] text: CASINO\n[+] confidence: 78%\n[+] inference time: 30 milliseconds\n```\n\n## Custom Training\n\nIf you find that the default Paddle OCR weights don't work very well for your specific use case, we recommed you to train your own OCR model on [Theos AI](https://theos.ai).\n\nA tutorial on how to do this is coming soon, but if you already signed up and figured out how to build your own dataset on Theos and trained it on Paddle OCR, the only thing you have to do now is download your custom weights from your training session experiment by clicking the weights button on the top right corner.\n\n![Button](https://raw.githubusercontent.com/theos-ai/easy-paddle-ocr/main/assets/button.jpeg)\n\n![Weights](https://raw.githubusercontent.com/theos-ai/easy-paddle-ocr/main/assets/weights.jpeg)\n\nDownload the **Last** or **Best** weights and extract the zip file. Only the following files are required.\n\n```\ndictionary.txt\ninference.pdiparams\ninference.pdiparams.info\ninference.pdmodel\n```\n\nFinally, set the new weights folder path when you instantiate your TextRecognizer.\n\n``` python\ntext_recognizer = TextRecognizer(weights='./best')\n```\n\n## Contact us\n\nReach out to [contact@theos.ai](mailto:contact@theos.ai) if you have any questions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheos-ai%2Feasy-paddle-ocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheos-ai%2Feasy-paddle-ocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheos-ai%2Feasy-paddle-ocr/lists"}