Skip to main content

detect and classify insects on a raspberry pi

Project description

bugcam

Raspberry Pi insect detection CLI using Hailo AI accelerator and the edge26 processing pipeline. Records video, detects and classifies insects on-device, and uploads results to S3.

Default API endpoint: https://api.sensinggarden.com/v1

Quick Start

curl -sSL https://raw.githubusercontent.com/MIT-Senseable-City-Lab/sensing-garden/main/install.sh | bash
bugcam setup
bugcam run

Commands

Command Description
bugcam run Full pipeline: record + process + upload + heartbeat
bugcam record single Record a single video
bugcam process Process existing videos with edge26
bugcam upload Upload processed output to S3
bugcam heartbeat Write a heartbeat snapshot
bugcam models list List available and installed models
bugcam models download <name> Download a model bundle
bugcam models info <name> Show model details
bugcam models delete <name> Delete a model bundle
bugcam status System diagnostics (hardware, deps, camera, Hailo)
bugcam setup Device registration + Hailo installation
bugcam autostart enable Enable systemd service for boot
bugcam autostart disable Disable systemd service
bugcam autostart status Show service status
bugcam autostart logs View service logs
bugcam update Update to latest version
bugcam --version Show installed version

Architecture

  • edge26 pipeline lives in bugcam/edge26/ (vendored from the edge26 repo). Handles recording, processing, and output formatting.
  • BugSpot library handles motion detection and insect tracking.
  • Hailo accelerator runs classification on detected insects.
  • Upload sends results to S3 via presigned URLs obtained from the backend API. No AWS credentials are stored on-device -- only a per-device API key issued during bugcam setup.
  • S3 trigger Lambda indexes uploaded results into DynamoDB.

Configuration

Config file: ~/.config/bugcam/config.json

Field Description
api_url Backend API endpoint
api_key Per-device API key (from registration)
flick_id FLICK device identifier
dot_ids List of DOT device identifiers
s3_bucket Output S3 bucket name

Models are stored in ~/.cache/bugcam/models/<bundle>/ (each bundle contains model.hef + labels.txt).

Requirements

  • Raspberry Pi 5 with 8GB RAM
  • Raspberry Pi AI HAT+ (Hailo-8L or Hailo-8)
  • Pi Camera (HQ Camera recommended)
  • Optional SEN55 environmental sensor on I2C for bugcam environment and periodic environment uploads
  • Python 3.11+
  • Raspberry Pi OS Bookworm 64-bit
  • build-essential and libcjson-dev for building the bundled SEN55 reader

Development

git clone https://github.com/MIT-Senseable-City-Lab/sensing-garden.git
cd sensing-garden
poetry install
poetry run bugcam --help

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bugcam-0.2.0.tar.gz (71.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bugcam-0.2.0-py3-none-any.whl (96.3 kB view details)

Uploaded Python 3

File details

Details for the file bugcam-0.2.0.tar.gz.

File metadata

  • Download URL: bugcam-0.2.0.tar.gz
  • Upload date:
  • Size: 71.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.14.3 Darwin/25.2.0

File hashes

Hashes for bugcam-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8012747f4777945d690644bb2d08b53e100871e2e24ca8d037bbbd2a064e2383
MD5 02753adab20eb8f06be9b1db03371272
BLAKE2b-256 803acc650535dcc32f175a2388b4681da75bb2700140deb4861e33db81b113ee

See more details on using hashes here.

File details

Details for the file bugcam-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: bugcam-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 96.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.14.3 Darwin/25.2.0

File hashes

Hashes for bugcam-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54301c489eab4d7df8e301c149c23f33d8e72c2a0cbab33bdacd1128395dea88
MD5 3b13c3cdd891ba6f5bbdea018fcec019
BLAKE2b-256 40f95adeb3c39abbd79aa1d12627e30fc67e0632aff55c9625f69e34690df3ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page