The Effect of the Number of Classes on the Values Resulting from Evaluation Metrics in the YOLOv5 Model

Object detection is an essential field in computer vision. Building an object detection model requires specific categories during training: classes. This study aims to analyze the effect of the number of classes on the evaluation metrics obtained from detection model training. The dataset consists of ten classes, each containing one hundred images of size 416 x 416 pixels. The detection model is trained using the YOLOv5 model with one hundred epochs and a batch size of 16. Testing is done five times with the number of classes increasing gradually, namely two classes, four classes, six classes, eight classes, and ten classes. The test results in evaluation metrics, namely precision, recall, [email protected], [email protected]:0.95, and training time, were analyzed and compared. The analysis shows that the number of classes significantly affects the accuracy of the evaluation metrics. Training a model with eight classes gives the best accuracy results with a precision of 75.5%, recall of 62.5%, [email protected] of 71.2%, and [email protected]:0.95 of 35.5%. Meanwhile, training the model with two classes produced the lowest results, and training with 10 classes decreased compared to eight classes. A non-linear analysis relationship was also observed, as using ten classes slightly reduced the matrix value while maintaining efficiency in training time. This concludes that increasing the number of classes does not necessarily improve accuracy, and the optimal class configuration needs further consideration. These findings highlight important considerations for optimizing object detection models using YOLOv5 and contribute to future development.

Authors

Publication Details

Journal
International Journal on Advanced Science Engineering and Information Technology
Published
2025-04-24
DOI
https://doi.org/10.18517/ijaseit.15.2.20495
Primary Topic
Advanced Data Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

The Effect of the Number of Classes on the Values Resulting from Evaluation Metrics in the YOLOv5 Model

Tikaridha Hardiani, Esi Putri Silmina, Silvi Lailatul Mahfida
International Journal on Advanced Science Engineering and Information Technology
Advanced Data Processing Techniques
article

The Effect of the Number of Classes on the Values Resulting from Evaluation Metrics in the YOLOv5 Model

Tikaridha Hardiani, Esi Putri Silmina, Silvi Lailatul Mahfida
article en

Abstract

Object detection is an essential field in computer vision. Building an object detection model requires specific categories during training: classes. This study aims to analyze the effect of the number of classes on the evaluation metrics obtained from detection model training. The dataset consists of ten classes, each containing one hundred images of size 416 x 416 pixels. The detection model is trained using the YOLOv5 model with one hundred epochs and a batch size of 16. Testing is done five times with the number of classes increasing gradually, namely two classes, four classes, six classes, eight classes, and ten classes. The test results in evaluation metrics, namely precision, recall, [email protected], [email protected]:0.95, and training time, were analyzed and compared. The analysis shows that the number of classes significantly affects the accuracy of the evaluation metrics. Training a model with eight classes gives the best accuracy results with a precision of 75.5%, recall of 62.5%, [email protected] of 71.2%, and [email protected]:0.95 of 35.5%. Meanwhile, training the model with two classes produced the lowest results, and training with 10 classes decreased compared to eight classes. A non-linear analysis relationship was also observed, as using ten classes slightly reduced the matrix value while maintaining efficiency in training time. This concludes that increasing the number of classes does not necessarily improve accuracy, and the optimal class configuration needs further consideration. These findings highlight important considerations for optimizing object detection models using YOLOv5 and contribute to future development.

International Journal on Advanced Science Engineering and Information TechnologyVol. 15(2)
Openalex Percentile: Top 90%
Advanced Data Processing Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

The Effect of the Number of Classes on the Values Resulting from Evaluation Metrics in the YOLOv5 Model — Tikaridha Hardiani, Esi Putri Silmina, et al. · International Journal on Advanced Science Engineering and Information Technology (2025) | TGRS Research Map | TGRS