Fall Safe is designed to address fall-related injuries among vulnerable populations by leveraging computer vision and machine learning. The system detects falls in real-time from CCTV footage, analyzing video streams to identify abnormal movements and postures. Alerts are sent to caregivers or emergency services with details about the incident, aiming to improve response times and safety for at-risk individuals.
- Real-Time Fall Detection: Utilizes YOLO11 for accurate fall detection.
- Integration: Works with existing CCTV setups.
- Alerts: Sends notifications with incident details to caregivers or emergency services.
- Python: Latest version
- NVIDIA GPU (highly recommended): For accelerated processing
-
Install Python
- Download and install from Python's official website.
-
Set Up YOLO11 Project
mkdir YOLO_PROJECT/yolo11-python cd YOLO_PROJECT/yolo11-python
-
Create a Virtual Environment
-
Using venv:
python -m venv env
Activate the virtual environment:
- On Windows:
.\env\Scripts\activate
- On macOS/Linux:
source env/bin/activate
- On Windows:
-
Using conda: For detailed instructions on creating a conda environment, refer to the Official Anaconda Documentation.
-
-
Install GPU Drivers and CUDA
- Install NVIDIA GPU drivers.
-
Install Required Packages
- Install the packages from the "requirements.txt" file.
pip install -r requirements.txt
- Install pyTorch and its dependencies. Get the architecture, platform and select the latest version of cuda from pyTorch Website It should be like this for Windows
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
-
Verification
- Verify all installations by running the test files from the "TestFiles" folder.
- Run "Test_Camera.py" to get the ids for the camera source.
- Run "Test_Cuda_GPU.py" to check the proper verification of cuda installation and gpu detection.
- Verify all installations by running the test files from the "TestFiles" folder.
-
Test YOLO11 Inference according to Ultralytics website and detection file
python detection.py --model yolo11n.onnx --source data/images/horses.jpg python detection.py --model yolo11n.onnx --source data/videos/road.mp4 python detection.py --model yolo11n.onnx --source 0
*NOTE: Get the detection.py from ultralytics github page and for yolo11
-
Prepare and Get Labelled Dataset from Roboflow
- Upload images to Roboflow and label them as either
fall
ornofall
. - Discard any images that are not relevant by marking them as null.
- Download the structured dataset from Roboflow and select YOLO11 for model type when prompted.
- Extract the zip file from roboflow
- Upload images to Roboflow and label them as either
-
Train the Model
- Modify the name for the current operation.
- Adjust the parameters value to properly utilize the GPU.
Training through CLI :
yolo detect train model=yolo11n.pt data="path/to/dataset" imgsz=224 device=0 workers=2 batch=16 epochs=100 patience=50 name=yolo11_fallsafe_detection
Training through GUI :
- Use python for training the model.
- Use Roboflow website for training.
- Use Ultralyticss HUB.
- Use Google Colab for training
-
Continue Training after Pause OR Further Train model with new/updated Dataset
Training through CLI :
yolo detect train model=runs/classify/yolo11_fallsafe_detection/weights/last.pt resume=True
Training through GUI : Restart Training as most services dont support pausing.
-
Perform Classification
yolo detect predict model=runs/classify/yolo11_fallsafe_detection/weights/best.pt source="path/image.jpg" save=True
-
Real-Time Classification via Camera
yolo detect predict model=runs/classify/yolo11_fallsafe_detection/weights/best.pt source="0" save=True conf=0.5 show=True save_txt=True line_thickness=1
Contributions are welcome! Please open an issue or submit a pull request if you have improvements or suggestions.
This project is licensed under the MIT License - see the LICENSE file for details.
For any questions or feedback, please contact us at Issues Pages.
Fall Safe is developed by the above contributors. For more information, visit our GitHub repository.