Skip to content

Model Parameters

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Layer (type) ┃ Output Shape ┃ Param # ┃ Connected to ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ │ text_input (InputLayer) │ (None) │ 0 │ - │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ text_vectorization │ (None, 16) │ 0 │ text_input[0][0] │ │ (TextVectorization) │ │ │ │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ image_input (InputLayer) │ (None, 224, 224, 3) │ 0 │ - │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ embedding (Embedding) │ (None, 16, 128) │ 1,280,000 │ text_vectorization[0][0] │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ image_augmentation │ (None, 224, 224, 3) │ 0 │ image_input[0][0] │ │ (Sequential) │ │ │ │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ global_average_pooling1d │ (None, 128) │ 0 │ embedding[0][0] │ │ (GlobalAveragePooling1D) │ │ │ │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ xception (Functional) │ (None, 2048) │ 20,861,480 │ image_augmentation[0][0] │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ dense_1 (Dense) │ (None, 256) │ 131,328 │ dropout[0][0] │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ dropout_1 (Dropout) │ (None, 256) │ 0 │ dense_1[0][0] │ ├───────────────────────────────┼───────────────────────────┼─────────────────┼────────────────────────────┤ │ output (Dense) │ (None, 27) │ 6,939 │ dropout_1[0][0] │ └───────────────────────────────┴───────────────────────────┴─────────────────┴────────────────────────────┘

Class weights:

Class 0: 1.0112 Class 1: 0.6619 Class 2: 1.8697 Class 3: 0.6458 Class 4: 1.1400 Class 5: 0.6303 Class 6: 1.2143 Class 7: 0.6197 Class 8: 1.5213 Class 9: 0.7312 Class 10: 0.6587 Class 11: 1.1784 Class 12: 0.3079 Class 13: 4.1158 Class 14: 0.6231 Class 15: 2.2117 Class 16: 0.7953 Class 17: 0.6298 Class 18: 1.2542 Class 19: 3.7759 Class 20: 0.9698 Class 21: 1.2618 Class 22: 3.8160 Class 23: 3.6079 Class 24: 1.2593 Class 25: 3.9170 Class 26: 3.8928

10 Epochs training (graph only for epoch 9 & 10 due to crash):

![Training_History](figures/dnn_xception_marius_2.0 (epoch 9-10).png)

Classification Report

          precision    recall  f1-score   support

       0     0.3978    0.4598    0.4265       622
       1     0.7466    0.6358    0.6868       950
       2     0.6601    0.6994    0.6792       336
       3     0.7555    0.5272    0.6211       973
       4     0.5584    0.7971    0.6567       552
       5     0.9632    0.8387    0.8966       998
       6     0.5334    0.7703    0.6303       518
       7     0.8097    0.7754    0.7921      1015
       8     0.3965    0.3801    0.3881       413
       9     0.8911    0.8756    0.8833       860
      10     0.7946    0.6488    0.7144       954
      11     0.6649    0.7210    0.6918       534
      12     0.9668    0.9133    0.9393      2042
      13     0.3088    0.6863    0.4260       153
      14     0.9315    0.9158    0.9235      1009
      15     0.5958    0.7993    0.6827       284
      16     0.9399    0.8900    0.9143       791
      17     0.8673    0.6092    0.7157       998
      18     0.5983    0.6866    0.6394       501
      19     0.8621    0.7530    0.8039       166
      20     0.6382    0.7623    0.6948       648
      21     0.6818    0.7831    0.7290       498
      22     0.6805    0.6970    0.6886       165
      23     0.9144    0.9828    0.9474       174
      24     0.6422    0.7194    0.6786       499
      25     0.6471    0.8199    0.7233       161
      26     0.9119    0.9006    0.9062       161

accuracy                         0.7495     16975

macro avg 0.7170 0.7425 0.7215 16975 weighted avg 0.7719 0.7495 0.7542 16975

True and predicted values

   count_true  count_pred

label 0 622 719 1 950 809 2 336 356 3 973 679 4 552 788 5 998 869 6 518 748 7 1015 972 8 413 396 9 860 845 10 954 779 11 534 579 12 2042 1929 13 153 340 14 1009 992 15 284 381 16 791 749 17 998 701 18 501 575 19 166 145 20 648 774 21 498 572 22 165 169 23 174 187 24 499 559 25 161 204 26 161 159

Confusion Matrix

Confusion_Matrix