This tool helps you collect pictures for your AI project using the inexpensive Raspberry PI Camera.
This tool supports three important steps
- Focus - a video mode allows you to focus your camera - important with HQ Camera
- Lighting - find the best setting for you object - important if it's moving
- Automation - use GPIO signals to trigger data collection
- Storage - upload to cloud storage
The trigger can come from a remote device
This is based on picamera which is not yet compatibel with bullseye
If installing on a pi zero use lite image (also good option if not conncting PI to monitor)
Install the buster raspios image using etcher
remove an dreinsert SD Card to mount on pc/mac
touch /Volumes/boot/ssh
enable device access via USB so you can configure WLAN etc.
or you can connect keyboard and screen
turbo and voltage are required for system stability when camera is attacehd to a zero
edit /Volumes/boot/config.txt
[pi0]
gpu_mem=128
start_x=1
dtoverlay=dwc2
force_turbo=1
over_voltage=4
edit /Volumes/boot/cmdline.txt after rootwait
modules-load=dwc2,g_ether
Now you can connect via usb
ssh pi@raspberrypi
or
ssh [email protected] (when via USB)
initial password is raspberry
sudo raspi-config
- hostname
- your wifi
- enable camera
- gpu 128
- change password fo pi
sudo apt update
sudo apt full-upgrade
add local time server
sudo vim.tiny /etc/systemd/timesyncd.conf
[Time]
NTP=fritz.box
sudo systemctl restart systemd-timesyncd.service
timedatectl timesync-status
sudo apt install python3 git python3-pip
sudo apt install libgfortran5 libatlas3-base # for numpy
pip3 install -r requirements.txt -U
does not work!
pip3 freeze > all_packages.txt
sed -i 's/==/>=/g' all_packages.txt
pip3 install -r all_packages.txt --upgrade
pip3 install git+https://github.com/dmnewton/picamera_collector.git
or
git clone https://github.com/dmnewton/picamera_collector.git
Chose camera.service or trigger.service
cd /home/pi/.local/lib/python3.7/site-packages/picamera_colllecter
sudo cp camera.service /etc/systemd/system/
sudo systemctl enable camera.service
sudo systemctl start camera.service
sudo systemctl status camera.service
http://<hostname>:5000
userid password are defined in the yaml
One definable triger and storage function
edit app_settings.yaml
scp google-service-key.json pi@raspberrypi:
sudo nano /boot/config.txt
at end add
dtoverlay=disable-wifi
dtoverlay=disable-bt
sudo nano /etc/network/if-pre-up.d/ethtool
at end add
$ETHTOOL --change eth0 advertise 0x008