Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USE JAVASCRIPT-SDK IN NODE-RED #6

Open
mas1515 opened this issue Jun 12, 2020 · 20 comments
Open

USE JAVASCRIPT-SDK IN NODE-RED #6

mas1515 opened this issue Jun 12, 2020 · 20 comments

Comments

@mas1515
Copy link

mas1515 commented Jun 12, 2020

is it possible use object detection in node-red ????

can you send source code for check ?

@bourdakos1
Copy link
Member

Yes it’s possible. In what way would you like to use it in node red?

I have a demo that uses node red, but it’s mainly for streaming video from a raspberry pi or drone and doing detections on that. It might not be too useful for you

@bourdakos1
Copy link
Member

Here’s a video that goes over object detection with node red https://youtu.be/h_-wTXlX2Ms

It doesn’t actually do the actual object detection in a node red node though. It still does it in the browser so you can get real-time predictions. However it shouldn’t be too difficult to make a node red node that does detections.
You wouldn’t be able to use this sdk though because it only works in the browser. You need to do it using TensorFlowjs-node

@mas1515
Copy link
Author

mas1515 commented Jun 12, 2020

hello @bourdakos1
i want to get video from ip camera with ffmpge and rtsp address .
after that object detecting on video.
i think in node-red i can do it easier .

@mas1515
Copy link
Author

mas1515 commented Jun 12, 2020

where is source code for this video ????
https://youtu.be/h_-wTXlX2Ms

@mas1515
Copy link
Author

mas1515 commented Jun 12, 2020

my Big problem is
get rtsp video from ip camera in web browser for using
javascript sdk and object detection
do you have a solution for it ????

@bourdakos1
Copy link
Member

I don't have too much experience with IP cameras, how do they work?

@mas1515
Copy link
Author

mas1515 commented Jun 12, 2020

@bourdakos1

ip camera has an address like this for get video
rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0

for test react object detection app with ip camera
we have to use rtsp address but
i cant find easy solution for this ,

i test this solution
i made a node js app that use socket.io
for send video to client and

But in client side (react app) i dont know how show video(get video) in react app with this code
import * as io from 'socket.io-client'

can you help for this ?
or better solution

@bourdakos1
Copy link
Member

okay, so I think you'll need to use ffmpeg to restream rtsp as HLS and then this might be useful: https://github.com/cloud-annotations/object-detection-live-stream

@bourdakos1
Copy link
Member

Actually this is probably more useful https://github.com/cloud-annotations/raspberrypi-streaming-object-detection

@bourdakos1
Copy link
Member

if you can send me a live camera address I can try to get it working

@mas1515
Copy link
Author

mas1515 commented Jun 12, 2020

@bourdakos1
thanks for helping
this is many rtsp link that you can test

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov

rtsp://170.93.143.139/rtplive/470011e600ef003a004ee33696235daa

rtsp://freja.hiof.no:1935/rtplive/definst/hessdalen03.stream

thank you man
my problem is to get video from rtsp address in
react app for object detection .

@bourdakos1
Copy link
Member

Okay, I think I have something working! It works with all 3 of these addresses

@bourdakos1
Copy link
Member

bourdakos1 commented Jun 12, 2020

https://github.com/cloud-annotations/ip-camera-object-detection

change the STREAM_URL to your url

npm install
npm start

@mas1515
Copy link
Author

mas1515 commented Jun 12, 2020

@bourdakos1
This code works for rtsp address i tested it ,
Thank you very much and thank you for your help ,

i have another question ,
how use this code without internet (offline)
can i load this link locally ??

<script src="https://cdn.jsdelivr.net/npm/@cloud-annotations/[email protected]"></script>

@bourdakos1
Copy link
Member

yea just download this file: https://cdn.jsdelivr.net/npm/@cloud-annotations/[email protected]
and save it locally as models.js in the js
then update the script tag to be:

<script src="js/models.js"></script>

@mas1515
Copy link
Author

mas1515 commented Jun 14, 2020

@bourdakos1

i tested
it works thank you ,

another question
is it possible have two video on same page
for object detection ???

two rtsp address link for two camera i mean .

@bourdakos1
Copy link
Member

yea, it's possible, but running more that one object detection detector simultaneously will probably be slow

@mas1515
Copy link
Author

mas1515 commented Jun 14, 2020

i have goood pc for test it .

can you send code for two object detection ???

@bourdakos1
Copy link
Member

I don't have code for it and I don't really have much time this week to build it.

You could modify the ip-camera code to have dynamic stream routes instead of one /stream

@mas1515
Copy link
Author

mas1515 commented Jun 18, 2020

@bourdakos1

it is not hurry for make code , you helped me very much

i dont know very ffmpeg in nodejs

can you send me link for learning it ????

i need two object detection(rtsp address) on same page ,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants