All Projects → webrtcHacks → Tfobjwebrtc

webrtcHacks / Tfobjwebrtc

Licence: mit
Tensorflow Object Detection API Web Service wrapper that works on any <video> tag and WebRTC streams

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tfobjwebrtc

Jeelizar
JavaScript object detection lightweight library for augmented reality (WebXR demos included). It uses convolutional neural networks running on the GPU with WebGL.
Stars: ✭ 296 (+98.66%)
Mutual labels:  object-detection, webrtc
Raspberrypi Objectdetection Tensorflow
Object Detection using TensorFlow on a Raspberry Pi
Stars: ✭ 147 (-1.34%)
Mutual labels:  object-detection
Ssd keras
A Keras port of Single Shot MultiBox Detector
Stars: ✭ 1,763 (+1083.22%)
Mutual labels:  object-detection
Nile.js
Server
Stars: ✭ 1,757 (+1079.19%)
Mutual labels:  webrtc
Lacmus
Lacmus is a cross-platform application that helps to find people who are lost in the forest using computer vision and neural networks.
Stars: ✭ 142 (-4.7%)
Mutual labels:  object-detection
Wt Tracker
High-performance WebTorrent tracker
Stars: ✭ 144 (-3.36%)
Mutual labels:  webrtc
Nes Rust
NES emulator written in Rust + WASM
Stars: ✭ 141 (-5.37%)
Mutual labels:  webrtc
Underwater Object Detection
Kesci underwater object detection algorithm contest
Stars: ✭ 148 (-0.67%)
Mutual labels:  object-detection
Data science bowl 2018
My 5th place (out of 816 teams) solution to The 2018 Data Science Bowl organized by Booz Allen Hamilton
Stars: ✭ 147 (-1.34%)
Mutual labels:  object-detection
Enslavism
A framework to manage distributed WebRTC servers that communicate with browser clients
Stars: ✭ 143 (-4.03%)
Mutual labels:  webrtc
Yolov3
yolov3 by pytorch
Stars: ✭ 142 (-4.7%)
Mutual labels:  object-detection
Stun
A Go implementation of STUN
Stars: ✭ 141 (-5.37%)
Mutual labels:  webrtc
Bmw Labeltool Lite
This repository provides you with a easy to use labeling tool for State-of-the-art Deep Learning training purposes.
Stars: ✭ 145 (-2.68%)
Mutual labels:  object-detection
Snowflake
WebRTC Pluggable Transport
Stars: ✭ 141 (-5.37%)
Mutual labels:  webrtc
Self Driving Golf Cart
Be Driven 🚘
Stars: ✭ 147 (-1.34%)
Mutual labels:  object-detection
Easy Faster Rcnn.pytorch
An easy implementation of Faster R-CNN (https://arxiv.org/pdf/1506.01497.pdf) in PyTorch.
Stars: ✭ 141 (-5.37%)
Mutual labels:  object-detection
Iterdet
[S+SSPR2020] IterDet: Iterative Scheme for Object Detection in Crowded Environments
Stars: ✭ 143 (-4.03%)
Mutual labels:  object-detection
Littlechat
A peer-to-peer video chat application made using Phoenix, LiveView, and WebRTC. Want to know how it's made? Read the blog post: https://littlelines.com/blog/2020/07/06/building-a-video-chat-app-in-phoenix-liveview
Stars: ✭ 144 (-3.36%)
Mutual labels:  webrtc
Study resources
study resources of model and engineering
Stars: ✭ 148 (-0.67%)
Mutual labels:  object-detection
Swiftywebrtc
Swift Framework for WebRTC
Stars: ✭ 147 (-1.34%)
Mutual labels:  webrtc

Tensorflow Object Detection API Web Service

This is an example of how to turn the TensorFlow Object API into a web service. A Python Flask web server is used to interact with a JavaScript a client library. The example shows how you can extract frames from WebRTC's getUserMedia, upload them to the API, and then use the canvas to display them. This allows use of the TensorFlow Object API on any HTML <video> element.

Please see the Computer Vision on the Web with WebRTC and TensorFlow post on webrtcHacks for a walkthrough and more details.

Example image: Detecting Cats

TensorFlow Object Detection API on a WebRTC getUserMedia stream demo video:

TensorFlow Object Detection API on a video element

TensorFlow Object Detection API on a video element demo video:

TensorFlow Object Detection API on a video element

Quick start with Docker

docker run -it -p 5000:5000 chadhart/tensorflow-object-detection:runserver

Installation

Docker Install

git clone https://github.com/webrtcHacks/tfObjWebrtc.git
cd tfObjWebrtc
docker run -it -p 5000:5000 --name tf-webrtchacks -v $(pwd):/code chadhart/tensorflow-object-detection:webrtchacks
python setup.py install
python server.py

Manual install

Follow the TensorFlow Object API install instructions. Then run the the instructions above.

Example web apps

Point your browser to:

  • https://localhost:5000/local - shows a mirrored video from a webcam
  • https://localhost:5000/video - shows object detection running on a HTML <video> tag

Browser support

WebRTC browsers have secure origin restrictions:

  • Chrome will only work on localhost unless you add TLS certificates to your server
  • Firefox will work on any domain as long as you allow it
  • Safari will work, but you will need to "Allow Media Capture on Insecure Domains"

These should all work fine with any other video source.

Edge is currently not supported (polyfill for canvas.toBlob needed)

See the webrtcHacks link for details.

API Details

Point to a <script> tag to objDetect.js with an id of objDetect. Include data-source="myVideo" and other optional data- tags to set parameters.

Example:

<script id="objDetect" src="/static/objDetect.js" data-source="myVideo" data-mirror="true" data-uploadWidth="1280" data-scoreThreshold="0.40"></script>

Data tags:

  • data-source - the ID of the source <video> to use. Must be specified.
  • data-uploadWidth - the width of the upload file. Height will automatically be calculated based on the source video's aspect ratio. Default is 640.
  • data-mirror - mirror the boundary boxes. Used is the image is mirrored (as is usual with a local getUserMedia view). Default is false.
  • data-scoreThreshold - only show objects above this confidence threshold. Default is 0.5
  • data-apiServer - the full URL of the TensorFlow Object Detection Web API server location. Default is /image off of the current domain - i.e. http://localhost:5000/image
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].