This project is a human fall detection system based on the MoveNet model. The system is able to detect human fall in real-time using a video or webcam.
- The system uses the MoveNet model to detect the keypoints of the human body
- The keypoints are then used to calculate:
- The x and y coordinates of the nose that represent the head position
- The aspect ratio of the body that represents the body position
- The angle of centroid of the body with respect to the x-axis that represents the body orientation
- The head position and body position are then used to determine the fall detection
- The body orientation is then used to confirm the fall detection
- Clone the repository
- Install the required packages
- Change the input based on your needs
3.1 For video input, change the queda.mp4
in VideoCapture to the path of your video file
# Insert video file name here
cap = cv2.VideoCapture('queda.mp4')
3.2 For webcam input, use the following code
# If using webcam, uncomment the line below and comment the line above
cap = cv2.VideoCapture(1)
- Run the code
- Press
esc
to exit the program