Exploring ResNet-18 Estimation Design through Multiple Implementation Iterations and Techniques in Legacy Databases

— In a rapidly evolving landscape where automated systems and database applications are increasingly crucial, there is a pressing need for precise and efficient object recognition methods. This study contributes to this burgeoning field by examining the ResNet-18 architecture, a proven deep learning model, in the context of fruit image classification. The research employs an elaborate experimental setup featuring a diverse fruit dataset that includes Rambutan, Mango, Santol, Mangosteen, and Guava. The efficacy of single versus multiple ResNet-18 models is compared, shedding light on their relative classification accuracy. A unique aspect of this study is the establishment of a 90% decision threshold, introduced to mitigate the risk of incorrect classification. Our statistical analysis reveals a significant performance advantage of multiple ResNet-18 models over single models, with an average improvement margin of 15%. This finding substantiates the study’s central hypothesis. The implemented 90% decision threshold is determined to play a pivotal role in augmenting the system’s overall accuracy b y minimizing false positives. However, it’s worth noting that the increased computational complexity associated with deploying multiple models necessitates further scrutiny. In sum, this study provides a nuanced evaluation of single and multiple ResNet-18 models in the realm of fruit image classification, emphasizing their utility in practical, real-world applications. The research opens avenues for future exploration by refining these methodologies and investigating their applicability to broader object recognition tasks.


INTRODUCTION
Nutritional food systems are a cornerstone of human health, offering insights into daily nutrient requirements [1]- [2].Fruits, an essential part of these systems, are a rich source of dietary fiber, vitamins, and minerals, playing a significant role in overall human well-being [3]- [6].Studies have highlighted the anticancer properties of fruits, emphasizing the importance of specific nutrients like beta-carotene, vitamin E, and vitamin C. Research by Thailand's Ministry of Public Health has particularly identified fruits that are high in these nutrients, underscoring their potential role in cancer prevention strategies [6].
Concurrent with this, the rise of web applications and nutritional databases has significantly impacted how healthrelated information is disseminated.These platforms often employ sophisticated databases capable of handling image or video data [7]- [11].In this context, Convolutional Neural Networks (CNNs) have become indispensable tools for accurate image classification [8]- [9].Various algorithms for image processing have been seamlessly integrated into a myriad of fields, including agriculture [12], medical diagnostics [13], and dental imaging diagnostics [14].Within the sphere of more complex systems, ResNet models have emerged as versatile deep neural networks, capable of addressing a wide array of tasks, ranging from disease detection to advanced image processing [15]- [35].Specifically, ResNet models like ResNet-18 [15], [36], ResNet-34 [37], ResNet-50 [38], and ResNet-101 [39] have gained popularity due to their ease of use.
This study aims to address the existing research gap by developing and evaluating multiple ResNet-18 models for the specific purpose of fruit image categorization at the web application level.The research enhances the functionality of the ResNet-18 neural network system through the design and comparative evaluation of single and multiple ResNet-18 models for image grouping and categorization.Overall Additionally, the research introduces the concept of prediction thresholds to manage "Indecision" outcomes, thereby enhancing the robustness of fruit type categorization.The research presented in this case study serves as a practical example of fruit type detection with broader implications in the development of nutritionally valuable fruit databases.This work makes a significant contribution to the nutritional assessment of fruits within a healthcare organization that is currently in the process of development at the university level.Additionally, it extends the potential applications of object recognition techniques and automated systems in the future.

A. Research Overview
To provide a comprehensive overview of the methodology, this section is structured into several subsections, including system configuration, dataset characteristics, and evaluation methods.A flowchart illustrating the entire research methodology is presented in Fig. 1 to facilitate understanding.Based on the flowchart, it outlines the process of utilizing image classification.The initial step involves checking if the ResNet18 model exists within the program.If it does, the image classification process begins.If not, the program proceeds to create the ResNet18 model.This involves inputting the dataset and defining the learning system conditions for ResNet18.Subsequently, the ResNet18 model is trained until the system's algorithm is generated.Following this, input images for testing purposes are fed into the system.The algorithm designed for the ResNet18 system processes the data and predicts the system's output.The results of the predictions are then displayed, marking the completion of the program's operation.

B. System Configuration and Model Setup
The study explores two unique configurations of ResNet-18 models for image classification tasks.The first configuration is illustrated in Fig. 2

