Skip to the main content

How the AI works

Flock has four models, each with one job. We trained two of them ourselves. The other two are Google’s Gemini, with our own rules around it.

Tap a model to jump to it.

Starling forecasts how busy a place will be

Starling is 800 small decision trees, each one fixing what the trees before it got wrong. It reads the hour, the weather, events nearby and the venue’s usual week, and gives a busyness score from 0 to 100 for every hour.

We tested it on three cities it never trained on: Miami, Barcelona and Tokyo.

The live readings it learns from are estimates on that 0 to 100 scale, not head counts. Where Flock knows a venue’s usual week, the number on its card is Starling’s forecast, moved by the venue’s latest live reading when there is one. The research page has the numbers.

Inputs such as the hour, the temperature, whether it is raining and events nearby run through 800 trees, each fixing what the ones before it got wrong. Out comes the venue’s usual week plus a correction: busyness for each hour, 0 to 100.
A schematic, not real readings.
A world map of the cities Starling learned from, with Miami, Barcelona and Tokyo circled.
Miami, Barcelona and Tokyo were held out of training.
Code from backend/scripts/ml/train/train_model.py: 800 estimators, minimum child weight 7, maximum depth 8, cross-validation grouped by city, and the forecast clipped to 0 to 100.
The training settings, from the repository.

A forecast is a guess, and it says so

Flock marks the forecast as an estimate. When a venue knows better on the night, its owner can set the live number from their dashboard. Groups see it credited to the place, like “the cafe says”, and it lasts 90 minutes.

A chart of one evening’s busyness from 6 PM to midnight, the forecast inside a shaded band marked as an estimate. At 9 the venue sets 86, 22 points above the forecast, and its number lasts 90 minutes.
An illustration of one evening, not real readings.

Owl counts people from heat

Owl is a small neural network, 718,550 weights, that runs on the Raspberry Pi inside Flux, the sensor we’re building. It reads a thermal frame and marks each person as a peak of warmth. The count leaves the sensor. The frame stays behind.

It was trained on generated frames and 28 public thermal datasets, then tested on footage it never saw. It hasn’t run in a venue yet.

Owl's path through a frame: a 160 by 120 thermal frame goes in, through the network's layers, and out comes a 40 by 30 map where each person is a peak. Here it finds 3 people.
This thermal frame is generated, not a picture of real people.
Code from flock-sensor/main.py: a peak is a cell at least as sure as all eight neighbours, the same rule training scored the model with.
How a peak becomes a person, in the sensor’s code.
The Flux sensor deletes the frame and sends “count: 3” to the Flock server, never the frame.
The frame never leaves the box.

Roost’s advisor checks its numbers against your data

Roost is the plan for venues, and its advisor helps an owner make more money: a short answer first, then a few points, with the sources at the end. The model writing it is Google’s Gemini. Numbers about the venue are filled in from its measured data, and a number the model states about the venue on its own is checked against that data. A sentence that fails the check is removed before the owner sees it.

Its advice builds on Roost’s playbook: more than 130 tested moves for filling slow days, pricing, staffing and turning tables, written by us from what experienced operators publish. If the model cannot be reached, Roost still answers from the venue’s own numbers and the playbook.

And Birdie

Birdie is the assistant inside the app, built on Google’s Gemini. It suggests places that fit the group and asks before it does anything for you.

A venue owner asks when they peak this week. The answer: Friday is your busiest day, peaking near 7 PM at 92 on our index. Two points follow: the rush builds from 5 PM, so have the second cook on before then; and at $35 a head, 20 more covers that night is $700. Sources: model estimate and the venue’s settings. Friday, 7 PM, 92, 5 PM and $35 are highlighted as coming from the venue’s own data.
An example answer. The highlighted values come from the venue’s own data.
Rule one of the advisor’s instructions: “Numbers about this venue come only from the facts.” Beside it, the check in backend/services/advisorAnswer.js: a number about the venue that its data does not back loses its sentence.
The rule, and the check that enforces it.

See how they did

The research page scores the forecast and Owl on data neither one trained on, including where they fell short.