Non-Contact Multispectral Image Binary Classification of Water and Sodium Hydroxide Solutions Using Convolutional Neural Networks
Abstract
Identification of visually transparent liquids remains a challenging problem in non-contact sensing because chemically different solutions can appear nearly identical under normal observation. In laboratory and industrial environments, direct-contact chemical measurements are reliable but may require sample handling, probe calibration, cleaning, and additional processing time, which can limit their use in rapid or automated monitoring systems. This study aims to develop and evaluate a non-contact image-based classification framework for distinguishing pure water (H₂O) from sodium hydroxide solution (H₂O with NaOH) using multispectral fluctuation-pattern images. The proposed approach integrates image preprocessing, K-means segmentation, and a convolutional neural network (CNN)-based classification. A balanced dataset of 1,050 multispectral images, consisting of 525 images for each class, was used in the experiment. Each image was resized, converted to grayscale, normalized, and segmented using K-means clustering to emphasize the dominant liquid-region fluctuation pattern before classification. Three CNN architectures, namely InceptionV3, VGG19, and DenseNet201, were trained and compared under identical data-splitting and evaluation conditions. The experimental results showed that VGG19 achieved the best testing performance, with an accuracy of 97.47%, precision of 95.18%, recall of 100.00%, and F1-score of 97.53%. DenseNet201 obtained 94.30% accuracy, while InceptionV3 achieved 89.24% accuracy. These results indicate that multispectral fluctuation-pattern images contain discriminative optical information that can be learned effectively by CNN models, even when the liquid samples are visually indistinguishable to the human eye. The proposed framework demonstrates the feasibility of non-contact transparent liquid identification and may support the development of automated monitoring systems for laboratory, chemical, and industrial applications where direct sample contact is undesirable or impractical.
Downloads
References
L. Lajoie, A. S. Fabiano-Tixier, and F. Chemat, “Water as Green Solvent: Methods of Solubilisation and Extraction of Natural Products—Past, Present and Future Solutions,” Pharmaceuticals, vol. 15, no. 12, Art. no. 1507, 2022, doi: 10.3390/ph15121507.
C. D. Rodríguez-Fernández, L. M. Varela, C. Schröder, and E. L. Lago, “Charge delocalization and hyperpolarizability in ionic liquids,” J. Mol. Liq., vol. 349, Art. no. 118153, 2022, doi: 10.1016/j.molliq.2021.118153.
Y. Wu, H. Ye, Y. Yang, Z. Wang, and S. Li, “Liquid Content Detection in Transparent Containers: A Benchmark,” Sensors, vol. 23, no. 15, Art. no. 6656, 2023, doi: 10.3390/s23156656.
I. Shaw and P. Magee, “Acid–base quantification: A review of developing technology,” BJA Educ., vol. 22, no. 11, pp. 440–447, 2022, doi: 10.1016/j.bjae.2022.07.006.
W. Zhang et al., “Non-contact measurement method of liquid composition using microwave radar cross-section,” Sci. Rep., vol. 14, no. 1, Art. no. 29744, 2024, doi: 10.1038/s41598-024-81043-4.
J.-H. Leung et al., “Water pollution classification and detection by hyperspectral imaging,” Opt. Express, vol. 32, no. 14, pp. 23956–23965, 2024, doi: 10.1364/OE.522932.
S. Kendler, Z. Mano, R. Aharoni, R. Raich, and B. Fishbain, “Hyperspectral imaging for chemicals identification: A human-inspired machine learning approach,” Sci. Rep., vol. 12, no. 1, Art. no. 17580, 2022, doi: 10.1038/s41598-022-22468-7.
J. Zhu, J. Bao, and Y. Tao, “A Nondestructive Methodology for Determining Chemical Composition of Salvia miltiorrhiza via Hyperspectral Imaging Analysis and Squeeze-and-Excitation Residual Networks,” Sensors, vol. 23, no. 23, Art. no. 9345, 2023, doi: 10.3390/s23239345.
L. C. O. Tiong et al., “Machine vision-based detections of transparent chemical vessels toward the safe automation of material synthesis,” npj Comput. Mater., vol. 10, no. 1, Art. no. 42, 2024, doi: 10.1038/s41524-024-01216-7.
X. Zhao, L. Wang, Y. Zhang, X. Han, M. Deveci, and M. Parmar, “A review of convolutional neural networks in computer vision,” Artif. Intell. Rev., vol. 57, no. 4, Art. no. 99, 2024, doi: 10.1007/s10462-024-10721-6.
Z. Khan and J. Yang, “Nonparametric K-means clustering-based adaptive unsupervised colour image segmentation,” Pattern Anal. Appl., vol. 27, no. 1, Art. no. 17, 2024, doi: 10.1007/s10044-024-01228-5.
M. Sabha and M. Saffarini, “Selecting optimal k for K-means in image segmentation using GLCM,” Multimed. Tools Appl., vol. 83, no. 18, pp. 55587–55603, 2024, doi: 10.1007/s11042-023-17615-9.
H. Mittal, A. C. Pandey, M. Saraswat, S. Kumar, R. Pal, and G. Modwel, “A comprehensive survey of image segmentation: Clustering methods, performance parameters, and benchmark datasets,” Multimed. Tools Appl., vol. 81, no. 24, pp. 35001–35026, 2022, doi: 10.1007/s11042-021-10594-9.
M. Krichen, “Convolutional Neural Networks: A Survey,” Computers, vol. 12, no. 8, Art. no. 151, 2023, doi: 10.3390/computers12080151.
M. M. Taye, “Theoretical Understanding of Convolutional Neural Network: Concepts, Architectures, Applications, Future Directions,” Computation, vol. 11, no. 3, Art. no. 52, 2023, doi: 10.3390/computation11030052.
J. Ran, G. Dong, F. Yi, L. Li, and Y. Wu, “Automatic Measurement of Comprehensive Skin Types Based on Image Processing and Deep Learning,” Electronics, vol. 14, no. 1, Art. no. 49, 2025, doi: 10.3390/electronics14010049.
I. A. Kandhro et al., “Performance evaluation of E-VGG19 model: Enhancing real-time skin cancer detection and classification,” Heliyon, vol. 10, no. 10, Art. no. e31488, 2024, doi: 10.1016/j.heliyon.2024.e31488.
M. Bundea and G. M. Danciu, “Pneumonia Image Classification Using DenseNet Architecture,” Information, vol. 15, no. 10, Art. no. 611, 2024, doi: 10.3390/info15100611.
B. Dey, J. Ferdous, R. Ahmed, and J. Hossain, “Assessing deep convolutional neural network models and their comparative performance for automated medicinal plant identification from leaf images,” Heliyon, vol. 10, no. 1, Art. no. e23655, 2024, doi: 10.1016/j.heliyon.2023.e23655.
H. Zhou, X. Wang, K. Xia, Y. Ma, and G. Yuan, “Transfer Learning-Based Hyperspectral Image Classification Using Residual Dense Connection Networks,” Sensors, vol. 24, no. 9, Art. no. 2664, 2024, doi: 10.3390/s24092664.
R. Hou, J. Y. Lo, J. R. Marks, E. S. Hwang, and L. J. Grimm, “Classification performance bias between training and test sets in a limited mammography dataset,” PLOS ONE, vol. 19, no. 2, Art. no. e0282402, 2024, doi: 10.1371/journal.pone.0282402.
Z. Yang, R. O. Sinnott, J. Bailey, and Q. Ke, “A survey of automated data augmentation algorithms for deep learning-based image classification tasks,” Knowl. Inf. Syst., vol. 65, no. 7, pp. 2805–2861, 2023, doi: 10.1007/s10115-023-01853-2.
S. Seoni et al., “All you need is data preparation: A systematic review of image harmonization techniques in multi-center/device studies for medical support systems,” Comput. Methods Programs Biomed., vol. 250, Art. no. 108200, 2024, doi: 10.1016/j.cmpb.2024.108200.
F. Hu et al., “Image harmonization: A review of statistical and deep learning methods for removing batch effects and evaluation metrics for effective harmonization,” NeuroImage, vol. 274, Art. no. 120125, 2023, doi: 10.1016/j.neuroimage.2023.120125.
A. M. Ikotun, A. E. Ezugwu, L. Abualigah, B. Abuhaija, and J. Heming, “K-means clustering algorithms: A comprehensive review, variants analysis, and advances in the era of big data,” Inf. Sci., vol. 622, pp. 178–210, 2023, doi: 10.1016/j.ins.2022.11.139.
X. Chai, Z. Wu, W. Li, H. Fan, X. Sun, and J. Xu, “Image Segmentation Based on the Optimized K-Means Algorithm with the Improved Hybrid Grey Wolf Optimization: Application in Ore Particle Size Detection,” Sensors, vol. 25, no. 9, Art. no. 2785, 2025, doi: 10.3390/s25092785.
H. T. Lee, H. R. Cheon, S. H. Lee, M. Shim, and H. J. Hwang, “Risk of data leakage in estimating the diagnostic performance of a deep-learning-based computer-aided system for psychiatric disorders,” Sci. Rep., vol. 13, no. 1, Art. no. 16633, 2023, doi: 10.1038/s41598-023-43542-8.
O. Rainio, J. Teuho, and R. Klén, “Evaluation metrics and statistical tests for machine learning,” Sci. Rep., vol. 14, no. 1, Art. no. 6086, 2024, doi: 10.1038/s41598-024-56706-x.
L. Chen et al., “An Adaptive Parameter Optimization Deep Learning Model for Energetic Liquid Vision Recognition Based on Feedback Mechanism,” Sensors, vol. 24, no. 20, Art. no. 6733, 2024, doi: 10.3390/s24206733.
M. A. Lones, “Avoiding common machine learning pitfalls,” Patterns, vol. 5, no. 10, Art. no. 101046, 2024, doi: 10.1016/j.patter.2024.101046.
H. Feng, Y. Wang, Z. Li, N. Zhang, Y. Zhang, and Y. Gao, “Information Leakage in Deep Learning-Based Hyperspectral Image Classification: A Survey,” Remote Sens., vol. 15, no. 15, Art. no. 3793, 2023, doi: 10.3390/rs15153793.
G. Gallitto et al., “External validation of machine learning models—registered models and adaptive sample splitting,” GigaScience, vol. 14, Art. no. giaf036, 2025, doi: 10.1093/gigascience/giaf036.
S. S. Band et al., “Application of explainable artificial intelligence in medical health: A systematic review of interpretability methods,” Inform. Med. Unlocked, vol. 40, Art. no. 101286, 2023, doi: 10.1016/j.imu.2023.101286.
W. Chmiel, J. Kwiecień, and K. Motyka, “Saliency Map and Deep Learning in Binary Classification of Brain Tumours,” Sensors, vol. 23, no. 9, Art. no. 4543, 2023, doi: 10.3390/s23094543.
J. Sigut, F. Fumero, J. Estévez, S. Alayón, and T. Díaz-Alemán, “In-Depth Evaluation of Saliency Maps for Interpreting Convolutional Neural Network Decisions in the Diagnosis of Glaucoma Based on Fundus Imaging,” Sensors, vol. 24, no. 1, Art. no. 239, 2024, doi: 10.3390/s24010239.
Y. Gao, J. Liu, W. Li, M. Hou, Y. Li, and H. Zhao, “Augmented Grad-CAM++: Super-Resolution Saliency Maps for Visual Interpretation of Deep Neural Network,” Electronics, vol. 12, no. 23, Art. no. 4846, 2023, doi: 10.3390/electronics12234846.
K. Venkatesh, S. Mutasa, F. Moore, J. Sulam, and P. H. Yi, “Gradient-Based Saliency Maps Are Not Trustworthy Visual Explanations of Automated AI Musculoskeletal Diagnoses,” Journal of Imaging Informatics in Medicine, vol. 37, no. 5, pp. 2490–2499, 2024, doi: 10.1007/s10278-024-01136-4.
A. Baumann et al., “Neural illumination calibration for surgical workflow-optimized spectral imaging,” International Journal of Computer Assisted Radiology and Surgery, vol. 21, no. 4, pp. 665–675, 2026, doi: 10.1007/s11548-025-03525-8.
S. Nie et al., “Hyperspectral imaging combined with deep learning models for the prediction of geographical origin and fungal contamination in millet,” Front. Sustain. Food Syst., vol. 8, Art. no. 1454020, 2024, doi: 10.3389/fsufs.2024.1454020.
Copyright (c) 2026 Siti Rusdiana, Asep Rusyana, Juwita, Mauliza Putri, Aufa Rafiki, Souvik Das

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution-ShareAlikel 4.0 International (CC BY-SA 4.0) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).


.png)
.png)
.png)
.png)
.png)