A Pytorch C++ based API for alcohol consumption detection using periocular NIR images on mobile devices. Here, we employ transfer learning induced Data-efficient Image Transformer(DeIT) model for alcohol consumption detection using periocular NIR iris images dataset.
Follow these steps to utilize the API for your mobile devices:
- git clone https://github.com/system-reboot/DeiT-for-alcohol-consumption-Detection.git
- cd DeiT-for-alcohol-consumption-Detection
- mkdir build/ && cd build/
- cmake -DCMAKE_PREFIX_PATH=<absolute_path_to_libtorch>
- make
- ./Alcohol-Consumption-Detector <path_to_your_image_file>
- model/binary_class_model.ipynb - Model trained to detect if the subject is under alcohol consumption or not.
- model/multi_class_model.ipynb - Model trained to study the temporal impact of alcohol on iris central nervous system(CNS).
- src/main.cpp - Sample main file to load and preprocess sample images which is then classified using the pre-trained model.
The weights utilized for training the above model has not published due to privacy concerns of the subjects in the dataset. One can contact Juan Tapia Farias regarding the datset.