Inspiration

Given the surge in demand for face masks, the market has been flooded with masks of questionable quality (1, 2, 3). Since the WHO guidelines were updated to recommend the use of masks, citizens are put in the difficult situation of identifying fake products or products which offer insufficient protection. This is not possible unless without expertise and without taking the mask apart.

What it does

Samsung Health uses the proprietary HRM sensor found on many Galaxy phones to project red and infrared light and measure its reflection from a finger in order to measure pulse and blood oxygen levels. It is able to distinguish blood vessels and pulse. Similar approaches exist which work with any smartphone camera and flash, but their accuracy is inferior and inconsistent across various devices We use the same IR sensor in order to scan the fiber matrix of a textile material such as a face-mask. In our tests, we were able to distinguish between low quality and high quality masks. We also notice that folding the material increases the measured fiber density logarithmically, which is what we expect.

This means our app is indeed able to provide an indication of the quality of a given face mask. Currently, we classify masks on a scale of 1-to-10 using a formula we derived from our initial experiments.

See the app in action: https://m.youtube.com/watch?v=WmpeHfAzC6I

Try the app: https://github.com/danionita/testyourmask/releases/tag/v0.1

Disclaimer

We've only tested the app on a small number of white, textile face-masks. We cannot make any guarantees regarding the accuracy of the results at this point. Please try to follow WHO guidelines at all times and do not rely on your face-mask to protect you, regardless of its score.

How we built it

Using the Samsung Galaxy Sensor Extension SDK, a lot of measurements, and some statistics, we put together a simple algorithm to distinguish between different types of textures and classify masks based on their material. The Samsung Sensor Extension SDK exposes an API that was used to gather data directly from the IR sensor. This data is then fed to an algorithm that will compute a grade from 0.0 to 10.0. We have used Java to manipulate native device features to stream data from the sensor. The data is manipulated using Dart and all the visual aspects of the app are built with Flutter.

Challenges we ran into

  • Getting access to Galaxy Sensor Extension SDK.
  • Getting reliable and repeatable measurements.
  • Insufficient masks and devices for testing.

Accomplishments that we're proud of

  • Understanding how the IR sensor works and how to read it.
  • Finding the right surface and conditions to get reliable measurements without special materials.
  • Making sense of the data and understanding how to distinguish between masks of different qualities with a sensor that was not designed for this.
  • Building our first app ever in just 72 hours.

What we learned

  • You can do surprising things with Samsung's unique sensor.
  • In our trials, some cheap masks performed worse than a folded napkin.
  • You can achieve amazing things in just one weekend, with support from the right people.

What's next for TestYourMask

  1. Further testing. Volunteers welcome!
  2. Clean up the app and upload it to Google Play Store.
  3. Explore additional applicaitons.

Built With

+ 1 more
Share this project:

Updates