C. Dataset and Illustrative Scenarios
The research utilizes a comprehensive dataset comprising images of five unique fruit types, namely, Guava, Mango, Mangosteen, Rambutan, and Santol.These images are visually presented across Fig. 3 to Fig. 7 and were purposefully selected through a randomized methodology to ensure a diverse array of conditions.For instance, the dataset includes images of fruits on trees, peeled fruits, and fruits presented in various dishes.The dataset contains different quantities of images for each fruit type -Guava has 65, Mango holds 92, Mangosteen includes 90, Rambutan shows 73, and Santol features 102.This dataset serves a dual purpose.First, it is designed for seamless integration into the ResNet-18 system to enhance its predictive analysis capabilities.Second, it aims to contribute to the development of an application that provides nutritional information about different fruit categories, using a structured database framework for storing and managing the image data.Significantly, this study not only focuses on the machine learning and classification aspects but also aims to

D. Testing Dataset and Evaluation Metrics
To evaluate the performance of both individual and collaborative ResNet-18 configurations, a specialized testing dataset is deployed, as illustrated in Fig. 8 to Fig. 12.The dataset includes 10 images for each type of fruit under investigation, Guava, Mango, Mangosteen, Rambutan, and Santol.These images were carefully selected to cover a broad spectrum of conditions, such as the natural appearance of the fruit, fruit on trees, peeled state, and arranged presentations.
Additionally, Fig. 13 features a dataset of 10 images that are not part of the ResNet-18 training data, designated solely for system testing.By excluding these test images from the training set, the study ensures an unbiased evaluation of the classification capabilities of the ResNet-18 model.The testing dataset serves two primary functions in this research.Firstly, it quantifies the accuracy of the ResNet-18 configuration in classifying fruit types.Secondly, it gauges the models' robustness by subjecting them to an assortment of conditions in which fruit images may be encountered.
Through the careful selection of test images and their deliberate exclusion from the training set, the study aims to conduct a thorough performance assessment, offering crucial insights into the system's operational viability and reliability under real-world conditions.

A. Single ResNet-18 Model
In this research, the ResNet-18 architecture was employed.A learning framework designed to improve the training efficiency of deep residual networks.The challenge of vanishing gradients can emerge when dealing with a substantial number of layers.However, ResNet effectively tackles this issue by incorporating shortcut techniques that allow the network to bypass certain layers.The specific implementation details of the ResNet-18 model can be found in [80], which establishes a consistent learning configuration for the ResNet-18 system in this research.Additionally, the configuration of the Add-On explorer is visually depicted in Fig. 14.In the current research, data from Fig. 3 to Fig. 7 serve as the foundation for machine learning with the specific aim of pattern recognition in images.Eight models were meticulously configured for this purpose, with their detailed specifications documented in Table I, Table II, and Table III.The choices for model parameters, including the number of training epochs and oversampling techniques, were rigorously determined to strike a balance between computational efficiency and predictive accuracy.Models M1 through M8 were trained using specialized datasets and parameters.For example, Model M1 utilized a dataset consisting of five sets and was trained for 15 epochs, resulting in 90 iterations and achieving an accuracy rate of 0.9756.In contrast, Model M2 was trained on a similar dataset but underwent 20 epochs, totaling 120 iterations, and reached an accuracy of 0.9024.Model M3 used the same dataset size but increased the training epoch to 25, equivalent to 150 iterations, yielding an accuracy of 0.9756.Models M4 through M8 focused on more specific dataset configurations.Model M4, which excluded the guava dataset, was trained for 20 epochs and achieved a perfect accuracy of 1. Models M5 and M6, which omitted the mango and mangosteen datasets, respectively, underwent 20 epochs, amounting to 120 iterations, and reached accuracies of 0.9375 and 0.9688.Similarly, Model M7, which left out the rambutan dataset, was trained for 20 epochs, achieving an accuracy of 0.9462.Lastly, Model M8, trained without the santol dataset, completed 20 epochs, and reached an accuracy of 0.9677.

