Commit ·
2a6fc3d
1
Parent(s): 5d075b4
Upload model
Browse files- README.md +47 -0
- idx2disease.json +41 -0
- model.bin +3 -0
- requirements.txt +4 -0
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Model card for convnextv2_tiny.ft_plantdoc_384
|
| 2 |
+
## Overview
|
| 3 |
+
This model classifies diseases from plant images.
|
| 4 |
+
|
| 5 |
+
- Dataset size: 8000 images
|
| 6 |
+
- Number of classes: 39
|
| 7 |
+
- Architecture: ConvNeXtV2 Tiny (384)
|
| 8 |
+
|
| 9 |
+
## Metrics
|
| 10 |
+
- mAP: **0.94**
|
| 11 |
+
- Accuracy: **0.86**
|
| 12 |
+
|
| 13 |
+
## Model
|
| 14 |
+
|
| 15 |
+
## Model Details
|
| 16 |
+
- **Model Type:** Image classification
|
| 17 |
+
- **Backbone:** convnextv2_tiny.fcmae_ft_in22k_in1k_384
|
| 18 |
+
- **Model Stats:**
|
| 19 |
+
- Params (M): 28.6
|
| 20 |
+
- GMACs: 13.1
|
| 21 |
+
- Activations (M): 39.5
|
| 22 |
+
- Image size: 384 x 384
|
| 23 |
+
- **Papers:**
|
| 24 |
+
- ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders: https://arxiv.org/abs/2301.00808
|
| 25 |
+
- **Original:** https://github.com/facebookresearch/ConvNeXt-V2
|
| 26 |
+
- **Dataset:** PlantDoc (8000 images)
|
| 27 |
+
- **Pretrain Dataset:** ImageNet-1k
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
## Model Usage
|
| 31 |
+
Built with:
|
| 32 |
+
```python
|
| 33 |
+
import torch
|
| 34 |
+
import timm
|
| 35 |
+
|
| 36 |
+
# create model
|
| 37 |
+
model = timm.create_model(
|
| 38 |
+
"convnextv2_tiny.fcmae_ft_in22k_in1k_384",
|
| 39 |
+
pretrained=False,
|
| 40 |
+
num_classes=39,
|
| 41 |
+
)
|
| 42 |
+
|
| 43 |
+
# load weights
|
| 44 |
+
state_dict = torch.load("model.bin", map_location="cpu")
|
| 45 |
+
model.load_state_dict(state_dict)
|
| 46 |
+
```
|
| 47 |
+
|
idx2disease.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"0": "alternaria leaf spot",
|
| 3 |
+
"1": "angular leaf spot",
|
| 4 |
+
"2": "anthracnose",
|
| 5 |
+
"3": "bacterial leaf spot",
|
| 6 |
+
"4": "bacterial leaf streak (black chaff)",
|
| 7 |
+
"5": "bacterial wilt",
|
| 8 |
+
"6": "berry blotch",
|
| 9 |
+
"7": "black leaf streak",
|
| 10 |
+
"8": "black rot",
|
| 11 |
+
"9": "blossom end rot",
|
| 12 |
+
"10": "brown rot",
|
| 13 |
+
"11": "brown spot",
|
| 14 |
+
"12": "bunchy top",
|
| 15 |
+
"13": "canker",
|
| 16 |
+
"14": "downy mildew",
|
| 17 |
+
"15": "early blight",
|
| 18 |
+
"16": "frog eye leaf spot",
|
| 19 |
+
"17": "gray leaf spot",
|
| 20 |
+
"18": "greening disease",
|
| 21 |
+
"19": "head scab",
|
| 22 |
+
"20": "late blight",
|
| 23 |
+
"21": "leaf curl",
|
| 24 |
+
"22": "leaf mold",
|
| 25 |
+
"23": "leaf rust",
|
| 26 |
+
"24": "leaf spot",
|
| 27 |
+
"25": "loose smut",
|
| 28 |
+
"26": "mosaic",
|
| 29 |
+
"27": "mosaic virus",
|
| 30 |
+
"28": "northern leaf blight",
|
| 31 |
+
"29": "powdery mildew",
|
| 32 |
+
"30": "rust",
|
| 33 |
+
"31": "scab",
|
| 34 |
+
"32": "septoria blotch",
|
| 35 |
+
"33": "septoria leaf spot",
|
| 36 |
+
"34": "sheath blight",
|
| 37 |
+
"35": "smut",
|
| 38 |
+
"36": "stem rust",
|
| 39 |
+
"37": "stripe rust",
|
| 40 |
+
"38": "tar spot"
|
| 41 |
+
}
|
model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ea45f07e42a8e7f1caa4a700250e9f79a56ff3a9c3ba4188ec596cef42d62b0
|
| 3 |
+
size 111648787
|
requirements.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
torch
|
| 2 |
+
torchvision
|
| 3 |
+
timm
|
| 4 |
+
pillow
|