VIN Recognizer is a system designed to automatically extract Vehicle Identification Numbers (VIN) from various types of images. The system accelerates the customer service process by automating VIN recognition, even for images with rotated or angled VINs, and provides explanations if a VIN cannot be identified.
The system is developed for a company specializing in car parts. It addresses the challenge of manually recognizing VINs from images provided by customers. The system ensures efficiency, transparency, and accuracy in VIN recognition.
- VIN Extraction: Automatically extracts VIN codes from images, even those rotated, angled, or inverted.
- Error Explanation: Provides reasons why a VIN code is not present or identifiable in an image.
- Accuracy Handling: Ensures transparency in recognition accuracy, avoiding false positives and detailing potential errors.
- Multi-context Support: Supports VIN recognition from diverse contexts such as documents, handwritten notes, car hoods, and even screenshots.
- Python: 3.10 or higher.
- Dependencies:
qwen2.5-7B-VLfor VIN recognition.
- The system is tested and trained with a dataset comprising:
- Images of handwritten VINs.
- Photos of VINs on car hoods.
- Screenshots of VIN codes.
- Images without VINs (e.g., parts or unrelated items).
-
Clone the Repository:
git clone https://github.com/menma331/vin-recognizer.git cd vin-recognizer -
Install Dependencies:
pip install -r requirements.txt
-
Setup Environment Variables: Create a
.envfile with the following:TELEGRAM_BOT_TOKEN="YOUR_TG_BOT_TOKEN" DASHSCOPE_API_KEY="YOUR_DASHCOPE_API_KEY"
-
Run the Application:
python main.py
- Input: Upload an image containing a VIN code.
- Process: The system extracts the VIN or provides an explanation for its absence.
- Output: The VIN code or an error message.
- Input: A photo of a car hood with a VIN.
- Output: "VIN: 1HGCM82633A123456"
- Input: An image without a VIN.
- Output: "Reason: This appears to be an image of a manual, not a VIN."
The system is composed of the following components:
- Image Preprocessing:
- Rotates and aligns images to detect VIN codes at various angles.
- VIN Recognition Model:
- Utilizes
qwen2.5-7B-VLfor OCR-based VIN recognition.
- Utilizes
- Error Handling Module:
- Identifies and categorizes images without VIN codes, providing a human-understandable explanation.
- Accuracy Management:
- Ensures a false-positive rate below 20% by validating results with defined thresholds.
The system's performance is evaluated based on:
- Accuracy: Correct identification of VIN codes.
- False Positives: Instances where non-VIN data is incorrectly identified as a VIN.
- Processing Time: Speed of recognition and response.
Contributions are welcome! Please fork the repository, make your changes, and submit a pull request. Ensure your code adheres to the project standards and includes appropriate tests.
- Explore alternative models to
qwen2.5-7B-VLfor cost-effectiveness. - Enhance recognition accuracy for handwritten and obscured VINs.
- Integrate with customer support systems for seamless operation.
For questions or feedback, contact the repository owner:
- GitHub: menma331