B. Multiple ResNet-18 model
The innovative approach behind the multiple ResNet-18 model system is based on leveraging distinct Single ResNet-18 models, each individually trained on unique datasets.These models adhere to the architecture of the original Single ResNet-18 and are organized in a parallel configuration, as visually illustrated in Fig. 2 (b).
The architecture of the multiple ResNet-18 model system in this study comprises three main composite models.These are named "S Model 2", "S Model 3", and "S Model 4".Specifically, S Model 2 integrates models M1, M2, and M3. S Model 3 combines models M2, M4, M5, M6, M7, and M8.Meanwhile, "S Model 4" is a comprehensive assembly that includes models M1, M2, M3, M4, M5, M6, M7, and M8.Once predictions are generated from each of these individual models, a voting mechanism is implemented to determine a collective decision for the final system output, thereby enhancing the overall data processing efficiency.
It's also important to note that there is a stand-alone Single ResNet-18 model known as "S Model 1", which corresponds to model M2 as detailed in Table IV.This configuration adds another layer of complexity and adaptability to the overall system.In this research, a specialized scoring system serves as an integral component to facilitate decision-making processes.This system operates on the principle of tallying votes, thereby assisting in the selection of one or more options from a set of available choices.The framework for the scoring system is developed based on the method of vote counting, as well as the number of choices available for selection.One of the key innovations in this study is the incorporation of a voting mechanism within multiple ResNet-18 models, aimed at enhancing classification performance.This feature holds particular relevance for web-based applications, as it offers a more nuanced approach to data categorization.
In the specific context of this study, the voting mechanism integrated into the system with multiple ResNet-18 models employs a single-choice plurality voting system, also known as the First-past-the-post system.To understand how this works, consider that there are three options for selection, namely, A, B, and C. The option that receives the most votes becomes the final output, as defined by the criteria in Equation 1. Efficiency and quick decision-making are two essential qualities of this selected voting methodology, making it particularly suitable for real-time web applications.A thorough discussion on the role and advantages of this voting system serves to highlight its significance in enhancing the overall performance and reliability of the multiple ResNet-18 models used in this study.
Where Votes(A), Votes(B), and Votes(C) represent the number of scores received from voters for each respective option A, B, C.
After incorporating (1) into the data outlined in Table 4, the formula that emerges for the plurality voting system is specified below.

EXPERIMENTAL RESULTS
This section aims to elucidate the findings from two interconnected but distinct experiments, both designed to rigorously evaluate the ResNet-18 model's performance in fruit type categorization.The overarching objective extends beyond measuring predictive accuracy to include an examination of different prediction criteria and the utility of a voting system when using multiple ResNet-18 models.
The first experiment focuses on classifying fruit types based on the highest prediction scores generated by a single ResNet-18 model.Six rounds of testing were conducted for this purpose, each involving 10 images assessed with eight different ResNet-18 configurations.
In contrast, the second experiment shifts the focus on the role of prediction thresholds in accurate fruit categorization.
Here, a prediction score exceeding 90% is considered necessary for confident classification.Any score below this threshold is labeled as "Indecision," offering an alternative evaluation metric compared to the first experiment.
Additionally, a voting system is implemented in both experiments to reach collective decisions when using multiple ResNet-18 models.Under this system, if the maximum voting score surpasses 2, the outcome is labeled as "Indecision," indicating either an inconclusive result or a degree of model uncertainty.
By adopting these multi-faceted testing paradigms, a comprehensive understanding of the performance of both single and multiple ResNet-18 models under various conditions is achieved.This prepares the ground for subsequent, in-depth analyses and discussion, the key conclusions of which are captured in the summary of the results section.

A. Testing ResNet-18 by Selecting Maximum Prediction Scores for Fruit Type Categorization
This section presents the outcomes of the initial experiment, which involves evaluating the ResNet-18 model by selecting the highest prediction scores to categorize different fruit types.The experiment was conducted on six separate occasions, with each trial consisting of 10 images for each of the 8 models that were designed as outlined in Table IV.The results of the experiment were classified into three distinct categories as correctness, incorrectness, and indecision.
Referring to the data presented in Table V, an image of a guava, as shown in Fig. 8, was employed to assess the system.The prediction with the highest score was taken as the model's response.Notably, the system's predictions were consistently congruent across all models, and the image marked as "Incorrectness" was uniformly identified as Image 3.
Similarly, the findings from Table VI pertain to the examination of the system using an image of a mango, as illustrated in Fig. 9.The model's response was determined by the highest predicted score.S Model 1 accurately predicted 5 images while incorrectly predicting 5 others.In contrast, S Model 2 achieved correctness for over 2 images compared to S Model 1.Despite S Model 3 correctly predicting 4 images, it deliberately refrained from giving answers, thereby leading to 2 images being categorized as "Indecision" and 4 images as "Incorrectness".Conversely, S  Concurrently, the findings showcased in Table VII demonstrate an experiment employing an image of a mangosteen, as shown in Fig. 10, to assess the system's performance.The model's response was determined by the highest predicted score.Remarkably, S Model 1 exhibited precise predictions for 9 images while making 1 incorrect prediction.Similarly, the remaining models yielded similar results.Conversely, S Model 3 achieved accurate predictions for 9 images, with 1 image categorized as "Indecision".Drawing insights from the findings presented in Table VIII, an evaluation was conducted using an image of a Rambutan, as shown in Fig. 11, to test the system.The model's answer was determined by selecting the highest predicted score.The results revealed consistent predictions across all models, with each model achieving a remarkable 100% accuracy in predicting the outcomes In the context of the experimental findings presented in Table IX, an evaluation was carried out using an image of a mangosteen, as shown in Fig. 12, to assess the performance of the system.The highest predicted score was employed as the model's response.The results revealed that S Model 1 accurately predicted the correct classification for 9 images and had 1 incorrect prediction.Similarly, S Model 3 achieved accurate predictions for 9 images, with 1 image categorized as "Indecision".Conversely, the remaining models correctly predicted the classification for all 10 images.The results presented in Table X showcase an experiment involving an image that was not part of the learning dataset, as shown in Fig. 13.The primary goal of this experiment was to assess the system's response when confronted with an unfamiliar image, expecting to receive an "Indecision" response from the system.This outcome aligns with the system's correctness prediction within this specific experiment.The experiment underscores the system's inability to categorize images absent from its training dataset, while still generating responses based on the knowledge it has acquired.

