When emergencies arise, a matter of seconds could mean the difference between life and death. FireAcc is an app that detects accidents and other casualties from CCTV or other surveillance camera feeds and sends instant messages in real-time notifying authorities of the location and time of the incident.
Live streaming video feeds are a huge source of actionable open-source intelligence. With more and more of our lives being filmed and monitored in real-time, visual recognition has the ability to save lives by recognizing something as it’s happening, like seeing threatening gestures or weapons in live streams before they turn into something worse.
FireAcc is an app that recognizes accidents like car crashes, fires, and other emergency events, as they happen. Using Clarifai, FireAcc monitors CCTV or other surveillance camera feeds and sends a notification to relevant authorities when an emergency occurs. This notification is location-based and instantaneous, greatly reducing the delay before an emergency response.
WHY WE ❤ IT
We always love applications where the Clarifai API can be used to save lives. After all, our mission is to "understand every image and video to improve life" and we think "staying alive" is a huge improvement on "being dead," don't you? Check out the live demo on Heroku!
HOW YOU DO IT
We caught up with Vishwashri Sairam, Harsh Jadav, Darshit Patel, and Smit Thakkar, third-year computer science students from SVNIT Surat, to talk about their inspiration for the FireAcc app.
Clarifai: How did you come up with the idea for FireAcc?
FireAcc Team: We actually saw a road accident the morning we were meant to hack with Clarifai. We discussed with mentors and brainstormed a bit, then started hacking on it. Usually, when an accident happens, emergency services are notified by a person. Often, notifying authorities comes too late and people whose lives could have been saved by earlier action die. To solve this problem we came up with FireAcc, an app that removes such delays and makes use of real-time monitoring.
How did you build the app?
The hack assumes there are CCTV or other surveillance cameras in the vicinity to detect the casualty. So, we used OpenCV libraries available for Java to simulate the activity of a CCTV camera. It converts the webcam of a laptop to a security camera that continuously captures images after a particular timeframe and sends the images to the server. This footage is then sent to the backend server we built using Flask. The backend server calls the Clarifai API which processes the image and extracts features and tags relevant to the picture. The tags and features returned by the API are then compared with the pre-trained data (tags) to select whom to notify. For example, road accidents are reported to the police and ambulance services, which fire breakouts notify the fire brigade and ambulance services.
A log of all the data is maintained by a MongoDb database which can also be used for future analysis. Notification to the concerned authority is done through the Twillio API which includes the time and location of the casualty and it is done immediately after detection of casualty. Authorities are notified within one minute of the event. We also designed a web dashboard for displaying the logs and deployed on Heroku.
What was the best part about using Clarifai?
Clarifai has easy-to-use API calls and responses, well-written documentation, and most importantly, amazingly accurate tags and results returned by the API. We also liked that Clarifai can process both video and image.
Thanks for sharing, life savers!
To learn more, check out our documentation and sign-up for a free Clarifai account to start using our API - all it takes is three lines of code to get up and running! We’re super excited to share all the cool things built by our developer community, so don’t forget to tweet @Clarifai to show us your apps.