AI-Based Halal-Haram Food Classification Using Machine Learning and Deep Learning for Islamic Compliance and Smart Food Business and Industry Applications

Authors

  • Muhammad Makki Department of Computer Science, IQRA University, Karachi, Sindh, Pakistan
  • Hira Farman Department of Computer Science, IQRA University, Karachi, Sindh, Pakistan
  • Muhammad Hussain Mughal Sukkur IBA University
  • Sharaf Hussain Department of Computer Science, Mohammad Ali Jinnah University, Karachi, Sindh, Pakistan
  • Murad Ali ECHO Consultancy, Karachi, Pakistan

Keywords:

Halal food classification, machine learning, CNN, deep learning, MobileNetV2, ingredient analysis, halal certification, food authentication, Islamic dietary compliance

Abstract

The verification of processed food products becomes more difficult due to the fact that non-compliant ingredients, such as pork derivatives, gelatins of unknown origin and alcohol based ingredients, can be present in a product and not be obvious from the ingredients list, either because they are hidden in the ingredients or because they are present in the product in an insignificant amount. This study introduces a two-branch AI approach that combines the image-based and ingredient-based classification for halal food screening. Three publicly available Kaggle repositories of 7,090 labelled samples prior to deduplication were explored and categorized into five compliance groups; halal meat, pork-based, alcohol, gelatin and mixed/doubtful processed food. The image branch uses the custom Convolutional Neural Network (CNN) and transfer learning using the MobileNetV2 model while the ingredient branch uses Support Vector Machine (SVM), K-Nearest Neighbors (KNN) and Random Forest (RF) classifiers with Term Frequency–Inverse Document Frequency (TF-IDF) features. The training and testing split for the proposed evaluation protocol is 70:15:15, split according to the provided group information, and five seeds are provided for each of training, validation and test sets to cover reproducibility and performance variations. The reported accuracy values are the mean results from five independent experimental runs and were 97.18% (standard deviation: 0.113 percentage point) for MobileNetV2 and 95.78% (standard deviation: 0.079 percentage point) for Random Forest, rounded to 97.2% and 95.8%, respectively. The improvement in accuracy that was observed was 0.8 percentage points. Random Forest, which achieved an accuracy of 95.8%, precision of 95.2% and recall of 94.9% (macro-F1 of 95.0%) for the classification based on ingredients, gave the best performance. The image and ingredient repositories contain separate datasets and were assessed independently of feature level fusion. The framework illustrates the significance of visual recognition as an auxiliary system for the preliminary screening system on halal compliance that can be done by analyzing ingredients. But there are a number of other parameters that cannot be verified through visual classification alone – the composition of ingredients, slaughtering practices, certification requirements, and additives which cannot be controlled in any way. The proposed framework provides a foundation for food screening and decision support using AI, emphasizes the need for not using AI food prediction as a replacement for formal halal certification, and discusses the role of certification authorities, manufacturers, and consumers.

 

References

J. M. Regenstein, M. M. Chaudry, and C. E. Regenstein, “The Kosher and Halal Food Laws,” Compr. Rev. food Sci. food Saf., vol. 2, no. 3, pp. 111–127, Jul. 2003, doi: 10.1111/J.1541-4337.2003.TB00018.X.

N. A. F. Ardiani Aniqoh and M. R. Hanastiana, “Halal Food Industry: Challenges and Opportunities in Europe,” J. Digit. Mark. Halal Ind., vol. 2, no. 1, pp. 43–54, Apr. 2020, doi: 10.21580/JDMHI.2020.2.1.5799.

S. Secinaro and D. Calandra, “Halal food: structured literature review and research agenda,” Br. Food J., vol. 123, no. 1, pp. 225–243, Jan. 2021, doi: 10.1108/BFJ-03-2020-0234.

I. Vanany, J. M. Soon, A. Maryani, and B. M. Wibawa, “Determinants of halal-food consumption in Indonesia,” J. Islam. Mark., vol. 11, no. 2, pp. 507–521, Mar. 2020, doi: 10.1108/JIMA-09-2018-0177.

A. M. Fathima, L. Rahmawati, A. Windarsih, and Suratno, “Advanced Halal Authentication Methods and Technology for Addressing Non-Compliance Concerns in Halal Meat and Meat Products Supply Chain: A Review,” Food Sci. Anim. Resour., vol. 44, no. 6, p. 1195, 2024, doi: 10.5851/KOSFA.2024.E75.

A. Mustapha, I. Ishak, N. N. M. Zaki, M. R. Ismail-Fitry, S. Arshad, and A. Q. Sazili, “Application of machine learning approach on halal meat authentication principle, challenges, and prospects: A review,” Heliyon, vol. 10, no. 12, Jun. 2024, doi: 10.1016/j.heliyon.2024.e32189.

