{"id":19724818,"url":"https://github.com/techbyvj/license-plate-recognition-python","last_synced_at":"2026-01-20T02:30:17.228Z","repository":{"id":257807364,"uuid":"865605940","full_name":"techbyvj/license-plate-recognition-python","owner":"techbyvj","description":"License plate recognition, python","archived":false,"fork":false,"pushed_at":"2024-10-03T15:01:17.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T20:11:09.356Z","etag":null,"topics":["anpr","easyocr","indian","license-plate","license-plate-detection","license-plate-reader","license-plate-recognition","lpr","number-plate-detection","number-plate-recognition","python","tesseract-ocr"],"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/techbyvj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2024-09-30T20:06:33.000Z","updated_at":"2024-10-03T15:01:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"23d2129b-d4e8-4a00-b0f9-a8403d2ae026","html_url":"https://github.com/techbyvj/license-plate-recognition-python","commit_stats":null,"previous_names":["techbyvj/license-plate-recognition-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techbyvj%2Flicense-plate-recognition-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techbyvj","download_url":"https://codeload.github.com/techbyvj/license-plate-recognition-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599669,"owners_count":21615565,"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":["anpr","easyocr","indian","license-plate","license-plate-detection","license-plate-reader","license-plate-recognition","lpr","number-plate-detection","number-plate-recognition","python","tesseract-ocr"],"created_at":"2024-11-11T23:27:14.728Z","updated_at":"2026-01-20T02:30:17.194Z","avatar_url":"https://github.com/techbyvj.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# License Plate Recognition API\n\nThis project provides a Flask-based API for license plate recognition using computer vision techniques and OCR (Optical Character Recognition).\n\n## Features\n\n- License plate detection from images\n- Text recognition from detected license plates\n- Support for both Tesseract OCR and EasyOCR\n- Error handling and logging\n- Configurable through environment variables\n- Image preprocessing and enhancement\n- Supports various image formats\n- Saves processed license plate images\n\n## Prerequisites\n\n- Python 3.8+\n- pip\n- [Tesseract OCR](https://github.com/tesseract-ocr/tesseract#installing-tesseract) installed on your system\n\n## Installation\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/techbyvj/license-plate-recognition-python.git\n   cd license-plate-recognition-api\n   ```\n\n2. Install the required dependencies:\n   ```\n   pip install -r requirements.txt\n   ```\n\n3. Set up environment variables:\n   Create a `.env` file in the project root and add the following:\n   ```\n   PORT=5000\n   ```\n\n## Usage\n\nTo start the API server, run:\n\n```\npython main.py\n```\n\nThe API will be available at `http://localhost:5000` (or the port you specified in the .env file).\n\n### API Endpoints\n\n1. License Plate Recognition\n   - URL: `/process_image`\n   - Method: POST\n   - Body: Form-data with key 'file' and value as the image file\n   - Response: JSON object containing the recognized license plate text\n\nExample using curl:\n```\ncurl -X POST -F \"file=@path/to/your/image.jpg\" http://localhost:5000/process_image\n```\n\n## Error Handling\n\nThe API uses custom error codes and messages for different scenarios. These are defined in the `constants.py` file:\n\n```python\nclass ErrorCode(Enum):\n    NO_FILE = 1001\n    NO_SELECTED_FILE = 1002\n    NO_PLATE_DETECTED = 1003\n    PROCESSING_ERROR = 1004\n\nclass Constants:\n    class ErrorMessage:\n        NO_FILE = \"No file part in the request\"\n        NO_SELECTED_FILE = \"No selected file\"\n        NO_PLATE_DETECTED = \"No license plate detected or text recognized\"\n        PROCESSING_ERROR = \"Error processing image\"\n```\n\n## Image Processing\n\nThe image processing pipeline includes the following steps:\n\n1. Convert the image to HSV color space\n2. Create yellow and white masks to isolate potential license plate regions\n3. Apply morphological operations to reduce noise\n4. Find and analyze contours to detect the license plate\n5. Use OCR (Tesseract and EasyOCR) to recognize text on the license plate\n\n## For More Details\n\nFor more detailed information about the implementation, usage, and additional features, please visit the project's GitHub repository:\n\n[https://github.com/techbyvj/PlateRecognizePy](https://github.com/techbyvj/PlateRecognizePy)\n\nThis repository contains the full source code, documentation, and examples to help you get started with the License Plate Recognition API.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Connect with the Author\n\nFollow the author on X (Twitter): [@saidbyvj](https://x.com/saidbyvj)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechbyvj%2Flicense-plate-recognition-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechbyvj%2Flicense-plate-recognition-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechbyvj%2Flicense-plate-recognition-python/lists"}