Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI powered webcam

With a raspberry pi zero 2 w, camera module, 2x SG90 servo's, custom 3D printed case and this software you can create an AI powered webcam that follows a person and can autofocus and pan/tilt.

Hardware

  • Raspberry Pi Zero 2 W
  • Raspberry Pi 5 8MP IMX219 Camera Module
  • 2x SG90 Servo Motors
  • Custom 3D Printed Case (available on Thingiverse)
  • Micro USB to USB-A male OTG Cable

Webcam Prototype

Installation

To set up the AI powered webcam on your Raspberry Pi (zero 2w), follow these steps:

  1. Clone the repository:

    git clone https://github.com/AlbertovanEckeveld/ai-webcam.git
  2. Install the required packages:

    sudo apt install python3-pip python3-dev libatlas-base-dev libopenjp2-7 libtiff5 v4l2-ctlq
  3. Install the required Python packages:

     pip3 install -r requirements.txt
  4. Add to config.txt on the boot partition:

    dtoverlay=dwc2
  5. Add to cmdline.txt after rootwait:

    modules-load=dwc2,g_ether rootwait
  6. Place usb-webcam.sh script in /usr/bin/ and make it executable

    sudo cp usb-webcam.sh /usr/bin/usb-webcam.sh
    sudo chmod +x /usr/bin/usb-webcam.sh
  7. Add the script to crontab to start automatically on boot:

    sudo crontab -e

    Add the following line:

    @reboot /usr/bin/usb-webcam.sh
    @reboot python3 main.py
  8. Reboot the Raspberry Pi:

     sudo reboot now

About

An AI powered webcam that follow traces movement of a person.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages