Apiarist Dev commited on
Commit
3bf4d3f
·
1 Parent(s): be50c21

chore: remove internal planning docs (drafts, scripts notes) from public repo

Browse files
Files changed (4) hide show
  1. BLOG_POST.md +0 -76
  2. DEMO_VIDEO_SCRIPT.md +0 -85
  3. LINKEDIN_POST.md +0 -61
  4. data/SOURCES.md +0 -73
BLOG_POST.md DELETED
@@ -1,76 +0,0 @@
1
- # Building Apiarist: 10 days, 1 custom YOLO, and why small models win
2
-
3
- *Field notes from the Build Small Hackathon.*
4
-
5
- ---
6
-
7
- ## The constraint that made this interesting
8
-
9
- The hackathon's only hard rule: **total parameters ≤ 32 billion**, and the whole thing must run on a laptop. No cloud APIs at runtime. Build something that solves a real problem for a real person, then prove a small model is genuinely the right tool for the job, not a cop-out for not having GPT-4o's API key.
10
-
11
- I built **Apiarist**: a fully-offline AI hive frame inspector for backyard beekeepers. You point a phone camera at any honeycomb frame and the app counts bees, flags the queen, spots varroa mites, and writes a narrative report you can actually log. No internet required.
12
-
13
- Live demo: [huggingface.co/spaces/build-small-hackathon/Apiarist](https://huggingface.co/spaces/build-small-hackathon/Apiarist)
14
-
15
- ## Why beekeeping, why now
16
-
17
- Frank, a beekeeper a few streets over, keeps 14 hives. Every weekend he inspects each frame and writes notes by hand in a beat-up notebook. Last summer he lost four colonies because he didn't spot a queen failure in time.
18
-
19
- The problem is real but tiny: he's not going to upload private hive data to a cloud API, and his apiary has no signal anyway. He doesn't need a foundation model. He needs **a fast, focused tool that runs on his laptop in a field.**
20
-
21
- That's the entire pitch for small models, distilled.
22
-
23
- ## Architecture: specialist + generalist
24
-
25
- Two models, two jobs:
26
-
27
- - **YOLOv8s, custom-trained** (22 MB, ~11M params): finds bees, drones, queens, and varroa mites with bounding boxes. Runs on CPU in ~200ms. This is the *specialist*.
28
- - **Qwen2.5-VL-3B-Instruct** (~6 GB, 3B params): takes the image + the YOLO detection counts and writes a narrative inspection report. Runs on a free ZeroGPU in ~5 seconds. This is the *generalist*.
29
-
30
- The trick: each model does what it's actually good at.
31
-
32
- Vision-language models are terrible at counting tiny things or picking subtle queens out of a sea of nearly-identical workers. Ask Qwen-3B "how many varroa mites?" and it will confidently hallucinate a number. Ask a specialist YOLO and you get a real count grounded in pixels.
33
-
34
- Inversely, YOLO can't write a useful report. "47 bees, 1 queen, 0 mites" is data, not language. Qwen takes those facts and produces "Healthy frame, queen present, brood pattern looks solid, no swarm prep visible."
35
-
36
- Together: structured + narrative. That's a real product.
37
-
38
- ## Training a YOLO on Modal in one afternoon
39
-
40
- The first dataset I tried (Matt Nudi's 909-image honey-bee set) had only ~50 queen examples. Queen mAP came out at 0.37 with P=0.19, basically useless for queen detection.
41
-
42
- Pivoted to **hendricks_ricky/bee-project** on Roboflow Universe: 3,308 labeled images with 892 queens AND a Varroa class. Trained YOLOv8s for 60 epochs on a single Modal T4 in ~50 minutes for ~$0.40 of free hackathon credit.
43
-
44
- The Modal script is two functions. It pulls the dataset from Roboflow inside the container, trains, saves weights to a Modal Volume, and exits. No local GPU needed. No flaky Colab timeouts. Best money the credit program ever spent on me.
45
-
46
- ## Off the Grid, intentionally
47
-
48
- For the demo Space to count for the "Off the Grid" badge, the live app can't call any cloud APIs at inference. So:
49
-
50
- - YOLO runs on the main HF Space container (CPU)
51
- - Qwen-3B runs via `@spaces.GPU` on ZeroGPU's free GPU pool
52
- - Both models live in the Space repo (YOLO weights via Git LFS, Qwen from HF Hub cache)
53
- - SQLite persists hive registry + inspection history
54
- - ReportLab generates weekly PDF reports
55
-
56
- The only network calls are *downloading* the models on first boot. After that, it's a closed loop.
57
-
58
- ## What I'd do with more time
59
-
60
- - **More queen training data.** 892 examples is the most I could find, but the model still misses queens that aren't well-lit or facing the camera.
61
- - **A second specialist for swarm cells.** Right now those are detected by Qwen-3B's prose, which means false alarms.
62
- - **Voice notes**, with Whisper transcription. Beekeepers wear gloves, typing is bad UX in the field.
63
- - **Bee count trends over time** in the PDF report. Pretty graphs sell.
64
-
65
- ## The thing I learned
66
-
67
- Specialist + generalist isn't just an architecture choice. It's a thesis: **you don't need a giant model if you know exactly what your tiny model needs to do.** A 11M-parameter YOLO trained on 3,000 images beats GPT-4o at counting bees because it was literally designed for that. The 3B VLM handles everything else.
68
-
69
- Small models win when you stop asking them to do everything.
70
-
71
- ---
72
-
73
- **Code:** [github / HF Space](https://huggingface.co/spaces/build-small-hackathon/Apiarist)
74
- **YOLO weights:** [huggingface.co/maryammeda/apiarist-honey-bee-detector](https://huggingface.co/maryammeda/apiarist-honey-bee-detector)
75
- **Built for:** [Build Small Hackathon](https://huggingface.co/build-small-hackathon)
76
- **Tools:** Hugging Face, Gradio, Modal, Roboflow, ultralytics, transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
DEMO_VIDEO_SCRIPT.md DELETED
@@ -1,85 +0,0 @@
1
- # Apiarist, 60s Demo Video Script
2
-
3
- **Total runtime:** 60 seconds
4
- **Format:** Screen recording (your laptop) + voiceover. No face-on-camera needed.
5
- **Tool to record:** OBS (free) or Screen Recorder built into Windows (Win+G)
6
- **Mic:** Phone mic in a quiet room beats your laptop mic. Record separately, sync after.
7
-
8
- ---
9
-
10
- ## Shot list (timecoded)
11
-
12
- ### 0-5s, Hook
13
- **Visual:** Close-up still of a honeycomb frame from the dataset, full screen. Cut to a laptop sitting on a wooden surface (your desk works).
14
- **Voiceover:**
15
- > "Beekeepers inspect hives every weekend. Most still write notes in a beat-up notebook."
16
-
17
- ### 5-15s, Problem
18
- **Visual:** Browser tab opening to Apiarist Space. Pause on the welcome screen.
19
- **Voiceover:**
20
- > "Last summer, Frank, a backyard beekeeper down the road, lost four colonies because he didn't spot queen failures in time. Apiarist is the assistant he should have had."
21
-
22
- ### 15-30s, The App In Action (THE PROOF)
23
- **Visual:** Screen recording.
24
- 1. Click **Inspect** tab
25
- 2. Pick **"Hive #7"** from dropdown
26
- 3. Upload a clean bee frame photo (use one with a visible queen, pre-test which ones the model nails)
27
- 4. Click **Analyze Frame**
28
- 5. ~5 seconds of "thinking", cut this short in edit if needed
29
- 6. **Annotated frame appears** with bounding boxes
30
- 7. **Pan over the result panel**, show queen badge (bright green), bee counts, brood pattern, notes
31
-
32
- **Voiceover (over the action):**
33
- > "Snap a photo of any comb frame. Apiarist runs a custom-trained YOLO detector to find queens, drones, workers, and varroa mites, then a 3-billion-parameter vision-language model writes a narrative report. All local. No cloud APIs. No subscription."
34
-
35
- ### 30-42s, The Kill Shot (Compare tab)
36
- **Visual:** Switch to **Compare** tab. Upload same photo. Click "Run Comparison." Both sides analyze. Camera lingers on the side-by-side: clean structured output on the left (Apiarist), vague prose on the right (raw VLM).
37
- **Voiceover:**
38
- > "Compare a generic vision model on its own, it describes the photo, but can't count bees or pick out the queen. Apiarist's specialist YOLO + small VLM combo gives you something a beekeeper can actually log."
39
-
40
- ### 42-52s, Workflow
41
- **Visual:**
42
- - Switch to **Hives** tab
43
- - Show the apiary table with multiple hives
44
- - Click into inspection history for one hive, show 4-5 past inspections
45
- - Click **"Generate PDF Report"**, show the downloaded PDF preview
46
-
47
- **Voiceover:**
48
- > "Every inspection auto-saves to that hive's log. Generate weekly PDF reports. Track which hives need attention. SQLite-backed, runs anywhere."
49
-
50
- ### 52-60s, Close
51
- **Visual:** Apiarist logo full screen with text overlay:
52
- > Apiarist
53
- > Custom YOLOv8s + Qwen2.5-VL-3B
54
- > Fully offline. Built in 10 days.
55
- > huggingface.co/spaces/build-small-hackathon/Apiarist
56
-
57
- **Voiceover:**
58
- > "Apiarist. Small models, real work. Built for the Build Small Hackathon."
59
-
60
- ---
61
-
62
- ## Recording checklist
63
-
64
- - [ ] Practice run the click-through 3 times before hitting record
65
- - [ ] Pre-load 3-4 bee photos in a folder, picked because the model handles them well
66
- - [ ] Pre-create at least 3 hives in the Hives tab with realistic names ("Hive #1, Northeast", "Hive #2, Apricot tree", "Hive #3, Backyard")
67
- - [ ] Log 4-5 inspections per hive before recording (so the history view has content)
68
- - [ ] Switch the Space to T4/ZeroGPU mode and prewarm by clicking Analyze once before recording (avoids 30s cold-start in the video)
69
- - [ ] Record voiceover separately on phone in a quiet room, read each section twice, pick best take
70
- - [ ] Edit in CapCut / Premiere / DaVinci Resolve (all free for this)
71
- - [ ] Add subtle background music (uncopyrighted, try YouTube Audio Library "instrumental folk")
72
- - [ ] Export as MP4 1920x1080 30fps, under 50MB
73
-
74
- ## What NOT to do
75
-
76
- - Don't film your face. Wastes time, adds nothing.
77
- - Don't show real-time waiting. Cut directly from "click" to "result." Demo videos lie about latency, that's normal.
78
- - Don't show the Logs tab. Don't show errors. Don't show the Code editor. Stay in App view the entire time.
79
- - Don't read the script verbatim if it sounds robotic. Riff on it.
80
-
81
- ## Where to upload
82
-
83
- - **Primary**: YouTube Unlisted, paste link in submission + LinkedIn post
84
- - **Backup**: Upload as `demo.mp4` in your HF Space (add it to repo via git LFS)
85
- - LinkedIn natively prefers uploaded video over external links, so upload **directly** to LinkedIn too
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
LINKEDIN_POST.md DELETED
@@ -1,61 +0,0 @@
1
- # LinkedIn submission post (June 15)
2
-
3
- Post this on submission day. Upload the demo video natively (LinkedIn throttles posts with external video links).
4
-
5
- ---
6
-
7
- I spent 10 days teaching a small AI to do something OpenAI's flagship can't: count bees on a honeycomb frame.
8
-
9
- For the Build Small Hackathon by Hugging Face × Gradio, I built **Apiarist**, a fully offline AI hive inspector for backyard beekeepers. Point a phone at any comb frame and it tells you:
10
-
11
- how many bees, drones, and queen candidates it sees
12
- where the queen is (with a green box around her)
13
- whether varroa mites are visible
14
- what the brood pattern looks like
15
- generates a weekly PDF inspection report
16
-
17
- Why small models? Because apiaries don't have signal. Hive-health data isn't for the cloud. And a custom YOLOv8s trained on 3,308 labeled bee images, paired with Qwen2.5-VL-3B running locally on ZeroGPU, beats GPT-4o at counting bees, because that's literally what it was designed for.
18
-
19
- Specialist (YOLO) finds and counts the things. Generalist (VLM) writes the narrative report. Together: structured + narrative inspection in 5 seconds, no internet required.
20
-
21
- Total params: ~3 billion. Total cost per inspection: zero.
22
-
23
- Demo video below
24
- Try it: huggingface.co/spaces/build-small-hackathon/Apiarist
25
- Field notes: [link to your blog post once published]
26
-
27
- Thanks to Hugging Face, Gradio, Modal, OpenAI, NVIDIA, Cohere, Black Forest Labs, and OpenBMB for the hackathon and the compute.
28
-
29
- #BuildSmall #SmallModels #Gradio #OpenSourceAI #HuggingFace #Beekeeping
30
-
31
- ---
32
-
33
- ## Tagging instructions
34
-
35
- When you paste this into LinkedIn, type @ then the company name and pick the verified page (blue checkmark):
36
- - Hugging Face
37
- - Gradio
38
- - Modal
39
- - OpenAI
40
- - NVIDIA
41
- - Cohere
42
- - Black Forest Labs
43
- - OpenBMB
44
-
45
- The names turn **bold blue** when they're real tags.
46
-
47
- ## Upload order
48
-
49
- 1. Open new LinkedIn post
50
- 2. **Upload demo video file directly** (not a YouTube link), LinkedIn favors native video
51
- 3. Type the post text above (with tags applied)
52
- 4. **Put the Space URL in the first comment**, not the post body, LinkedIn throttles posts with external links in the body
53
- 5. Post
54
-
55
- ## Backup channels
56
-
57
- If you don't get traction on LinkedIn, cross-post to:
58
- - Twitter / X (split into 3 tweets, hook + features + link)
59
- - Bluesky (same as Twitter)
60
- - Reddit r/beekeeping (separate post, lead with "I built an AI hive inspector, would love your feedback")
61
- - Reddit r/LocalLLaMA (lead with the tech story, specialist+generalist, 3B params, ZeroGPU)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/SOURCES.md DELETED
@@ -1,73 +0,0 @@
1
- # Bee Dataset Sources
2
-
3
- The Apiarist model needs photos of **honeycomb frames** (the wooden rectangles
4
- bees build comb on), not just bees flying around. iNaturalist gives us a base
5
- of bee imagery but is light on hive-frame shots, we supplement from other
6
- sources below.
7
-
8
- ## 1. iNaturalist (auto-scraped)
9
-
10
- Apis mellifera observations, CC-licensed.
11
-
12
- ```powershell
13
- C:\Users\marya\Apiarist\.venv\Scripts\python.exe scripts\scrape_inaturalist.py --pages 10
14
- ```
15
-
16
- Output: `data/raw/inaturalist/` + `metadata.jsonl`. Resumable.
17
-
18
- ## 2. Roboflow Universe (hand-search, often pre-labeled)
19
-
20
- Search these queries, many datasets ship with YOLO labels already.
21
-
22
- - https://universe.roboflow.com/search?q=honeycomb
23
- - https://universe.roboflow.com/search?q=varroa+mite
24
- - https://universe.roboflow.com/search?q=queen+bee
25
- - https://universe.roboflow.com/search?q=beehive+frame
26
-
27
- Download as YOLOv8 format. Drop the zip into `data/raw/roboflow/<dataset-name>/`.
28
-
29
- ## 3. Kaggle
30
-
31
- - https://www.kaggle.com/search?q=honeybee+dataset
32
- - https://www.kaggle.com/search?q=bee+image+classification
33
-
34
- Useful: "BeeImage Dataset" (5k+ bee close-ups labeled by species/health).
35
-
36
- ## 4. Flickr (Creative Commons)
37
-
38
- Search queries that find frame shots:
39
- - `"honeycomb frame" beekeeping`
40
- - `"hive inspection"`
41
- - `"queen bee marked"`
42
- - `"varroa mite"`
43
-
44
- Filter to CC-BY / CC-BY-SA. Manual download.
45
-
46
- ## 5. YouTube frame extraction
47
-
48
- Beekeeping channels regularly show frame inspections. Use `yt-dlp` + `ffmpeg`
49
- to pull frames at 1fps from videos.
50
-
51
- Suggested channels (manual licensing review required):
52
- - Jeff Horchoff Bees
53
- - Frederick Dunn
54
- - BoB the Bee Guy
55
- - The Beekeeper's Apprentice
56
-
57
- ## Target counts for YOLO fine-tuning
58
-
59
- | Class | Target | Source priority |
60
- |---|---|---|
61
- | `queen` | 200+ | Flickr, YouTube, Roboflow |
62
- | `mite` | 100+ | Roboflow (best), Flickr macro |
63
- | `swarm_cell` | 50+ | Roboflow, YouTube |
64
- | `brood_pattern_normal` | 200+ (negatives) | All |
65
-
66
- ## Labeling
67
-
68
- Use Roboflow's free tier (up to 1k images). Define 3 classes:
69
- - `queen`, bounding box around the queen
70
- - `mite`, small box per visible mite
71
- - `swarm_cell`, box around each peanut-shaped cell
72
-
73
- Export as YOLOv8 format → drop into `data/processed/yolo/`.