Singapore improves the AI it uses to detect smokers

Past versions struggled to spot a lungbuster – this time authorities think they've reduced false positives

Singapore has improved the AI it uses to detect smokers who light up in the many places where the practice is forbidden across the island nation, to help local law enforcement more efficiently stub out offenders.

The AI is called Balefire, and as recently explained by Pye Sone Kyaw – an AI engineer at Singapore's digital transformation agency GovTech – it's already reached version 3.0.

"The principal aim of Balefire … is to assist NEA [the National Environment Agency] in detecting smokers in smoking-prohibited places," he wrote. The NEA helpfully lists those prohibited places: most indoor areas, parks, educational institutions, swimming pools, and even pedestrian overhead bridges. Fines of S$200 ($148) can be levied for smoking in the wrong place, and a conviction can result in fine five times that sum.

Previous versions of Balefire were considered proof of concept demos. Version 3.0 is considered an "expanded pilot" that operates in 20 locations.

Kyaw complained that spotting cigarettes is not easy – they're small and easily mistaken for other objects. He mentioned "straws, shiny phone edges, fingers positioned in certain ways, and even certain types of food" as objects that computer vision systems relying on outdoor cameras can falsely identify as a cancer stick.

He tried detecting smoke or a cigarette's glowing tip, but those efforts burned out because they produced too many errors. So did "looking at the entire person, such as through pose estimation."

Those failures led Kyaw to conclude "an end-to-end detection model isn't feasible, particularly in an edge AI context with its inherent compute limitations and relatively small model sizes, coupled with the need for near-instantaneous detection."

He looked for off-the-shelf systems that could improve on Balefire, but couldn't find any that met NEA's need for a system capable of identifying as many smokers as possible across the entire span of a camera's field of view and doing so almost instantaneously.

GovTech therefore built its own custom processing pipeline that Kyaw wrote. It includes the following five steps:

  1. Head Detection and Processing: The pipeline initiates with the camera frames being fed into a head detector, which identifies the coordinates of all heads within the frame.
  2. Heuristic-Based Filtering: Post-detection, these heads undergo a series of heuristic filters designed to eliminate potential erroneous heads. These filters are the product of accumulated learnings and detailed analysis of deployment data.
  3. Head Tracking: An object tracker then follows the detected heads across successive frames, linking them with previously detected heads wherever possible. This ensures that, for identified smokers, repeated alerts are not triggered each time they are recognized in a new frame.
  4. Smoke/No-Smoke Classification: Heads not previously classified as belonging to smokers are then processed through a binary head classifier. This classifier determines whether the individual is smoking or not.
  5. Reidentification Module: If the classifier indicates smoking activity, a reidentification module attempts to match the detected smoker against a watchlist of recent smokers. If there is no reidentification, an alert is triggered. The watchlist is updated with the latest appearance of the smoker and other relevant information.

Version 3.0 uses multiple models that draw on footage captured from the current and past iterations of Balefire.

"Simply put, we used our existing models to annotate the new data for us and corrected any errors from that process," Kyaw wrote. "We iteratively added in specific profiles of images that the existing models were error prone in, such as persons wearing helmets, or persons who are eating or drinking. This helped to improve the performance of the models significantly over the course of the project."

The new system is hoped to not only detect more smokers, but also to avoid false positives – to "facilitate NEA in optimizing the allocation of enforcement officers to these identified hotspots."

In other words, Balefire is aims to ensure that when the NEA swoops on smokers, its efforts don't go to ash. ®

More about


Send us news

Other stories you might like