Coder Social home page Coder Social logo

video-streaming's Introduction

RealTime Video Face Detection

Demo Link

Face detection

Installation

  • Install Homebrew

    • /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
      
    • vim ~/.bash_profile
      export PATH=/usr/local/bin:$PATH
      
      source ~/.bash_profile
      
  • Install python

    • brew install python python3
      cd /usr/local/bin
      ln -s ../Cellar/python/2.7.14/bin/python2 python
      
  • Install ffmpeg

    • brew install ffmpeg \
        --with-tools \
        --with-fdk-aac \
        --with-freetype \
       --with-fontconfig \
       --with-libass \
       --with-libvorbis \
       --with-libvpx \
       --with-opus \
       --with-x265
      
  • Install opencv

    • brew tap homebrew/science
      brew install opencv3 --with-contrib --with-python3
      
  • Install boto3, watchdog

    •   pip2 install boto3 watchdog
      

    or python -m pip install boto3 watchdog

Execution - Recognizing Faces in a Streaming Video

Clone this repo:

git clone [email protected]:imyoungyang/video-streaming.git

Step1: IAM Role & SNS Topic

Create an IAM service role to give Rekognition Video access to your Kinesis video streams and your Kinesis data streams. SNS Topic to recieve the reginition name.

python iam-role-helper.py --create
python sns-helper.py --create

Step2: Create Collection

python collection-helper.py --create

Step3: Add faces to a collection

python index_faces.py ./young-yang.jpg Young

Step4: Create a Kinesis Video Stream

python video-stream-helper.py --create

Step5: Create a Kinesis Data Stream

python data-stream-helper.py --create

Step6: Create the stream processor

  • run command to create a stream processor.

    python rekognition-process.py --create

  • run command to check process status

    aws rekognition describe-stream-processor --name appStreamProcessor-videoFaceRek

Step7: Start the stream processor

  • run command python rekognition-process.py --start to start the process

Step8: Start video stream

  • Open terminal and exeucte the upload to kinesis videos

    • python watch_for_changes.py
  • Execute face detection in another terminal

    • python face-detection-multi-files.py

Step9: Consume the analysis result

  • run command python get-rekognition-result.py

Reference

video-streaming's People

Watchers

James Cloos avatar

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.