Compare commits
28 Commits
experiment
...
08431ee6ca
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08431ee6ca | ||
|
|
7dcf03970e | ||
|
|
44f2797a5c | ||
|
|
98ad6242fa | ||
|
|
b3b3d77394 | ||
|
|
e50ab9d03c | ||
|
|
c9c60f7237 | ||
|
|
de156a5c33 | ||
|
|
e4ec7fe244 | ||
|
|
1546528550 | ||
|
|
e7b4cc0f92 | ||
|
|
199d81891f | ||
|
|
ea1f0bcd85 | ||
|
|
9ae940585a | ||
|
|
78403395c1 | ||
|
|
b313fc7629 | ||
|
|
3c847cee01 | ||
|
|
9ed0b768b8 | ||
|
|
4a06b759e3 | ||
|
|
2887e2927c | ||
| 6da4cd2b40 | |||
|
|
65be018700 | ||
|
|
5399cb8739 | ||
|
|
b80dd3f7d7 | ||
|
|
c264acac29 | ||
|
|
b24426c1d3 | ||
|
|
2ebaf16006 | ||
| 24ac4ccd51 |
42
.gitea/workflows/run-mucapy.yml
Normal file
42
.gitea/workflows/run-mucapy.yml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: Build MuCaPy Executable
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-package:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python 3.10
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
- name: Install PyInstaller
|
||||||
|
run: pip install pyinstaller
|
||||||
|
|
||||||
|
- name: Build executable with PyInstaller
|
||||||
|
run: |
|
||||||
|
pyinstaller --onefile --windowed mucapy/main.py \
|
||||||
|
--add-data "mucapy/styling:styling" \
|
||||||
|
--add-data "mucapy/models:models"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Upload executable artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: mucapy-executable
|
||||||
|
path: dist/
|
||||||
|
|
||||||
10
.gitignore
vendored
Normal file
10
.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
mucapy/seperate/__pycache__/__init__.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/AboutWindow.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/CameraDisplay.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/CollapsibleDock.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/Config.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/main.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/MainWindow.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/MultiCamYOLODetector.cpython-313.pyc
|
||||||
|
mucapy/seperate/__pycache__/NetworkCameraDialog.cpython-313.pyc
|
||||||
41
LICENSE
Normal file
41
LICENSE
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
MuCaPy Proprietary Software License
|
||||||
|
Version 1.0 — May 30, 2025
|
||||||
|
|
||||||
|
Copyright © 2025 Rattatwinko
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
This software, including all source code, binaries, documentation, and associated files (collectively, the "Software"), is the exclusive property of the copyright holder.
|
||||||
|
|
||||||
|
The Software is proprietary and confidential. It is licensed, not sold, solely for internal, non-commercial use by the copyright holder or explicitly authorized individuals.
|
||||||
|
1. License Grant
|
||||||
|
|
||||||
|
The copyright holder does not grant any rights to use, copy, modify, distribute, sublicense, or create derivative works from the Software except as explicitly authorized in writing.
|
||||||
|
2. Restrictions
|
||||||
|
|
||||||
|
You shall not, under any circumstances:
|
||||||
|
|
||||||
|
Redistribute the Software in any form (source or binary).
|
||||||
|
|
||||||
|
Publish, transmit, upload, or make the Software publicly available.
|
||||||
|
|
||||||
|
Reverse engineer, decompile, or disassemble the Software.
|
||||||
|
|
||||||
|
Use the Software for any commercial or revenue-generating purpose.
|
||||||
|
|
||||||
|
Share the Software with third parties, contractors, or external collaborators.
|
||||||
|
|
||||||
|
Access to the Software must remain confined to private, secure environments under the control of the copyright holder.
|
||||||
|
3. Ownership
|
||||||
|
|
||||||
|
All title, ownership rights, and intellectual property rights in and to the Software remain solely with the copyright holder.
|
||||||
|
4. Termination
|
||||||
|
|
||||||
|
Any unauthorized use of the Software automatically terminates any implied rights and may result in legal action.
|
||||||
|
5. Disclaimer of Warranty
|
||||||
|
|
||||||
|
The Software is provided "AS IS" without warranty of any kind, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement.
|
||||||
|
6. Limitation of Liability
|
||||||
|
|
||||||
|
In no event shall the copyright holder be liable for any damages, including direct, indirect, incidental, special, or consequential damages arising out of or related to the use or inability to use the Software.
|
||||||
|
|
||||||
|
This license is not OSI-approved and must not be interpreted as open-source. For internal use only.
|
||||||
169
README.md
Normal file
169
README.md
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
# MuCaPy: Multi-Camera Python🎥🧠
|
||||||
|
|
||||||
|
[](https://www.python.org/)
|
||||||
|
[]()
|
||||||
|
[](https://opencv.org/)
|
||||||
|
[](https://riverbankcomputing.com/software/pyqt/)
|
||||||
|
[]()
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📌 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
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Dependencies:</strong></summary>
|
||||||
|
|
||||||
|
- Python 3.8+
|
||||||
|
- OpenCV (cv2)
|
||||||
|
- PyQt5
|
||||||
|
- NumPy
|
||||||
|
- Requests
|
||||||
|
- psutil
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🚀 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
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 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:
|
||||||
|
```sh
|
||||||
|
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_
|
||||||
|
|
||||||
|
[](run.mp4)
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔗 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
|
||||||
0
__init__.py
Normal file
0
__init__.py
Normal file
1906
mucapy/main.py
1906
mucapy/main.py
File diff suppressed because it is too large
Load Diff
36
mucapy/styling/about.qss
Normal file
36
mucapy/styling/about.qss
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
QDialog {
|
||||||
|
background-color: #2D2D2D;
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel {
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding: 4px;
|
||||||
|
background-color: #252525;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox::title {
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
left: 10px;
|
||||||
|
padding: 0 3px;
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton {
|
||||||
|
background-color: #3A3A3A;
|
||||||
|
color: #DDD;
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 5px;
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover {
|
||||||
|
background-color: #4A4A4A;
|
||||||
|
}
|
||||||
11
mucapy/styling/bar/a85.qss
Normal file
11
mucapy/styling/bar/a85.qss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
QProgressBar {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 2px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: #E5A823;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
11
mucapy/styling/bar/else.qss
Normal file
11
mucapy/styling/bar/else.qss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
QProgressBar {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 2px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: #A23535;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
11
mucapy/styling/bar/u60.qss
Normal file
11
mucapy/styling/bar/u60.qss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
QProgressBar {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 2px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: #3A6EA5;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
12
mucapy/styling/core_bar.qss
Normal file
12
mucapy/styling/core_bar.qss
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
QProgressBar {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 2px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
max-height: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: #3A6EA5;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
11
mucapy/styling/cpu_progress.qss
Normal file
11
mucapy/styling/cpu_progress.qss
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
QProgressBar {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 2px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: #3A6EA5;
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
BIN
mucapy/styling/logo.png
Normal file
BIN
mucapy/styling/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
95
mucapy/styling/mainwindow.qss
Normal file
95
mucapy/styling/mainwindow.qss
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
QMainWindow, QWidget {
|
||||||
|
background-color: #2D2D2D;
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel {
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton {
|
||||||
|
background-color: #3A3A3A;
|
||||||
|
color: #DDD;
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:hover {
|
||||||
|
background-color: #4A4A4A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:pressed {
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton:disabled {
|
||||||
|
background-color: #2A2A2A;
|
||||||
|
color: #777;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox, QSpinBox {
|
||||||
|
background-color: #3A3A3A;
|
||||||
|
color: #DDD;
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox {
|
||||||
|
border: 1px solid #555;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-top: 10px;
|
||||||
|
padding-top: 15px;
|
||||||
|
background-color: #252525;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox::title {
|
||||||
|
subcontrol-origin: margin;
|
||||||
|
left: 10px;
|
||||||
|
padding: 0 3px;
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenuBar {
|
||||||
|
background-color: #252525;
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenuBar::item {
|
||||||
|
background-color: transparent;
|
||||||
|
padding: 5px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenuBar::item:selected {
|
||||||
|
background-color: #3A3A3A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu {
|
||||||
|
background-color: #252525;
|
||||||
|
border: 1px solid #444;
|
||||||
|
color: #DDD;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu::item:selected {
|
||||||
|
background-color: #3A3A3A;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollArea {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDockWidget {
|
||||||
|
titlebar-close-icon: url(none);
|
||||||
|
titlebar-normal-icon: url(none);
|
||||||
|
}
|
||||||
|
|
||||||
|
QDockWidget::title {
|
||||||
|
background: #252525;
|
||||||
|
padding-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QToolButton {
|
||||||
|
background-color: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
13
mucapy_config.json
Normal file
13
mucapy_config.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"network_cameras": {},
|
||||||
|
"last_model_dir": "",
|
||||||
|
"last_screenshot_dir": "/home/rattatwinko/Pictures/MuCaPy",
|
||||||
|
"last_layout": 0,
|
||||||
|
"last_fps": 10,
|
||||||
|
"last_selected_cameras": [],
|
||||||
|
"window_geometry": null,
|
||||||
|
"confidence_threshold": 0.35,
|
||||||
|
"model_dir": "/home/rattatwinko/Documents/mucapy/mucapy/mucapy/models",
|
||||||
|
"fps": 10,
|
||||||
|
"layout": 0
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
opencv-python>=4.5.0
|
opencv-python==4.11.0.86
|
||||||
opencv-contrib-python>=4.5.0
|
numpy==2.2.6
|
||||||
numpy>=1.19.0
|
PyQt5==5.15.11
|
||||||
PyQt5>=5.15.0
|
requests==2.32.3
|
||||||
|
psutil==7.0.0
|
||||||
Reference in New Issue
Block a user