This project is designed to monitor public health and manage crowd density in real-time using advanced thermal cameras, computer vision techniques, and dynamic alert displays. The system extracts temperature data from video feeds using OCR, tracks individual temperatures, and displays dynamic health and safety messages on external monitors.
- Extracts temperature readings using OCR from thermal camera feeds.
- Tracks the number of individuals and adjusts occupancy limits in real-time.
- Displays warnings for elevated temperatures and overcrowding on external monitors.
- Fully compatible with HK Provix cameras and Tesseract OCR.
- HK Provix Camera
- Camera 01: Normal video feed with temperature readings.
- Camera 02: Thermal feed for enhanced monitoring.
- External Monitor: HDMI-supported display for alert notifications.
- Python: Version 3.8 or higher.
- Tesseract OCR: Properly installed and configured (e.g.,
C:\Program Files (x86)\Tesseract-OCR
on Windows).
git clone https://github.com/vishnusn77/AI-thermal-cameras.git
cd AI-thermal-cameras
Create and activate a virtual environment:
python -m venv venv
.\venv\Scripts\activate # For Windows
source venv/bin/activate # For macOS/Linux
Install the required packages:
pip install -r requirements.txt
Download the YOLOv5 model repository into the project folder:
git clone https://github.com/ultralytics/yolov5
Ensure the following setup:
rtsp://admin:[email protected]/Streaming/channels/2
Start the main application:
python app.py
- Captures frames every 0.25 seconds.
- Uses OpenCV to isolate temperature data displayed in green.
- Extracts text using Tesseract OCR with enhanced preprocessing techniques.
- Detects and tracks individuals in the scene using YOLOv5.
- SORT algorithm assigns unique IDs to track individuals across frames.
- Links extracted temperatures with bounding boxes for each person.
Monitors conditions in real-time:
- High Temperature Alert: Triggered if temperature > 37.5°C.
- Crowd Density Alert: Triggered if the number of people exceeds the threshold (e.g., 50).
- Displays actionable messages on external monitors using a Tkinter-based GUI.
File/Folder | Description |
---|---|
people_detection.py |
Handles people detection, tracking, and temperature extraction. |
sort.py |
Implements the SORT algorithm for unique ID tracking. |
app.py |
Main script integrating all modules for execution. |
alert_display.py |
Displays alerts dynamically on external monitors. |
requirements.txt |
List of required Python libraries. |
yolov5/ |
Repository containing YOLOv5 object detection model. |
Update the threshold for temperature alerts in app.py
:
temperature_threshold = 37.5
Adjust the maximum allowable crowd size:
max_occupancy = 50
-
Tesseract OCR Not Found:
Ensure Tesseract is installed, and its path is correctly configured inapp.py
. -
Camera Not Accessible:
Verify the RTSP URL and ensure cameras are connected to the same network. -
Dependency Errors:
Runpip install -r requirements.txt
again in the correct virtual environment.
- Use debug logs or
print()
statements to troubleshoot specific areas in the code. - Test the camera feed using OpenCV to ensure proper configuration.
- Vishnu Sreekumaran Nair
- Anusree Ambika Viswanathan
- Saumya Maurya
- Tanveer Singh
Add relevant screenshots showing detection, alert display, and crowd monitoring features.
Alt text: Snapshot of people being detected with temperature readings displayed in bounding boxes.
Alt text: Snapshot of Health Monitoring System showing crowd and temperature alerts with messages.
This project was developed as part of AI Project under the supervision of Professor Sanjeev Kumar for the Summer 2024 session.
For questions or support, feel free to reach out to any team member listed in the Contributors section.