{"id":26753149,"url":"https://github.com/serhatderya/fall_detection","last_synced_at":"2026-04-11T13:09:15.706Z","repository":{"id":283963972,"uuid":"953413389","full_name":"SerhatDerya/fall_detection","owner":"SerhatDerya","description":"This project implements a computer vision-based fall detection system using deep learning techniques. The system can detect whether a person has fallen in images or video frames.","archived":false,"fork":false,"pushed_at":"2025-03-23T10:43:40.000Z","size":13287,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T11:25:00.881Z","etag":null,"topics":["ai","artificial-intelligence","artificial-neural-networks","computer-vision","deep-learning","deep-neural-networks","deeplearning","falldetection","matplo","neural-network","numpy","opencv","pil","pillow","pytorch","tensorflow","yolo","yolov5","yolov8"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SerhatDerya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-23T10:05:06.000Z","updated_at":"2025-03-23T10:43:55.000Z","dependencies_parsed_at":"2025-03-23T11:35:04.643Z","dependency_job_id":null,"html_url":"https://github.com/SerhatDerya/fall_detection","commit_stats":null,"previous_names":["serhatderya/fall_detection"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerhatDerya%2Ffall_detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerhatDerya%2Ffall_detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerhatDerya%2Ffall_detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SerhatDerya%2Ffall_detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SerhatDerya","download_url":"https://codeload.github.com/SerhatDerya/fall_detection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246034312,"owners_count":20712857,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","artificial-neural-networks","computer-vision","deep-learning","deep-neural-networks","deeplearning","falldetection","matplo","neural-network","numpy","opencv","pil","pillow","pytorch","tensorflow","yolo","yolov5","yolov8"],"created_at":"2025-03-28T13:17:59.051Z","updated_at":"2025-12-30T23:20:22.217Z","avatar_url":"https://github.com/SerhatDerya.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚑 Fall Detection System\n\nThis project implements a **computer vision-based fall detection system** using deep learning techniques. The system can detect whether a person has fallen in images or video frames.\n\n## 📁 Project Structure\n- main.py - Main script for running fall detection and evaluation\n- data_handler.py - Handles dataset loading and preprocessing\n- my_models.py - Contains model definitions\n- fall_dataset/ - Directory containing training and validation data\n- images/ - Contains input images\n- labels/ - Contains corresponding labels\n- model_weights/ - Directory containing trained model weight files (.h5 files)\n\n\n## 📊 Data Source\nThe dataset used in this project is sourced from **Kaggle**.\n\n### 📄 Dataset Details\n- **Name:** Fall Detection Dataset \n- **Link:** https://www.kaggle.com/datasets/uttejkumarkandagatla/fall-detection-dataset\n- **Size:** 374 samples  \n- **Description:** *Images of people in various postures including standing, sitting, and fallen states in different environments*   \n\n## 🧠 Models\nThe system uses two main models:\n\n1. **Fall Detection Model (`fall_detection_model`)** - A custom deep learning model that classifies cropped person images as *fallen* or *not fallen*.  \n2. **YOLO Model (`yolo_model`)** - Uses **YOLOv5** to detect people in images and generate bounding boxes.\n\n## 📦 Dataset Labels\nThe `Fall_dataset` class processes the dataset with the following label convention:\n\n- `0` - Fallen  \n- `1` - Standing  \n- `2` - Sitting  \n\n## 🚀 Usage\n\n### 🔍 Running Evaluation\nThis will:\n- Load the fall detection model with pre-trained weights  \n- Process validation images with YOLO to detect people  \n- Apply the fall detection model to each detected person  \n- Calculate performance metrics (accuracy, precision, recall, F1 score)  \n\n### 🎓 Training a New Model\nThe system supports training using the `train` method in the `fall_detection_model` class.\n\n## 📈 Performance Metrics\nThe system calculates:\n\n- **Accuracy**: (TP + TN) / (TP + FP + TN + FN)  \n- **Precision**: TP / (TP + FP)  \n- **Recall**: TP / (TP + FN)  \n- **F1 Score**: 2 * TP / (2 * TP + FP + FN)  \n\n### Where:\n- **TP** = True Positives (*Fall - Detected*)  \n- **FP** = False Positives (*Not Fall - Detected*)  \n- **TN** = True Negatives (*Not Fall - Not Detected*)  \n- **FN** = False Negatives (*Fall - Not Detected*)  \n\n## 🔧 Requirements\n- **TensorFlow**\n- **PyTorch**  \n- **OpenCV**  \n- **Matplotlib**  \n- **NumPy**  \n- **YOLOv5 (via torch hub)**  \n- **PIL**  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserhatderya%2Ffall_detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserhatderya%2Ffall_detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserhatderya%2Ffall_detection/lists"}