Divining Air Quality With A Cheap Computer Vision Device

There are all kinds of air quality sensors on the market that rely on all kinds of electro-physical effects to detect gases or contaminants and report them back as a value. [lucascreator] has instead been investigating a method of determining air quality that is closer to divination than measurement—using computer vision and a trained AI model.

The system relies on an Unihiker K10—a microcontroller module based around the ESP32-S3 at heart. The chip is running a lightweight convolutional neural network (CNN) trained on 12,000 images of the sky. These images were sourced from a public dataset; they were taken in India and Nepal, and tagged with the relevant Air Quality Index at the time of capture. [lucascreator] used this data to train their model to look at an image taken with a camera attached to the ESP32 and estimate the air quality index based on what it has seen in that existing dataset.

It might sound like a spurious concept, but it does have some value. [lucascreator] cites studies where video data was used for low-cost air quality estimation—not as a replacement for proper measurement, but as an additional data point that could be sourced from existing surveillance infrastructure. Performance of such models has, in some cases, been remarkably accurate.

[lucascreator] is pragmatic about the limitations of their implementation of this concept, noting that their very compact model didn’t always perform the best in terms of determining actual air quality. The concept may have some value, but implementing it on an ESP32 isn’t so easy if you’re looking for supreme accuracy. We’ve featured some other great air quality projects before, though, if you’re looking for other ways to capture this information. Video after the break.

10 thoughts on “Divining Air Quality With A Cheap Computer Vision Device

  1. The irony, I was just telling someone a visual assessment of atmospheric opacity and coloration is not how AQI is measured. There can be clearish looking skies and poor air quality. I have breathing issues at high PM2.5/10 levels (20+) so I check AQI information almost hourly depending on the season. This will only work during the day time correct?

  2. Although I doubt its accuracy, I like the fact that its running a CNN. I have seen it solve a lot of problems where people can’t be bothered to study the data properly but they know what they want. Its a computation intensive way of letting the machine itself figure out how to get from the input to the desired output

    1. All true. If you do not study your data at all, however, and just hope your data may contain relevant information, you end up with divination instead of hard evidence. One old truth many AI apologists seem to forget is “garbage in – garbage out”. AI has not changed this fundamentally.

  3. On the positive side I like the device and what it’s capable of doing as it relates to software

    That said… You shouldn’t need a CNN for this, old school computer vision would likely be comparable if not better, and there’s no way this does what it sets out to do in any meaningful way. I’m glad people are experimenting but some of the projects getting posted here lately border on delusion reinforcement, gambling, and wishful thinking.

    Sometimes as hackers we make something and it’s a flop. Sometimes that happens even if we spend a lot of time on it. It’s okay and should be celebrated. But I think it’s important to report these things with an appropriate level of skepticism so as to avoid misinformation.

  4. Tangential to the article, but does anyone out there know of a Linux image built for the Unihiker devices that doesn’t include all of the dubious Chinese-language software DFRobot installs by default? They’re neat little devices with a lot of potential, but I’d prefer driver support for the touchscreen and sensors without all the extras.

  5. Doesn’t seem legit, despite the attempt to transfer a veneer of legitimacy over to it by citing a study using video with a completely different technique.

    “It can be surprisingly accurate.” But is it? No real testing, just the implication of testing by association.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.