You can use AI for various things. For example, to create videos, improve productivity, and write essays. Singapore, though, has also chosen to implement it to spot smoking across the island.
Singapore is a sovereign country that’s free to decide on its own political system – which is a de facto one-party state – and its laws. But it’s called “The Fine City” for a reason.
That’s because some of the regulations seem rather strict. For instance, you cannot chew gum (not even in private, as importation of the product is banned and you can’t bring any in), and you absolutely have to flush the toilet, or you’ll be fined if caught.
The island nation has also banned smoking in most public places. That’s entirely reasonable, of course, but local law enforcement has found it difficult to enforce the ban as many offenders still light up in places where it’s forbidden to do so.
AI is now helping Singapore to hunt down smokers more effectively. What’s more, the AI, called Balefire, has already reached version 3.0.
Pye Sone Kyaw, an AI engineer working at Singapore’s digital transformation agency GovTech has recently explained how exactly the tool works.
"The principal aim of Balefire is to assist NEA (the National Environment Agency) in detecting smokers in smoking-prohibited places," he wrote.
These places include most indoor areas, parks, swimming pools, educational institutions, and even pedestrian overhead bridges. The full list is here. Fines of S$200 ($148) can be levied for smoking in the wrong place, and you’ll pay five times that if you’re convicted.
According to Kyaw, spotting cigarettes is hard because they’re small and could be easily confused for other objects, such as lollipops, straws, or shiny phone edges. That’s where earlier versions of Balefire struggled.
“Relying on smoke detection or the cigarette’s glowing tip as detection cues also proved error-prone. Going beyond the cigarette and looking at the entire person, such as through pose estimation, also resulted in an unacceptable level of false positives,” said Kyaw.
He concluded that “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.”
GovTech couldn’t find off-the-shelf systems that could improve Balefire, either. But now, Singapore has built its own custom processing pipeline, version 3.0. It includes cameras in 20 locations and five steps.
First, all heads within the frames are detected and processed. Then, the AI system executes “heuristic-based filtering” – the detected heads undergo a series of filters designed to eliminate potentially erroneous heads.
Thirdly, an object tracker follows the detected heads and links them with previously detected heads if possible. This is done to make sure that repeated alerts are not triggered each time smokers are recognized.
“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,” writes Kyaw.
Finally, if the classifier indicates smoking activity, the detected smoker is matched against a watchlist of recent smokers. If there is no reidentification, an alert is triggered. This is very important, Kyaw stressed.
Yes, accuracy is a key and commonly used metric, he said. But for Balefire’s “specific operational context,” precision and recall are more relevant, the engineer explained.
“A high precision rate is crucial to ensure that NEA is not overwhelmed with false positive alerts, while a high recall rate is essential to identify as many smokers as possible within the operational scope,” said Kyaw.
Scientists from Duke-NUS Medical School said last year that an extension of the smoking ban to communal areas of residential blocks and other outdoor spaces in Singapore in 2013 may have prevented up to 20,000 heart attacks among those aged 65 and above.
Your email address will not be published. Required fields are markedmarked