webrtchacks / aiy_vision_web_server Goto Github PK
View Code? Open in Web Editor NEWShow camera feed and annotations of the AIY Vision Kit in a webpage
License: Other
Show camera feed and annotations of the AIY Vision Kit in a webpage
License: Other
This appears to have happened after the June 25 UV4L update.
@julianoes and @siyer7881 reported this in #3 on the Pi Zero. It is happening for me on the Pi3.
I believe there might have been something in the June 25th update of UV4L causing this. I asked the UV4L author to take a look.
Hi,
I’m running into an error when trying to run the server.py script:
(env) pi@raspberrypi:~/AIY-projects-python $ sudo ../../../../env/bin/python3 server.py
Traceback (most recent call last):
File “server.py”, line 15, in
from aiy.vision.leds import Leds
ImportError: No module named ‘aiy.vision.leds’
It’s not able to find this module. Is there an install step I’m missing somewhere?
Thanks
Rachel
First up, thanks a lot for the tutorial and code repo! That's very nice to get you me started.
I tried out the face example and it works correctly for a few seconds. Then the stream seems to lag behind the annotations. Basically, the annotations keep up with realtime but the stream is too slow and eventually freezes.
When I try to exit server.py
it gets stuck at exiting...
.
When I hit Ctrl+C again, I get:
^Cexiting...
^CException ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown
t.join()
File "/usr/lib/python3.5/threading.py", line 1054, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
After that, uv4l
is still running, so I can't restart the server:
ps aux | grep uv4l
root 227 51.0 54.9 215872 208140 ? SLsl 07:56 3:53 /usr/bin/uv4l -f -k --sched-fifo --mem-lock --config-file=/etc/uv4l/uv4l-raspidisp.conf --driver raspidisp --driver-config-file=/etc/uv4l/uv4l-raspidisp.conf --server-option=--editable-config-file=/etc/uv4l/uv4l-raspidisp.conf
root 233 0.1 2.2 101636 8432 ? Ssl 07:56 0:00 /usr/bin/uv4l -f -k --sched-fifo --mem-lock --config-file=/etc/uv4l/uv4l-raspicam.conf --driver raspicam --driver-config-file=/etc/uv4l/uv4l-raspicam.conf --server-option=--editable-config-file=/etc/uv4l/uv4l-raspicam.conf
root 317 0.0 0.5 4416 2168 ? Ss 07:56 0:00 /usr/bin/raspidisp_server /tmp/uv4l-raspidisp.socket
pi 1438 0.0 0.8 6568 3376 pts/0 S+ 08:03 0:00 grep --color=auto uv4l
I also tried to start the server with --framerate 5
but it behaved in the same way.
Note that I have recently done a sudo apt-get dist-upgrade
.
Let me know if there is something I should try out, or you need additional info.
I was following instructions and everything seemed to work except when I try to check video stream from browser there is nothing on it.
I can see what the camera is seeing from a monitor directly connected to the pi. When I ssh into pi I can see aiy detection output.
I want to be able to see the video stream from a web browser remotely. Am I missing some configuration?
Note from the UV4L author, Luca Risolia on uv4l-raspidisp.socket file ownership:
With regard to /tmp/uv4l-raspidisp.socket having root as owner, this
file is created by a program called raspidisp_server installed with the
uv4l-raspidisp-extras package. This program is automatically started by
the raspidisp_server.service, which is present in the same package, at
boot and runs in background as root.raspidisp_server is a virtual keyboard: it open and listens to the
socket for a sequence of characters and emulates the corresponding key
strokes as if there were a real keyboard attached to the Rpi. For
example, by using the UV4L demo page with data channels enabled, if you
type 'a', 'b', 'c' there, then, assuming you have a terminal window open
on the rpi, you should see 'abc' appearing in it. It's useful for
controlling the rpi from a web page with the PC keyboard.This video should make it clear:
https://www.youtube.com/watch?v=wthS8TPk2DE
For your purposes, I think it's enough to disable the systemd service
once for all (and reboot to get rid of any possible pending socket file
under /tmp/).
I'm following all the steps presented in the readme file and when I executed this command step 7 sudo python3 setup.py install
I'm getting this:
Using /usr/lib/python3/dist-packages
Finished processing dependencies for aiy-vision-web-server==0.1
Disabling uv4l-raspidisp keyboard to socket and releasing /tmp/uv4l-raspidisp.socket
/bin/sh: 1: ./uv4l-socket.sh: Permission denied
Then in step 9, I executed sudo python3 server.py
and I got the http://raspberrypi.local:5000.
socket waiting for connection...
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
face model loaded
There I'm replacing the 0.0.0.0:5000 with my local raspberry pi IP and I'm not getting any image from my AIY but in the terminal is showing me when it recognizes my face.
What am I missing?
Thank you!
I tried running python3 server.py but I get this error message:
Traceback (most recent call last):
File "server.py", line 26, in
from aiy.leds import Leds
ImportError: No module named 'aiy.leds'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.