When the 2024 total solar eclipse swept across North America, millions of viewers frantically searched for certified eye protection. In Norway, eclipse glasses are known as solformørkelsesbriller. And the web exploded with queries for safe options. Unfortunately, counterfeit solar viewers flooded global marketplaces, many fraudulently stamped with the ISO 12312-2 safety mark. As senior engineers at Denver mobile App Developer, we saw a clear intersection of mobile development, on-device AI,? And public safety: what if a smartphone could instantly verify that a pair of solformørkelsesbriller was genuinely safe? Our team trained a deep learning model to distinguish certified ISO 12312-2 solar filters from dangerous knockoffs directly from a smartphone camera-and you'd be surprised how subtle the differences are.
This isn't a theoretical exercise. We built a fully functional mobile application, EclipseGuard, using TensorFlow Lite, Core ML. And a custom dataset of thousands of lens samples. The project uncovered powerful lessons about on-device inference - optical calibration. And compliance automation. In this post, I'll walk through the architecture, share our model selection rationale, and explain how we turned a smartphone into a portable spectrophotometer for solformørkelsesbriller verification.
The Counterfeit Crisis: Why ISO 12312-2 Compliance Alone Falls Short
The international standard ISO 12312-2:2015 specifies the optical density, luminous transmittance, and material robustness a solar viewer must meet to protect the retina from dangerous ultraviolet, infrared. And intense visible light. The official ISO specification is rigorous-certified solformørkelsesbriller must filter out more than 99. 999% of visible light. Yet counterfeiters simply print the ISO logo onto thin Mylar sheets or exposed film negatives, relying on consumers' inability to test at point of sale.
Traditional verification methods-such as holding the glasses up to a bright LED and checking for light leakage-are dangerously subjective. Even the classic "do you see any pinpricks of light? " test fails when the damage is pinhole-sized. The sheer volume of buyers searching for "solformørkelsesbriller" in the weeks before an eclipse creates a perfect storm for supply chain fraud. A technical, accessible, repeatable solution was overdue.
Our Approach: Real-Time Image Analysis of Solar Filters
We designed a mobile app that uses the camera to capture multiple images of the solformørkelsesbriller, then runs a convolutional neural network to classify whether the lens material meets safety thresholds. The model doesn't attempt to measure optical density directly with laboratory precision; instead, it learns subtle visual signatures: the consistency of the aluminum/polymer coating, microscopic scratches indicative of repurposed materials. And telltale reflections that deviate from legitimate black polymer filters.
To ground-truth our dataset, we collaborated with an optics testing lab that provided spectrophotometer measurements for each sample. We then correlated those measurements with image features extracted from smartphone cameras, building a model that effectively predicts the optical density class. The app. Which we've dubbed EclipseGuard, works entirely offline-critical for eclipse viewing sites in remote areas where solformørkelsesbriller might be distributed without reliable internet access.
Selecting the Right Machine Learning Framework for On-Device Deployment
With latency and disk footprint as primary constraints, we evaluated TensorFlow Lite, Apple Core ML/ML Compute. And PyTorch Mobile. TensorFlow Lite emerged as the strongest contender due to its mature GPU delegate support across Android and iOS, straightforward quantization tooling, and strong community around vision models. For the iOS pipeline, we exported the same TFLite flat
.Need a Custom App Built?
Let's discuss your project and bring your ideas to life.
Contact Me Today →