edgetpu icon indicating copy to clipboard operation
edgetpu copied to clipboard

which IP address to use to view demo?

Open ilonadem opened this issue 3 years ago • 11 comments

Description

I am connecting to the google coral from my Mac computer via a micro usb and connecting the coral itself to a power source (note: NOT using mdt).

I'm trying to run the demo app as in step 7 of https://coral.ai/docs/dev-board/get-started/, and when I run edgetpu_demo --stream, I see:

Press 'n' to switch between models.
INFO:edgetpuvision.streaming.server:Listening on ports tcp: 4665, web: 4664, annexb: 4666

The instructions on the google coral website I linked above say "Then on your desktop (that's connected to the Dev Board)—if you're connected to the board using MDT over USB—open 192.168.100.2:4664 in a browser. If you're instead connected to the board by other means (such as SSH over LAN or with an Ethernet cable), type the appropriate IP address into your browser with port 4664." Is there somewhere I can find which IP address to use to connect to see the demo? Or do I need to connect the board to a monitor to see anything?

Click to expand!

Issue Type

Build/Install, Support, Documentation Bug

Operating System

Mendel Linux, Mac OS

Coral Device

Dev Board

Other Devices

No response

Programming Language

No response

Relevant Log Output

Press 'q' to quit.
Press 'n' to switch between models.
INFO:edgetpuvision.streaming.server:Listening on ports tcp: 4665, web: 4664, annexb: 4666

ilonadem avatar Sep 14 '22 20:09 ilonadem

please get the ip address with the below command:

  • ip addr | grep wlan

hjonnala avatar Sep 14 '22 21:09 hjonnala

Which of these would say the IP address?

mendel@arid-quill:~/coral/project-posenet$ ip addr | grep wlan
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 3000

ilonadem avatar Sep 14 '22 22:09 ilonadem

Please try connecting to the wifi first and then try to get the ip address.

mendel@arid-pig:~$ ip addr | grep wlan 3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 3000 inet 192.168.7.160/24 brd 192.168.7.255 scope global dynamic noprefixroute wlan0lan0

In the above output 192.168.7.160 is the ip address of the board,

hjonnala avatar Sep 14 '22 22:09 hjonnala

Having my device connected to wifi I get:

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 3000
    inet 172.20.10.9/28 brd 172.20.10.15 scope global dynamic noprefixroute wlan0

So if my IP address is 172.20.10.15, and when I run the edgetpu demo I get the output "INFO:edgetpuvision.streaming.server:Listening on ports tcp: 4665, web: 4664, annexb: 4666", is 172.20.10.15:4664 the right website to put into the chrome browser? When I do, chrome cannot load the page saying Screen Shot 2022-09-16 at 10 55 32 AM

Also, does the device need to be on the same network as the computer, generally? (right now they are on the same network).

ilonadem avatar Sep 16 '22 14:09 ilonadem

yes, the device and and the computer has to be on the same network..Please try 172.20.10.9:4664

hjonnala avatar Sep 16 '22 20:09 hjonnala

Got it! Thank you so much :)

If I want to run a standard python program and have my computer be the monitor, is all I need to do just append "--stream" to whichever bash script or python file that I run?

ilonadem avatar Sep 18 '22 16:09 ilonadem

If I want to run a standard python program and have my computer be the monitor, is all I need to do just append "--stream" to whichever bash script or python file that I run?

Unfortunately, I don't understand the ask here. Please try what you are trying to do and let us know if you are facing any issues with it.

hjonnala avatar Sep 19 '22 20:09 hjonnala

No worries!

The idea is to be able to run a script (for example https://github.com/google-coral/project-posenet/blob/master/pose_camera.py) and view what is normally on the monitor without the monitor, as a link I could put into chrome. Right now I have an HDMI cable connecting the coral to a separate monitor. Would it be possible to do something like in the edgetpu_demo and view the visual output on an IP address in the browser?

I haven't been able to figure out a way to send what is sent to the monitor to an IP address instead.

ilonadem avatar Sep 19 '22 23:09 ilonadem

Please check the source code of edgetpuvision at :https://coral.googlesource.com/edgetpuvision/ and make the necessary changes to your script to send the video to an IP address.. Thanks!

hjonnala avatar Sep 20 '22 13:09 hjonnala

I'm a little new to gstreamer, so would I just have to change the address of where the video is being sent? So for example if I wanted to modify this demo (https://github.com/google-coral/project-posenet/blob/master/pose_camera.py) to be able to view it on a streaming server, would I have to add a different argument into gstreamer.run_pipeline in line 122? Or would this change have to be executed elsewhere?

ilonadem avatar Sep 24 '22 21:09 ilonadem

or alternatively, should I write a bash script that calls pose_camera.py followed by a line that sets up a web server stream? e.g. something like

SERVER_INDEX_HTML="${TEST_DATA}/index.html" edgetpu_detect_server \
      --source "${VIDEO_STREAM_FILE}" \
      --model "${TPU_MODEL_FILE},${CPU_MODEL_FILE}" \
      --labels "${LABELS_FILE}" \
      --filter car,truck \
      --max_area 0.1 \
      --color white \
      --loop

at least as far as I understand this is how the edgetpu_detect demo (https://coral.googlesource.com/edgetpudemo/) does it.

ilonadem avatar Sep 24 '22 21:09 ilonadem

closing the issue here. As we have another issue opened for the same at: https://github.com/google-coral/project-posenet/issues/88

hjonnala avatar Oct 11 '22 04:10 hjonnala

Are you satisfied with the resolution of your issue? Yes No

google-coral-bot[bot] avatar Oct 11 '22 04:10 google-coral-bot[bot]