-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
Hardware:USB AcceleratorCoral USB Accelerator issuesCoral USB Accelerator issuescomp:thirdpartyThirdparty related issuesThirdparty related issuessubtype:ubuntu/linuxUbuntu/Linux Build/installation issuesUbuntu/Linux Build/installation issuestype:othersIssues not falling in bug, perfromance, support, build and install or featureIssues not falling in bug, perfromance, support, build and install or feature
Description
Description
i got it working just want to share.
Click to expand!
Issue Type
Others
Operating System
Linux
Coral Device
USB Accelerator
Other Devices
Rapsberry Pi 4
Programming Language
Python 3.9
Relevant Log Output
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 https://github.com/google-coral/pycoral/issues/140
Download pycoral-2.0.0-cp39-cp39-linux_aarch64.whl and tflite_runtime-2.5.0.post1-cp39-cp39-linux_aarch64.whl from https://github.com/google-coral/pycoral/releases/tag/v2.0.0
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.
https://wiki.veye.cc/index.php/V4L2_mode_for_Raspberry_Pi#Source_code_cross_compilation - gstreamer
https://libcamera.org/getting-started.html
4. install mediamtx or other rtsp-server.
https://github.com/bluenviron/mediamtx?tab=readme-ov-file#standalone-binary - 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
video - https://youtu.be/EA7_2qL3Iho
Metadata
Metadata
Assignees
Labels
Hardware:USB AcceleratorCoral USB Accelerator issuesCoral USB Accelerator issuescomp:thirdpartyThirdparty related issuesThirdparty related issuessubtype:ubuntu/linuxUbuntu/Linux Build/installation issuesUbuntu/Linux Build/installation issuestype:othersIssues not falling in bug, perfromance, support, build and install or featureIssues not falling in bug, perfromance, support, build and install or feature