A Robust Approach for Hair Contaminant Detection in Papadam Using Transfer Learning
Main Article Content
Abstract
Hair contamination in food products is a serious challenge that impacts quality, safety, and consumer trust. Conventional hair detection techniques often fall short in effectively identifying hair particles, demanding more advanced solutions. This research aims to design and develop a robust framework to correctly detect hair in papadam using image processing and deep learning techniques. The approach starts with an extensive preprocessing pipeline, including grayscale conversion, Wiener filtering for noise reduction, Canny edge detection to highlight edges, and contour detection to extract borderline details, followed by image masking to isolate areas of interest. Pre-trained InceptionV3 transfer learning model is applied for classification, where the initial layers are frozen to preserve learned features, and custom layers are fine-tuned specifically for hair detection. The model incorporates GlobalAveragePooling2D and dense layers with ReLU activation. The proposed approach attained an accuracy of 97.18% in detecting hair contaminants in papadam, validated through real-world datasets. This research highlights the effectiveness of combining comprehensive preprocessing with deep learning to enhance quality, particularly for automatic hair detection in papadam.
Downloads
Article Details
Section

This work is licensed under a Creative Commons Attribution 4.0 International License.
How to Cite
References
K. Payne, C. A. O’Bryan, J. A. Marcy, and P. G. Crandall, “Detection and prevention of foreign material in food: A review,” Heliyon, vol. 9, no. 9, Sep. 2023, doi: 10.1016/J.HELIYON.2023.E19574.
D. G. Caldwell, “Automation in Food Manufacturing and Processing,” Springer Handbooks, vol. Part F674, pp. 949–971, 2023, doi: 10.1007/978-3-030-96729-1_44.
K. Patel, “Image Processing Tools and Techniques Used in Computer Vision for Quality Assessment of Food Products: A Review,” International Journal of Food Quality and Safety | Year-2015 |, vol. 1, no. December, pp. 1–16, 2015, [Online]. Available: www.jakraya.com/journal/ijfqs
B. Geueke, K. Groh, and J. Muncke, “Food packaging in the circular economy: Overview of chemical safety aspects for commonly used materials,” J Clean Prod, vol. 193, pp. 491–505, Aug. 2018, doi: 10.1016/J.JCLEPRO.2018.05.005.
Y. Chen et al., “Low cost smart phone diagnostics for food using paper-based colorimetric sensor arrays,” Food Control, vol. 82, pp. 227–232, Dec. 2017, doi: 10.1016/J.FOODCONT.2017.07.003.
H. Einarsdóttir et al., “Novelty detection of foreign objects in food using multi-modal X-ray imaging,” Food Control, vol. 67, pp. 39–47, Sep. 2016, doi: 10.1016/J.FOODCONT.2016.02.023.
M. A. Subhi and S. Md. Ali, “A Deep Convolutional Neural Network for Food Detection and Recognition,” pp. 284–287, Jan. 2019, doi: 10.1109/IECBES.2018.8626720.
Y. Pan, Y. Zhang, Q. Liu, Z. Wu, W. Hu, and Y. Wei, “A Contour Detection Method Based on Image Saliency,” Proceedings of 2020 IEEE 9th Data Driven Control and Learning Systems Conference, DDCLS 2020, pp. 42–46, Nov. 2020, doi: 10.1109/DDCLS49620.2020.9275283.
T. G. Devi and N. Patil, “Analysis &evaluation of Image filtering Noise reduction technique for Microscopic Images,” 2020 International Conference on Innovative Trends in Information Technology, ICITIIT 2020, Feb. 2020, doi: 10.1109/ICITIIT49094.2020.9071556.
M. Pu, Y. Huang, Y. Liu, Q. Guan, and H. Ling, “EDTER: Edge Detection with Transformer,” Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2022-June, pp. 1392–1402, Mar. 2022, doi: 10.1109/CVPR52688.2022.00146.
Y. Zhang, H. Huang, Y. Ma, Q. Liu, and G. Ding, “Recognition of Foreign Objects in Food Images Using Support Vector Machine,” Lecture Notes in Electrical Engineering, vol. 551 LNEE, pp. 667–674, 2020, doi: 10.1007/978-981-15-3250-4_84.
K. Goyal, P. Kumar, and K. Verma, “Food Adulteration Detection using Artificial Intelligence: A Systematic Review,” Archives of Computational Methods in Engineering, vol. 29, no. 1, pp. 397–426, Jan. 2022, doi: 10.1007/S11831-021-09600-Y.
L. Hansen and M. F. Ferrão, “Identification of Possible Milk Adulteration Using Physicochemical Data and Multivariate Analysis,” Food Anal Methods, vol. 11, no. 7, pp. 1994–2003, Jul. 2018, doi: 10.1007/S12161-018-1181-6/METRICS.
I. G. I. Sudipa, R. A. Azdy, I. Arfiani, N. M. Setiohardjo, and Sumiyatun, “Leveraging K-Nearest Neighbors for Enhanced Fruit Classification and Quality Assessment,” Indonesian Journal of Data and Science, vol. 5, no. 1, pp. 30–36, Mar. 2024, doi: 10.56705/IJODAS.V5I1.125.
A. Inglis, A. C. Parnell, N. Subramani, and F. M. Doohan, “Machine Learning Applied to the Detection of Mycotoxin in Food: A Systematic Review,” Toxins 2024, Vol. 16, Page 268, vol. 16, no. 6, p. 268, Jun. 2024, doi: 10.3390/TOXINS16060268.
M. Soltani Firouz and H. Sardari, “Defect Detection in Fruit and Vegetables by Using Machine Vision Systems and Image Processing,” Food Engineering Reviews 2022 14:3, vol. 14, no. 3, pp. 353–379, Mar. 2022, doi: 10.1007/S12393-022-09307-1.
M. K. Tripathi and D. D. Maktedar, “A role of computer vision in fruits and vegetables among various horticulture products of agriculture fields: A survey,” Information Processing in Agriculture, vol. 7, no. 2, pp. 183–203, Jun. 2020, doi: 10.1016/J.INPA.2019.07.003.
E. Elhariri, N. El-Bendary, A. E. Hassanien, A. Badr, A. M. M. Hussein, and V. Snášel, “Random Forests Based Classification for Crops Ripeness Stages,” Advances in Intelligent Systems and Computing, vol. 303, pp. 205–215, 2014, doi: 10.1007/978-3-319-08156-4_21.
Z. Zou et al., “Classification and adulteration of mengding mountain green tea varieties based on fluorescence hyperspectral image method,” Journal of Food Composition and Analysis, vol. 117, p. 105141, Apr. 2023, doi: 10.1016/J.JFCA.2023.105141.
“Extrapolation, Interpolation, and Smoothing of Stationary Time Series: With Engineering Applications MIT Press eBooks | IEEE Xplore.” Accessed: Aug. 22, 2024. [Online]. Available: https://ieeexplore.ieee.org/book/6267356
J. Canny, “A Computational Approach to Edge Detection,” IEEE Trans Pattern Anal Mach Intell, vol. PAMI-8, no. 6, pp. 679–698, 1986, doi: 10.1109/TPAMI.1986.4767851.
S. Suzuki and K. A. be, “Topological structural analysis of digitized binary images by border following,” Comput Vis Graph Image Process, vol. 30, no. 1, pp. 32–46, Apr. 1985, doi: 10.1016/0734-189X(85)90016-7.
L. Nucci, D. Narvaez, and T. Krettenauer, Digital Image Processing Second Edition, no. June. 2014.
Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2323, 1998, doi: 10.1109/5.726791.
A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” Commun ACM, vol. 60, no. 6, pp. 84–90, May 2017, doi: 10.1145/3065386.
I. Goodfellow, Y. Bengio, A. Courville, and J. Heaton, “Ian Goodfellow, Yoshua Bengio, and Aaron Courville: Deep learning,” Genetic Programming and Evolvable Machines 2017 19:1, vol. 19, no. 1, pp. 305–307, Oct. 2017, doi: 10.1007/S10710-017-9314-Z.
C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna, “Rethinking the Inception Architecture for Computer Vision,” Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2016-December, pp. 2818–2826, Dec. 2016, doi: 10.1109/CVPR.2016.308.
S. J. Pan and Q. Yang, “A survey on transfer learning,” IEEE Trans Knowl Data Eng, vol. 22, no. 10, pp. 1345–1359, 2010, doi: 10.1109/TKDE.2009.191.