Skip to main content
ES CAT EN IT FR DE 中文
Method

From counting to simulating

Counting technology has become infrastructure: there are sensors that hit 99 % and software that runs on the closed circuit you already have. The work that remains unsolved starts right after that.

What we found

  • Fine-tuning an off-the-shelf detector on your own images takes it from 52.5 % to 63.0 % average precision on the COCO benchmark, according to the detection model comparison published by Roboflow in 2026.
  • Between 500 and 5,000 well curated in-house images are enough to fit a model to a bounded case, against the hundreds of thousands almost everyone assumes.
  • A single false alarm per camera per hour means 4,800 alerts a day across a 200 camera estate, which is the threshold at which the operator switches the system off.

A people counter is something you buy ready made. There are three dimensional sensors that get 99 % of entries right and install in a morning, and there is software that does the same thing on the closed circuit you already have, at around 98 % accuracy and with no hardware to buy. If what you need is to know how many people crossed a door, that has been solved for years.

The interesting part starts with the next question.

01What a counter cannot answer#

An occupancy figure tells you how many people came in yesterday and how many are inside now. That carries a lot of weight, and for many venues it is enough.

There is another group of questions that will not come out of it no matter how much you tune the sensor. Why that queue jams at that exact point and not fifty metres earlier. Which bottleneck is in charge today, which is not the one that was in charge on Tuesday. How much headroom is left before the flow stops being comfortable, and then before it stops being safe. What would happen if you opened door B instead of door A.

Those four have no product to buy, and it is not for lack of vendors. It is that every site has its own physics, its own vocabulary and its own legal frame, and that has to be built.

02The devil is in the detail of the queue#

A ride queue is one of the best known models there is. Any maths student has seen it in second year: arrivals, one server, waiting time. Textbook M/M/1 fits the profile reasonably well, and a ride that dispatches in cycles looks even more like a batch service.

With that you might think the problem was closed in the nineteen fifties. And then you go to the park.

Someone hides behind someone else and vanishes from the count. The line moves three abreast and three seconds later it moves five abreast, so the same physical length means two different waits. People bunch up at the turns, because a switchback never fills evenly. Someone jumps the barrier. Someone carries another person, and there you have two visitors where the system sees one.

Each of those introduces an error the theoretical model does not account for. All of them together show up at peak time, which is exactly when the number matters.