B. Testing ResNet-18 by Setting Prediction Thresholds for Fruit Type Categorization
The second series of experiments focuses on assessing ResNet-18 by defining prediction thresholds for the categorization of fruit types.An accurate classification of a fruit type requires a prediction score exceeding 90%, otherwise, the outcome is categorized as "Indecision".This approach introduces a distinction from the first experiment.
The results presented in Table XI depict an experiment involving an image of guava, as illustrated in Fig. 8, to evaluate the system.The highest predicted score determined the model's answer.The findings revealed that S Model 1 correctly predicted the classification for 6 images, made an incorrect prediction for 1 image, and indicated "Indecision" for 3 images.Conversely, S Model 2 achieved accurate classification for 8 images and labeled 2 images as "Indecision".Meanwhile, both S Model 3 and S Model 4 achieved correct classification for 9 images, with 1 incorrect prediction.Simultaneously, the outcomes in Table XII showcase an experiment involving an image of Mango, illustrated in Fig. 9, to assess the system.The highest predicted score was employed as the model's response.Notably, S Model 1 accurately predicted the correctness for 2 images, made 2 incorrect predictions, and indicated "Indecision" for 6 images.Conversely, S Model 2 achieved correctness for 2 images and identified 8 images as "Indecision".Despite S Model 3 predicting correctness for 5 images, it deliberately chose not to provide an answer for 1 image, categorizing them as "Indecision," leading to 4 images being labeled as "Incorrectness".In contrast, S Model 4 achieved accurate classification for 5 images, with 3 images marked as "Incorrectness" and 2 images as "Indecision".Continuing with the findings presented in Table XIII, an experimental trial was conducted using an image of Mangosteen, showcased in Fig. 10, for system evaluation.The highest predicted score was employed as the model's response.It was observed that both S Model 1 and S Model 2 accurately predicted the correctness for 7 images and indicated "Indecision" for 3 images.Similarly, the remaining models demonstrated comparable results.In contrast, both S Model 3 and S Model 4 accurately predicted the correctness for all 10 images.In relation to the experimental results showcased in Table XIV, an experiment involving an image of Rambutan, as depicted in Fig. 11, was conducted to assess the system's performance.The highest predicted score was utilized as the model's response.Significantly, the predictions made by the system remained uniform across all models, with each model accurately forecasting correctness for 9 images and identifying 1 image as "Incorrectness".
In the context of the outcomes presented in Table XV, a test was carried out utilizing an image of Santol, as shown in Fig. 12, to evaluate the system's functionality.The highest predicted score was employed as the model's output.The outcomes disclosed that S Model 1 adeptly predicted the correctness of 8 images while classifying 2 images as "Indecision".Similarly, the other models demonstrated consistent patterns, correctly predicting 9 images and designating 1 image as "Indecision".The outcomes presented in Table XVI showcase an experiment involving an image not included in the learning dataset, as illustrated in Fig. 13.The primary objective was to elicit an "Indecision" response from the system, based on a predefined prediction threshold of over 90% for correctness.This experiment highlighted those systems utilizing a prediction threshold exceeding 90% could effectively distinguish responses.On average, correctness was accurately predicted for 7 images, while 3 images were categorized as "Incorrectness".Notably, S Model 4 deviated from this trend, with 4 images classified as "Incorrectness".

