MuCaPy: Multi-Camera Python🎥🧠
📌 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/popout camera views with zoom, pan, grid & timestamp overlays, snapshots, and shortcuts
- 💾 Persistent configuration management
📦 Requirements
pip install -r requirements.txt
Troubleshooting (Windows): If you see "ImportError: DLL load failed while importing QtCore",
- Uninstall conflicting Qt packages:
pip uninstall -y python-qt5 PySide2 PySide6 - Reinstall PyQt5:
pip install --upgrade --force-reinstall PyQt5==5.15.11 - Install Microsoft VC++ x64 runtime: https://aka.ms/vs/17/release/vc_redist.x64.exe
Dependencies:
- Python 3.8+
- OpenCV (cv2)
- PyQt5
- NumPy
- Requests
- psutil
🚀 Getting Started
python main.py
✅ Make sure your YOLOv4 model directory contains
.weights,.cfg, and.namesfiles.
📁 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!
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
Gitea Worflow Download
You can actually download Gitea Workflow compiled code that will run on your local machine. But for this to work you need to enter one of the following commands in your terminal:
chmod a+x main # or the name of your compiled file
Note: This will only work on Linux! ( This is cause of the Gitea Runner (Which runs on Ubuntu!)) If you are on Windows you can compile it yourself with PyInstaller
🔗 Recommended YOLOv4 Model Links
🔐 Network Camera Example
Supports URLs like:
http://192.168.1.101:8080/videohttp://username:password@ip:port/stream
Authentication is optional and can be configured per-camera.
⚙️ 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