File size: 2,977 Bytes
ea35a17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Configuration Template — Arch-Building-Image-Classification
# File ini untuk referensi dokumentasi hyperparameter.
# File ini dapat diintegrasikan di masa depan untuk modular pipeline.

dataset:
  source: huggingface
  repo_id: 0xgr3y/arch-building-dataset
  num_classes: 8
  labels: [barn, bridge, castle, mosque, skyscraper, stadium, temple, windmill]
  total_images: 13440
  images_per_class: 1680
  split_ratio: [0.8, 0.1, 0.1]
  split_seed: 42
  input_shape: [320, 320, 3]
  batch_size: 32

augmentation:
  rotation_range: 15
  width_shift_range: 0.1
  height_shift_range: 0.1
  shear_range: 0.1
  zoom_range: 0.20
  brightness_range: [0.75, 1.15]
  channel_shift_range: 10.0
  horizontal_flip: true
  fill_mode: nearest
  mixup_alpha: 0.2
  cutmix_alpha: 1.0
  mixup_cutmix_prob: 0.5
  random_erasing:
    p: 0.5
    area_range: [0.02, 0.15]
    aspect_ratio: [0.3, 3.3]

architecture:
  backbone: efficientnetv2-s
  weights: imagenet
  include_top: false
  custom_head:
    conv2d_filters: 256
    conv2d_kernel: [3, 3]
    conv2d_activation: relu
    maxpool_size: [2, 2]
    gem_pooling:
      p_init: 3.0
      eps: 1.0e-6
    dense_units: 256
    dense_activation: relu
    dropout_rate: 0.4
    output_activation: softmax
    output_dtype: float32

training:
  phase1:
    name: head_training
    epochs_max: 25
    learning_rate: 0.001
    warmup_epochs: 3
    early_stopping_patience: 5
    optimizer: adamw
    weight_decay: 2.0e-5
    loss: focal
    focal_gamma: 2.0
    label_smoothing: 0.1
    use_mixup_cutmix: true
    use_ema: true
    ema_decay: 0.999
  phase2:
    name: selective_fine_tuning
    epochs_max: 50
    learning_rate: 0.0003
    warmup_epochs: 5
    early_stopping_patience: 3
    optimizer: discriminative_adamw
    weight_decay: 2.0e-5
    loss: focal
    focal_gamma: 2.0
    label_smoothing: 0.05
    use_mixup_cutmix: false
    use_ema: true
    ema_decay: 0.999
    unfreeze: [block6, top_conv]
    freeze_bn: true
    lr_multipliers:
      block6: 0.1
  swa:
    epochs: 10
    learning_rate: 0.0001
    bn_update_steps: 100
    optimizer: adamw

reproducibility:
  seed: 42
  enable_op_determinism: false  # disabled — slows training 5-10x
  mixed_precision: disabled  # float32 chosen for reproducibility
  python_version: "3.12.13"
  tensorflow_version: "2.19.0"
  keras_version: "3.13.2"
  cuda_version: "12.5.1"
  cudnn_version: "9.x"
  tf_use_legacy_keras: "0"

export:
  formats:
    - keras_compile_false
    - weights_h5
    - safetensors
    - saved_model
    - tflite
    - tfjs
  build_script: build_model.py

deployment:
  hf_model_repo: 0xgr3y/Arch-Building-Image-Classification
  hf_space_repo: 0xgr3y/arch-building-classifier
  hf_dataset_repo: 0xgr3y/arch-building-dataset
  space_inference_format: tflite
  space_inference_ms: 197.8
  github: https://github.com/arcxteam/building-architectural-image-classifier
  license_code: MIT
  license_model: apache-2.0
  license_dataset: cc-by-4.0
  public_version: v6