Skip to content

pmmistry/node-red-object-detection-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Object Detection on live Video Stream using Node-RED

This repository contains Node-RED flow examples that demonstrate how to detect objects using video stream from either DJI Tello Drone or a Raspberry Pi using the Node-RED visual editor.


Introduction

Have you ever wanted to detect objects using live video stream ? Well if so this repo will show you how to get started.

This example will be using the node-red-contrib-ffmpeg node. This node allows users to stream video from either a tello drone or a raspberry pi. See this repo on instructions on how to video stream

Steps to get started with Tello Drone

  1. Install Node-RED

  2. Install node-red-contrib-ffmpeg : npm install node-red-contrib-ffmpeg

  3. Install ffmpeg brew install ffmpeg once installed run : ffmpeg

  4. Train an object detection model - you can follow these instructions on how to do so. You should end up with a model_web folder.

  5. Copy your mode_web folder in the directory you installed node red

  6. In the node-red directory make the following changes to the settings.js folder Search and un-comment out the following

     httpAdminRoot: '/editor',
     httpStatic: '/<homefolder>/.node-red',
     
    
  7. Run Node-Red by running this command : node-red

  8. Go to http://127.0.0.1:1880/editor/ in your browser

  9. Import Tello-Drone flow

  10. Turn Tello Wifi on

  11. Inject Command and then streamon in the flow

Flow should look like :

  1. In another tab , go to : http://127.0.0.1:1880/api/dashboard

Output should look like :

You should see live streaming with tello drone

Steps To get started with Raspberry Pi

1 . Confirm you have Node-RED and ffmpeg installed on Raspberry Pi

  1. If you don’t have ffmpeg installed follow these instructions to install ffmpeg on pi

  2. Train an object detection model - you can follow these instructions on how to do so. You should end up with a model_web folder.

  3. Copy your mode_web folder in the directory you installed node red

  4. In the node-red directory make the following changes to the settings.js folder

Search and un-comment out the following

 httpAdminRoot: '/editor',
 httpStatic: '/<homefolder>/.node-red',
  1. Run Node-Red by running this command : node-red

  2. Import the Raspberry Pi flow

Flow should look like this :

  1. Deploy and in a different tab go to http://127.0.0.1:1880/api/dashboard

You should see video stream from Raspberry Pi along with object detection 🎉

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published