Image Classification
Keras
LiteRT
TF-Keras
Safetensors
English
efficientnetv2-s
efficientnetv2
fgic
transfer-learning
gem-pooling
focal-loss
swa
grad-cam
calibration
temperature-scaling
computer-vision
tensorflow.js
Eval Results (legacy)
Instructions to use 0xgr3y/Arch-Building-Image-Classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use 0xgr3y/Arch-Building-Image-Classification with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://0xgr3y/Arch-Building-Image-Classification") - Notebooks
- Google Colab
- Kaggle
Upload config.json with huggingface_hub
Browse files- config.json +59 -58
config.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
-
"model_type": "
|
| 3 |
-
"base_model": "
|
| 4 |
"task": "image-classification",
|
| 5 |
"num_labels": 8,
|
| 6 |
"id2label": {
|
|
@@ -29,21 +29,22 @@
|
|
| 29 |
3
|
| 30 |
],
|
| 31 |
"preprocessing": {
|
| 32 |
-
"mode": "
|
| 33 |
"mean": [
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
],
|
| 38 |
"std": [
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
],
|
|
|
|
| 43 |
"channel_order": "RGB"
|
| 44 |
},
|
| 45 |
"training_info": {
|
| 46 |
-
"dataset_source": "
|
| 47 |
"dataset_size": 13440,
|
| 48 |
"split_ratio": [
|
| 49 |
0.8,
|
|
@@ -53,30 +54,30 @@
|
|
| 53 |
"split_seed": 42,
|
| 54 |
"phases": [
|
| 55 |
{
|
| 56 |
-
"name": "
|
| 57 |
"optimizer": "AdamW",
|
| 58 |
"lr": 0.001,
|
| 59 |
"epochs_max": 25,
|
| 60 |
"epochs_actual": 1,
|
| 61 |
-
"val_accuracy": 0.
|
| 62 |
-
"val_loss": 1.
|
| 63 |
-
"train_accuracy": 0.
|
| 64 |
"cutmix_mixup": true,
|
| 65 |
"label_smoothing": 0.1,
|
| 66 |
"early_stop_reason": "myCallback val_acc >= 0.85"
|
| 67 |
},
|
| 68 |
{
|
| 69 |
-
"name": "
|
| 70 |
"optimizer": "DiscriminativeAdamW",
|
| 71 |
"lr": 0.0003,
|
| 72 |
"epochs_max": 50,
|
| 73 |
-
"epochs_actual":
|
| 74 |
-
"val_accuracy": 0.
|
| 75 |
-
"val_loss": 0.
|
| 76 |
-
"train_accuracy": 0.
|
| 77 |
-
"unfreeze": "
|
| 78 |
"discriminative_lr": {
|
| 79 |
-
"
|
| 80 |
},
|
| 81 |
"cutmix_mixup": false,
|
| 82 |
"label_smoothing": 0.05,
|
|
@@ -88,70 +89,70 @@
|
|
| 88 |
"lr": 0.0001,
|
| 89 |
"bn_update": true,
|
| 90 |
"bn_update_steps": 100,
|
| 91 |
-
"val_accuracy": 0.
|
| 92 |
-
"val_loss": 0.
|
| 93 |
"method": "Izmailov et al., UAI 2018"
|
| 94 |
}
|
| 95 |
],
|
| 96 |
"metrics": {
|
| 97 |
"train_accuracy": 0.9988,
|
| 98 |
-
"val_accuracy": 0.
|
| 99 |
-
"test_accuracy": 0.
|
| 100 |
-
"test_loss": 0.
|
| 101 |
-
"tta_accuracy": 0.
|
| 102 |
-
"overfitting_gap": 0.
|
| 103 |
-
"test_correct":
|
| 104 |
"test_total": 1344,
|
| 105 |
-
"macro_precision": 0.
|
| 106 |
-
"macro_recall": 0.
|
| 107 |
-
"macro_f1": 0.
|
| 108 |
"per_class_f1": {
|
| 109 |
-
"barn": 0.
|
| 110 |
-
"bridge": 0.
|
| 111 |
-
"castle": 0.
|
| 112 |
-
"mosque": 0.
|
| 113 |
-
"skyscraper": 0.
|
| 114 |
-
"stadium": 0.
|
| 115 |
"temple": 0.9668,
|
| 116 |
-
"windmill": 0.
|
| 117 |
},
|
| 118 |
"per_class_recall": {
|
| 119 |
"barn": 0.9702,
|
| 120 |
-
"bridge": 0.
|
| 121 |
"castle": 0.9821,
|
| 122 |
"mosque": 0.9821,
|
| 123 |
-
"skyscraper": 0.
|
| 124 |
-
"stadium": 0.
|
| 125 |
"temple": 0.9524,
|
| 126 |
-
"windmill": 0.
|
| 127 |
},
|
| 128 |
"checkpoint_comparison": {
|
| 129 |
-
"
|
| 130 |
-
"val_accuracy": 0.
|
| 131 |
-
"val_loss": 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
"rank": 1
|
| 133 |
},
|
| 134 |
-
"
|
| 135 |
-
"val_accuracy": 0.
|
| 136 |
-
"val_loss": 0.
|
| 137 |
"rank": 2
|
| 138 |
},
|
| 139 |
-
"
|
| 140 |
-
"val_accuracy": 0.
|
| 141 |
-
"val_loss":
|
| 142 |
"rank": 3
|
| 143 |
-
},
|
| 144 |
-
"best_phase1": {
|
| 145 |
-
"val_accuracy": 0.8921,
|
| 146 |
-
"val_loss": 1.2231,
|
| 147 |
-
"rank": 4
|
| 148 |
}
|
| 149 |
}
|
| 150 |
}
|
| 151 |
},
|
| 152 |
"version": "v6",
|
| 153 |
"license": "apache-2.0",
|
| 154 |
-
"github": "https://github.com/arcxteam/
|
| 155 |
"author": {
|
| 156 |
"name": "Saugani",
|
| 157 |
"email": "team@greyscope.xyz"
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_type": "efficientnet_v2_s",
|
| 3 |
+
"base_model": "efficientnet_v2_s",
|
| 4 |
"task": "image-classification",
|
| 5 |
"num_labels": 8,
|
| 6 |
"id2label": {
|
|
|
|
| 29 |
3
|
| 30 |
],
|
| 31 |
"preprocessing": {
|
| 32 |
+
"mode": "efficientnet_v2_preprocess_input",
|
| 33 |
"mean": [
|
| 34 |
+
0.0,
|
| 35 |
+
0.0,
|
| 36 |
+
0.0
|
| 37 |
],
|
| 38 |
"std": [
|
| 39 |
+
1.0,
|
| 40 |
+
1.0,
|
| 41 |
+
1.0
|
| 42 |
],
|
| 43 |
+
"note": "preprocess_input is identity in TF 2.12+; EfficientNetV2-S includes internal Rescaling layer. Input expects raw [0, 255] float32.",
|
| 44 |
"channel_order": "RGB"
|
| 45 |
},
|
| 46 |
"training_info": {
|
| 47 |
+
"dataset_source": "Pexels Architectural Buildings (13440 images, 8 classes, balanced)",
|
| 48 |
"dataset_size": 13440,
|
| 49 |
"split_ratio": [
|
| 50 |
0.8,
|
|
|
|
| 54 |
"split_seed": 42,
|
| 55 |
"phases": [
|
| 56 |
{
|
| 57 |
+
"name": "Fase 1 - Feature Extraction (Head)",
|
| 58 |
"optimizer": "AdamW",
|
| 59 |
"lr": 0.001,
|
| 60 |
"epochs_max": 25,
|
| 61 |
"epochs_actual": 1,
|
| 62 |
+
"val_accuracy": 0.9234,
|
| 63 |
+
"val_loss": 1.0109,
|
| 64 |
+
"train_accuracy": 0.5696,
|
| 65 |
"cutmix_mixup": true,
|
| 66 |
"label_smoothing": 0.1,
|
| 67 |
"early_stop_reason": "myCallback val_acc >= 0.85"
|
| 68 |
},
|
| 69 |
{
|
| 70 |
+
"name": "Fase 2 - Selective Fine-Tuning",
|
| 71 |
"optimizer": "DiscriminativeAdamW",
|
| 72 |
"lr": 0.0003,
|
| 73 |
"epochs_max": 50,
|
| 74 |
+
"epochs_actual": 1,
|
| 75 |
+
"val_accuracy": 0.9628,
|
| 76 |
+
"val_loss": 0.5655,
|
| 77 |
+
"train_accuracy": 0.8496,
|
| 78 |
+
"unfreeze": "block6+top_conv (BN frozen)",
|
| 79 |
"discriminative_lr": {
|
| 80 |
+
"block6": 0.1
|
| 81 |
},
|
| 82 |
"cutmix_mixup": false,
|
| 83 |
"label_smoothing": 0.05,
|
|
|
|
| 89 |
"lr": 0.0001,
|
| 90 |
"bn_update": true,
|
| 91 |
"bn_update_steps": 100,
|
| 92 |
+
"val_accuracy": 0.9836,
|
| 93 |
+
"val_loss": 0.4109,
|
| 94 |
"method": "Izmailov et al., UAI 2018"
|
| 95 |
}
|
| 96 |
],
|
| 97 |
"metrics": {
|
| 98 |
"train_accuracy": 0.9988,
|
| 99 |
+
"val_accuracy": 0.9836,
|
| 100 |
+
"test_accuracy": 0.9777,
|
| 101 |
+
"test_loss": 0.4262,
|
| 102 |
+
"tta_accuracy": 0.9799,
|
| 103 |
+
"overfitting_gap": 0.0211,
|
| 104 |
+
"test_correct": 1314,
|
| 105 |
"test_total": 1344,
|
| 106 |
+
"macro_precision": 0.9777,
|
| 107 |
+
"macro_recall": 0.9777,
|
| 108 |
+
"macro_f1": 0.9777,
|
| 109 |
"per_class_f1": {
|
| 110 |
+
"barn": 0.9731,
|
| 111 |
+
"bridge": 0.9676,
|
| 112 |
+
"castle": 0.9792,
|
| 113 |
+
"mosque": 0.9792,
|
| 114 |
+
"skyscraper": 0.994,
|
| 115 |
+
"stadium": 0.9791,
|
| 116 |
"temple": 0.9668,
|
| 117 |
+
"windmill": 0.9822
|
| 118 |
},
|
| 119 |
"per_class_recall": {
|
| 120 |
"barn": 0.9702,
|
| 121 |
+
"bridge": 0.9762,
|
| 122 |
"castle": 0.9821,
|
| 123 |
"mosque": 0.9821,
|
| 124 |
+
"skyscraper": 0.994,
|
| 125 |
+
"stadium": 0.9762,
|
| 126 |
"temple": 0.9524,
|
| 127 |
+
"windmill": 0.9881
|
| 128 |
},
|
| 129 |
"checkpoint_comparison": {
|
| 130 |
+
"fine_tuning_swa": {
|
| 131 |
+
"val_accuracy": 0.9836,
|
| 132 |
+
"val_loss": 0.4109,
|
| 133 |
+
"rank": 0
|
| 134 |
+
},
|
| 135 |
+
"fine_tuning": {
|
| 136 |
+
"val_accuracy": 0.9628,
|
| 137 |
+
"val_loss": 0.5655,
|
| 138 |
"rank": 1
|
| 139 |
},
|
| 140 |
+
"fine_tuning_ema": {
|
| 141 |
+
"val_accuracy": 0.9353,
|
| 142 |
+
"val_loss": 0.6007,
|
| 143 |
"rank": 2
|
| 144 |
},
|
| 145 |
+
"head_training": {
|
| 146 |
+
"val_accuracy": 0.9234,
|
| 147 |
+
"val_loss": 1.0109,
|
| 148 |
"rank": 3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
}
|
| 150 |
}
|
| 151 |
}
|
| 152 |
},
|
| 153 |
"version": "v6",
|
| 154 |
"license": "apache-2.0",
|
| 155 |
+
"github": "https://github.com/arcxteam/building-architectural-image-classifier",
|
| 156 |
"author": {
|
| 157 |
"name": "Saugani",
|
| 158 |
"email": "team@greyscope.xyz"
|