Vol. 3 No. July 2025 . ISSN: 2987-6990 DOI: https://doi. org/10. 60005/coreid. Convolutional Neural Network for Soil Surface Image Classification in Six Soil Categories Muhamad Iqbal Fauzi1. Nasywah Darraini2. Muhamad Randi Septiansah3. Erwinestri Hanidar Nur Afif 4 1,2,3 Informatics Engineering. Faculty of Science and Technology. UIN Sunan Gunung Djati Bandung. Indonesia IAIN Sorong. Indonesia Article Info ABSTRACT Article history: Soil type classification is important for agriculture, geology, and civil engineering because soil characteristics influence land suitability, tillage strategy, irrigation, fertilization, and foundation stability. However, manual soil identification through field observation or laboratory analysis can be timeconsuming and may introduce subjective errors. This study proposes an automated soil image classification approach using a Convolutional Neural Network (CNN). The dataset comprises six soil categories-black soil . anah hita. , yellow soil . anah kunin. , peat soil . anah gambu. , cinder/volcanic soil . anah vulkani. , laterite soil . anah lateri. , and cracked soil . anah reta. -collected from a public Kaggle dataset and complemented with webextracted cracked-soil images. Images are preprocessed through resizing, normalization, and training-time augmentation before being split into training, validation, and testing subsets. Experimental results show that the proposed CNN achieves 91. 61% test accuracy and substantially improves performance compared to training without preprocessing. These findings indicate that CNN-based models, supported by appropriate preprocessing, can provide practical decision support for rapid soil type identification under diverse image conditions. Received April 11, 2025 Revised May 12, 2025 Accepted July 12, 2025 Keywords: Convolutional Neural Network soil image classification soil type This is an open access article under the CC BY-SA license. Corresponding Author: Muhamad Iqbal Fauzi Informatics Engineering. Faculty of Science and Technology. UIN Sunan Gunung Djati Bandung Jl. Nasution No. 105 Cibiru. Kota Bandung. Jawa Barat 40614. Indonesia Email: miqbalfauzi000@gmail. INTRODUCTION Soil is a fundamental natural resource that directly determines agricultural productivity, land suitability, and sustainable crop management. In real field practice, farmers and agricultural practitioners frequently face heterogeneous soil conditions even within nearby plots, causing differences in water retention, nutrient availability, and tillage requirements . , . , . , . Accurate soil-type identification therefore becomes a practical need to support decisions such as crop selection, irrigation scheduling, fertilization strategy, and land preparation. However, conventional identification that relies on expert observation or laboratory analysis is often time-consuming, requires specific expertise and equipment, and may not be feasible for rapid decision-making in the field . , . With the increasing availability of cameras and smartphones, soil images offer a practical pathway for faster identification and decision support through automated classification systems. Research on soil-type identification and classification can be grouped into at least three streams. First, studies in soil science and agronomy emphasize field morphology and laboratory-based characterization . texture, organic content, moisture, and color descriptor. that provide strong scientific grounding but often CoreID Journal | Vol. No. July 2025: 60-64 require controlled procedures and specialized tools, limiting rapid deployment in everyday practice . Second, machine learning approaches such as K-Nearest Neighbors (KNN). Support Vector Machine (SVM), and Naive Bayes have been applied to classification tasks, commonly by extracting handcrafted features . color histograms or texture descriptor. and training conventional classifiers . , . , . , . , . , . , . While these methods can perform reasonably under controlled settings, they may degrade under real-world variations such as lighting, camera angle, soil moisture, shadows, and mixed particles, because the features are manually engineered and not always robust. Third, deep learningAiparticularly Convolutional Neural Networks (CNN)Aihas become a dominant approach for image classification, including agriculture-related tasks, because it learns hierarchical features directly from images and often improves generalization on complex visual patterns . , . , . Despite this progress, important gaps remain: many studies focus on limited class diversity, do not explicitly target locally relevant soil categories, or lack thorough evaluation of robustness under practical image variation. In addition, datasets for multi-class soil recognition are often small and heterogeneous, and many works do not benchmark CNN performance against simpler baselines in a comparable setup. These limitations motivate a more structured investigation of CNN-based soil classification for multiple soil types using image data captured in practical conditions. To address the above gaps, this study aims to develop and evaluate a CNN-based soil image classification model for six soil categories commonly referenced in local field contexts: black soil . anah hita. , yellow soil . anah kunin. , peat soil . anah gambu. , cinder/volcanic soil . anah vulkani. , laterite soil . anah lateri. , and cracked soil . anah reta. Specifically, this research . compiles a labeled image dataset for the six classes, . applies a preprocessing pipeline and data augmentation to improve robustness to visual variation, and . evaluates the CNN model using standard performance metrics . ccuracy, precision, recall. F1-score, and confusion matri. Where appropriate. CNN performance is compared with conventional baselines to highlight the value of deep feature learning for soil images . This research is grounded in the argument that soil-type recognition is primarily a visual-pattern problemAidriven by color distribution, surface texture, granularity, and structural cues . , cracking pattern. Aiwhich can be learned effectively by CNN architectures through end-to-end training. Accordingly, the main hypothesis is that a CNN-based model will achieve higher and more stable classification performance than conventional approaches that rely on handcrafted features, particularly under varying lighting and capture conditions . , . , . , . A secondary hypothesis is that appropriate preprocessing and augmentation will improve generalization by reducing sensitivity to common noise factors . llumination changes, shadows, and minor viewpoint shift. Finally, it is expected that misclassifications will concentrate among visually similar categories . , black vs. peat under low light, or yellow vs. laterite when color saturation is simila. , and that analyzing these confusion patterns can guide data collection improvements and model refinement. To strengthen the theoretical foundation of this study, the following review highlights key concepts related to soil types and visual characteristics, image preprocessing and augmentation, and CNN-based image METHOD 1 Unit of Analysis The unit of analysis in this study is individual soil-surface images. Each image constitutes one observation and is labeled into one of six soil categories: black soil, yellow soil, peat soil, cinder/volcanic soil, laterite soil, and cracked soil. The classification task aims to learn visual soil cues such as color distribution, granularity, surface texture, and cracking patterns from RGB images. 2 Research Design This study employs a quantitative experimental design within a supervised multi-class image classification framework. The experimental approach is used to systematically evaluate model performance under different architectural and training settings. CNN is selected because soil type recognition is strongly driven by complex visual patterns. CNN can learn hierarchical features directly from images and typically outperforms approaches that rely on handcrafted features under varying acquisition conditions . , . , . , . 3 Data Sources Two data sources are used. First, a public Kaggle dataset provides 300 RGB JPG soil images distributed across five classes . lack, yellow, peat, laterite, and cinder/volcani. Second, approximately 50 cracked-soil images are collected through web-image extraction and manual screening to complete the sixclass scope. Overall, the compiled dataset contains approximately 350 labeled images. Table 1 presents representative samples from the soil image dataset used in this study. The dataset consists of RGB soil-surface photographs in JPG format that are grouped into five main categories from the Convolutional Neural Network for Soil Surface Image Classification . (Muhamad Iqbal Fauzi, et a. - 61 CoreID Journal | Vol. No. July 2025: 60-64 Kaggle source-black soil, cinder soil, laterite soil, peat soil, and yellow soil-which are visually distinguishable through differences in dominant color, granularity, and surface texture. Each class exhibits characteristic appearance patterns, for instance darker tones in black and peat soil, granular and coarse particles in cinder soil, reddish-brown hues in laterite soil, and lighter yellowish coloration in yellow soil. These sample images are provided to illustrate the visual variability within the dataset and to support the rationale for using CNNbased feature learning in the subsequent classification experiments. Table 1. Dataset Image Soil type Black soil Cinder soil Laterite soil Peat soil Yellow soil Tanah retak Convolutional Neural Network for Soil Surface Image Classification . (Muhamad Iqbal Fauzi, et a. - 62 CoreID Journal | Vol. No. July 2025: 60-64 4 Data Collection and Preparation Kaggle images are downloaded and organized by class based on the provided labels. Cracked-soil images are retrieved via keyword-based web search and curated by removing non-soil images, duplicates, and samples with excessive background clutter. As shown in Figure 1, preprocessing includes resizing images to a fixed input dimension, normalizing pixel values, and applying training-time augmentation . otation, shifting, shearing, zooming, and flippin. to increase robustness and reduce overfitting. The dataset is split into training, validation, and testing subsets using stratification to preserve class proportions. 5 Data Analysis Data analysis is conducted by training CNN models and evaluating their classification performance. The CNN architecture (Figure . consists of convolutional layers, max-pooling layers, fully connected layers, and dropout regularization. Experiments vary . convolution and pooling configurations, . dropout rate, . optimizer (SGD. RMSProp. Ada. , and . learning rate values to identify the best-performing model. Model selection is based on validation performance, while final reporting uses the held-out test set. Evaluation emphasizes accuracy together with class-sensitive metrics . recision, recall. F1-scor. and a confusion matrix to analyze misclassifications. RESULTS AND DISCUSSION 1 Dataset Characteristics The compiled dataset contains approximately 350 soil images across six classes. The Kaggle portion contributes 300 images across five classes, and the cracked-soil class is complemented with around 50 webextracted images. Table 1 summarizes the dataset composition. Table 1. Dataset composition Class Source Approx. Black soil Kaggle OO60 Cinder/volcanic soil Kaggle OO60 Laterite soil Kaggle OO60 Peat soil Kaggle OO60 Yellow soil Kaggle OO60 Cracked soil Web extraction OO50 Experimental Setup and Training Behavior Experiments were conducted by modifying the CNN configuration . umber of convolution and pooling layer. , adjusting dropout rates, and comparing optimizers (SGD. RMSProp. Ada. under different learning rates. Figure 3 . o be inserte. is recommended to present training and validation accuracy/loss curves for the selected best model. Overall, models trained with preprocessing and augmentation converged more stably and achieved higher validation performance than models trained without these steps. Classification Performance and Error Analysis The best-performing CNN model achieved 91. 61% accuracy on the test set. This result indicates that the model can learn discriminative soil features and generalize to unseen images. To provide deeper insight beyond accuracy. Figure 4 . o be inserte. should present a confusion matrix, enabling identification of classes that are frequently confused. Qualitative error analysis suggests that misclassifications occur mainly between visually similar For example, cracked-soil images with dark coloration may be predicted as black soil, while yellowish cracked-soil images may be predicted as yellow soil. These errors are consistent with the hypothesis that color dominance can override structural cues when cracking patterns are subtle or obscured by lighting Discussion The results demonstrate that CNN-based classification can effectively distinguish multiple soil types from images, achieving high test accuracy in a multi-class setting. The substantial improvement observed after applying preprocessing and augmentation supports prior findings that augmentation can mitigate limited data and improve generalization in image classification. Practically, the proposed approach can reduce reliance on time-consuming manual identification and provide rapid decision support for soil-related agricultural practices. Nevertheless, the study reveals challenges in separating classes with overlapping visual Soil appearance is influenced by acquisition conditions such as illumination, moisture, camera distance, and background clutter. In particular, color similarity between peat and black soil, or between yellow and laterite soil, may increase confusion when texture cues are weak. Future work should therefore consider Convolutional Neural Network for Soil Surface Image Classification . (Muhamad Iqbal Fauzi, et a. - 63 CoreID Journal | Vol. No. July 2025: 60-64 expanding the dataset, ensuring balanced class distributions, and exploring more advanced architectures . transfer learning backbone. and color/texture normalization methods to further improve robustness. CONCLUSION This study developed a Convolutional Neural Network (CNN) model for automated soil type classification using soil-surface images collected from Kaggle and web extraction. The best model achieved 61% test accuracy across six soil classes, demonstrating that CNN can capture relevant soil visual patterns for practical multi-class classification. Preprocessing and data augmentation played a crucial role in improving performance, increasing accuracy from 46% . ithout preprocessin. 61% . ith preprocessing and augmentatio. However, limitations remain due to dataset size, potential domain shift between Kaggle and web images, and visual similarity among certain soil classes. Future research should increase data volume and diversity per class, evaluate transfer learning architectures, and report additional metrics . acro-F1 and confusion matri. to strengthen reliability for real-world deployment. REFERENCES