- Federal University of Roraima
- Bachelor's Degree in Computer Science
- Author: Natália Ribeiro de Almada
- Advisor: Professor Dr. Herbert Oliveira Rocha
This project aims to use two existing models (YOLO-NAS and YOLOv8) to compare their performance, first with the original dataset provided with the models and then with adaptations for an author-created dataset, enabling performance evaluation.
Warning
Legal Disclaimer: This dataset consists of frames extracted from videos and made available from publicly accessible YouTube videos, compiled exclusively for non-commercial academic research and the development of computer vision systems for elderly fall detection. By using it, you expressly agree that:
All visual material comes from public videos, but intellectual property remains with the original rights holders (creators, institutions, or individuals), according to YouTube Terms of Service and copyright law;
Frame extraction does not authorize commercial use, redistribution, or applications outside health research, elderly safety, or data science;
Commercial use or publication of the images requires explicit permission from the rights holders;
- The creator of this dataset is not responsible for:
Copyright or image rights violations committed by users,
Clinical accuracy or bias in the compiled data,
Consequences of misuse (unauthorized surveillance, algorithmic discrimination, etc.).
├── 156 videos ← Training/validation/test images
│ ├── 53 videos of elderly people labeled as "No Fall"/
│ └── 103 videos of elderly people labeled as "Fall"
│ └── 648 frames total ← Split: training=70% / validation=20% / test=10%
10 videos were kept fully separate and never used in training, for final testing.
Classes: "fall" and "person"Project executed on Windows 11
P2_YOLOv8
│
├── dataset/ ← Training/validation/test images
│ ├── images/
│ └── data.yaml
│
├── videos_testes_validacao/← Validation videos
├── videos_teste/ ← Test videos (never used in training at any stage)
├── runs/
│ └── detect/
│ └── predict/ ← Inference outputs
│ ├── queda/
│ └── naoQueda/
│
├── treinamento_yolo_com_relatorio.ipynb ← Notebook with full pipeline
└── requirements.txt ← Project dependencies
- YOLOv8 model training and validation with custom data.
- Evaluation with external videos.
- Automatic classification of test videos:
- Videos with fall detection →
videos_saida/queda/ - Videos without fall detection →
videos_saida/naoQueda/
- Videos with fall detection →
- Automatic Telegram alert delivery with attached video.
- Chart generation (IoU, Loss, Accuracy, Histograms, etc.) saved as PNG.
- Clone the repository:
git clone https://github.com/colocaroresto.git cd VisionFall - Use the notebook available at Notebook on Colab.
- Create and activate a virtual environment (Windows):
python -m venv venv .\venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Start the notebook:
jupyter notebook
- Run the cells.
Project executed in WSL2 on Windows 11
P2_YOLO_NAS
│
├── datasetNAS/ # Custom dataset
│ ├── train/
│ ├── valid/
│ └── test/
│
├── videos_teste/ # Videos for testing with the trained model
├── videos_saida/
│ ├── queda/ # Videos where falls were detected
│ └── naoQueda/ # Videos with no fall detection
│
├── checkpoints/ # Saved trained model weights
└── fall-detection-yolo-nas-train-predict.ipynb- YOLOv8 model training and validation with custom data.
- Evaluation with external videos.
- Automatic classification of test videos:
- Videos with fall detection →
videos_saida/queda/ - Videos without fall detection →
videos_saida/naoQueda/
- Videos with fall detection →
- Automatic Telegram alert delivery with attached video.
- Chart generation (IoU, Loss, Accuracy, Histograms, etc.) saved as PNG.
Follow the official Microsoft guide.
You must install:
- Ubuntu
- WSL2 as default
- Install Miniconda in WSL, accept the terms, and allow it to be added to PATH.
- Create the Conda environment for the project:
conda create -n yolonas_env python=3.10 -y conda activate yolonas_env
3. Clone the repository:
```bash
cd /mnt/c/Users/YOUR_USER/Desktop
git clone https://github.com/YOUR_USER/P2_YOLO_NAS.git
cd P2_YOLO_NAS
- Install dependencies:
pip install -r requirements.txt
📓 How to run the notebook 5. Start Jupyter in WSL2:
conda activate yolonas_env
jupyter notebookIt will show a URL such as:
http://localhost:8888/?token=... Copy and paste it into your Windows browser.
- Open the notebook Open the file:
fall-detection-yolo-nas-train-predict.ipynb- Run the cells.
📦 Training with your own dataset Make sure your dataset is in YOLOv5/v8 format:
📹 Video Tests Place up to 10 elderly-fall videos (.mp4) in:
videos_teste/ -After testing, the system will create:
videos_saida/
├── queda/
├── naoQueda/Have at least one Telegram account
- Create an app at Telegram configure the following information in the code:
api_id = 'YOUR_API_ID'
api_hash = 'YOUR_API_HASH'
phone = '+55xxxxxxxxx'
dest_user_id = YOUR_ID
dest_access_hash = YOUR_ACCESS_HASH- Model available on Kaggle by @stpeteishii, or with small modifications required to run on WSL2 available on Colab
- Dataset available on Kaggle by @selwalyahmad
- COCO pre-trained weights available on Hugging Face
@misc{supergradients, doi = {10.5281/ZENODO.7789328}, url = {https://zenodo.org/record/7789328}, author = {Aharon, Shay and {Louis-Dupont} and {Ofri Masad} and Yurkova, Kate and {Lotem Fridman} and {Lkdci} and Khvedchenya, Eugene and Rubin, Ran and Bagrov, Natan and Tymchenko, Borys and Keren, Tomer and Zhilko, Alexander and {Eran-Deci}}, title = {Super-Gradients}, publisher = {GitHub}, journal = {GitHub repository}, year = {2021}, }
@software{yolov8_ultralytics, author = {Glenn Jocher and Ayush Chaurasia and Jing Qiu}, title = {Ultralytics YOLOv8}, version = {8.0.0}, year = {2023}, url = {https://github.com/ultralytics/ultralytics}, orcid = {0000-0001-5950-6979, 0000-0002-7603-6750, 0000-0003-3783-7069}, license = {AGPL-3.0} }