Code Monkey home page Code Monkey logo

danger.ai's Introduction

Danger.ai

Inspiration

37% of active shootings last less than 5 minutes, and the rest last less than 15 minutes. With police response times ranging from 5-15 minutes, every minute is crucial. We created a video surveillance system to help decrease this response time by cutting out the lag due to human interaction. With over 285 million surveillance cameras, this software could help immensely by alerting the proper authorities about large problems the second they occur.

What it does

Uses a diverse set of machine learning technologies to detect danger in surveillance videos

How we built it

GCP Storage

  • Used a GCP Storage bucket to hold the processed video footage

GCP Cloud Firestore

  • Used Cloud Firestore to save all of the danger score data that corresponded to the video footage in the GCP storage bucket

GCP Cloud Functions

  • Used Cloud Functions to implement a serverless RESTful architecture to
    • Save danger score data into Cloud Firestore
    • Save processed video footage into GCP Storage
    • Retrieve danger score data from Cloud Firestore

GCP Video Intelligence

  • Used the GCP video intelligence API to detect objects throughout the video streams.
  • The api enabled to us to track dangerous items like knives, guns, and other dangerous objects.
  • The detected objects where then converted to vectors via Word2Vec.

Word2Vec

  • Word2Vec takes a list of words and converts them to a 250-dimensional space.
  • The general heuristic of this space is that words that are related to each other are closer together within the space.
  • We take the words outputted by GCP Video Intel and using Word2Vec compare them to words related to danger.

Pixel Change

  • The L1 norm was calculated to determine a difference score between every 2 consecutive frames of the video.
  • Those values were then scaled to occupy the range from 0 to 1.
  • This value was used as part of the final danger score.

RNN

  • The RNN takes the positional data outputted by openPose
  • It trains and learns based off of the positions of body parts of people in frame.
  • 15 frames at a time were sampled and then predictions were based off of those 15 frames

OpenPose

  • OpenPose is an open-source multi-person system to detect human body, hand, facial, and foot key points on images and video.
  • It is a state of the art convolutional neural network.
  • OpenPose was used to detect the positions of all humans in our set of videos

Challenges we ran into

  • Manually labeling our ~13,000 frames of video
  • Harnessing enough computing power to smoothly run videos through our pipeline
  • Getting the cloud functions working to support our serverless API

Accomplishments that we're proud of

  • Our RNN boasts a 94% accuracy rate.
  • Successfully implemented a state of the art CNN for body tracking.
  • Functional web app that appropriately displays the videos
  • Dynamic charts to display danger scores to a user.

What we learned

  • Google Cloud Platform APIs
  • RNNs for time series data
  • Data pipelining
  • Full-stack web development
  • AWS accelerated computing tools

What's next for Danger.ai

  • Improve our pipeline and use more compute for live video analysis
  • Collect more training examples

danger.ai's People

Contributors

hammackm avatar nionata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

danger.ai's Issues

How to run this code?

Hi, i'd like to replicate the experiment of this repository and I realized that some information is missing.
Could you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.