Close

ATLAS Vision: Training a 50-Class Species Classifier

A project log for ATLAS

Built the tricorder I actually wanted in the field: one that warns, not just measures.

apollo-timbersApollo Timbers 02/24/2026 at 14:460 Comments

The Goal

A vision model that runs on a HUSKYLENS 2 (Kendryte K230, 6 TOPS AI accelerator) and classifies species into safety tiers:

The model has to be small enough for edge deployment, fast enough for real-time use, and — critically — it has to be right about the dangerous stuff.

The Pipeline

1. Data Collection

I wrote a Python scraper that pulls research-grade, expert-verified observations from the iNaturalist API. Research-grade means community consensus on identification — these aren't random smartphone photos with guessed labels.

50 classes across 5 categories:

Total: 17,700 images. Dangerous species are intentionally oversampled — death cap and destroying angel get 600 images each while safe species get 300. When someone's life is on the line, false negatives on deadly species are unacceptable.

2. Dataset Preparation

A preparation script validates every image (corrupt file detection, minimum size check), splits into train/val/test (roughly 84/16 split plus held-out test), and generates a safety-tagged class map. Every class gets a safety label baked into the metadata so the device firmware can display appropriate warnings.

3. Training

YOLOv8n-cls (nano classification) on an NVIDIA RTX 2070 SUPER. 1.5 million parameters, 3.4 GFLOPs.

Training stopped early at epoch 85 (best model at epoch 65). Total training time: 51 minutes.

4. Results

Score
88.4>#/td###
98.4>#/td###
3.1 MB
5.7 MB
0.2ms per image

88.4% top-1 means the model picks the correct species 88% of the time across all test images — including bad angles, poor lighting, and visually similar species. 98.4% top-5 means the correct answer is almost always in the model's top candidates.

More importantly: on clean, well-lit images of distinctive species, confidence scores hit 95-99%. A photo of a destroying angel / death cap came back at 100% confidence. A baby bella mushroom (not in the training set) came back at 6% — the model knows when it doesn't know.

Live Demo

Exported to ONNX and ran live inference through a USB webcam using OpenCV. Point the camera at a photo on my phone, get real-time classification with confidence scores. Chanterelle: 99%. Death cap: 99%. Unknown grocery store mushroom: low confidence, no false ID. Exactly the behavior you want from a safety-critical system.

Hardware Target

The final model deploys to a HUSKYLENS 2 AI camera (Kendryte K230, 6 TOPS, 1GB RAM). A custom PCB designed by my collaborator Yasir Ahmad. The MCU board runs dual RP2350 processors handling sensor fusion, UI, and audio while the HUSKYLENS handles all vision processing. Communication over UART/I2C.

The nano model at 3.1MB with 0.2ms inference is absurdly comfortable on this hardware. Which is good, because V2 is going to need the headroom.

What's Next: V2

V2 expands from 50 to ~200 classes:

The V2 dataset downloader is running right now on a separate machine. 57,000+ images from iNaturalist, targeting a YOLOv8s-cls (small) model for the larger class count.

I've also compiled a full species database document with safety classifications, identification notes, lookalike warnings, and survival context for all 200 classes. Every entry leads with what can hurt you, then follows with utility.

The Point

ATLAS isn't a nature app. It's a field instrument. The difference is that a nature app tells you what something is. ATLAS tells you whether it's going to kill you, and it does it on-device with no cell service required.

Discussions