Thinking in Public
1,029 cells: what small, honest data teaches about AI
The PillWatch student team has captured 159 photographs of a 21-cell pill organizer. Fifty are fully labeled so far, which yields 1,029 labeled cells: 459 full, 570 empty. By modern standards it is a rounding error. It has taught the team more than any model has.
Split by photograph, never by cell
The data is split 111/24/24 photographs into train, validation, and test. The unit of the split is the photograph, not the cell. Cells from one photo share lighting, camera position, and pill batch. Split by cell and the test set quietly contains the training set’s conditions, and every reported number inflates. The held-out test photographs are never touched during tuning.
This is the first thing the students had to learn about data: leakage does not look like cheating. It looks like a good result.
Models separate on the hard tail
Most cells are easy. A white pill in a white tray under glare is not.
The team measures camouflage as the color distance between pill and tray. The labeled set holds only three cells below the perceptual threshold where a pill nearly vanishes into its background. Rare conditions do not show up on their own schedule, so targeted capture sessions collect them deliberately.
The hard tail is also where models separate. On 144 deliberately difficult images, a transfer-learned YOLO classifier holds 87.5 percent. The other models drop to roughly 48 to 58 percent, and the classic difference-of-Gaussians baseline falls below 40. On the easy 95 percent of the data, those same models look interchangeable.


The pipeline is part of the dataset
The capture app runs on the Raspberry Pi itself. The Pi pushes every photograph and label to the data repository on an hourly loop, and people and training jobs pull from the same history. When a number in the paper needs checking, the trail runs from the metric back through the split, the label, and the original capture.
A dataset you can audit is an argument
The set is condition-stratified on purpose. Captures follow a checklist that varies lighting, pill types, and fill patterns. That is why the class balance, 459 full to 570 empty, is close to even rather than accidental.
The team is preparing the dataset for public release with a datasheet and a DOI under a CC-BY license. A dataset you can audit, with its capture conditions, split rules, and label decisions written down, is an argument that the results mean something.
The data pipeline, model registry, and labels live in the PillWatch data repository.