When counting is enough and when it is not {#cuando-contar-basta}

Worth saying, because otherwise this reads as an attack on counting and it is not.

Counting is enough when the decision you make with the number is binary and low frequency. Closing an entrance when you hit capacity. Knowing whether more people came today than on the same day last year. Billing per visitor. There a dedicated sensor, well placed, is the right answer and also the cheapest to maintain.

Counting stops being enough as soon as the decision is continuous and depends on where the people are and not only on how many there are. Moving staff between two zones. Telling a visitor it is worth heading to another ride now. Deciding whether to open an extra line. That needs identity over time, geometry of the space, and some idea of how that particular venue behaves.

The short rule: if the question carries a how many, a counter answers it. If it carries a why or a what if, it does not.

03From image to real world data#

If you have cameras running, you already own the expensive part of building your own model: real world data, captured from your physical world with your light, your angles, your vehicles and your incidents. No public dataset looks like that.

The term is worth clarifying, because it is used for two different things. In pharma, real world data means patient data collected outside the clinical trial, and it is a regulatory concept with its own framework. In artificial intelligence it means something else: data captured from the physical world as it is, as against synthetic data generated by computer.

That contrast is the live debate in computer vision. Synthetic data has matured a great deal and is excellent for covering situations that are rare, expensive or dangerous to record. What it does not do well is anticipate what you did not know you were going to see. The specific dynamics of a skater in a public square, or the exact shape a defective croissant takes on a production line, are not rendered: they are recorded.

Fine-tuning on your own data is not marginal. A very capable open detector, Grounding DINO, scores 52.5 % on the COCO benchmark with no tuning, and 63.0 % with it. That is more than ten points, measured on the ground it was designed for. When the ground is a logistics warehouse or a beach, the gap widens.

And it takes fewer images than almost everyone assumes: between 500 and 5,000 of your own, well chosen and reviewed, for a bounded case.

Technical detail · why it fits inside the camera

The large model does not fit in a device, so it is distilled: it is used as a teacher to train a small one that imitates its answers. A paper published in 2026 compressed the vision engine of SAM 3, at 446 million parameters, into one of 40.66 million that keeps 92.29 % of the MOTA and 96.15 % of the IDF1 of the original, with peak video memory dropping from 19.52 to 6.49 gigabytes. After that you quantise to 8 bit integers for the specific accelerator. Here the hardware rules: the deep learning unit on an Axis ARTPEC-9 only runs built-in TensorFlow Lite operations, so the target is fixed before training, not after.

04Why we prefer hybrid systems#

Visible imaging has two limits that more resolution and a better detector will not fix. It does not measure the speed of what it sees, it estimates it from differences between frames. And it does not measure distance without a prior calibration of the plane.

A good share of queue anomalies are better solved by combining imaging with other kinds of sensors than by raising camera quality. A millimetre wave radar measures speed directly instead of estimating it, goes through rain and fog, and costs a fraction of a LiDAR. A thermal sensor detects by heat without depending on lighting.

There are three reasons to go that way and all three carry weight.

The first is economic: it is cheaper to acquire and to maintain than multiplying cameras.

The second is engineering: a system with independent modalities degrades more gracefully. False positives from the camera, which are shadows and reflections, and from the radar, which are multipath returns and background noise, do not coincide at the same point in space and time. Real objects do. That lets you lower each sensor's threshold, be very sensitive, and require cross confirmation before bothering a human.

The third is the one we care about most. The road of "more cameras and more detail" ends up looking like a surveillance system, and that is not where we want to arrive. We are still learning how to collect real world data while respecting privacy, without crossing that line.

05Simulating is the objective#

Measuring tells you what happened. Modelling tells you why. Simulating lets you ask what would happen if you opened another door, moved the distribution point, changed a ride's dispatch cycle or if it rained on a Tuesday in August.

Glass cube with a luminous organism inside and a tiny human figure observing it from outside
A model is a contained world you can look at from outside, from any angle, without stepping into it.

For everyone at 498 Advance that is the real destination. We want a venue to be able to explore scenarios that have not happened yet, compare solutions before applying them and optimise continuously.

It is a strategic objective rather than one more feature, because it lines up three things that normally travel separately. Ethics, because simulating reduces the need to experiment on real people. Sustainability, because optimising flow saves consumption, crowding and wear without building anything new. And speed of innovation, because testing an idea in the model costs hours and testing it in the venue costs a season.

It has an awkward consequence for whoever sells it, and we accept it. An objective like that only holds up with your own historical series and with a model that does not depend on a third party licence. Measurement vendors get replaced, and over ten years they get replaced several times. What cannot be replaced is the venue's own history or the model trained on it.

On the layer that reads behaviour, the family of models we find most interesting right now is JEPA, joint embedding predictive architecture. Instead of reconstructing the missing pixels, they predict the internal representation of the hidden part of the video, which forces them to model how scenes evolve. Meta's V-JEPA 2 was pre-trained on more than a million hours of video without a single label. For anyone who has been recording for years, that turns an archive that today only takes up disk into training material.

06What we see from the trenches#

Two cases, which are the ones that best explain the extremes.

PortAventura. We are their digital agency and we take part in their digital projects. After ten years working in the park we know first hand why queues form, what operational and load limit implications come with balancing visitors between rides, and what really happens when you try to cut a waiting time by moving people somewhere else. That knowledge does not come out of any dataset.

The measurement is provided by Nola, specialised in theme parks, with a very interesting solution and a pilot already running. Our recommendation was a hybrid system, complementing imaging with other kinds of sensors and leaving the model in the park's hands, because it struck us as more scalable and with fewer dependencies. The park decided to start with a pilot of specialised technology, which to begin with is a reasonable decision, and that is where we work on the ontology and the modelling layer.

Baker & Baker. The smallest case of all and the one that best explains the economics of this. At their factory in the Penedès there was a person counting production units: palmiers, cream horns and croissants. Now there is a camera with a local system that counts and also detects when a croissant does not have the shape it should, grading each piece by its percentage of shape accuracy.

The interesting part happened afterwards with the workforce. The system did not remove the job of the person who was counting. Grading by quality surfaced class B and C units that used to be thrown away, and today two people are dedicated to selling them. Waste turned into product, and more work rather than less.

The project was developed as a master's thesis in artificial intelligence, supervised from the Universitat Autònoma de Barcelona with the collaboration of the IIIA-CSIC. Worth saying, because it sets the floor of what it costs to start: there are bounded industrial problems that get solved with the scope of a thesis and one well placed camera.

The other two we tend to tell point the same way. At the Llaqta of Machupicchu, more than 5,000 visitors a day and two cameras that only streamed: counting entries there is trivial and useless, because the question is carrying capacity. It was a project coordinated by ARS Progetti, with Carlos Ortet as our delegate. And for the International Inline Skate Association, a system to monitor skaters in public spaces in the United States: a skater moves faster than a pedestrian, traces curves a pedestrian model does not expect and occupies space differently, so generic models kept losing their identity and firing alarms where nothing was happening. Hundreds of hours of in-house recording with fine-tuning solved it.

07What to ask before signing#

If you are weighing up a project like this, with anyone, these questions separate the wheat from the chaff.

  • Is the model trained on my images mine? Can I take it with me if I change vendor?
  • Do my recordings leave my installation at any point? Are they used to train models for other clients?
  • What false alarm rate per camera per hour do you guarantee, measured on my cameras and not on a public dataset?
  • Is the test set split by camera and by day, or was it drawn at random from the same videos?
  • How long does it take and what does it cost to add a new class six months from now?
  • If the link to the control centre goes down, does the system keep measuring?

The fourth saves the most projects. If the test set is chosen by taking frames at random from the same video, there are near identical images in training and in test: the model has already seen them. Accuracy looks spectacular in the report and collapses on installation day.

At 498 Advance we work this layer with the modelling and data capabilities we have in place, and the academic side we run with the UAB and the IIIA-CSIC.

Sources
  1. Roboflow. Best Object Detection Models 2026, 2026. https://blog.roboflow.com/best-object-detection-models/
  2. Lightweight Distillation of SAM 3 and DINOv3 for Edge-Deployable Monitoring. arXiv, 2026. https://arxiv.org/abs/2604.27128
  3. Axis Communications. DLPU model conversion, developer documentation, 2026. https://developer.axis.com/computer-vision/computer-vision-on-device/dlpu-model-conversion/
  4. Meta AI. V-JEPA 2: Self-Supervised Video Models Enable Understanding, Prediction and Planning. arXiv, 2026. https://arxiv.org/abs/2506.09985
  5. ONVIF. Profile M, metadata and events specification for analytics, v1.1, 2024. https://www.onvif.org/profiles/profile-m/
Carlos Ortet
Carlos Ortet
Co-Founder & CEO of 498 Advance

Computer engineer from the UAB. Supervises master's projects in artificial intelligence with the UAB and the IIIA-CSIC.