Naïve Bayes-Based Freshwater Fish Classification Using HSV Color Features

Hindayati Mustafidah, Suwarsito Suwarsito

Abstract


This study presents a machine learning-based method for classifying six freshwater fish species commonly consumed in Indonesia: gourami (gurame), catfish (lele), tilapia (nila), barb (melem), Java barb (tawes), and pomfret (bawal). A total of 132 images, with 22 images per species, were collected from online sources and direct field photography. The classification model utilizes a Naïve Bayes algorithm, employing color feature extraction based on the Hue, Saturation, and Value (HSV) color space. The HSV method decomposes image color into three components—Hue (the color type, such as red, blue, or green), Saturation (the intensity or vividness of the color), and Value (the brightness or lightness of the color)—allowing for improved distinction between morphologically similar species, such as barb and tilapia. Image preprocessing included resizing, background removal, and conversion from RGB to grayscale prior to HSV feature extraction. The dataset was split into training and testing subsets, with 20% of the data allocated for testing. The model's performance was evaluated using a confusion matrix, and it achieved a classification accuracy of 79.17%. This result surpasses the accuracy reported in comparable studies, such as one on frozen tuna classification, which achieved 72.73% using similar techniques. The findings validate the effectiveness of the Naïve Bayes classifier for species identification tasks in fisheries. Moreover, the approach offers a computationally efficient solution suitable for environments with constrained data availability and limited computational resources. This study underscores the practical value of machine learning in aquaculture, highlighting its potential for enhancing species monitoring, quality control, and automated recognition using relatively small datasets.

Full Text:

PDF

References


E. Trewavas, Tilapiine fishes of the genera Sarotherodon, Oreochromis, and Danakilia. 1983.

S. Juliani, “Karakteristik Morfometrik dan Meristik Ikan Nila, Oreochromis niloticus (Linnaeus 1758) di Danau Tempe, Kabupaten Wajo dan Danau Sidenreng, Kabupaten Sidenreng Rappang Provinsi Sulawesi Selatan,” Universitas Hasanuddin, 2023.

G. Kwikiriza et al., “Morphometric variations of Nile tilapia (Oreochromis niloticus)(Linnaeus, 1758) local strains collected from different fish farms in South Western Highland Agro-Ecological Zone (SWHAEZ), Uganda: screening strains for aquaculture,” Fishes, vol. 8, no. 4, p. 217, 2023.

Y. Hadjidji, “HUBUNGAN KEKERABATAN BEBERAPA JENIS IKAN (Pisces) AIR TAWAR BERDASARKAN KARAKTER MORFOLOGI DAN PEMANFAATANNYA SEBAGAI MEDIA PEMBELAJARAN,” 2019, Universitas Tadulako, Palu, Sulawesi Tengah.

H. Mustafidah, B. R. Alfiansyah, and N. Hidayat, “Expert System Using Forward Chaining to Determine Freshwater Fish Types Based on Water Quality and Area Conditions,” in 2023 Eighth International Conference on Informatics and Computing (ICIC), IEEE, 2023, pp. 1–5.

S. Zhao et al., “Application of machine learning in intelligent fish aquaculture: A review,” Aquaculture, vol. 540, p. 736724, 2021.

A. Yassir, S. J. Andaloussi, O. Ouchetto, K. Mamza, and M. Serghini, “Acoustic fish species identification using deep learning and machine learning algorithms: A systematic review,” Fish Res, vol. 266, p. 106790, 2023.

W. Rahman et al., “A Deep CNN-Based Salinity and Freshwater Fish Identification and Classification Using Deep Learning and Machine Learning,” Sustainability, vol. 16, no. 18, p. 7933, 2024.

T. P. Trappenberg, Fundamentals of Machine Learning. Oxford University Press, 2020. doi: 10.1093/oso/9780198828044.001.0001.

M. A. Islam, M. R. Howlader, U. Habiba, R. H. Faisal, and M. M. Rahman, “Indigenous fish classification of Bangladesh using hybrid features with SVM classifier,” in 2019 International Conference on Computer, Communication, Chemical, Materials and Electronic Engineering (IC4ME2), IEEE, 2019, pp. 1–4.

Y. Krisdiani, “Klasifikasi kesegaran ikan berdasarkan warna mata menggunakan metode K-Nearest Neighbor,” 2019, Universitas Negeri Malang.

A. Pariyandani, D. A. Larasati, E. P. Wanti, and M. Muhathir, “Klasifikasi Citra Ikan Berformalin Menggunakan Metode k-NN dan GLCM,” in Semantika (Seminar Nasional Teknik Informatika), 2019, pp. 42–47. [Online]. Available: https://semantika.polgan.ac.id/index.php/Semantika/article/view/49

E. P. Wanti and M. Muhathir, “Pengidentifikasian Citra Ikan Berformalin Dengan Menggunakan Metode Multilayer Perceptron,” J-SAKTI (Jurnal Sains Komputer dan Informatika), vol. 5, no. 1, pp. 491–502, 2021, doi: http://dx.doi.org/10.30645/j-sakti.v5i1.342.

