Build Vision AI with Raspberry Pi Cameras

Train a model on your own images with Roboflow and run it on a Raspberry Pi with the AI Camera or Camera Module 3. Count parts on a workbench, watch a bird feeder, or monitor a pool, with Roboflow Inference running on the Pi and no cloud connection needed.

An AI-detected goldfinch and several sparrows feed from a bird feeder.

Raspberry Pi Cameras Computer Vision Solution

More people start computer vision on a Raspberry Pi than on any other hardware. Roboflow is the natural companion: label your images, train a model, and run it on the Pi in an afternoon, with Roboflow Inference processing images, videos, and live camera feeds locally.

The Raspberry Pi AI Camera (opens in a new tab) pairs a 12 MP Sony IMX500 sensor with on-sensor inference, and the Camera Module 3 remains the budget pick for classic capture-then-infer projects. Both connect over the CSI ribbon to recent Raspberry Pi boards.

  • Featured: Raspberry Pi AI Camera (Sony IMX500, 12 MP, on-sensor inference)
  • Budget: Camera Module 3
  • Integration: Roboflow Inference on the Pi, with results sent to GPIO pins, webhooks, or dashboards

How to Run a Roboflow Model on a Raspberry Pi Camera

There are four common ways to get frames from a Pi camera into a Roboflow model:

  • Roboflow Inference on the Pi: Run Roboflow Inference in Docker on a 64-bit Raspberry Pi. It gives you a local inference server that runs your models and Workflows without sending data to the cloud. Start with how to deploy computer vision models to a Raspberry Pi.
  • Picamera2 in Python: Capture frames from the CSI camera with Picamera2 and send each one to the local Inference server, then act on the result in the same script.
  • A phone or IP camera: The Pi can also read any RTSP stream on the same network, like a phone running an RTSP camera app in our Raspberry Pi pool monitor build.
  • Cloud Streaming, model off the Pi: Publish the Pi camera to Roboflow Cloud Streaming over RTMP, for example by piping rpicam-vid into FFmpeg, and Cloud Streaming runs your Workflow on managed GPUs. The Pi only captures and sends video, so you can run larger models than its CPU can handle.

Tip: on a Raspberry Pi 5, run Roboflow Inference in Docker and capture frames with the system Python, which has the camera libraries built in. Use a small model size to keep inference fast on the Pi's CPU.

Example App: Parts Counter with a Raspberry Pi Camera

Here is how a small shop can turn a Pi and a Camera Module 3 into a parts counter at the packing bench:

  • Mount a Camera Module 3 on a small stand above a tray on the bench, with a desk lamp for even light.
  • Capture images of the tray with different counts and mixes of parts, and label each part in Roboflow.
  • Train a small RF-DETR (opens in a new tab) object detection model on those images in Roboflow.
  • Build a Workflow that counts each part type and compares the total with the order.
  • Run it on the Pi and light a green or red LED on a GPIO pin, so the packer knows the count is right before sealing the bag.

See count and quantity verification for the full use case and kitting verification for checking mixed kits. The same setup works for inventory cycle counting on a shelf.

More Raspberry Pi Camera Projects

From wildlife monitors to parts counters to classroom projects, a Pi camera plus a Roboflow model is the shortest path from idea to something that works.

Run vision models on Roboflow hardware

Roboflow Edge computers and the AI1 Smart Camera arrive ready to run your models. Each one ships with RoboflowOS, the operating system we build and maintain, so fixes and security patches reach your devices over the air without a site visit.

Roboflow Edge computers
  • Settings that survive a restart

    RoboflowOS rebuilds static addresses, gateway, DNS and camera-port tuning from a persistent store each time the device starts.

  • Updates over the air

    Security patches, camera driver fixes and NVIDIA platform upgrades come in from the Roboflow platform, separate from your models and Workflows.

  • Tested on the hardware you get

    We build the inference runtime too, so we test every OS image against it on the same boards we ship.

  • Locked down by default

    The OS image is read-only and ships without SSH, a desktop or a local login. Your team reads logs, checks streams and views telemetry in Deployment Manager, the Roboflow tool for managing devices remotely.

  • Five years of updates included

    Every appliance comes with five years of RoboflowOS updates from the purchase date, plus a one-year hardware warranty.

RoboflowOS on NVIDIA Jetson

  • Smart Camera

    AI1

    The AI1 puts a camera, a light and a computer in one housing. It pairs an 8 MP (3840 x 2160) camera and LED ring with an NVIDIA Jetson Orin NX 8GB. Teams use it to prove out an edge vision project on a fixed inspection view, counting parts a few inches away or spotting defects dozens of feet away.

    Memory
    8 GB
    Cameras and networking
    Integrated 8 MP camera and LED ring1 x GbE
    1 stream
  • Roboflow Edge

    RF-NX16

    The RF-NX16 handles stations with several cameras. It has six PoE ports on a shared 150 W budget, two more GbE ports and an NVIDIA Jetson Orin NX 16GB.

    Memory
    16 GB
    Cameras and networking
    6 x GbE PoE with a 150 W total budget2 x GbE
    1–4 streamsRF-NX16 Spec Sheet
  • Roboflow Edge

    RF-AGX64

    The RF-AGX64 runs higher-resolution cameras and bigger models. It has 64 GB of memory on an NVIDIA Jetson AGX Orin, four PoE ports and two 10 GbE ports.

    Memory
    64 GB
    Cameras and networking
    4 x GbE PoE2 x 10 GbE
    4+ streams, line scanRF-AGX64 Spec Sheet
  • Roboflow Edge

    RF-THOR128

    The RF-THOR128 is our most powerful appliance and runs on the NVIDIA Jetson T5000 with 128 GB of memory. It has one 5 GbE port and a 100 GbE QSFP28 port that breaks out to four 25 GbE links, and its cameras connect through a PoE switch.

    Memory
    128 GB
    Cameras and networking
    1 x 5 GbE and 1 x 100 GbE QSFP28Breaks out to 4 x 25 GbE
    8+ streams, edge VLM inferenceRF-THOR128 Spec Sheet

One GbE PoE camera port

Not sure which one fits your line?

Send us your cameras, Workflow and line rate, and we’ll create a recommendation for you.

AI for Raspberry Pi Cameras Workflows

Use a Raspberry Pi camera? Explore Workflows you can get started with to create computer vision apps in minutes. Roboflow Inference runs directly on Raspberry Pi, so you can train a model on your own data and run detection, classification, or segmentation right on the board, or send the camera to Roboflow Cloud Streaming and run the same Workflow on managed GPUs.

How to Setup Raspberry Pi Cameras with AI

Raspberry Pi cameras can be used for computer vision tasks such as object detection and classification. Roboflow Inference runs on the Pi itself, the AI Camera's on-sensor compute can run models directly, and the Pi can also publish its camera to Roboflow Cloud Streaming to run larger models on managed GPUs.

Talk to a Vision AI engineer about scaling your Raspberry Pi project.

Moving a Pi prototype toward production? Bring us your use case and we'll map a working solution.

Ask us about:

  • Solution architecture that fits your cameras, devices, and sites
  • A live demo on images from your own cameras
  • Deployment options: Raspberry Pi, Jetson, Cloud Streaming, or on-prem
  • A path from one prototype to a managed fleet of devices

Over 80,000 organizations build with Roboflow.

  • Rivian
  • Pella
  • Chobani
  • USG Corporation
  • BNSF Railway
  • American Woodmark
Start where you are

Additional resources