# Soil Type Image Classifier ๐ŸŒฑ๐Ÿง  This model is a Convolutional Neural Network (CNN) trained to classify different types of soil from images using TensorFlow and Keras. It helps automate soil type identification, which can be useful for agriculture, environmental monitoring, and research. ## ๐Ÿท๏ธ Soil Categories The model can identify the following 11 soil types: - Alluvial soil - Black Soil - Cinder Soil - Clayey soils - Laterite soil - Loamy soil - Peat Soil - Sandy loam - Sandy soil - Yellow Soil ## ๐Ÿ“ Dataset The training dataset consists of soil images stored in category-specific folders. It was split into 80% training and 20% validation sets. Data augmentation techniques (rotation, zoom, flips, etc.) were applied to improve generalization. ## ๐Ÿง  Model Architecture - 4 Convolutional layers with increasing filters (32 โ†’ 128) - MaxPooling after each conv layer - Flatten layer followed by: - Dense(512) + ReLU - Dropout(0.5) - Dense output layer with Softmax activation ## โš™๏ธ Training Configuration - Image size: 224x224 - Batch size: 32 - Epochs: 15 - Loss: categorical_crossentropy - Optimizer: Adam ## ๐Ÿ“ˆ Results Training and validation accuracy were tracked, and results are plotted in the included `training_results.png`. ## ๐Ÿงช Prediction You can use the `predict_soil_type()` function to classify a new image: ```python soil_type, confidence = predict_soil_type(model, 'path/to/image.jpg', class_indices)