Files
mucapy/README.md
rattatwinko 1546528550
All checks were successful
Build MuCaPy Executable / build-and-package (push) Successful in 1m49s
added a license and readme
2025-05-30 21:43:27 +02:00

4.2 KiB

MuCaPy: Multi-Camera Python🎥🧠

Python Platform OpenCV Qt YOLO


📌 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

pip install -r requirements.txt
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 .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!

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


🔐 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