8626-Article Text-32183-1-10-20230510
8626-Article Text-32183-1-10-20230510
8626-Article Text-32183-1-10-20230510
Muhammad Daffa Arviano Putra1, Tawang Sahro Winanto2, Retno Hendrowati3, Aji Primajaya4,
Faisal Dharma Adhinata5,*
Department of Informatics, Universitas Paramadina, Jakarta, Indonesia
1,3)
ABSTRACT – Deep learning is a branch of machine learning with many highly successful applications. One
application of deep learning is image classification using the Convolutional Neural Network (CNN) algorithm. Large
image data is required to classify images with CNN to obtain satisfactory training results. However, this can be
overcome with transfer learning architectural models, even with small image data. Therefore, with transfer learning,
the success rate of a model is likely to be higher. Since there are many transfer learning architecture models,
comparing each model's performance results is necessary to find the best-performing architecture. In this study, we
conducted three experiments on different datasets to train models with various transfer learning architectures. We
then performed a comprehensive comparative analysis for each experiment. The result is that the DenseNet-121
architecture is the best transfer learning architecture model for various datasets. The DenseNet-121 transfer learning
architecture is the best because it achieved the highest evaluation scores in the second and third experiments.
Although MobileNet was superior in the first and second experiments, the evaluation value in the third experiment
was very low.
Key Words – Deep learning, transfer learning, CNN, image classification
1. INTRODUCTION model, large datasets are often required for the model
to get a satisfactory level of success. However, a
Deep learning is a research trend because of its
transfer learning architecture on a small dataset can
wide application and relative success rate. It is because
help models achieve better accuracy [10]. Transfer
of how deep learning works, which mimics the
learning is a deep learning method in which a model
workings of the human brain. As a result, processes
trained on one problem is reused for another issue.
such as feature extraction, which is the main focus of
Transfer learning enables deep learning model
machine learning-based research, can be carried out
training to achieve high accuracy even when using
automatically by deep learning algorithms [1]. Various
small amounts of data [10]. However, many transfer
examples of the application of deep learning include
learning architectures can be used on CNN models. As
applications in medical image analysis [2], sentiment
a result, comprehensive research is needed to find the
analysis on Twitter data [3], vehicle detection [4], plant
best-performing transfer learning architecture.
disease classification [5], communication signal
Various studies have been conducted on the
processing [6], and the stock market forecasting [7].
performance of transfer learning architecture on the
There are various algorithms in deep learning. One
CNN method for image classification. For example, a
example of a well-known deep learning algorithm
comparative study of several transfer learning
today is the Convolutional Neural Network (CNN) [8].
architectures on the CNN model for detecting COVID-
Convolutional Neural Network (CNN) is a type of
19 from CT scan images [11]. Another study has done
neural network often used to detect and identify
experiments and comparative analysis between the
objects in an image. CNN, a deep neural network
classic CNN model and several transfer learning
model, is designed to process two-dimensional data in
architectures to catch pneumonia from chest X-ray
image-processing tasks [9]. For training the CNN
Tersedia di https://ojs.unikom.ac.id/index.php/komputika
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
images [12]. A similar study can also be seen in [13], through the preprocessing stage, i.e., resizing the
which implemented various transfer learning image. Then the data will be trained by adding various
architectures to detect fatigue crack initiation sites and transfer learning architectures to the CNN model
compare the results from different models. The study's separately. The transfer learning architectures tested
drawback is that they only focus on using multiple were MobileNet, VGG-19, Resnet50V2, DenseNet-121,
transfers learning architectural models in specific and NASNetMobile. In the training and validation
problems with one dataset. process, each model will be evaluated by comparing
One other study examines the comparison of the values of training loss, training accuracy,
transfer learning architectures on different datasets validation loss, and validation accuracy. After that, the
[14]. However, this study only compared two datasets, testing process will be carried out using the test data,
namely small and large datasets. The research also and the comparison of the results will be analyzed.
does not provide many answers regarding the best After that, the same method will be applied to the
transfer learning architecture. It is because, in large second dataset and the third dataset. The results of the
datasets, all models created with transfer learning evaluation of all models in the three datasets will be
architecture have a high probability of getting perfect studied and analyzed. This research results in the
accuracy. In addition, this study did not provide an in- discovery of the best transfer learning architecture.
depth analysis regarding differences in the accuracy of Figure 1 shows the method proposed in this study.
each model on small datasets. Therefore, our study
will thoroughly experiment with various transfer
learning models. The goal is to find the best transfer
learning architecture that can be used on the CNN
model.
For the experiments in this study, we will create
several deep-learning models with CNN for image
classification with several different datasets. The type
and amount of data used will vary. Various transfer
learning architectures will be applied to these models.
The transfer learning architectures we implement
include MobileNet, VGG-19, Resnet50V2, DenseNet-
121, and NASNetMobile. Then, we will make a
comprehensive analysis regarding the comparison of
transfer learning architectures used to find the best
transfer learning architectural model. The main
contributions of our research are as follows:
Analyze the performance of each transfer learning
architecture on the CNN model on different
datasets using well-known evaluation metrics
Provides a performance comparison of all transfer
learning architectures for all datasets to get the
best-performing architecture
This study helps find the best transfer learning
architecture for the CNN model. It is advantageous for
small datasets to get maximum performance results. Figure 1 Flowchart of the comparative study of transfer
By finding the best transfer learning architecture from learning architecture
the results of our research, further research that
2.1. Dataset
utilizes the transfer learning architecture can
immediately decide on the transfer learning The main objective of this study is to compare the
architecture to be implemented. Thus, the steps for performance of various transfer learning architectures
defining the transfer learning architecture can be across a variety of datasets. To accomplish this, three
omitted. distinct datasets have been selected for three separate
experiments. All datasets used are publicly available
2. DATASET AND METHOD
from Kaggle, which guarantees accessibility and
This comparative study on transfer learning reproducibility of the study. The specific datasets were
architecture begins with data collection. There are chosen based on their small data size, which is
three datasets used. Each dataset is loaded and goes necessary for evaluating the effectiveness of the
2
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
3
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
2.6. ResNet50V2
Residual Network (ResNet) is a popular type of
architecture that emphasizes the concept of residual
blocks. This architecture uses two simple rules: each
layer has the same number of filters for the same
output feature map size. The second rule is that if the
size of the output feature map is divided into two, the
number of filters for each layer is doubled [26]. For
this research, we will use ResNet50v2. The
ResNet50V2 architecture has a total of 50 layers. This
architecture is shown in Figure 7.
2.7. DenseNet-121
2.8. NASNetMobile
4
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
was found in the NASNet search space, which was 3. RESULTS AND DISCUSSION
then named NASNet. In the NASNet architecture, This study utilizes several tools and technologies,
there are two convolutional cells called Normal Cells including the Python programming language, the
and Reduction Cells. Normal Cell functions to return a TensorFlow machine learning framework, and the
feature map with the exact dimensions, while Keras API. To accelerate the training and testing
Reduction Cell functions to produce a feature map processes, we utilized Google Colaboratory and took
where the height and width of the feature map are advantage of the provided Tesla T4 GPU for
reduced by a factor of two. The original NASNet conducting the experiments. The results of all the
architecture is shown in Figure 9. We use the experiments in the training, validation, and testing
NASNetMobile architecture for this research because processes are presented. Finally, a comparative
the input image size used is 224x224 [30]. analysis is performed to evaluate the performance of
the transfer learning architecture models based on the
2.9. Model Evaluation and Comparison
experiments.
In this comparative study, we look at the results of A. Training Process
the training loss, training accuracy, validation loss,
and validation accuracy values of each model in each We experiment with each dataset for the training
dataset. All training and validation processes are process and train our models with different transfer
carried out at the same number of epochs and batch learning architectures. We use the adam optimizer and
sizes. We observe the performance of each transfer categorical cross-entropy for each model as the loss
learning architecture for three different datasets for function. We use the batch size of 8 for all models.
training and validation processes. After that, we Then, for the number of epochs, we use 50 epochs.
compared the accuracy, precision, recall, and f1-score However, we evaluate the number of epochs in
results of all models across all datasets in the testing multiples of 10, from 10 to 50. Table 1, 2, and 3 shows
process. Finally, we conducted an in-depth analysis to the training results of accuracy and loss values for
conclude the best transfer learning architecture from each experiment with each different dataset.
the three experiments.
Table 1 Training result on the first dataset
Accuracy Loss
Model Epoch Epoch
10 20 30 40 50 10 20 30 40 50
MobileNet 99.46% 100% 100% 100% 100% 10.91% 3.68% 1.96% 1.21% 0.85%
VGG19 74.59% 80.54% 82.70% 84.86% 89.19% 110% 85.76% 70.66% 60.34% 51.59%
ResNet50V2 99.46% 100% 100% 100% 100% 6.95% 2.39% 1.28% 0.79% 0.55%
DenseNet121 97.30% 99.46% 100% 100% 100% 21.30% 8.52% 4.89% 3.03% 2.05%
NASNetMobile 97.30% 99.46% 100% 100% 100% 20.18% 8.22% 4.51% 2.86% 1.97%
5
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
In the first experiment, there are four transfer validation data. Here we look at validation accuracy
learning architecture models that have 100% accuracy and loss validation by evaluating the number of
at epoch 50. However, of the four models, ResNet50V2 epochs in multiples of 10, which is 10 to 50. Tables 4, 5,
has the lowest training loss value compared to the and 6 show the results of validating the accuracy and
other models. VGG19 is the model with the worst loss values for each experiment on different datasets.
performance because it has a low accuracy value The validation process results did not differ much
compared to other models. The second experiment on from the first experiment, where ResNet50V2 achieved
the second dataset did not differ much from the first the highest accuracy validation with the lowest
one. Four models have a training accuracy value of validation loss value. The four models obtained 100%
100%, with ResNet50V2 having the lowest loss value. validation accuracy in the second experiment, but the
VGG19 is also the worst model in this experiment. MobileNet architecture reached the lowest loss
The difference began in the third experiment, validation value. None of the models got 100%
where only two models achieved 100% accuracy in the validation accuracy in the third experiment. In
training process. The transfer learning architecture addition, all models tend to have a reasonably high
models mentioned are MobileNet and ResNet50V2. loss validation value. However, the best architectural
However, DenseNet121 and NASNetMobile still have model here is achieved by DenseNet-121, with a
pretty good accuracy, with 98.75%. validation accuracy value of 90%. MobileNet and
NASNetMobile followed it with a validation accuracy
B. Validation Process value of 86%.
In the following process, we try to analyze each
model's performance in the three experiments on
6
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
7
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
8
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
architecture gets low evaluation results and is third experiment was very low. In addition,
different from other architectures. ResNet50V2 has good results in the training and
In the third experiment, two architectures stand validation process, but not so good after the testing
out, namely ResNet50V2 and DensetNet-121. process. Thus, DenseNet-121 has an excellent overall
ResNet50V2 excels in the training process with 100% performance in the three experiments conducted.
accuracy. However, during the validation and
4. CONCLUSION
testing process, ResNet50V2 received poor accuracy.
On the other hand, DenseNet-121 was lost in the This study aims to provide a comparative
training process with 98.75% accuracy. However, analysis of various transfer learning architectures for
DenseNet-121 got 90% accuracy in the validation the CNN algorithm. Previous research that made
process and achieved the highest evaluation score. comparative studies has not provided many
The cause of DenseNet-121 being superior to answers regarding the best transfer learning
ResNet50V2 could be due to the testing process, architecture. It is because the study only compares
where the ResNet50V2 architecture experienced an the value of accuracy and the length of time for
overfit, which resulted in the validation process learning. Therefore, we comprehensively conducted
getting poor results. experiments with three different datasets with five
After looking at and comparing all the transfer learning architectures in this study. Then
experiments, we have come up with three we compare the performance results of each
architectures that have the potential to be the best architecture on each dataset and perform a thorough
architectures. We then try to provide the following analysis. Based on our experiments and analysis, we
conclusions: found that DenseNet-121 is the best performing
a. The MobileNet architecture excels in test results transfer learning architecture. However, it is
for the first and second datasets but performs important to note that there is still room for future
poorly in the third. research regarding the comparison of performance
b. The DenseNet-121 architecture excels in test of transfer learning architectures. One area for
results for the second and third datasets. But in future research is to explore the performance of
the third dataset, DenseNet was lost in the other various transfer learning architectures not
training process. In the first dataset, DenseNet used in this study. Future studies could also
still has a reasonably good evaluation value consider using the same architectures from this
even though it fails to MobileNet. study but with additional distinct datasets to further
c. The ResNet50V2 architecture excels in the validate their performance, especially the DenseNet-
results of the second dataset test. ResNet50V2 121 architecture. Additionally, future research could
has a good value in the training and validation also explore the impact of using different data splits
process for the first dataset. This architecture for training, validation, and testing models to enable
also excelled in the training process in the third a more comprehensive evaluation of the
dataset, but it experienced an overfit and performance of each transfer learning architecture.
received poor validation and testing scores. Through these efforts, it is hoped that the transfer
d. The NASNetMobile architecture also excels in learning architecture with the best performance for
the second dataset test results. But other than multiple datasets can be found.
that, NASNetMobile does not have any
impressive results. REFERENCES
e. The VGG19 architecture is the worst [1] L. Alzubaidi et al., “Review of deep learning:
architectural model of the three experiments concepts, CNN architectures, challenges,
conducted. applications, future directions,” J. Big Data,
vol. 8, no. 1, Dec. 2021, doi: 10.1186/s40537-
After analyzing the experimental results on the 021-00444-8.
three datasets, we find that the three architectures [2] J. Ker, L. Wang, J. Rao, and T. Lim, “Deep
have pretty good performance. These architectures Learning Applications in Medical Image
are DenseNet-121, MobileNet, and ResNet50V2. Analysis,” IEEE Access, vol. 6, pp. 9375–9389,
However, looking at the conclusions we have stated 2018, doi: 10.1109/ACCESS.2017.2788044.
previously, the DenseNet-121 transfer learning [3] S. Kamiş and D. Goularas, “Evaluation of
architecture can be said to be the best because it Deep Learning Techniques in Sentiment
achieved the highest evaluation scores in the second Analysis from Twitter Data,” in Proceedings -
and third experiments. DenseNet-121 also scored 2019 International Conference on Deep Learning
reasonably well on the first try. On the other hand, and Machine Learning in Emerging Applications,
even though MobileNet was superior in the first and Deep-ML 2019, Aug. 2019, pp. 12–17. doi:
second experiments, the evaluation value in the 10.1109/Deep-ML.2019.00011.
9
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
[4] H. S. Dikbayir and H. Ibrahim Bulbul, “Deep Pneumonia X-ray Images Detection,” in
Learning Based Vehicle Detection from Proceedings - 2020 2nd International Conference
Aerial Images,” in Proceedings - 19th IEEE on Machine Learning, Big Data and Business
International Conference on Machine Learning Intelligence, MLBDBI 2020, Oct. 2020, pp. 449–
and Applications, ICMLA 2020, Dec. 2020, pp. 454. doi: 10.1109/MLBDBI51377.2020.00095.
956–960. doi: [13] S. Y. Wang and T. Guo, “Transfer Learning-
10.1109/ICMLA51294.2020.00155. Based Algorithms for the Detection of
[5] K. P. Akshai and J. Anitha, “Plant disease Fatigue Crack Initiation Sites: A Comparative
classification using deep learning,” in 2021 Study,” Front. Mater., vol. 8, Nov. 2021, doi:
3rd International Conference on Signal 10.3389/fmats.2021.756798.
Processing and Communication, ICPSC 2021, [14] M. K. Nalini and K. R. Radhika,
May 2021, pp. 407–411. doi: “Comparative analysis of deep network
10.1109/ICSPC51351.2021.9451696. models through transfer learning,” in
[6] Y. Liu, Y. Li, Y. Zhu, Y. Niu, and P. Jia, “A Proceedings of the 4th International Conference
Brief Review on Deep Learning in on IoT in Social, Mobile, Analytics and Cloud,
Application of Communication Signal ISMAC 2020, Oct. 2020, pp. 1007–1012. doi:
Processing,” in 2020 IEEE 5th International 10.1109/I-SMAC49090.2020.9243469.
Conference on Signal and Image Processing, [15] G. Fadilla, “Indonesian Wayang Types,”
ICSIP 2020, Oct. 2020, pp. 51–54. doi: Kaggle, 2022.
10.1109/ICSIP49896.2020.9339345. https://www.kaggle.com/datasets/gibranfa
[7] M. Biswas, A. Shome, M. A. Islam, A. J. dilla/indonesian-wayang-types (accessed
Nova, and S. Ahmed, “Predicting stock Oct. 26, 2022).
market price: A logical strategy using deep [16] B. Saha, “Drone-Bird Classification,” Kaggle,
learning,” in ISCAIE 2021 - IEEE 11th 2022.
Symposium on Computer Applications and https://www.kaggle.com/datasets/imbikra
Industrial Electronics, Apr. 2021, pp. 218–223. msaha/drone-bird-classification (accessed
doi: 10.1109/ISCAIE51753.2021.9431817. Oct. 26, 2022).
[8] S. Albawi, T. A. Mohammed, and S. Al-Zawi, [17] M. Koklu, M. F. Unlersen, I. A. Ozkan, M. F.
“Understanding of a convolutional neural Aslan, and K. Sabanci, “A CNN-SVM study
network,” in 2017 International Conference on based on selected deep features for grapevine
Engineering and Technology (ICET), Aug. 2017, leaves classification,” Measurement, vol. 188,
pp. 1–6. doi: p. 110425, Jan. 2022, doi:
10.1109/ICEngTechnol.2017.8308186. 10.1016/j.measurement.2021.110425.
[9] E. I. Haksoro and A. Setiawan, “pengenalan [18] R. Gandikota and D. Mishra, “How You See
jamur yang dapat dikonsumsi menggunakan Me: Understanding Convolutional Neural
metode transfer learning pada convolutional Networks,” in TENCON 2019 - 2019 IEEE
neural network" Jurnal ELTIKOM : Jurnal Region 10 Conference (TENCON), Oct. 2019,
Teknik Elektro, Teknologi Informasi dan pp. 2069–2073. doi:
Komputer, vol. 5, no. 2, pp. 81-91, 2021. 10.1109/TENCON.2019.8929603.
[10] S. Ahuja, B. K. Panigrahi, N. Dey, V. [19] F. D. Adhinata, G. F. Fitriana, A. Wijayanto,
Rajinikanth, and T. K. Gandhi, “Deep and M. P. K. Putra, “Corn Disease
transfer learning-based automated detection Classification Using Transfer Learning and
of COVID-19 from lung CT scan slices,” Appl. Convolutional Neural Network,” JUITA J.
Intell., vol. 51, no. 1, pp. 571–585, Jan. 2021, Inform., vol. 9, no. 2, p. 211, Nov. 2021, doi:
doi: 10.1007/s10489-020-01826-w. 10.30595/juita.v9i2.11686.
[11] A. Seum, A. H. Raj, S. Sakib, and T. Hossain, [20] F. D. Adhinata, D. P. Rakhmadani, M.
“A comparative study of CNN transfer Wibowo, and A. Jayadi, “A Deep Learning
learning classification algorithms with Using DenseNet201 to Detect Masked or
segmentation for COVID-19 detection from Non-masked Face,” JUITA J. Inform., vol. 9,
CT scan images,” in Proceedings of 2020 11th no. 1, p. 115, May 2021, doi:
International Conference on Electrical and 10.30595/juita.v9i1.9624.
Computer Engineering, ICECE 2020, Dec. 2020, [21] E. Prasetyo, R. Purbaningtyas, R. D. Adityo,
pp. 234–237. doi: N. Suciati, and C. Fatichah, “Combining
10.1109/ICECE51571.2020.9393129. MobileNetV1 and Depthwise Separable
[12] X. Wei, Y. Chen, and Z. Zhang, convolution bottleneck with Expansion for
“Comparative Experiment of Convolutional classifying the freshness of fish eyes,” Inf.
Neural Network (CNN) Models Based on Process. Agric., Jan. 2022, doi:
10
M D A Putra, T S Winanto, R Hendrowati, A Primajaya, F D Adhinata
Komputika: Jurnal Sistem Komputer, Vol. 12, No. 1, April 2023
11