File size: 1,130 Bytes
57076b9 7adccc2 5139084 7adccc2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ---
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. |