Рет қаралды 65
1. usb coral need python 3.9. it doesnt support 3.11 which is native for Raspbian Bookworm.
one way - install python 3.9 with pyenv.
2. install coral packages inside python 3.9
see github.com/google-coral/pycor...
Download pycoral-2.0.0-cp39-cp39-linux_aarch64.whl and tflite_runtime-2.5.0.post1-cp39-cp39-linux_aarch64.whl from github.com/google-coral/pycor...
pip install ./pycoral-2.0.0-cp39-cp39-linux_aarch64.whl
pip install ./tflite_runtime-2.5.0.post1-cp39-cp39-linux_aarch64.whl
3. picamera2 will not work cause of lack libcamera. so the fast way - use gstreamer and build libcamera.
wiki.veye.cc/index.php/V4L2_m... - gstreamer
libcamera.org/getting-started...
4. install mediamtx or other rtsp-server.
github.com/bluenviron/mediamt... - just download binary for raspberry. and change it settings (this video shows how).
5.
start rtsp stream:
gst-launch-1.0 libcamerasrc ! "video/x-raw, format=(string)UYVY, width=(int)640, height=(int)480,framerate=30/1" ! videoscale ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtspclientsink location=rtsp://localhost:8554/mystream
start mediamtx:
./mediamtx
start classify from coral examples (python 3.9):
python classify.py