Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 

IMWUT-NIRS-Liquid

This is the Source code repository for IMWUT paper: Probing Sucrose Contents in Everyday Drinks Using Miniaturized Near-Infrared Spectroscopy Scanners (IMWUT)

We show a generic and mobile method to estimate concentration level for a specific ingredient in a solution (e.g., sugar concentration in soft-drinks), identify liquids (e.g., discriminate different drinks or alcohols), or even detect counterfeit liquids (e.g., detect counterfeit perfume or alcohols), etc.

What's included?

  1. Hardware schemetics.

  2. Python library with source code for NIRScan Nano that works for Linux, Mac and Raspberry Pi.

  3. Example Python code for training regression models.

  4. Example Python code for training classification models.

Dependencies

Hardware

(Optional for standalone mode)

  • Raspberry Pi A+.
  • Adafruit 2.8-inch PiTFT.
  • Li-Po battery.
  • PowerBoost 1000C or equivalent.

For compiling the Python library

Please refer to this repository.

For running the Python scripts

  • Python3
  • Numpy
  • Matplotlib
  • Seaborn
  • Scikit-learn
  • Pandas
  • Jupyter Notebook or Jupyter Lab (recommended)

Quick start

  1. In your console, using the cd command to change your current path to this repository.
  2. Run jupyter notebook or jupyter lab.
  3. In Jupyter open the quick_start.ipynb file.
  4. Execute the cells to train/test/export your models using your data.

Running as a standalone device

  1. Assemble the device as shown in the paper.
  2. Copy the src/standalone/ folder to Raspberry Pi.
  3. Copy your sklearn model file into standalone/model/regressor/ folder for regression tasks, or standalone/model/classifier for classification tasks.
  4. Run the main.py script.

Tips for developing your applications

  1. Follow the protocol and collect your data as described in the paper.
  2. Controlling the optical path is the key when you re-design a 3D-print case for your application.
  3. Calibrition may be critical to aqcuire consistent results across different conditions.
  4. Try different filtering methods.
  5. Keep calm and cite my paper ;-)

Contact

Please send me an email if you have any question.

weiweijiangcn[at]gmail.com

About

Source code for IMWUT paper: Probing Sucrose Contents in Everyday Drinks Using Miniaturized Near-Infrared Spectroscopy Scanners

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published