Download CivicEye
Get the latest version of CivicEye for your operating system. AI-powered traffic violation detection with a user-friendly GUI, supporting local files, webcams, and RTSP streams. Choose between online (cloud-synced) and offline (local-only) modes for flexibility and privacy.
Introduction
CivicEye is an innovative AI-powered software designed to detect and monitor traffic violations (like helmet non-compliance) using standard CCTV cameras, webcams, or video files. Leveraging the advanced YOLOv8 object detection model, it offers a user-friendly graphical interface (GUI) and flexible operation modes.
Key Features
- Real-Time Violation Detection: Employs YOLOv8 to accurately detect 'With Helmet' (green box) and 'Without Helmet' (red box) in various video sources.
- Multiple Video Sources: Supports local video files (
.mp4
,.avi
), connected PC webcams, and RTSP streams from CCTV cameras via the GUI. - Online & Offline Modes:
- Online Mode: Requires login (
civiceye.my
credentials). Saves detection details/frames to a linked database. Remembers login session. Needs internet for login/operation. - Offline Mode: Uses predefined local credentials
Email:
admin@civiceye
Password:civiceye
. Saves detection frames locally toDetects/
folder. No internet required after setup.
- Online Mode: Requires login (
- Adjustable Detection Speed: Balance performance and accuracy with 'Fast', 'Balanced' (default), and 'Quality' modes, adjusting frame skipping.
- User-Friendly GUI: Intuitive graphical interface (Tkinter/ttkbootstrap) with light/dark themes for easy operation.
- Secure User Authentication: Mandatory login screen for both online and offline modes.
- Automated Setup & Launch: Includes scripts (
.bat
for Windows,.sh
for Linux) for easy installation and launching. - Local Processing Core: Even in Online Mode, core AI processing happens locally, enhancing privacy. Offline mode is 100% local.
Technical Overview
Programming Language:
Built primarily using Python 3.8+.
Core Libraries:
- OpenCV (cv2): Video stream handling (files, cameras, RTSP), frame processing, image manipulation, saving detections.
- Ultralytics YOLOv8: Core real-time object detection model for helmet usage identification.
- Tkinter & ttkbootstrap: GUI creation, widgets, and modern theming (light/dark).
- Pillow (PIL Fork): Image operations, especially for GUI display.
- Requests: Used for online authentication and potential communication with the
civiceye.my
backend (Online Mode). - cvzone: (Potentially used, as in older versions) For drawing bounding boxes and annotations easily.
- Database Library (Potential): e.g.,
sqlite3
or others likepsycopg2
, depending on the Online Mode database implementation.
Future Enhancements Roadmap
- Develop a standalone executable installer (
.msi
) for further streamlined Windows deployment. - Continuously refine the GUI based on user feedback for improved usability and aesthetics.
- Expand the range of detectable violations to include "Triple Riding," "Wrong Way Driving," etc.
- Fine-tune the YOLO model for diverse regional traffic patterns and lighting conditions.
- Integrate optional real-time alert mechanisms (e.g., email/SMS) for critical violations.
- Enhance online mode features for aggregated analytics and reporting (user opt-in).
Support & Contributions
Encountered a bug? Have a feature suggestion? We welcome contributions! Please visit our official GitHub repository to report issues, propose enhancements, or contribute to the project. You can also reach out directly to the development lead, SHADOW.
Windows (Latest Version)
Installation Guide
System Requirements:
- OS: Windows 10 or later (64-bit recommended)
- Processor: Intel Core i3 (or equivalent AMD) or higher recommended
- RAM: 4GB (8GB Recommended for smoother performance)
- Storage: Approx. 5GB available disk space (Python, environment, detections)
- Python: Python 3.8+ must be installed and added to the system PATH during its installation (check "Add Python to PATH").
- Internet: Required during setup (
setup_civiceye.bat
) and for Online Mode operation. Optional for Offline Mode after setup.
Setup Instructions:
- Download the Latest Release:
Obtain the Windows package (.zip
archive) from the CivicEye Releases page. - Extract the Archive:
Right-click the downloaded.zip
file and select "Extract All..." to a suitable location (e.g.,C:\CivicEye
). Ensure the structure includessetup_civiceye.bat
,requirements.txt
, and theDATA
folder. - Run Installation Script:
Navigate into the extracted folder using File Explorer. Double-click thesetup_civiceye.bat
script.
A command prompt will open, check for Python, create a virtual environment (myenv
), install dependencies fromrequirements.txt
, create a launcher (run_civiceye.bat
), and optionally create a desktop shortcut (CivicEye.lnk
). Administrator privileges might be requested.
Follow the prompts in the command window (e.g., confirming deletion of setup files). - Launch the Application:
Once setup is complete, navigate back to the project directory. Double-clickrun_civiceye.bat
to start the software. You can also use theCivicEye.lnk
shortcut if created.
Software Workflow
- Login Screen: Launching the app presents the login screen.
- Online Mode: Enter your registered
civiceye.my
email and password. Click LOGIN. Requires internet. - Offline Mode: Use Email:
admin@civiceye
, Password:civiceye
. Click LOGIN. Operates locally. - Register: Opens
civiceye.my
registration page in browser.
- Online Mode: Enter your registered
- Main Window & Video Source: After login, use the GUI buttons:
- Browse File: Select a local video file.
- Use PC Camera: Access the default system webcam.
- Connect CCTV: Enter an RTSP stream URL.
- Side Menu (☰): Access settings:
- Toggle Theme: Switch between Light/Dark modes.
- Detection Speed: Choose Fast (Skip=15), Balanced (Skip=30), Quality (Skip=60).
- Logout: Return to login screen (clears online session).
- Exit Application: Close the program.
- Start/Stop Detection: Use the Green/Red buttons to control the AI processing. The video preview shows detections (Green: Helmet, Red: No Helmet).
- Violation Logging & Storage:
- Online Mode: 'Without Helmet' detections saved to your linked database.
- Offline Mode: 'Without Helmet' detection frames saved as
.jpg
in theDetects/
subfolder within the application directory.
- Status Bar: Displays current application status at the bottom.
Version Highlights (Windows Latest)
- Graphical User Interface (GUI): Built with Tkinter & ttkbootstrap (Light/Dark themes).
- Online/Offline Modes: Flexible operation with distinct authentication and data saving.
- Multiple Video Sources: Support for Files, Webcams, and RTSP streams via GUI.
- Adjustable Detection Speed: Control performance vs. accuracy trade-off.
- Online Session Persistence: Remembers online login.
- Automated Setup (
setup_civiceye.bat
): Simplifies installation with virtual environment and dependency handling. - Easy Launch (
run_civiceye.bat
/ Shortcut): Convenient ways to start the application. - Uninstaller Script (
uninstall_civiceye.bat
): Provided for component removal.
Linux (Version 1.2)
Installation Guide
System Requirements:
- OS: Linux (Debian/Ubuntu, Arch, Fedora derivatives recommended)
- Processor: Intel Core i3 (or equivalent AMD) or higher recommended
- RAM: 4GB (8GB Recommended)
- Storage: Approx. 25GB available disk space (Dependencies, environment, detections)
- Python: Python 3.8+ (Setup script installs
python3-venv
,python3-pip
,python3-tk
) - Internet: Required during initial setup and for Online Mode operation. Optional for Offline Mode after setup.
Setup Instructions (Terminal):
- Download or Clone Project:
Open your terminal.
Option 1: Clone using Git:
Option 2: Download the v1.2 source code archive: (If downloaded, extract the archive:git clone https://github.com/SHADOW2669/CivicEye.git
unzip v1.2.zip
) - Navigate to Project Directory:
cd CivicEye # Or the extracted folder name
- Run Setup Script:
Make the setup script executable and run it. It will prompt forsudo
password to install system packages.
The script detects your distro, installs dependencies, creates a virtual environment (chmod +x setup_civiceye.sh ./setup_civiceye.sh
myenv
), installs Python packages, creates a launcher (civiceye.sh
), and sets up desktop integration (civiceye.desktop
).
Note: The script deletes itself andrequirements.txt
upon successful completion. - Launch the Application:
Method 1: Use the Application Menu/Desktop Icon (Look for "CivicEye", may require logout/login first time. Might need to "Trust and Launch").
Method 2: Use the terminal launcher script:
(This activates the virtual environment and runs the Python script)../civiceye.sh
Software Workflow
- Login Screen: Launching the app presents the login screen.
- Online Mode: Enter your registered
civiceye.my
email and password. Click LOGIN. Requires internet. - Offline Mode: Use Email:
admin@civiceye
, Password:civiceye
. Click LOGIN. Operates locally. - Register: Opens
civiceye.my
registration page in browser.
- Online Mode: Enter your registered
- Main Window & Video Source: After login, use the GUI buttons:
- Browse File: Select a local video file.
- Use PC Camera: Access the default system webcam (e.g.,
/dev/video0
). - Connect CCTV: Enter an RTSP stream URL.
- Side Menu (☰): Access settings:
- Toggle Theme: Switch between Light/Dark modes.
- Detection Speed: Choose Fast, Balanced, Quality.
- Logout: Return to login screen (clears online session).
- Exit Application: Close the program.
- Start/Stop Detection: Use the Green/Red buttons to control the AI processing. The video preview shows detections (Green: Helmet, Red: No Helmet).
- Violation Logging & Storage:
- Online Mode: 'Without Helmet' detections saved to your linked database.
- Offline Mode: 'Without Helmet' detection frames saved as
.jpg
in theDetects/
subfolder within the application directory.
- Status Bar: Displays current application status at the bottom.
Version 1.2 Highlights
- Graphical User Interface (GUI): First Linux version with GUI (Tkinter/ttkbootstrap), replacing command-line.
- Online/Offline Modes: Introduced flexible operation modes with specific credentials.
- Multiple Video Sources: Support for Files, Webcams, and RTSP streams via GUI.
- Adjustable Detection Speed: Control performance vs. accuracy.
- Online Session Persistence: Remembers online login.
- Enhanced Setup Script (
setup_civiceye.sh
): Improved distro detection, handles GUI dependencies, integrates with desktop environment. - Desktop Integration: Creates
.desktop
launcher for application menu/desktop. - Self-Cleaning Setup: Setup script removes itself and requirements file after success.
- Theming: Light ('litera') and Dark ('darkly') themes available.