https://github.com/vishnu-tppr/camouflage-ai
π₯ Camouflage-AI β A fast and flexible AI tool for removing video backgrounds using YOLOv8 segmentation. Customize with solid colors, blur, or images. Built with Python & CustomTkinter for a stunning desktop experience.
https://github.com/vishnu-tppr/camouflage-ai
ai-desktop-app ai-projects ai-tool ai-video-editor background-removal camouflage-ai gui image-segmentation machine-learning open-source-project opencv python top-github-projects video-ai video-processing vishnu-cse yolov8-segmentation
Last synced: 4 months ago
JSON representation
π₯ Camouflage-AI β A fast and flexible AI tool for removing video backgrounds using YOLOv8 segmentation. Customize with solid colors, blur, or images. Built with Python & CustomTkinter for a stunning desktop experience.
- Host: GitHub
- URL: https://github.com/vishnu-tppr/camouflage-ai
- Owner: Vishnu-tppr
- License: mit
- Created: 2025-05-16T17:48:39.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-16T18:14:48.000Z (5 months ago)
- Last Synced: 2025-05-16T18:39:12.149Z (5 months ago)
- Topics: ai-desktop-app, ai-projects, ai-tool, ai-video-editor, background-removal, camouflage-ai, gui, image-segmentation, machine-learning, open-source-project, opencv, python, top-github-projects, video-ai, video-processing, vishnu-cse, yolov8-segmentation
- Language: Python
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# πΌοΈ Camouflage AI β Smart Video Background Remover π₯π§
> π― An AI-powered desktop tool for removing video backgrounds using **YOLOv8 segmentation**.
> π¨ Choose solid colors, images, or blur effects as your new backdrop β it's fast, clean, and stunningly simple!
---
## π Table of Contents
- [β¨ Features](#-features)
- [πΈ Demo Screenshots](#-demo-screenshots)
- [π§ How It Works](#-how-it-works)
- [π File Structure](#-file-structure)
- [βοΈ Requirements](#-requirements)
- [π How to Run](#-how-to-run)
- [π§© Technologies Used](#-technologies-used)
- [π¨π»βπ» Author](#-author)
- [π License](#-license)---
## β¨ Features
- π§ββοΈ **AI-Powered Person Segmentation** β Detects humans using `YOLOv8n-seg`.
- π¨ **Background Options**:
- Solid color picker π¨
- Custom background image πΌοΈ
- Gaussian blur effect π
- π **Video File Input** β Select and process any video file.
- π **Progress Tracking** β Real-time status updates with loading bars.
- π§ **Lightweight YOLOv8n Model** β Fast, accurate, and ideal for personal devices.
- π₯οΈ **Cross-compatible** β Works on both CPU and GPU environments.---
## πΈ Demo Screenshots








---
## π§ How It Works
### 1οΈβ£ YOLOv8 Segmentation
```python
from ultralytics import YOLO
model = YOLO("yolov8n-seg.pt")
results = model.track(frame, persist=True, classes=0)
````Detects the person (class ID 0) and generates binary masks for each frame.
---
### 2οΈβ£ Background Replacement
Based on your choice:
* **Color**: Overlays the mask with the selected RGB color.
* **Image**: Resizes and merges a new image background.
* **Blur**: Applies `cv2.GaussianBlur()` behind the person.```python
mask = masks[0]
inverse_mask = cv2.bitwise_not(mask)
foreground = cv2.bitwise_and(frame, frame, mask=mask)
background = cv2.bitwise_and(chosen_bg, chosen_bg, mask=inverse_mask)
final = cv2.add(foreground, background)
```---
## π File Structure
```
π¦ CamouflageAI/
β£ π Camouflage AI.py # GUI App using CustomTkinter
β£ π process_video.py # Main processing logic with YOLO
β£ π requirements.txt # Dependencies
β π README.md # Youβre here!
```---
## βοΈ Requirements
Install all required packages with:
```bash
pip install -r requirements.txt
```**Or manually:**
```bash
pip install customtkinter opencv-python numpy rembg pillow tkinter moviepy matplotlib scikit-image tqdm pyperclip
```π Tested with Python 3.10+ on Windows
---
## π How to Run
```bash
python "Camouflage AI.py"
```β Make sure `process_video.py` is in the same directory.
πΌοΈ Output videos are automatically saved in the `output/` folder.---
## π§© Technologies Used
* [Python 3](https://www.python.org/)
* [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics)
* [OpenCV](https://opencv.org/)
* [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter)
* [NumPy](https://numpy.org/)
* [Pillow (PIL)](https://pypi.org/project/Pillow/)
* [Torch (PyTorch)](https://pytorch.org/)---
## π¨π»βπ» Author
Made with β€οΈ by [**Vishnu**](https://www.linkedin.com/in/vishnu-v-31583b327/)
> βBuild with passion, debug with precision.β π₯
---
## π License
This project is open-source and licensed under the **MIT License**.
---
π If you found this useful, leave a β on the repo and share it!
```