Coder Social home page Coder Social logo

cv-tools / webrtc_cv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from darshil3011/webrtc_cv

0.0 0.0 0.0 11.8 MB

Implement computer vision AI models on WebRTC live stream using python

License: Other

JavaScript 42.73% Python 44.49% HTML 12.79%

webrtc_cv's Introduction

Computer vision on WebRTC live stream

This repo shows implementation of computer vision AI models on WebRTC live stream using python and JS.

Checkout my detailed Medium Blog for code explaination.

How to test

Follow below steps:

  1. First train your tensorflow computer vision Model and save the checkpoints. Learn More
  2. Edit your model code and checkpoints in def model() in server.py
  3. Run server.py from terminal and open localhost - 127.0.0.1:5050/local
  4. It will fetch live stream from camera source and display on the webpage
  5. Meanwhie the stream will be fetched and model predictions will be displayed in terminal
  6. For further inference - edit def image() in server.py

How to run on remote live stream

For remote live stream, you will have to host server.py on a server or perform tunneling using ngrok or other alternate service. Once hosted, run server.py on the server and edit the apiServer variable in ObjDetect.js (line 5)

Once done, open the server URL with '/local' and it will fetch the camera live stream and send it to the remote server for model predictions. Model predictions will be displayed on server.py console. You can further edit the inference code in def image() in server.py

This code is a development inspired by this wonderful blog

webrtc_cv's People

Contributors

darshil3011 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.