The multiqr-hackathon project is a powerful QR code detection tool that utilizes a custom-trained YOLOv8 model to detect multiple QR codes on images. This project is designed for individuals and organizations looking to automate the process of detecting and decoding QR codes. The project solves the problem of manual QR code detection, which can be time-consuming and prone to errors.
The project consists of several components, including a data loader, a model trainer, and an inference script. The data loader is responsible for loading the dataset, while the model trainer trains the YOLOv8 model on the dataset. The inference script uses the trained model to detect QR codes on new images.
The project is built using Python and utilizes several libraries, including PyTorch, OpenCV, and Ultralytics. The project is designed to be easy to use and requires minimal setup and configuration.
- 🔥 QR Code Detection — Detect multiple QR codes on images using a custom-trained YOLOv8 model.
- 📸 Image Processing — Load and process images using OpenCV and PyTorch.
- 📊 Model Training — Train a YOLOv8 model on a dataset using Ultralytics.
- 📁 Data Loading — Load datasets using a custom data loader.
- 📝 Inference — Use a trained model to detect QR codes on new images.
- 📈 Evaluation — Evaluate the performance of the model using a custom evaluation script.
- 📊 JSON Output — Output detection results in JSON format.
Python 3.8 or later, PyTorch, OpenCV, Ultralytics, and other dependencies listed in requirements.txt.
pip install -r requirements.txtpython infer.py --weights best.pt --input images --output output.jsonTo detect QR codes on an image, run the inference script with the --weights option specifying the path to the trained model, the --input option specifying the input image directory, and the --output option specifying the output JSON file.
python infer.py --weights best.pt --input images --output output.jsonTo train a new model, run the train script with the --data option specifying the path to the dataset.
python train.py --data data.yamlTo evaluate the performance of a trained model, run the evaluation script with the --pred option specifying the path to the prediction JSON file and the --gt option specifying the path to the ground truth JSON file.
python evaluate.py --pred predictions.json --gt ground_truth.jsonmultiqr-hackathon/
├── evaluate.py
├── infer.py
├── requirements.txt
├── src
│ ├── datasets
│ │ └── dataloader.py
│ ├── models
│ │ └── model.py
│ └── utils
│ └── helpers.py
├── train.py
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.8+ | Programming language |
| PyTorch | 1.9+ | Deep learning framework |
| OpenCV | 4.5+ | Computer vision library |
| Ultralytics | 0.1+ | YOLOv8 implementation |
| NumPy | 1.20+ | Numerical computing library |
| Matplotlib | 3.4+ | Plotting library |
| Pillow | 8.2+ | Image processing library |
| tqdm | 4.62+ | Progress bar library |
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
The latest commit did not change any files, but the documentation does not reflect the actual code structure and files, such as the presence of 'evaluate.py', 'infer.py', 'train.py', and specific directory structures like 'src/models' and 'src/datasets', which are not mentioned in the existing README/docs.
This documentation was auto-regenerated by LiveDocAI to reflect the latest code changes.