C. Summary of the Results
The research introduces compelling evidence that systems equipped with multiple ResNet-18 models deliver more consistent and often superior prediction outcomes compared to those running on a single ResNet-18 model.This distinction becomes crucial when one examines the system's behavior with predefined answer thresholds, as detailed in Table XVII to Table XIX.When the system operates under these constraints, it shows a discernable preference for abstaining from answering or displaying "Indecision" rather than offering incorrect responses.This behavioral nuance contributes to higher correctness values but also indicates the limitations of such an approach, especially in scenarios requiring absolute answers.
In contrast, the system grapples with a specific set of challenges when it faces data not originally included in its learning process.This is particularly evident in Table 18 and Table XX, where the absence of decision boundaries leads to difficulties in distinguishing unlearned data, causing a noticeable decline in the rate of correct predictions.These observations provide a counterbalance to the potential advantages of deploying multiple ResNet-18 models for categorization tasks.Where this study differs from existing research is in its nuanced comparison of the effectiveness of multiple models versus single models, a fresh angle that brings new considerations to the table.The overarching implication suggests that multiple model systems, while more reliable in many aspects, still need fine-tuning to better handle unlearned or outlier data.This duality of strengths and limitations highlights the need for further research, aiming to refine the system's ability to make robust predictions across varied datasets.ResNet-18 models results in better accuracy and more reliable system performance.This is relevant for industries that need automated systems and large databases.However, it's also important to note the computational costs and challenges in deploying multiple models.These issues point to areas that could benefit from future research.Looking ahead, there's an opportunity to improve the classification between closely related categories.This could be valuable for both practical applications and academic study, as it would make image classification systems more effective.To conclude, this study offers valuable insights for both practical use and academic research in image classification, especially using ResNet-18 models.As industries adopt these technologies, the findings from this study could guide future improvements in automated systems and databases.
Journal of Robotics and Control (JRC) ISSN: 2715-5072 651 Nuntachai Thongpance, Exploring ResNet-18 Estimation Design through Multiple Implementation Iterations and Techniques in Legacy Databases accuracy is improved by employing a voting mechanism.

Fig. 2 .
Fig. 2. Block diagram of the single and multiple ResNet-18 model

Fig. 3 .Fig. 4 .
Fig. 3.The Guava image dataset serves as the foundational learning dataset for training the ResNet-18 system

Fig. 5 .
Fig. 5.The Mangosteen image dataset serves as the foundational learning dataset for training the ResNet-18 system

Fig. 7 .Fig. 8 .
Fig. 7.The Santol image dataset serves as the foundational learning dataset for training the ResNet-18 system

Fig. 14 .
Fig. 14.Add-On explorer of the deep learning toolbox model for ResNet-18 network ), (4), (5), (6), (7) , (8)) this study examines how single and multiple ResNet-18 models perform in classifying fruit images.Single ResNet-18 models are effective when there is limited storage or a short learning period.This provides important information about the strengths and weaknesses of object recognition methods using ResNet-18.Using multiple Journal of Robotics and Control (JRC) ISSN: 2715-5072 659 Nuntachai Thongpance, Exploring ResNet-18 Estimation Design through Multiple Implementation Iterations and Techniques in Legacy Databases

TABLE I .
DATA OF MODEL TRAINING IN

TABLE IV
Nuntachai Thongpance, Exploring ResNet-18 Estimation Design through Multiple Implementation Iterations and Techniques in Legacy Databases IV.VOTING SYSTEM

TABLE V .
DATAS OF GUAVE BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION

TABLE VII .
DATAS OF MANGOSTEEN BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION

TABLE VIII .
DATAS OF RAMBUTAN BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION

TABLE IX .
DATAS OF SANTOL BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION Robotics and Control (JRC) Nuntachai Thongpance, Exploring ResNet-18 Estimation Design through Multiple Implementation Iterations and Techniques in Legacy Databases

TABLE X .
DATAS OF OUTDATE BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION

TABLE XI .
DATAS OF GUAVE BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION

TABLE XII .
DATAS OF MANGO BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION

TABLE XIII .
DATAS OF MANGOSTEEN BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION

TABLE XIV .
DATAS OF RAMBUTAN BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION

TABLE XVI .
DATAS OF OUTDATE BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION

TABLE XVII .
SUMMARY DATAS OF FRUIT BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION

TABLE XVIII .
SUMMARY DATAS OF OUTDATE BY SELECTING MAXIMUM PREDICTION SCORES FOR FRUIT TYPE CATEGORIZATION

TABLE XIX .
SUMMARY DATAS OF FRUIT BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION

TABLE XX .
SUMMARY DATAS OF OUTDATE BY SETTING PREDICTION THRESHOLDS FOR FRUIT TYPE CATEGORIZATION