# MuCaPy: Multi-Camera Python๐ŸŽฅ๐Ÿง  [![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/) [![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey)]() [![OpenCV](https://img.shields.io/badge/OpenCV-4.x-brightgreen)](https://opencv.org/) [![Qt](https://img.shields.io/badge/PyQt5-Used-informational)](https://riverbankcomputing.com/software/pyqt/) [![YOLO](https://img.shields.io/badge/YOLOv4-Supported-orange)]() --- ## ๐Ÿ“Œ Overview **MuCaPy** (Multi-Camera Python) is a modern, robust, and user-friendly real-time multi-camera object detection platform powered by **YOLOv4** and **OpenCV**, designed with a professional PyQt5 GUI. It supports both **local** and **network IP cameras**, allows dynamic camera selection, advanced configuration, and comes with a beautiful dark-themed UI. CUDA support ensures high performance where available. --- ## โœจ Features - ๐Ÿ” Connect multiple **local USB or IP cameras** - ๐Ÿ’ก Real-time **YOLOv4 object detection** - ๐ŸŽ›๏ธ Intelligent UI with **PyQt5**, collapsible dock widgets, and tabbed views - ๐Ÿ“ธ Take **screenshots** per camera feed - โš™๏ธ **Model loader** for dynamic YOLO weight/config/class sets - ๐Ÿ”Œ **Network camera support** with authentication - ๐Ÿ–ฅ๏ธ **Hardware monitor** (CPU and per-core utilization via `psutil`) - ๐Ÿ–ผ๏ธ Fullscreen camera views & dynamic layout switcher - ๐Ÿ’พ Persistent **configuration management** - ๐Ÿงช **Camera connectivity test tools** --- ## ๐Ÿ“ฆ Requirements ```bash pip install -r requirements.txt ```
Dependencies: - Python 3.8+ - OpenCV (cv2) - PyQt5 - NumPy - Requests - psutil
--- ## ๐Ÿš€ Getting Started ```bash python main.py ``` > โœ… Make sure your YOLOv4 model directory contains `.weights`, `.cfg`, and `.names` files. --- ## ๐Ÿ“ Model Directory Structure This is important! If you dont have the correct directory structure, the model loader won't work. Models are Included in the Git Repository! ```bash model/ โ”œโ”€โ”€ yolov4.cfg โ”œโ”€โ”€ yolov4.weights โ””โ”€โ”€ coco.names ``` --- ## ๐ŸŽฎ UI Highlights - **Model Loader**: Easily select model directory - **Camera Selection**: Mix and match local/network sources - **Layouts**: Switch between 1, 2, 3, 4, or grid layouts - **FPS Control**: Adjustable frame rate - **Dark Theme**: Developer-friendly aesthetic - **Screenshot Button**: Save current camera frame - **Hardware Stats**: Monitor CPU load in real-time --- ## ๐Ÿ”— Recommended YOLOv4 Model Links - [YOLOv4.cfg](https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4.cfg) - [YOLOv4.weights](https://github.com/AlexeyAB/darknet/releases/download/yolov4/yolov4.weights) - [COCO.names](https://github.com/pjreddie/darknet/blob/master/data/coco.names) --- ## ๐Ÿ” Network Camera Example Supports URLs like: - `http://192.168.1.101:8080/video` - `http://username:password@ip:port/stream` Authentication is optional and can be configured per-camera. --- ## ๐Ÿงช Camera Test Tools - Test connectivity to any selected camera - Auto-handle reconnection on failures - Preview all selected feeds with drag-and-drop reordering --- ## โš™๏ธ Configuration & Persistence This is also Very Important if you have multiple cameras or want to save / delete your settings. You can save your settings to a file and load them later. Settings (last model, selected cameras, layout, FPS, etc.) are saved to: - **Linux/macOS**: `~/.config/mucapy/config.json` - **Windows**: `%APPDATA%\MuCaPy\config.json` --- ## ๐Ÿ“ธ Screenshot Storage Default directory: `~/Pictures/MuCaPy` (can be changed from the UI) --- ## ๐Ÿ“– About > _I built MuCaPy to learn about OpenCV, Python, and to have a simple, easy-to-use camera viewer for my Camera Server, since ContaCam doesn't work on my system (not well atleast!)._ --- ## ๐Ÿ”ฎ To Be Added - **YOLOv5 / YOLOv8 / YOLO-NAS support** - **RTSP stream handling** _( Currently works but is fuzzy / crashes easily)_ - **Real-time performance dashboards** - **WebSocket remote monitoring** - **Not-so-laggy UI improvements** - **Better CUDA implementation** --- ## ๐Ÿ“„ License This Project is currently under a Proprietary Licsence and shouldnt be distributed! --- ## ๐Ÿง‘โ€๐Ÿ’ป Maintainers - ๐Ÿ‘ค Rattatwinko