A. N. Ahmad, U. F. Ungku Zainal Abidin, M. Othman, and R. Abdul Rahman, “Overview of the halal food control system in Malaysia,” Food Control, vol. 90, pp. 352–363, Aug. 2018, doi: 10.1016/J.FOODCONT.2018.02.035.

E. N. Omar and H. S. Jaafar, “Halal supply chain in the food industry - A conceptual model,” ISBEIA 2011 - 2011 IEEE Symp. Business, Eng. Ind. Appl., pp. 384–389, 2011, doi: 10.1109/ISBEIA.2011.6088842.

W. Min et al., “Large Scale Visual Food Recognition,” Feb. 2023, Accessed: Oct. 17, 2026. [Online]. Available: https://arxiv.org/pdf/2103.16107v3

Y. Zhang et al., “Deep learning in food category recognition,” Inf. Fusion, vol. 98, Oct. 2023, doi: 10.1016/j.inffus.2023.101859.

L. Bu, C. Hu, and X. Zhang, “Recognition of food images based on transfer learning and ensemble learning,” PLoS One, vol. 19, no. 1, p. e0296789, Jan. 2024, doi: 10.1371/JOURNAL.PONE.0296789.

“(PDF) Classification of meat using the convolutional neural network.” Accessed: Oct. 17, 2026. [Online]. Available: https://www.researchgate.net/publication/373953535_Classification_of_meat_using_the_convolutional_neural_network

D. S. Anggrivani, P. S. Sasongko, and Rismiyati, “Enhancing Beef and Pork Image Classification Using Hyperparameter-Tuned ResNet50,” Proc. - Int. Conf. Informatics Comput. Sci., pp. 174–179, 2025, doi: 10.1109/ICICOS68590.2025.11329555.

Suci Ramadhani, Yulita Molliq Rangkuti, Hermawan Syahputra, Elmanani Simamora, and Zulfahmi Indra, “Halal Ingredient Detection in Packaged Food Products Using Multi-Layer Perceptron (MLP),” J. Artif. Intell. Eng. Appl., vol. 5, no. 2, pp. 3101–3108, Feb. 2026, doi: 10.59934/JAIEA.V5I2.2110.

D. Mulyana, D. Pratama, D. Fujianti, D. Nurhakim, and D. Rabbani, “Automation of Halal Food Classification Using Bidirectional Long Short-term Memory on Ingredients List,” Khazanah J. Relig. Technol., vol. 3, no. 2, pp. 36–44, Mar. 2026, doi: 10.66948/KJRT.32.17.

M. A. Al Betar et al., “A Hybrid Transformer–Ontology Framework for Halal Food Classification Using Multilingual Ingredient Label Analysis,” J. Comput. Cogn. Eng., Jul. 2026, doi: 10.47852/BONVIEWJCCE62029040.

Y. Yaakob et al., “RECENT ADVANCES IN HALAL RESEARCH VIA MICROSCOPY AND IMAGING APPROACHES: OPPORTUNITIES AND CHALLENGES,” Malaysian J. Microsc., vol. 21, no. 1, pp. 320–337, Jun. 2025, Accessed: Oct. 17, 2026. [Online]. Available: https://malaysianjournalofmicroscopy.org/ojs/index.php/mjm/article/view/952

M. N. Riaz, F. Irshad, and M. B. Haider, “Artificial Intelligence in Religious Certification: A Comprehensive Review of Halal Digitalization, Compliance Integrity, and Future Directions,” Int. J. food Sci., vol. 2026, no. 1, 2026, doi: 10.1155/IJFO/3011089.

A. Alourani and S. Khan, “A Blockchain and Artificial Intelligence based System for Halal Food Traceability,” Oct. 2024, Accessed: Oct. 17, 2026. [Online]. Available: https://arxiv.org/pdf/2410.07305

A. Ridho, “Integrating Artificial Intelligence and Blockchain to Improve the Accuracy of Halal Certification,” J. Halal Rev. , vol. 1, no. 1, pp. 12–22, Jan. 2025, doi: 10.70764/GDPU-JHR.2025.1(1)-02.

R. Shirin Asa and I. Madieha Abdul Ghani Azmi, “MALAYSIAN JOURNAL OF CONSUMER AND FAMILY ECONOMICS 38 THE CONCEPT OF HALAL AND HALAL FOOD CERTIFICATION PROCESS IN MALAYSIA: ISSUES AND CONCERNS”.

Z. Samori, A. H. Ishak, and N. H. Kassan, “Understanding the Development of Halal Food Standard: Suggestion for Future Research,” Int. J. Soc. Sci. Humanit., vol. 4, no. 6, pp. 482–486, 2014, doi: 10.7763/IJSSH.2014.V4.403.

