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 label_mapping.json
Browse files- label_mapping.json +71 -15
label_mapping.json
CHANGED
|
@@ -1,18 +1,74 @@
|
|
| 1 |
{
|
| 2 |
-
"
|
| 3 |
-
"
|
| 4 |
-
"
|
| 5 |
-
"
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
},
|
| 10 |
-
"
|
| 11 |
-
"
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
}
|
| 18 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"labels": [
|
| 3 |
+
"barn",
|
| 4 |
+
"bridge",
|
| 5 |
+
"castle",
|
| 6 |
+
"mosque",
|
| 7 |
+
"skyscraper",
|
| 8 |
+
"stadium",
|
| 9 |
+
"temple",
|
| 10 |
+
"windmill"
|
| 11 |
+
],
|
| 12 |
+
"num_classes": 8,
|
| 13 |
+
"label_to_idx": {
|
| 14 |
+
"barn": 0,
|
| 15 |
+
"bridge": 1,
|
| 16 |
+
"castle": 2,
|
| 17 |
+
"mosque": 3,
|
| 18 |
+
"skyscraper": 4,
|
| 19 |
+
"stadium": 5,
|
| 20 |
+
"temple": 6,
|
| 21 |
+
"windmill": 7
|
| 22 |
},
|
| 23 |
+
"idx_to_label": {
|
| 24 |
+
"0": "barn",
|
| 25 |
+
"1": "bridge",
|
| 26 |
+
"2": "castle",
|
| 27 |
+
"3": "mosque",
|
| 28 |
+
"4": "skyscraper",
|
| 29 |
+
"5": "stadium",
|
| 30 |
+
"6": "temple",
|
| 31 |
+
"7": "windmill"
|
| 32 |
+
},
|
| 33 |
+
"model_file": "best_phase2_swa.keras",
|
| 34 |
+
"input_shape": [
|
| 35 |
+
320,
|
| 36 |
+
320,
|
| 37 |
+
3
|
| 38 |
+
],
|
| 39 |
+
"preprocessing": "densenet121.preprocess_input",
|
| 40 |
+
"architecture": "DenseNet121(ImageNet,frozen_Ph1)+Conv2D(256,3x3,relu,same)+BN+MaxPooling2D(2,2)+GeMPooling(p=3.0,trainable)+Dense(256,relu)+BN+Dropout(0.4)+Dense(n_classes,softmax)",
|
| 41 |
+
"training": {
|
| 42 |
+
"phase1": {
|
| 43 |
+
"optimizer": "AdamW",
|
| 44 |
+
"lr": 0.001,
|
| 45 |
+
"weight_decay": 2e-05,
|
| 46 |
+
"warmup_epochs": 3,
|
| 47 |
+
"max_epochs": 25,
|
| 48 |
+
"es_patience": 7,
|
| 49 |
+
"augmentation": "Mixup+CutMix+standard",
|
| 50 |
+
"focal_loss_gamma": 2.0,
|
| 51 |
+
"label_smoothing": 0.1
|
| 52 |
+
},
|
| 53 |
+
"phase2": {
|
| 54 |
+
"optimizer": "DiscriminativeAdamW",
|
| 55 |
+
"lr": 0.0003,
|
| 56 |
+
"weight_decay": 2e-05,
|
| 57 |
+
"lr_multipliers": {
|
| 58 |
+
"conv4_block": 0.1
|
| 59 |
+
},
|
| 60 |
+
"warmup_epochs": 5,
|
| 61 |
+
"max_epochs": 50,
|
| 62 |
+
"es_patience": 12,
|
| 63 |
+
"augmentation": "standard_only",
|
| 64 |
+
"focal_loss_gamma": 2.0,
|
| 65 |
+
"label_smoothing": 0.05,
|
| 66 |
+
"unfreeze": "conv4_block+conv5_block (BN frozen)"
|
| 67 |
+
},
|
| 68 |
+
"swa": {
|
| 69 |
+
"epochs": 10,
|
| 70 |
+
"lr": 0.0001,
|
| 71 |
+
"bn_update_steps": 100
|
| 72 |
+
}
|
| 73 |
}
|
| 74 |
+
}
|