Welcome to the Barcode Decoder repository! This project offers a robust system designed to detect, crop, and decode barcodes from images. Utilizing the power of YOLOv8, this system is trained on a custom barcode dataset and evaluated using precision, recall, and mAP metrics. The implementation leverages the Ultralytics YOLO and Pyzbar libraries, making it a reliable tool for barcode processing.
- High Accuracy: Trained on a custom dataset, this system provides high accuracy in barcode detection.
- Real-Time Processing: Fast detection and decoding of barcodes from images.
- Flexible: Works with various image formats and sizes.
- Comprehensive Evaluation: Uses precision, recall, and mAP metrics to assess performance.
- Easy Integration: Simple to integrate into existing projects or workflows.
To set up the Barcode Decoder, follow these steps:
-
Clone the Repository:
git clone https://github.com/Daudmax/barcode-decoder.git cd barcode-decoder
-
Install Required Libraries:
Ensure you have Python 3.8 or higher installed. Then, install the necessary libraries using pip:
pip install -r requirements.txt
-
Download the Model:
Visit the Releases section to download the model file. Follow the instructions to execute the downloaded file.
Once you have installed the Barcode Decoder, you can use it as follows:
-
Run the Detection Script:
Use the command below to run the barcode detection on an image:
python detect.py --image path/to/your/image.jpg
-
View the Results:
The script will output the detected barcodes along with their coordinates and decoded values.
-
Real-Time Detection:
For real-time detection using your webcam, run:
python detect.py --video
The system is trained on a custom barcode dataset, which includes various types of barcodes in different environments. This diversity ensures that the model generalizes well across different scenarios.
- Dataset Size: The dataset contains over 10,000 images.
- Types of Barcodes: Includes QR codes, UPC codes, EAN codes, and more.
To ensure the effectiveness of the model, we evaluate it using the following metrics:
- Precision: Measures the accuracy of the detected barcodes.
- Recall: Indicates how many actual barcodes were detected.
- mAP (Mean Average Precision): A comprehensive metric that combines precision and recall.
These metrics provide insights into the model's performance and help in making necessary adjustments.
We welcome contributions from the community. If you would like to contribute to the Barcode Decoder project, please follow these steps:
-
Fork the Repository: Click the "Fork" button on the top right corner of this page.
-
Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b feature/YourFeatureName
-
Make Changes: Implement your changes and commit them.
git commit -m "Add Your Feature"
-
Push to Your Fork:
git push origin feature/YourFeatureName
-
Create a Pull Request: Submit a pull request detailing your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For the latest updates and downloadable files, visit the Releases section. Download the necessary files and execute them as needed.
The Barcode Decoder is a powerful tool for anyone looking to integrate barcode detection and decoding into their applications. With its high accuracy and ease of use, it stands out as a reliable solution in the field of computer vision and deep learning.
Explore the project, contribute, and help us improve barcode detection for everyone!