A. Azis, “IDENTIFIKASI JENIS IKAN MENGGUNAKAN MODEL HYBRID DEEP LEARNING DAN ALGORITMA KLASIFIKASI,” Sebatik, vol. 24, no. 2, pp. 201–206, 2020, [Online]. Available: https://jurnal.wicida.ac.id/index.php/sebatik/article/view/1057

I. R. Diesta and W. F. Al Maki, “Klasifikasi Ikan Cupang Menggunakan Support Vector Machine,” in eProceedings of Engineering, 2021, pp. 10556–10565.

M. A. D. Akbar, A. B. Setiawan, and R. K. Niswatin, “Klasifikasi Jenis Ikan Cupang Menggunakan Metode GLCM Dan KNN,” in Prosiding SEMNAS INOTEK (Seminar Nasional Inovasi Teknologi), 2021, pp. 152–158.

I. E. Hasym and I. Susilawati, “Klasifikasi Jenis Ikan Cupang Menggunakan Algoritma Principal Component Analysis (PCA) Dan K-Nearest Neighbors (KNN),” KONSTELASI: Konvergensi Teknologi dan Sistem Informasi, vol. 1, no. 1, pp. 168–179, 2021, [Online]. Available: https://ojs.uajy.ac.id/index.php/konstelasi/article/viewFile/4242/2070

S. Suwarsito, H. Mustafidah, T. Pinandita, and P. Purnomo, “Freshwater Fish Classification Based on Image Representation Using K-Nearest Neighbor Method,” JUITA: Jurnal Informatika, vol. 10, no. 2, pp. 183–189, 2022, doi: http://dx.doi.org/10.30595/juita.v10i2.15471.

R. Nuraini, A. Wibowo, B. Warsito, W. A. Syafei, and I. Jaya, “Combination of K-NN and PCA Algorithms on Image Classification of Fish Species,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 7, no. 5, pp. 1026–1032, 2023, doi: https://doi.org/10.29207/resti.v7i5.5178.

N. Rachmat, Y. Yohannes, and A. Mahendra, “Klasifikasi Jenis Ikan Laut Menggunakan Metode SVM dengan Fitur HOG dan HSV,” JATISI (Jurnal Teknik Informatika dan Sistem Informasi), vol. 8, no. 4, pp. 2235–2247, 2021, doi: https://doi.org/10.35957/jatisi.v8i4.1686.

D. Yusup, S. Faisal, and A. Pratama, “Klasifikasi Jenis Ikan Hias African Cichlid Menggunakan Algoritma Support Vector Machines,” Scientific Student Journal for Information, Technology and Science, vol. 4, no. 1, pp. 31–38, 2023.

L. Ren et al., “Rapid identification of fish species by laser-induced breakdown spectroscopy and Raman spectroscopy coupled with machine learning methods,” Food Chem, vol. 400, p. 134043, 2023.

F. A. Susilo, H. Fitriyah, and G. E. Setyawan, “Sistem Klasifikasi Kualitas Ikan Tongkol Beku Berdasarkan Fitur Nilai Warna HSV Menggunakan Metode Naïve Bayes,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 3, no. 1, pp. 753–760, 2019.

R. Wang, “Automatic classification of document resources based on Naïve Bayesian classification algorithm,” Informatica, vol. 46, no. 3, 2022.

D. A. Nasution, H. H. Khotimah, and N. Chamidah, “Perbandingan normalisasi data untuk klasifikasi wine menggunakan algoritma K-NN,” CESS (Journal of Computer Engineering, System and Science), vol. 4, no. 1, pp. 78–82, 2019, doi: https://doi.org/10.24114/cess.v4i1.11458.

N. M. S. Iswari, W. Wella, and R. Ranny, “Perbandingan Algoritma kNN, C4. 5, dan Naive Bayes dalam Pengklasifikasian Kesegaran Ikan Menggunakan Media Foto,” Ultimatics: Jurnal Teknik Informatika, vol. 9, no. 2, pp. 114–117, 2017, doi: https://doi.org/10.31937/ti.v9i2.659.

E. Ellif, S. H. Sitorus, and R. Hidayati, “Klasifikasi Kematangan Pepaya Menggunakan Ruang Warna HSV dan Metode Naive Bayes Classifier,” Coding Jurnal Komputer dan Aplikasi, vol. 9, no. 01, pp. 66–75, 2021, doi: http://dx.doi.org/10.26418/coding.v9i01.45906.

ResepKoki, “10 Jenis Ikan Air Tawar di Indonesia Yang Sering Dikonsumsi,” https://resepkoki.id/10-jenis-ikan-air-tawar-di-indonesia-yang-sering-dikonsumsi/. Accessed: Nov. 07, 2021. [Online].

K. P. Murphy, Machine learning: a probabilistic perspective. MIT press, 2012.

L. Zhu, T. Chen, J. Yin, S. See, and J. Liu, “Learning gabor texture features for fine-grained recognition,” in Proceedings of the IEEE/CVF international conference on computer vision, 2023, pp. 1621–1631.

