
Molt watches a chicken farm the way a person can't – continuously. IP cameras mounted over each area are polled on a fixed interval, every frame is scored by a density-map counting model, and the resulting count is written to the area, logged, and checked against a threshold. When a count drops below what it should be, staff get an SMS and an in-app notification within one capture cycle. The problem it solves is that flock loss is invisible until it's large. Farms count by walking the barn, which is slow, error-prone, and happens a few times a day at best. Molt replaces the manual count with a measurement that runs every minute and alerts on its own – turning "we noticed on Thursday" into "we were told at 3:14."
DFCCNet density regression rather than object detection – a ResNet50-FPN backbone feeds a density regressor, and the integral of the density map is the count. This is what makes hundreds of overlapping birds countable at all, where box-based detectors collapse. Runs as an isolated microservice behind a fixed {image} → {count, confidence} contract.
A scheduler job walks every active camera each interval, pulls a snapshot over Digest-then-Basic HTTP auth (Hikvision/Dahua vs. cheap cameras), and validates the response is actually an image before it reaches the model – a stream or player URL returns HTML, and a naive predictor would happily turn those bytes into a confident, meaningless number. One camera failing never stops the rest of the sweep.
Threshold breaches resolve the full recipient set from the domain graph: the farm's owner plus every active assigned staff member, deduplicated so a person who is both isn't texted twice. Every alert produces a per-recipient notification row recording the count, the threshold, and whether the SMS actually reached them – sent, failed, or no_phone.
Strict three-tier FBA layering enforced by directory structure across every domain: routes validate and call exactly one service, services hold all business logic, CRUD holds all queries. The direction of flow is one-way and structural, so the codebase stays legible as domains are added rather than degrading into fat endpoints.
JWT access/refresh auth with owner | staff | admin roles enforced at the route boundary, and a farm–staff join table that decides who can see and who gets notified. The frontend mirrors it with a queuing refresh interceptor: concurrent 401s park, one refresh fires, everything retries.
The deployment is sized against measured numbers, not guesses: ~3.2 GB peak RAM per inference, ~7.9 s/image on 2 vCPUs, ~7.6 images/min ceiling against a 3.2 images/min real load. Images are capped at 600px before inference so the memory ceiling holds regardless of camera resolution, and a single-worker drain keeps exactly one inference in flight.
Molt gives a farm a continuous, timestamped record of how many birds are in every area – and tells someone the moment that number goes wrong. It converts the flock from something checked on a schedule into something observed constantly: mortality shows up as a trend line instead of a discovery, alerts arrive by SMS while there's still time to act, and every count the system ever made stays queryable alongside the batch it belongs to. The whole stack runs on one commodity VPS, so the monitoring costs less than the loss it prevents.

