Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,69 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
---
|
| 6 |
+
# 🐔 EfficientNetV2S Poultry Feces Classifier
|
| 7 |
+
|
| 8 |
+
A convolutional neural network model based on **EfficientNetV2S** for classifying chicken fecal images into 4 common conditions:
|
| 9 |
+
|
| 10 |
+
* **Coccidiosis**
|
| 11 |
+
* **Healthy**
|
| 12 |
+
* **Newcastle Disease**
|
| 13 |
+
* **Salmonella**
|
| 14 |
+
|
| 15 |
+
This model is designed to support smart poultry farming by enabling early detection of diseases through image-based feces analysis.
|
| 16 |
+
|
| 17 |
+
## 🧬 Model Architecture
|
| 18 |
+
|
| 19 |
+
* Base: `EfficientNetV2S` (pretrained on ImageNet, frozen then fine-tuned)
|
| 20 |
+
* Head:
|
| 21 |
+
|
| 22 |
+
* `GlobalAveragePooling2D`
|
| 23 |
+
* `Dense(128) + BatchNorm + ReLU + Dropout(0.3)`
|
| 24 |
+
* `Dense(4, activation='softmax')`
|
| 25 |
+
|
| 26 |
+
## 🧪 Training & Evaluation
|
| 27 |
+
|
| 28 |
+
* Optimizer: Adam
|
| 29 |
+
* Loss: Categorical Crossentropy
|
| 30 |
+
* Metric: Accuracy
|
| 31 |
+
* Dataset:
|
| 32 |
+
|
| 33 |
+
* Source: [Jayavrinda et al., 2023](https://doi.org/10.34740/KAGGLE/DS/3951043)
|
| 34 |
+
* 4 classes, resized to 224x224 pixels
|
| 35 |
+
* Train/Val/Test sampling (3k/400/400 per class)
|
| 36 |
+
* EarlyStopping was used to monitor validation accuracy
|
| 37 |
+
* Accuracy on validation set: **\~90%+** (see notebook for full results)
|
| 38 |
+
|
| 39 |
+
## 🗄️ Example Usage
|
| 40 |
+
|
| 41 |
+
```python
|
| 42 |
+
from tensorflow.keras.models import load_model
|
| 43 |
+
import tensorflow as tf
|
| 44 |
+
from PIL import Image
|
| 45 |
+
import numpy as np
|
| 46 |
+
|
| 47 |
+
model = load_model("path/to/your_model.h5")
|
| 48 |
+
|
| 49 |
+
def preprocess(image_path):
|
| 50 |
+
img = Image.open(image_path).resize((224, 224))
|
| 51 |
+
img_array = np.array(img) / 255.0
|
| 52 |
+
return np.expand_dims(img_array, axis=0)
|
| 53 |
+
|
| 54 |
+
pred = model.predict(preprocess("feces.jpg"))
|
| 55 |
+
class_names = ["Coccidiosis", "Healthy", "Newcastle", "Salmonella"]
|
| 56 |
+
print("Prediction:", class_names[np.argmax(pred)])
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
## 📜 Citation
|
| 60 |
+
|
| 61 |
+
If you use this model or dataset, please cite:
|
| 62 |
+
|
| 63 |
+
> 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](https://doi.org/10.34740/KAGGLE/DS/3951043)
|
| 64 |
+
|
| 65 |
+
---
|
| 66 |
+
|
| 67 |
+
Beyond the Outliers
|
| 68 |
+
|
| 69 |
+
Datathon 2025
|