https://github.com/nothing-dot-exe/advanced-product-detection-gpu-powered
Real-time **product and object detection** using the **latest Ultralytics YOLO models** with full **GPU acceleration (CUDA)**. This system detects **any product or object** while **ignoring humans**, giving each detected item a unique color for easy distinction.
https://github.com/nothing-dot-exe/advanced-product-detection-gpu-powered
ai ml ml-project real-time tranding web-cam
Last synced: about 2 months ago
JSON representation
Real-time **product and object detection** using the **latest Ultralytics YOLO models** with full **GPU acceleration (CUDA)**. This system detects **any product or object** while **ignoring humans**, giving each detected item a unique color for easy distinction.
- Host: GitHub
- URL: https://github.com/nothing-dot-exe/advanced-product-detection-gpu-powered
- Owner: Nothing-dot-exe
- License: mit
- Created: 2025-11-08T05:07:48.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2026-04-04T03:44:37.000Z (2 months ago)
- Last Synced: 2026-04-04T19:52:59.277Z (2 months ago)
- Topics: ai, ml, ml-project, real-time, tranding, web-cam
- Language: Python
- Homepage: https://nothing-dot-exe.github.io/Advanced-Product-Detection-GPU-Powered/
- Size: 123 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ง Advanced Product Detection (GPU-Powered)
Real-time **product and object detection** using the **latest Ultralytics YOLO models** with full **GPU acceleration (CUDA)**.
This system detects **any product or object** while **ignoring humans**, giving each detected item a unique color for easy distinction.
---
## ๐ Features
- โก **GPU-powered (CUDA)** for real-time inference
- ๐งฉ Detects **all COCO objects** (bottles, laptops, phones, fruits, etc.)
- ๐ซ Automatically ignores **person (human)** class
- ๐จ Random **color-coded bounding boxes** per product
- ๐ฅ๏ธ Works on **webcam or video files**
- ๐ง Built using **latest Ultralytics YOLO (v8 or v10)**
---
## ๐ Folder Structure
```
hand_product/
โ
โโโ main.py # Main detection script
โโโ requirements.txt # Dependencies
โโโ README.md # Documentation
```
---
## โ๏ธ Setup Instructions
### 1๏ธโฃ Create & Activate Virtual Environment
```bash
python -m venv .venv
.venv\Scripts\activate # On Windows
source .venv/bin/activate # On Linux/macOS
```
### 2๏ธโฃ Install Dependencies
Ensure your **PyTorch** build supports CUDA:
```bash
pip uninstall torch torchvision torchaudio -y
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
```
Then install the rest:
```bash
pip install -r requirements.txt
```
---
## โก Run the Detector
### โถ๏ธ Webcam Mode
```bash
python main.py
```
### โถ๏ธ Video File Mode
(If you add a `--source` parameter in code)
```bash
python main.py --source path/to/video.mp4
```
Press **ESC** to close the window.
---
## ๐ง How It Works
1. Loads the **latest YOLO model** (`yolov8l.pt` or higher) on your **GPU**.
2. Detects all visible objects per frame.
3. Automatically **ignores humans (person class)**.
4. Draws **color-coded boxes** for all other products/objects with confidence scores.
Example output:
```
bottle 0.89
cell phone 0.91
laptop 0.84
```
---
## ๐งฐ Requirements
```
ultralytics>=8.3.223
opencv-python
torch>=2.3.0
torchvision
torchaudio
```
---
## ๐ฅ๏ธ Tested Hardware
| Component | Example |
|------------|----------|
| GPU | NVIDIA RTX 3060 12GB |
| CUDA | 12.1 |
| Python | 3.12 |
| OS | Windows 10 / 11 |
---
## ๐งฉ Model Options
| Model | Size | Speed | Accuracy |
|--------|------|--------|-----------|
| `yolov8n.pt` | Nano | โกโกโก | Basic |
| `yolov8s.pt` | Small | โกโก | Medium |
| `yolov8m.pt` | Medium | โก | Balanced |
| `yolov8l.pt` | Large | โก | High Accuracy |
| `yolov8x.pt` | X-Large | ๐ | Best Accuracy |
For **segmentation masks**, use `yolov8n-seg.pt`.
---
## ๐ฎ Stay Advanced โ Upgrade to YOLOv10
Ultralytics recently released **YOLOv10**, offering better accuracy and faster performance.
To upgrade:
```bash
pip install -U ultralytics
```
Then in your code, replace:
```python
model = YOLO("yolov8l.pt")
```
with:
```python
model = YOLO("yolov10l.pt")
```
YOLOv10 is fully backward-compatible and uses the same API โ your project will continue working with no code changes.
---
## ๐งช Tips
- Adjust confidence threshold in `main.py` (e.g., `if box.conf > 0.4:`).
- For faster FPS, reduce webcam resolution or use `yolov8n.pt`.
- Add custom product filters easily if you want to exclude certain categories.
---
Created with โค๏ธ using **Python**, **Ultralytics YOLO**, and **OpenCV**,
powered by **NVIDIA GPU**.
---