Skip to main content

Dev · 2025

Coop Counter.

An AI-powered monitoring system that automatically detects and counts chickens inside a backyard coop using YOLO object detection. Built with a Raspberry Pi camera, FastAPI backend, and a React Native mobile app.

PythonYOLOFastAPIWebSocketRaspberry PiReact NativeExpoMariaDB
YOLO model detecting chickens with bounding boxes and confidence scores

AI detection in action with bounding boxes and confidence scores

Overview

Counting chickens shouldn't require a spreadsheet.

Coop Counter started as a school project. The idea was simple: keep track of how many chickens are inside the coop at any given moment. A Raspberry Pi camera captures images every five minutes and streams live video over WebSocket to a FastAPI backend, where a YOLO object detection model counts them.

Built in collaboration with @kaelangraham, who developed the React Native mobile app while I focused on the backend, AI model, and hardware integration.

Features

What it does.

AI-Powered Counting

YOLO object detection model trained to accurately count chickens with confidence scores.

Live Camera Streaming

Real-time WebSocket video feed from a Raspberry Pi camera mounted in the coop.

Automated Scans

Schedule automatic chicken counts throughout the day, with results stored to a database.

Mobile App

React Native (Expo) app for iOS and Android with dashboard, analytics, and door control.

Gallery

Screens & hardware.

Mobile app dashboard showing chicken count of 42 out of 50, AI certainty 87%, and door control
Mobile dashboard with current count, AI certainty, and automated door control
Analytics page with weekly and daily activity graphs
Weekly and daily reports of chicken activity
System architecture diagram showing data flow from Raspberry Pi camera through FastAPI to YOLO
System architecture: camera through FastAPI to YOLO processing
Raspberry Pi camera module mounted in the chicken coop
Raspberry Pi camera mounted in the coop

Source

Take a closer look.

The full project is open source on GitHub. Backend, mobile app, and hardware scripts all included.