logo
/

Sparrow Detector 1.0

YOLOv8 | Ultralytics | Streamlit

Project

Overview

This is a proof of concept using two white label technologies for performing object detection. This project is to be combined with a later one, featuring an ESP32-CAM and servos.


English House Sparrows (EHS) are a nuisance, thriving year-round in the variety of climates of North America. Like other invasives, they peck and destroy local bird eggs, impacting biodiversity, conservation efforts, and chicken egg-laying operations. Area denial, involving netting and fencing, can be unfeasible. Deterring congregation by removing food sources tends to be the easiest and most rapid solution. However, in the case of attracting native populations and passively feeding livestock, where food is intentionally made available, or available to non-specific/similar species, this method is inapplicable.


A tongue-in-cheek solution may be to involve automated deterrence via object recognition.


Minimum viable product was to detect English House Sparrows and to do so expeditiously. Ideally, I could quickly achieve MVP with white label platforms, with exposure to their inner workings: computer vision concepts, libraries, terminology, ML engineering principles, and any recent developments in these circles.


After surveying available technologies, I aspirationally chose the recent YOLOv8 as the base computer vision model for its ease of use, Ultralytics for swiftly training and exporting a model, Flask for the Python backend, and Next.js as the frontend to deploy to Vercel.

I trained (comically abbreviated) and exported an MVP model, then attempted to integrate Flask with Next.js. Unfortunately, Next.js presently integrates with Python 3.9 and below. Given the number of dependencies and in the interest of time, I dropped Flask and Next.js to search for a suitable web host for deployment. Streamlit was a great fit as the platform specializes in hosting data apps and possesses built-in styling for quickly creating an upload interface.


Much time was spent debugging, eavesdropping on StackOverflow, reading Flask, Next.js, Ultralytics, and OpenCV forums on Github, and absorbing the respective Docs and more to complete this project.

Technologies

YOLOv8

Ultralytics

Streamlit

Python

Home