A computer-vision safety monitoring system for exhibition environments, combining relic detection/tracking, human pose estimation, dangerous-object detection, and real-time alert visualization in a single video pipeline.
The current default configuration treats
cupas the protected relic class andknife,scissors, andbaseball batas dangerous classes (configurable in code).
- YOLOv7-tiny detection with lightweight multi-object tracking and relic selection logic
- MediaPipe Pose 33-keypoint estimation
- Relic fence intrusion detection plus dangerous-object/person association alerts
- PySide6 desktop UI with alert list, status panel, and video overlays
- Automatic first-run download for pose model and YOLO weights
- Python 3.10+
- Linux / macOS / Windows (with camera access permissions)
- Internet access for first-time model download
# 1) Install dependencies
pip install -r requirements.txt
# 2) Clone YOLOv7 repository
# The current implementation dynamically imports inference utilities from this local folder.
git clone --depth 1 https://github.com/WongKinYiu/yolov7.git# Recommended: launch the integrated PySide6 client
python run.py --source 0Optional arguments:
--source: camera index (for example,0) or video file path--conf: YOLO confidence threshold (default:0.25)--pose-model: pose model path (default:models/pose_landmarker_full.task)--yolo-model: YOLO weights path (default:models/yolov7-tiny.pt)--alert-sound: custom alert sound file path
# Integrated monitoring logic with OpenCV window
PYTHONPATH=src python -m cv_safety_sys.monitoring.integrated_monitor --source 0
# Directly launch the Qt module
PYTHONPATH=src python -m cv_safety_sys.ui.qt_monitor --source 0
# Detector/tracker only (debug)
PYTHONPATH=src python -m cv_safety_sys.detection.yolov7_tracker --source 0cv_safety_sys/
├── run.py
├── requirements.txt
├── src/cv_safety_sys/
│ ├── detection/ # YOLOv7 detection and tracking
│ ├── monitoring/ # Relic + pose + dangerous-object safety logic
│ ├── pose/ # MediaPipe pose model download helper
│ ├── ui/ # PySide6 client
│ └── utils/ # Utilities (for example, text rendering)
└── docs/ # Architecture and module documentation
- System architecture:
docs/system_architecture.md - Relic protection workflow:
docs/object_protection.md - Pose module guide:
docs/webcam_pose_detection.md
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). You may copy, modify, and redistribute this project under the terms of GPL-3.0. See the LICENSE file for details.
This project is released under GPL-3.0. You may use, modify, and redistribute it under GPL-3.0 conditions. If you distribute modified versions, you are generally required to provide corresponding source code under GPL-compatible terms. See LICENSE for full terms.
Copyright (C) 2025 Linsheng Yin, Heng Quan, Bojin Li, Yunpeng Din, Penghan Chen