πŸ” EfficientNetV2S Poultry Feces Classifier

A convolutional neural network model based on EfficientNetV2S for classifying chicken fecal images into 4 common conditions:

  • Coccidiosis
  • Healthy
  • Newcastle Disease
  • Salmonella

This model is designed to support smart poultry farming by enabling early detection of diseases through image-based feces analysis.

🧬 Model Architecture

  • Base: EfficientNetV2S (pretrained on ImageNet, frozen then fine-tuned)

  • Head:

    • GlobalAveragePooling2D
    • Dense(128) + BatchNorm + ReLU + Dropout(0.3)
    • Dense(4, activation='softmax')

πŸ§ͺ Training & Evaluation

  • Optimizer: Adam

  • Loss: Categorical Crossentropy

  • Metric: Accuracy

  • Dataset:

    • Source: Jayavrinda et al., 2023
    • 4 classes, resized to 224x224 pixels
    • Train/Val/Test sampling (3k/400/400 per class)
  • EarlyStopping was used to monitor validation accuracy

  • Accuracy on validation set: ~90%+ (see notebook for full results)

πŸ—„οΈ Example Usage

from tensorflow.keras.models import load_model
import tensorflow as tf
from PIL import Image
import numpy as np

model = load_model("path/to/your_model.h5")

def preprocess(image_path):
    img = Image.open(image_path).resize((224, 224))
    img_array = np.array(img) / 255.0
    return np.expand_dims(img_array, axis=0)

pred = model.predict(preprocess("feces.jpg"))
class_names = ["Coccidiosis", "Healthy", "Newcastle", "Salmonella"]
print("Prediction:", class_names[np.argmax(pred)])

πŸ“œ Citation

If you use this model or dataset, please cite:

Jayavrinda Vrindavanam, Pradeep Kumar, Gaurav Kamath, Chandrashekar N, and Govind Patil. (2023). Poultry Pathology Visual Dataset [Data set]. Kaggle. https://doi.org/10.34740/KAGGLE/DS/3951043


Beyond the Outliers

Datathon 2025

Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support