This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Sep 2023 update: We've released official support for MediaPipe on Raspberry Pi. | |
## It provides many more features to what's available in TFLite Task Library. The guide | |
## below has been updated to use MediaPipe instead of TFLite Task Library. | |
## Check out this blog post to learn more: | |
## https://developers.googleblog.com/2023/08/mediapipe-for-raspberry-pi-and-ios.html | |
# Show your Raspberry Pi OS version. | |
cat /etc/os-release | |
# Update packages on your Raspberry Pi OS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from picamera import PiCamera | |
from picamera.array import PiRGBArray | |
import time | |
import cv2 | |
WINDOW_NAME = 'benchmark' | |
FRAME_COUNT = 100 | |
FRAME_RATE = 30 | |
camera = PiCamera(framerate = FRAME_RATE) |