❓ What is our project:
Introducing Safe Scan: A pioneering security solution that fuses state-of-the-art technology with intelligent vision. Our project leverages advanced computer vision algorithms and real-time image processing to identify potential threats before they escalate. By decoding behavioral cues and analyzing complex scenes, Safe Scan empowers security personnel and individuals alike to take proactive measures, ensuring a safer environment for all. From schools to public spaces, Safe Scan's versatility transcends boundaries, making it a crucial tool in today's dynamic security landscape. Join us in redefining safety with innovation and foresight.
💻 How we made the code for our project:
We used simple HTML5, CSS, and Javascript to make a modern responsive web page. In the main script keypoint_rcnn_videos.py, the code starts by importing the necessary libraries. These include the time, cv2 (OpenCV for computer vision), torch, torchvision (for machine learning and computer vision models), and Image from PIL (Python Imaging Library) for image processing. The transforms module from torchvision is imported to manage image transformations. The custom utils module is also imported, which contains functions to assist with pose detection.
The script uses Python, a widely used programming language known for its readability and versatility. Additionally, the script integrates the Pygame library for audio playback. The Pygame library is used to play an audio alert when specific poses are detected. The alarm sound is loaded as an MP3 file, and the library provides functions to manage audio playback.
The model used for pose detection is the keypointrcnn_resnet50_fpn model from the torchvision library. It's a deep learning model pre-trained on a large dataset for pose estimation. The cv2.VideoCapture class from OpenCV is used to capture frames from the webcam. OpenCV is a popular library for computer vision tasks and real-time image processing. It provides essential functions for capturing, processing, and displaying video frames.
In the loop for video capture, each frame is processed to perform pose detection. The loop continues until the user presses the 'q' key to exit. Detected poses are displayed using OpenCV's image rendering functions. The average frames per second (FPS) is calculated to provide information about the processing speed.
The utils.py script supports the main code with utility functions for pose detection and visualization. It contains functions to draw key points, detect different poses, and visualize them on the image. The matplotlib library is used to assign colors for skeletal connections. Overall, the code combines multiple packages, including Python, OpenCV, PyTorch, and Pygame, to create a real-time pose detection and alert system using webcam input.
🔧 Hardware Components used:
- PC with Nvidia MX130
- Dell G16
- USB Camera
💻 Software Components Used:
Webpage:
- IDE: Visual Studio Code
- HTML
- CSS
- Javascript
Pose Estimation Model (Prototype):
- IDE: Pycharm Professional
- Python
😢 Problems Faced? It wouldn’t be a hackathon without them!:
- We could not find a suitable dataset that accurately depicts what we wanted to train and deploy in this hackathon.
- Being able to find the proper documentation to follow and learn Pose Estimation.
- Finding responsive solutions to modern html5 elements.
- Making sure all the packages were installed with the right versions.
- Getting CUDA and Torch to work together.
✅ The Problems We Solved!:
- Got CUDA and torch to work together so we were able to use our GPU to run the model
- Used SCSS to add responsiveness and learned its implementation and compilation.
- Learnt how to implement a Pose Estimation model
📆 Plans for the Future?:
- Automate a drone entirely without human intervention.
- Add detection of other types of aggressive behavior.
- Integrate LiDAR into this system.
- Alert authorities when aggressive behavior is detected.
- Detect the behavior that results in injuries, and contact emergency medical services right away.
🔗 Links:
Website: https://safe-scan.github.io/ YouTube Video: https://youtu.be/TRYLwHIweqY Github Pose Estimation: https://github.com/RescuePi/Rescue_Pi_Code.git Github Website: https://github.com/safe-scan/safe-scan.github.io
Log in or sign up for Devpost to join the conversation.