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 V16 config.json
Browse files- config.json +99 -57
config.json
CHANGED
|
@@ -2,34 +2,54 @@
|
|
| 2 |
"model_type": "densenet121",
|
| 3 |
"base_model": "densenet121",
|
| 4 |
"task": "image-classification",
|
| 5 |
-
"num_labels":
|
| 6 |
"id2label": {
|
| 7 |
-
"0": "
|
| 8 |
-
"1": "
|
| 9 |
-
"2": "
|
| 10 |
-
"3": "
|
| 11 |
-
"4": "
|
| 12 |
-
"5": "
|
|
|
|
|
|
|
| 13 |
},
|
| 14 |
"label2id": {
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
|
|
|
|
|
|
| 21 |
},
|
| 22 |
-
"input_shape": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
"preprocessing": {
|
| 24 |
"mode": "densenet_preprocess_input",
|
| 25 |
-
"mean": [
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
},
|
| 29 |
"training_info": {
|
| 30 |
-
"dataset_source": "
|
| 31 |
-
"dataset_size":
|
| 32 |
-
"split_ratio": [
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
"split_seed": 42,
|
| 34 |
"phases": [
|
| 35 |
{
|
|
@@ -38,9 +58,9 @@
|
|
| 38 |
"lr": 0.001,
|
| 39 |
"epochs_max": 25,
|
| 40 |
"epochs_actual": 1,
|
| 41 |
-
"val_accuracy": 0.
|
| 42 |
-
"val_loss": 1.
|
| 43 |
-
"train_accuracy": 0.
|
| 44 |
"cutmix_mixup": true,
|
| 45 |
"label_smoothing": 0.1,
|
| 46 |
"early_stop_reason": "myCallback val_acc >= 0.85"
|
|
@@ -51,67 +71,89 @@
|
|
| 51 |
"lr": 0.0003,
|
| 52 |
"epochs_max": 50,
|
| 53 |
"epochs_actual": 6,
|
| 54 |
-
"val_accuracy": 0.
|
| 55 |
-
"val_loss": 0.
|
| 56 |
-
"train_accuracy": 0.
|
| 57 |
"unfreeze": "conv4_block+conv5_block (BN frozen)",
|
| 58 |
-
"discriminative_lr": {
|
|
|
|
|
|
|
| 59 |
"cutmix_mixup": false,
|
| 60 |
"label_smoothing": 0.05,
|
| 61 |
"early_stop_reason": "myCallback val_acc >= 0.92"
|
| 62 |
},
|
| 63 |
{
|
| 64 |
"name": "SWA Post-Training",
|
| 65 |
-
"epochs":
|
| 66 |
"lr": 0.0001,
|
| 67 |
"bn_update": true,
|
| 68 |
"bn_update_steps": 100,
|
| 69 |
-
"val_accuracy": 0.
|
| 70 |
-
"val_loss": 0.
|
| 71 |
"method": "Izmailov et al., UAI 2018"
|
| 72 |
}
|
| 73 |
],
|
| 74 |
"metrics": {
|
| 75 |
-
"train_accuracy": 0.
|
| 76 |
-
"val_accuracy": 0.
|
| 77 |
-
"test_accuracy": 0.
|
| 78 |
-
"test_loss": 0.
|
| 79 |
-
"tta_accuracy": 0.
|
| 80 |
-
"overfitting_gap": 0.
|
| 81 |
-
"test_correct":
|
| 82 |
-
"test_total":
|
| 83 |
-
"macro_precision": 0.
|
| 84 |
-
"macro_recall": 0.
|
| 85 |
-
"macro_f1": 0.
|
| 86 |
"per_class_f1": {
|
| 87 |
-
"
|
| 88 |
-
"
|
| 89 |
-
"
|
| 90 |
-
"
|
| 91 |
-
"
|
| 92 |
-
"
|
|
|
|
|
|
|
| 93 |
},
|
| 94 |
"per_class_recall": {
|
| 95 |
-
"
|
|
|
|
| 96 |
"castle": 0.9821,
|
| 97 |
"mosque": 0.9821,
|
| 98 |
-
"skyscraper": 0.
|
| 99 |
-
"stadium": 0.
|
| 100 |
-
"temple": 0.
|
|
|
|
| 101 |
},
|
| 102 |
"checkpoint_comparison": {
|
| 103 |
-
"best_phase2_swa": {
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
}
|
| 109 |
},
|
| 110 |
-
"version": "
|
| 111 |
"license": "apache-2.0",
|
| 112 |
"github": "https://github.com/arcxteam/arch-building-classifier",
|
| 113 |
"author": {
|
| 114 |
"name": "Saugani",
|
| 115 |
"email": "team@greyscope.xyz"
|
| 116 |
}
|
| 117 |
-
}
|
|
|
|
| 2 |
"model_type": "densenet121",
|
| 3 |
"base_model": "densenet121",
|
| 4 |
"task": "image-classification",
|
| 5 |
+
"num_labels": 8,
|
| 6 |
"id2label": {
|
| 7 |
+
"0": "barn",
|
| 8 |
+
"1": "bridge",
|
| 9 |
+
"2": "castle",
|
| 10 |
+
"3": "mosque",
|
| 11 |
+
"4": "skyscraper",
|
| 12 |
+
"5": "stadium",
|
| 13 |
+
"6": "temple",
|
| 14 |
+
"7": "windmill"
|
| 15 |
},
|
| 16 |
"label2id": {
|
| 17 |
+
"barn": 0,
|
| 18 |
+
"bridge": 1,
|
| 19 |
+
"castle": 2,
|
| 20 |
+
"mosque": 3,
|
| 21 |
+
"skyscraper": 4,
|
| 22 |
+
"stadium": 5,
|
| 23 |
+
"temple": 6,
|
| 24 |
+
"windmill": 7
|
| 25 |
},
|
| 26 |
+
"input_shape": [
|
| 27 |
+
320,
|
| 28 |
+
320,
|
| 29 |
+
3
|
| 30 |
+
],
|
| 31 |
"preprocessing": {
|
| 32 |
"mode": "densenet_preprocess_input",
|
| 33 |
+
"mean": [
|
| 34 |
+
123.675,
|
| 35 |
+
116.28,
|
| 36 |
+
103.53
|
| 37 |
+
],
|
| 38 |
+
"std": [
|
| 39 |
+
58.395,
|
| 40 |
+
57.12,
|
| 41 |
+
57.375
|
| 42 |
+
],
|
| 43 |
+
"channel_order": "RGB"
|
| 44 |
},
|
| 45 |
"training_info": {
|
| 46 |
+
"dataset_source": "World Architectural Buildings (13440 images, 8 classes, balanced)",
|
| 47 |
+
"dataset_size": 13440,
|
| 48 |
+
"split_ratio": [
|
| 49 |
+
0.8,
|
| 50 |
+
0.1,
|
| 51 |
+
0.1
|
| 52 |
+
],
|
| 53 |
"split_seed": 42,
|
| 54 |
"phases": [
|
| 55 |
{
|
|
|
|
| 58 |
"lr": 0.001,
|
| 59 |
"epochs_max": 25,
|
| 60 |
"epochs_actual": 1,
|
| 61 |
+
"val_accuracy": 0.8921,
|
| 62 |
+
"val_loss": 1.2231,
|
| 63 |
+
"train_accuracy": 0.5318,
|
| 64 |
"cutmix_mixup": true,
|
| 65 |
"label_smoothing": 0.1,
|
| 66 |
"early_stop_reason": "myCallback val_acc >= 0.85"
|
|
|
|
| 71 |
"lr": 0.0003,
|
| 72 |
"epochs_max": 50,
|
| 73 |
"epochs_actual": 6,
|
| 74 |
+
"val_accuracy": 0.9204,
|
| 75 |
+
"val_loss": 0.6171,
|
| 76 |
+
"train_accuracy": 0.911,
|
| 77 |
"unfreeze": "conv4_block+conv5_block (BN frozen)",
|
| 78 |
+
"discriminative_lr": {
|
| 79 |
+
"conv4_block": 0.1
|
| 80 |
+
},
|
| 81 |
"cutmix_mixup": false,
|
| 82 |
"label_smoothing": 0.05,
|
| 83 |
"early_stop_reason": "myCallback val_acc >= 0.92"
|
| 84 |
},
|
| 85 |
{
|
| 86 |
"name": "SWA Post-Training",
|
| 87 |
+
"epochs": 10,
|
| 88 |
"lr": 0.0001,
|
| 89 |
"bn_update": true,
|
| 90 |
"bn_update_steps": 100,
|
| 91 |
+
"val_accuracy": 0.9658,
|
| 92 |
+
"val_loss": 0.4256,
|
| 93 |
"method": "Izmailov et al., UAI 2018"
|
| 94 |
}
|
| 95 |
],
|
| 96 |
"metrics": {
|
| 97 |
+
"train_accuracy": 0.9988,
|
| 98 |
+
"val_accuracy": 0.9658,
|
| 99 |
+
"test_accuracy": 0.9688,
|
| 100 |
+
"test_loss": 0.4485,
|
| 101 |
+
"tta_accuracy": 0.968,
|
| 102 |
+
"overfitting_gap": 0.03,
|
| 103 |
+
"test_correct": 1302,
|
| 104 |
+
"test_total": 1344,
|
| 105 |
+
"macro_precision": 0.9691,
|
| 106 |
+
"macro_recall": 0.9688,
|
| 107 |
+
"macro_f1": 0.9687,
|
| 108 |
"per_class_f1": {
|
| 109 |
+
"barn": 0.9674,
|
| 110 |
+
"bridge": 0.9645,
|
| 111 |
+
"castle": 0.9735,
|
| 112 |
+
"mosque": 0.9735,
|
| 113 |
+
"skyscraper": 0.9794,
|
| 114 |
+
"stadium": 0.96,
|
| 115 |
+
"temple": 0.9668,
|
| 116 |
+
"windmill": 0.9647
|
| 117 |
},
|
| 118 |
"per_class_recall": {
|
| 119 |
+
"barn": 0.9702,
|
| 120 |
+
"bridge": 0.9702,
|
| 121 |
"castle": 0.9821,
|
| 122 |
"mosque": 0.9821,
|
| 123 |
+
"skyscraper": 0.9881,
|
| 124 |
+
"stadium": 0.9286,
|
| 125 |
+
"temple": 0.9524,
|
| 126 |
+
"windmill": 0.9762
|
| 127 |
},
|
| 128 |
"checkpoint_comparison": {
|
| 129 |
+
"best_phase2_swa": {
|
| 130 |
+
"val_accuracy": 0.9658,
|
| 131 |
+
"val_loss": 0.4256,
|
| 132 |
+
"rank": 1
|
| 133 |
+
},
|
| 134 |
+
"best_phase2": {
|
| 135 |
+
"val_accuracy": 0.9204,
|
| 136 |
+
"val_loss": 0.6171,
|
| 137 |
+
"rank": 2
|
| 138 |
+
},
|
| 139 |
+
"best_phase2_ema": {
|
| 140 |
+
"val_accuracy": 0.8936,
|
| 141 |
+
"val_loss": 0.8183,
|
| 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/arch-building-classifier",
|
| 155 |
"author": {
|
| 156 |
"name": "Saugani",
|
| 157 |
"email": "team@greyscope.xyz"
|
| 158 |
}
|
| 159 |
+
}
|