Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
# EfficientNet-B0 Fruit & Vegetable Classifier ππ₯π½
|
| 3 |
|
|
@@ -7,17 +21,17 @@ It is trained on the [Fruit and Vegetable Image Recognition dataset](https://www
|
|
| 7 |
---
|
| 8 |
|
| 9 |
## π Dataset Statistics
|
| 10 |
-
- Training Images:
|
| 11 |
-
- Validation Images:
|
| 12 |
-
- Test Images:
|
| 13 |
-
- Classes:
|
| 14 |
|
| 15 |
---
|
| 16 |
|
| 17 |
## π Results
|
| 18 |
-
- Final Training Accuracy:
|
| 19 |
-
- Final Validation Accuracy:
|
| 20 |
-
- Final Test Accuracy:
|
| 21 |
|
| 22 |
---
|
| 23 |
|
|
@@ -31,7 +45,7 @@ model = models.efficientnet_b0(pretrained=False)
|
|
| 31 |
num_features = model.classifier[1].in_features
|
| 32 |
model.classifier = torch.nn.Sequential(
|
| 33 |
torch.nn.Dropout(0.3),
|
| 34 |
-
torch.nn.Linear(num_features,
|
| 35 |
)
|
| 36 |
|
| 37 |
# Load weights
|
|
|
|
| 1 |
+
readme_text = f"""
|
| 2 |
+
---
|
| 3 |
+
language: en
|
| 4 |
+
library_name: pytorch
|
| 5 |
+
tags:
|
| 6 |
+
- image-classification
|
| 7 |
+
- efficientnet
|
| 8 |
+
- fruits
|
| 9 |
+
- vegetables
|
| 10 |
+
datasets:
|
| 11 |
+
- kritikseth/fruit-and-vegetable-image-recognition
|
| 12 |
+
license: mit
|
| 13 |
+
pipeline_tag: image-classification
|
| 14 |
+
---
|
| 15 |
|
| 16 |
# EfficientNet-B0 Fruit & Vegetable Classifier ππ₯π½
|
| 17 |
|
|
|
|
| 21 |
---
|
| 22 |
|
| 23 |
## π Dataset Statistics
|
| 24 |
+
- Training Images: {len(train_dataset)}
|
| 25 |
+
- Validation Images: {len(val_dataset)}
|
| 26 |
+
- Test Images: {len(test_dataset)}
|
| 27 |
+
- Classes: {len(class_names)} β {class_names}
|
| 28 |
|
| 29 |
---
|
| 30 |
|
| 31 |
## π Results
|
| 32 |
+
- Final Training Accuracy: {train_acc:.2f}%
|
| 33 |
+
- Final Validation Accuracy: {val_acc:.2f}%
|
| 34 |
+
- Final Test Accuracy: {test_acc:.2f}%
|
| 35 |
|
| 36 |
---
|
| 37 |
|
|
|
|
| 45 |
num_features = model.classifier[1].in_features
|
| 46 |
model.classifier = torch.nn.Sequential(
|
| 47 |
torch.nn.Dropout(0.3),
|
| 48 |
+
torch.nn.Linear(num_features, {len(class_names)})
|
| 49 |
)
|
| 50 |
|
| 51 |
# Load weights
|