YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
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:
soil_type, confidence = predict_soil_type(model, 'path/to/image.jpg', class_indices)