https://github.com/lamouchi-bayrem/data-matrix-scanner
A dual-interface tool that leverages AI to **detect and decode QR codes and Data Matrix codes** from images using computer vision
https://github.com/lamouchi-bayrem/data-matrix-scanner
data datamatrix-scanner decoder flask qrcode scanner tkinter-gui webapp
Last synced: about 2 months ago
JSON representation
A dual-interface tool that leverages AI to **detect and decode QR codes and Data Matrix codes** from images using computer vision
- Host: GitHub
- URL: https://github.com/lamouchi-bayrem/data-matrix-scanner
- Owner: Lamouchi-Bayrem
- Created: 2024-12-08T11:45:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-06T22:00:47.000Z (about 1 year ago)
- Last Synced: 2026-04-30T07:38:13.459Z (about 2 months ago)
- Topics: data, datamatrix-scanner, decoder, flask, qrcode, scanner, tkinter-gui, webapp
- Language: Python
- Homepage:
- Size: 658 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ท QR & Data Matrix Decoder Application
This project provides two intuitive interfaces to **detect and decode QR codes and Data Matrix codes**:
1. ๐ A **modern Flask-based web application**
2. ๐ฅ๏ธ A **desktop GUI application built with Tkinter**
---
-----
## ๐ Demo for the tkinter gui app

---------------
## ๐ Demo for the web app
)
## ๐ Features
- ๐ Detects **QR codes** and **Data Matrix codes** in images
- ๐ง Utilizes **YOLOv8** for robust and accurate detection
- ๐ผ๏ธ Handles **multiple codes per image**
- ๐งฉ Displays **decoded data** with visual overlays
- ๐ Web app supports **drag-and-drop** uploads
- ๐ฑ๏ธ Desktop app supports **file selection dialog**
- ๐ One-click copy of decoded content
- ๐งช Pre-packaged with sample images for testing
---
## ๐ฆ Installation
### โ
Prerequisites
- Python **3.8+**
- `pip` package manager
### ๐ฅ Setup for Both Applications
1. **Clone the repository**:
```bash
git clone https://github.com/Lamouchi-Bayrem/Data-Matrix-scanner.git
cd Data-Matrix-scanner
2. **Install dependencies**:
```bash
pip install -r requirements.txt
```
3. **Download the YOLO model weights**:
* Place `best.pt` in the root directory.
---
## ๐ Web Application (Flask)
### โถ๏ธ Running the Web App
```bash
python app.py
```
Access it at: [http://localhost:5000](http://localhost:5000)
### ๐งญ Usage
* Open the web interface in your browser
* Drag and drop an image or click to select
* View decoded codes with bounding boxes
* Copy results to clipboard
### ๐ Web App Structure
```
web-app/
โโโ app.py # Flask backend
โโโ requirements.txt # Web dependencies
โโโ best.pt # YOLOv8 model weights
โโโ uploads/ # Uploaded images
โโโ templates/
โโโ index.html # Web interface
```
---
## ๐ฅ๏ธ Desktop Application (Tkinter)
### โถ๏ธ Running the Desktop App
```bash
python tkinter_app.py
```
### ๐งญ Usage
* Launch the GUI
* Click **"Open Image"** to choose a file
* View decoded codes and visual highlights
* Save or copy results
### ๐ Desktop App Structure
```
desktop-app/
โโโ tkinter_app.py # Desktop GUI
โโโ requirements.txt # GUI dependencies
โโโ best.pt # YOLOv8 model weights
โโโ samples/ # Example test images
```
---
## โ๏ธ Performance Notes
* โฑ๏ธ **Average processing time**: 500โ1500 ms per image (depending on hardware)
* ๐ **Recommended image size**: 800โ2000px per side
* ๐ผ๏ธ **Supported formats**: PNG, JPG, JPEG, BMP
---
## ๐งฐ Troubleshooting
### โ No codes detected?
* Ensure the image has good lighting
* Try a higher resolution image
* Lower the confidence threshold if needed
### โ Installation errors?
* Verify Python version (3.8+)
* If using GPU, ensure CUDA is configured correctly
---
## ๐ License
This project is licensed under the **MIT License** โ see the [LICENSE](LICENSE) file for details.