F. Ramadhona Amalia Lubis et al., “Comparative Study of the Potential of the Halal Industry in Developed Countries vs Developing Countries,” Arbitr. J. Econ. Account. , vol. 3, no. 1, pp. 95–102, Jul. 2022, doi: 10.47065/ARBITRASE.V3I1.459.

M. S. E. Azam and M. A. ABDULLAH, “GLOBAL HALAL INDUSTRY: REALITIES AND OPPORTUNITIES,” Int. J. Islam. Bus. Ethics, vol. 5, no. 1, p. 47, Mar. 2020, doi: 10.30659/IJIBE.5.1.47-59.

M. S. A. Mohd Nawawi, M. F. Abu-Hussin, M. S. Faid, N. Pauzi, S. Man, and N. Mohd Sabri, “The emergence of halal food industry in non-Muslim countries: a case study of Thailand,” J. Islam. Mark., vol. 11, no. 4, pp. 917–931, Jun. 2020, doi: 10.1108/JIMA-05-2018-0082.

H. Peristiwo, “Indonesian Halal Food Industry: Development, Opportunities and Challenges on Halal Supply Chains,” J. Islam. Stud. Humanit., vol. 4, no. 2, pp. 218–245, Dec. 2019, doi: 10.21580/JISH.42.5228.

M. R. Mustapha, F. Ahamad, N. Y. Hazahari, and N. Samsudin, “Ethical issues in the halal food supply chain: a systematic bibliometric review,” J. Islam. Mark., vol. 15, no. 12, pp. 3804–3819, Dec. 2024, doi: 10.1108/JIMA-07-2023-0210.

H. F. A. Baig, D. Khan, U. Amjad, S. Baig, T. Sheikh, and S. Memon, “Exploring Fish Species Exploring Fish Species Classification using Deep Learning: Fish Species Classification using Deep Learning,” Pakistan J. Eng. Technol. Sci., vol. 12, no. 2, pp. 74–90, Dec. 2024, doi: 10.22555/PJETS.V12I2.1120.

H. Farman, M. Nafees, and S. Abbasi, “Explainable Machine Learning Framework for Thyroid Disease Detection: A Hybrid ML–XAI Approach with Clinical and Imaging Data,” IMTIC 2025 - 8th Int. Multi-Topic ICT Conf. AI Driven Innov. Across Discip. a Resilient Sustain. Infrastruct., 2025, doi: 10.1109/IMTIC68267.2025.11520513.

H. Farman and usman Amjad, “Discriminative Features Extraction for Plant Disease Classification Using Deep CNN,” Sukkur IBA J. Comput. Math. Sci., vol. 8, no. 2, pp. 37–52, Mar. 2024, doi: 10.30537/SJCMS.V8I2.1553.

H. Farman, M. H. Mughal, S. Hussain, M. Ali, and A. Maroof, “A Comparative Machine and Deep Learning Framework for Multi-Class Hair Fall and Scalp Disease Classification Using Optimized Convolutional Neural Networks,” VAWKUM Trans. Comput. Sci., vol. 14, no. 1, pp. 125–141, May 2026, doi: 10.21015/VTCS.V14I1.2308.

M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, and L. C. Chen, “MobileNetV2: Inverted Residuals and Linear Bottlenecks,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., pp. 4510–4520, Jan. 2018, doi: 10.1109/CVPR.2018.00474.

S. Kaufman, S. Rosset, and C. Perlich, “Leakage in data mining: Formulation, detection, and avoidance,” Proc. ACM SIGKDD Int. Conf. Knowl. Discov. Data Min., pp. 556–563, 2011, doi: 10.1145/2020408.2020496.

C. Shorten and T. M. Khoshgoftaar, “A survey on Image Data Augmentation for Deep Learning,” J. Big Data, vol. 6, no. 1, pp. 1–48, Dec. 2019, doi: 10.1186/S40537-019-0197-0/FIGURES/33.

Andrew G. Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, Hartwig Adam, “MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications,” arXiv:1704.04861, 2017, [Online]. Available: https://arxiv.org/abs/1704.04861

T. G. Dietterich, “Approximate Statistical Tests for Comparing Supervised Classification Learning Algorithms,” Neural Comput., vol. 10, no. 7, pp. 1895–1923, Oct. 1998, doi: 10.1162/089976698300017197.

Downloads

Published

2026-10-26

How to Cite

Makki, M., Farman, H., Mughal, M. H., Hussain, S., & Ali, M. (2026). AI-Based Halal-Haram Food Classification Using Machine Learning and Deep Learning for Islamic Compliance and Smart Food Business and Industry Applications. International Journal of Innovations in Science & Technology, 8(9), 3663–3688. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/2105