Uppsats

Comparing training/test splits for training convolutional neural networks on fresh and rotten fruit image classification

Kandidat-uppsats

Stockholms universitet/Institutionen för data- och systemvetenskap

Publicerad: 2025

Språk: Engelska

Sammanfattning

Artificial intelligence has become an everyday utility for people worldwide. AI solves many problems, as well as creates new challenges. Tasks in different environments have become simpler to solve. This, however, requires training and data, especially for convolutional neural networks (CNNs) used for image classification. This study investigates how different train/test split ratios affect the classification accuracy on two small datasets for a binary task, classifying fruit as rotten or fresh. Four different split ratios (20/80, 40/60, 60/40, and 80/20) were used, with three randomized runs per split. Results showed that using the largest split (80/20) for training consistently produced the highest accuracy across both datasets. For the lower percentages (20% and 40% used for training), the 20% split produced better accuracy, suggesting a higher percentage for training is not always related to higher accuracy. This anomaly may be explained by limitations of the study, such as a lack of stratification when splitting the dataset or suboptimal hyperparameter tuning. The study exemplifies the importance of handling the dataset with care and suggests further research should investigate stratified sampling, optimal hyperparameter tuning, or different datasets to improve generalization when training CNNs from scratch with limited data.

Information

Lärosäte / institution
Stockholms universitet/Institutionen för data- och systemvetenskap
Publiceringsdatum
2025
Uppsatstyp
Kandidat-uppsats
Språk
Engelska

Utforska vidare

Liknande uppsatser

Uppsatser med liknande ämnen och nyckelord.