G. Ajmera, “HOG (Histogram of Oriented Gradients): An Amazing Feature Extraction Engine for Medical Images,” https://medium.com/@girishajmera/hog-histogram-of-oriented-gradients-an-amazing-feature-extraction-engine-for-medical-images-5a2203b47ccd.

F. Xiao, L. Kaiyuan, W. Qi, Z. Yao, and Z. Xi, “Texture analysis based on gray level co-occurrence matrix and its application in fault detection,” in International Geophysical Conference, Beijing, China, 24-27 April 2018, Society of Exploration Geophysicists and Chinese Petroleum Society, 2018, pp. 836–839.

A. Priyambodo and P. Prihati, “Klasifikasi Gambar Aksara Jawa Menggunakan Optimalisasi Parameter SVM dengan Kernel Cosine,” MEANS (Media Informasi Analisa dan Sistem), pp. 137–142, 2024.

D. Dahlan, R. Iskandar, N. Ekawati, and C. A. Sugianto, “Mackerel Tuna Freshness Identification Based on Eye Color Using K-Nearest Neighbor Enhanced by Contrast Stretching and Histogram Equalization,” Scientific Journal of Informatics, vol. 11, no. 4, pp. 1035–1042, 2024.

N. Fatima and V. Yadav, “Fish Species Classification Using Convolutional Neural Networks,” in International Conference on IoT, Intelligent Computing and Security: Select Proceedings of IICS 2021, Springer, 2023, pp. 413–423.

B. Bischl et al., “Hyperparameter optimization: Foundations, algorithms, best practices, and open challenges,” Wiley Interdiscip Rev Data Min Knowl Discov, vol. 13, no. 2, p. e1484, 2023.

MathWorks, “ClassificationNaiveBayes - Naïve Bayes classification for multiclass classification,” https://www.mathworks.com/help/stats/classificationnaivebayes.html.

MathWorks, “fitcnb - Train multiclass naïve Bayes model,” https://www.mathworks.com/help/stats/fitcnb.html.

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, 2019.

L. Perez and J. Wang, “The effectiveness of data augmentation in image classification using deep learning,” arXiv preprint arXiv:1712.04621, 2017.

C. Hu et al., “Impact of light and shadow on robustness of deep neural networks,” arXiv preprint arXiv:2305.14165, 2023.

O. Mazhar and J. Kober, “Random shadows and highlights: A new data augmentation method for extreme lighting conditions,” arXiv preprint arXiv:2101.05361, 2021.

Y. Bengio, I. Goodfellow, and A. Courville, Deep learning, vol. 1. MIT Press Cambridge, MA, USA, 2017.

C. Zhou et al., “Evaluation of fish feeding intensity in aquaculture using a convolutional neural network and machine vision,” Aquaculture, vol. 507, pp. 457–465, 2019.

R. Blanquero, E. Carrizosa, P. Ramírez-Cobo, and M. R. Sillero-Denamiel, “Variable selection for Naïve Bayes classification,” Comput Oper Res, vol. 135, p. 105456, 2021.

P. Langley and S. Sage, “Induction of Selective Bayesian Classifiers,” https://arxiv.org/abs/1302.6828.

Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, 2015.

D. R. Amancio et al., “A systematic comparison of supervised classifiers,” PLoS One, vol. 9, no. 4, p. e94137, 2014.

K. Munawaroh and A. Alamsyah, “Performance comparison of SVM, naïve Bayes, and KNN algorithms for analysis of public opinion sentiment against COVID-19 vaccination on Twitter,” Journal of Advances in Information Systems and Technology, vol. 4, no. 2, pp. 113–125, 2022.

Y. Heningtyas, A. Syarif, and A. G. Pratidina, “Implementation of Gabor Filter for Carassius Auratus’s Identification,” Int. J. Adv. Sci. Eng. Inf. Technol., vol. 11, no. 2, pp. 566–571, 2021.

D. Y. Kim, S. W. Park, and H. S. Shin, “Fish Freshness Indicator for Sensing Fish Quality during Storage,” Foods, vol. 12, no. 9, May 2023, doi: 10.3390/foods12091801.

A. Sharma, “Naïve Bayes with Hyperparameter Tuning,” https://www.kaggle.com/code/akshaysharma001/naive-bayes-with-hyperpameter-tuning.

G.-D. Wang, P.-L. Zhang, G.-Q. Ren, and X. Kou, “Texture feature extraction method fused with LBP and GLCM,” Jisuanji Gongcheng/ Computer Engineering, vol. 38, no. 11, 2012.

J. Brownlee, “A Gentle Introduction to k-fold Cross-Validation,” https://www.machinelearningmastery.com/k-fold-cross-validation/, Oct. 04, 2023.

D. C. Asogwa, S. O. Anigbogu, I. E. Onyenwe, and F. A. Sani, “Text classification using hybrid machine learning algorithms on big data,” arXiv preprint arXiv:2103.16624, 2021.

F. Monteiro et al., “Classification of fish species using multispectral data from a low-cost camera and machine learning,” Remote Sens (Basel), vol. 15, no. 16, p. 3952, 2023.




DOI: https://doi.org/10.31449/inf.v49i34.8059

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.