|
|
--- |
|
|
license: apache-2.0 |
|
|
language: |
|
|
- en |
|
|
metrics: |
|
|
- accuracy |
|
|
- f1 |
|
|
- precision |
|
|
--- |
|
|
Dataset: https://www.kaggle.com/datasets/jarricgentletail/mobilenetv3-preprocessed-orange-disease-fruit-dset |
|
|
|
|
|
Download model and to run use the following code: |
|
|
```Python |
|
|
torch.serialization.add_safe_globals([MobileNetV3]) |
|
|
torch.serialization.add_safe_globals([Sequential]) |
|
|
torch.serialization.add_safe_globals([Conv2dNormActivation]) |
|
|
torch.serialization.add_safe_globals([Conv2d]) |
|
|
torch.serialization.add_safe_globals([BatchNorm2d]) |
|
|
torch.serialization.add_safe_globals([Hardswish]) |
|
|
torch.serialization.add_safe_globals([InvertedResidual]) |
|
|
torch.serialization.add_safe_globals([ReLU]) |
|
|
torch.serialization.add_safe_globals([SqueezeExcitation]) |
|
|
torch.serialization.add_safe_globals([AdaptiveAvgPool2d]) |
|
|
torch.serialization.add_safe_globals([Hardsigmoid]) |
|
|
torch.serialization.add_safe_globals([Linear]) |
|
|
torch.serialization.add_safe_globals([Dropout]) |
|
|
|
|
|
mobilenetv3 = torch.load("<target_path>") |
|
|
``` |
|
|
|
|
|
I kept saving whole class instead of just the state dict. |
|
|
The model was finetuned, based on IMAGENETV1 dataset. I just finetuned the classification head. |