ironchanchellor commited on
Commit
f2252cc
1 Parent(s): 352207f

segformer-b0-finetuned-metallography_DsB

Browse files
Files changed (4) hide show
  1. README.md +121 -0
  2. config.json +86 -0
  3. pytorch_model.bin +3 -0
  4. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: nvidia/mit-b0
4
+ tags:
5
+ - generated_from_trainer
6
+ model-index:
7
+ - name: segformer-b0-finetuned-metallography_DsB
8
+ results: []
9
+ ---
10
+
11
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
12
+ should probably proofread and complete it, then remove this comment. -->
13
+
14
+ # segformer-b0-finetuned-metallography_DsB
15
+
16
+ This model is a fine-tuned version of [nvidia/mit-b0](https://huggingface.co/nvidia/mit-b0) on an unknown dataset.
17
+ It achieves the following results on the evaluation set:
18
+ - Loss: 0.0162
19
+ - Mean Iou: 0.7889
20
+ - Mean Accuracy: 0.9743
21
+ - Overall Accuracy: 0.9937
22
+ - Accuracy Background: nan
23
+ - Accuracy Haz: 0.9934
24
+ - Accuracy Matrix: 0.9859
25
+ - Accuracy Porosity: 0.9183
26
+ - Accuracy Carbides: 0.9759
27
+ - Accuracy Substrate: 0.9981
28
+ - Iou Background: 0.0
29
+ - Iou Haz: 0.9909
30
+ - Iou Matrix: 0.9758
31
+ - Iou Porosity: 0.8239
32
+ - Iou Carbides: 0.9504
33
+ - Iou Substrate: 0.9926
34
+
35
+ ## Model description
36
+
37
+ More information needed
38
+
39
+ ## Intended uses & limitations
40
+
41
+ More information needed
42
+
43
+ ## Training and evaluation data
44
+
45
+ More information needed
46
+
47
+ ## Training procedure
48
+
49
+ ### Training hyperparameters
50
+
51
+ The following hyperparameters were used during training:
52
+ - learning_rate: 6e-05
53
+ - train_batch_size: 2
54
+ - eval_batch_size: 2
55
+ - seed: 42
56
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
57
+ - lr_scheduler_type: linear
58
+ - num_epochs: 50
59
+
60
+ ### Training results
61
+
62
+ | Training Loss | Epoch | Step | Validation Loss | Mean Iou | Mean Accuracy | Overall Accuracy | Accuracy Background | Accuracy Haz | Accuracy Matrix | Accuracy Porosity | Accuracy Carbides | Accuracy Substrate | Iou Background | Iou Haz | Iou Matrix | Iou Porosity | Iou Carbides | Iou Substrate |
63
+ |:-------------:|:-----:|:-----:|:---------------:|:--------:|:-------------:|:----------------:|:-------------------:|:------------:|:---------------:|:-----------------:|:-----------------:|:------------------:|:--------------:|:-------:|:----------:|:------------:|:------------:|:-------------:|
64
+ | 1.1925 | 1.0 | 350 | 0.2093 | 0.5751 | 0.7355 | 0.9228 | nan | 0.8617 | 0.9887 | 0.0 | 0.8605 | 0.9668 | 0.0 | 0.8289 | 0.9133 | 0.0 | 0.8400 | 0.8683 |
65
+ | 0.3065 | 2.0 | 700 | 0.1070 | 0.6106 | 0.7607 | 0.9570 | nan | 0.9158 | 0.9711 | 0.0 | 0.9221 | 0.9945 | 0.0 | 0.9053 | 0.9400 | 0.0 | 0.8907 | 0.9276 |
66
+ | 0.1839 | 3.0 | 1050 | 0.0717 | 0.6284 | 0.7777 | 0.9747 | nan | 0.9737 | 0.9668 | 0.0 | 0.9676 | 0.9802 | 0.0 | 0.9488 | 0.9513 | 0.0 | 0.9116 | 0.9590 |
67
+ | 1.0057 | 4.0 | 1400 | 0.0470 | 0.6322 | 0.7765 | 0.9783 | nan | 0.9889 | 0.9718 | 0.0 | 0.9460 | 0.9761 | 0.0 | 0.9580 | 0.9493 | 0.0 | 0.9193 | 0.9669 |
68
+ | 1.3313 | 5.0 | 1750 | 0.0360 | 0.6338 | 0.7751 | 0.9839 | nan | 0.9825 | 0.9861 | 0.0 | 0.9128 | 0.9940 | 0.0 | 0.9737 | 0.9478 | 0.0 | 0.9015 | 0.9799 |
69
+ | 0.1398 | 6.0 | 2100 | 0.0333 | 0.6407 | 0.7849 | 0.9853 | nan | 0.9943 | 0.9782 | 0.0 | 0.9689 | 0.9830 | 0.0 | 0.9743 | 0.9623 | 0.0 | 0.9290 | 0.9787 |
70
+ | 0.4763 | 7.0 | 2450 | 0.0941 | 0.6520 | 0.8054 | 0.9710 | nan | 0.9435 | 0.9745 | 0.1384 | 0.9757 | 0.9950 | 0.0 | 0.9367 | 0.9622 | 0.1384 | 0.9258 | 0.9486 |
71
+ | 0.074 | 8.0 | 2800 | 0.0373 | 0.7154 | 0.8725 | 0.9848 | nan | 0.9877 | 0.9841 | 0.4466 | 0.9577 | 0.9864 | 0.0 | 0.9711 | 0.9646 | 0.4466 | 0.9339 | 0.9760 |
72
+ | 0.0637 | 9.0 | 3150 | 0.0239 | 0.7358 | 0.8946 | 0.9885 | nan | 0.9867 | 0.9907 | 0.5610 | 0.9388 | 0.9956 | 0.0 | 0.9815 | 0.9631 | 0.5591 | 0.9258 | 0.9851 |
73
+ | 0.0402 | 10.0 | 3500 | 0.0295 | 0.7462 | 0.9085 | 0.9865 | nan | 0.9774 | 0.9872 | 0.6256 | 0.9541 | 0.9982 | 0.0 | 0.9752 | 0.9662 | 0.6232 | 0.9333 | 0.9796 |
74
+ | 1.069 | 11.0 | 3850 | 0.0244 | 0.7494 | 0.9115 | 0.9889 | nan | 0.9874 | 0.9908 | 0.6455 | 0.9383 | 0.9957 | 0.0 | 0.9822 | 0.9644 | 0.6384 | 0.9263 | 0.9854 |
75
+ | 0.5997 | 12.0 | 4200 | 0.0243 | 0.7492 | 0.9106 | 0.9893 | nan | 0.9859 | 0.9884 | 0.6271 | 0.9545 | 0.9970 | 0.0 | 0.9817 | 0.9684 | 0.6246 | 0.9356 | 0.9850 |
76
+ | 0.091 | 13.0 | 4550 | 0.0269 | 0.7557 | 0.9197 | 0.9886 | nan | 0.9858 | 0.9900 | 0.6747 | 0.9530 | 0.9950 | 0.0 | 0.9799 | 0.9693 | 0.6659 | 0.9361 | 0.9833 |
77
+ | 1.3004 | 14.0 | 4900 | 0.0226 | 0.7740 | 0.9448 | 0.9906 | nan | 0.9887 | 0.9859 | 0.7857 | 0.9674 | 0.9964 | 0.0 | 0.9841 | 0.9719 | 0.7585 | 0.9424 | 0.9870 |
78
+ | 0.94 | 15.0 | 5250 | 0.1346 | 0.7572 | 0.9315 | 0.9731 | nan | 0.9938 | 0.9862 | 0.7591 | 0.9657 | 0.9528 | 0.0 | 0.9423 | 0.9709 | 0.7399 | 0.9417 | 0.9481 |
79
+ | 0.8906 | 16.0 | 5600 | 0.0221 | 0.7781 | 0.9528 | 0.9911 | nan | 0.9886 | 0.9844 | 0.8206 | 0.9729 | 0.9973 | 0.0 | 0.9851 | 0.9724 | 0.7805 | 0.9429 | 0.9877 |
80
+ | 0.9739 | 17.0 | 5950 | 0.0233 | 0.7629 | 0.9264 | 0.9905 | nan | 0.9870 | 0.9914 | 0.7040 | 0.9516 | 0.9980 | 0.0 | 0.9845 | 0.9700 | 0.6986 | 0.9367 | 0.9874 |
81
+ | 0.417 | 18.0 | 6300 | 0.0200 | 0.7724 | 0.9392 | 0.9917 | nan | 0.9911 | 0.9909 | 0.7618 | 0.9556 | 0.9967 | 0.0 | 0.9869 | 0.9718 | 0.7468 | 0.9399 | 0.9893 |
82
+ | 0.0405 | 19.0 | 6650 | 0.1657 | 0.7661 | 0.9474 | 0.9743 | nan | 0.9434 | 0.9863 | 0.8421 | 0.9661 | 0.9991 | 0.0 | 0.9421 | 0.9718 | 0.7877 | 0.9422 | 0.9528 |
83
+ | 1.2414 | 20.0 | 7000 | 0.0275 | 0.7808 | 0.9593 | 0.9900 | nan | 0.9844 | 0.9838 | 0.8565 | 0.9733 | 0.9986 | 0.0 | 0.9824 | 0.9725 | 0.8000 | 0.9442 | 0.9855 |
84
+ | 0.7539 | 21.0 | 7350 | 0.0200 | 0.7791 | 0.9509 | 0.9918 | nan | 0.9947 | 0.9857 | 0.8106 | 0.9698 | 0.9936 | 0.0 | 0.9872 | 0.9724 | 0.7813 | 0.9445 | 0.9895 |
85
+ | 0.0158 | 22.0 | 7700 | 0.0159 | 0.7773 | 0.9468 | 0.9926 | nan | 0.9924 | 0.9854 | 0.7855 | 0.9736 | 0.9972 | 0.0 | 0.9889 | 0.9731 | 0.7657 | 0.9448 | 0.9910 |
86
+ | 0.3368 | 23.0 | 8050 | 0.0176 | 0.7849 | 0.9678 | 0.9925 | nan | 0.9962 | 0.9844 | 0.8892 | 0.9758 | 0.9933 | 0.0 | 0.9882 | 0.9739 | 0.8113 | 0.9459 | 0.9904 |
87
+ | 0.0526 | 24.0 | 8400 | 0.0168 | 0.7835 | 0.9629 | 0.9927 | nan | 0.9916 | 0.9895 | 0.8727 | 0.9629 | 0.9978 | 0.0 | 0.9888 | 0.9739 | 0.8030 | 0.9448 | 0.9908 |
88
+ | 0.9409 | 25.0 | 8750 | 0.0205 | 0.7842 | 0.9681 | 0.9920 | nan | 0.9899 | 0.9829 | 0.8925 | 0.9773 | 0.9980 | 0.0 | 0.9873 | 0.9732 | 0.8096 | 0.9452 | 0.9897 |
89
+ | 1.0493 | 26.0 | 9100 | 0.0187 | 0.7823 | 0.9542 | 0.9924 | nan | 0.9906 | 0.9877 | 0.8277 | 0.9670 | 0.9981 | 0.0 | 0.9881 | 0.9736 | 0.7966 | 0.9454 | 0.9903 |
90
+ | 0.0685 | 27.0 | 9450 | 0.0166 | 0.7833 | 0.9549 | 0.9931 | nan | 0.9939 | 0.9868 | 0.8270 | 0.9698 | 0.9969 | 0.0 | 0.9898 | 0.9741 | 0.7970 | 0.9470 | 0.9917 |
91
+ | 0.0594 | 28.0 | 9800 | 0.0172 | 0.7882 | 0.9705 | 0.9932 | nan | 0.9942 | 0.9849 | 0.9007 | 0.9761 | 0.9965 | 0.0 | 0.9898 | 0.9749 | 0.8251 | 0.9479 | 0.9917 |
92
+ | 1.1676 | 29.0 | 10150 | 0.0166 | 0.7867 | 0.9726 | 0.9930 | nan | 0.9948 | 0.9834 | 0.9115 | 0.9777 | 0.9957 | 0.0 | 0.9896 | 0.9741 | 0.8178 | 0.9474 | 0.9915 |
93
+ | 0.076 | 30.0 | 10500 | 0.0184 | 0.7845 | 0.9595 | 0.9928 | nan | 0.9925 | 0.9898 | 0.8578 | 0.9598 | 0.9976 | 0.0 | 0.9895 | 0.9728 | 0.8090 | 0.9439 | 0.9917 |
94
+ | 0.0709 | 31.0 | 10850 | 0.0187 | 0.7876 | 0.9726 | 0.9931 | nan | 0.9934 | 0.9842 | 0.9118 | 0.9764 | 0.9972 | 0.0 | 0.9897 | 0.9744 | 0.8215 | 0.9480 | 0.9917 |
95
+ | 0.2951 | 32.0 | 11200 | 0.0171 | 0.7879 | 0.9701 | 0.9932 | nan | 0.9949 | 0.9853 | 0.8995 | 0.9747 | 0.9961 | 0.0 | 0.9900 | 0.9747 | 0.8226 | 0.9484 | 0.9919 |
96
+ | 0.0371 | 33.0 | 11550 | 0.0165 | 0.7863 | 0.9624 | 0.9932 | nan | 0.9941 | 0.9871 | 0.8644 | 0.9696 | 0.9967 | 0.0 | 0.9900 | 0.9742 | 0.8138 | 0.9480 | 0.9920 |
97
+ | 0.0374 | 34.0 | 11900 | 0.0183 | 0.7874 | 0.9718 | 0.9929 | nan | 0.9910 | 0.9862 | 0.9089 | 0.9743 | 0.9985 | 0.0 | 0.9891 | 0.9752 | 0.8202 | 0.9490 | 0.9911 |
98
+ | 0.7856 | 35.0 | 12250 | 0.0187 | 0.7873 | 0.9710 | 0.9931 | nan | 0.9918 | 0.9860 | 0.9042 | 0.9751 | 0.9981 | 0.0 | 0.9894 | 0.9753 | 0.8192 | 0.9483 | 0.9914 |
99
+ | 0.9141 | 36.0 | 12600 | 0.0151 | 0.7892 | 0.9686 | 0.9938 | nan | 0.9946 | 0.9881 | 0.8920 | 0.9712 | 0.9973 | 0.0 | 0.9912 | 0.9759 | 0.8254 | 0.9497 | 0.9929 |
100
+ | 0.0195 | 37.0 | 12950 | 0.0169 | 0.7880 | 0.9653 | 0.9932 | nan | 0.9918 | 0.9875 | 0.8770 | 0.9719 | 0.9985 | 0.0 | 0.9897 | 0.9755 | 0.8219 | 0.9493 | 0.9916 |
101
+ | 0.0355 | 38.0 | 13300 | 0.0177 | 0.7888 | 0.9717 | 0.9933 | nan | 0.9936 | 0.9843 | 0.9041 | 0.9796 | 0.9969 | 0.0 | 0.9898 | 0.9755 | 0.8272 | 0.9487 | 0.9917 |
102
+ | 0.07 | 39.0 | 13650 | 0.0165 | 0.7880 | 0.9736 | 0.9935 | nan | 0.9941 | 0.9848 | 0.9152 | 0.9765 | 0.9973 | 0.0 | 0.9906 | 0.9750 | 0.8209 | 0.9491 | 0.9924 |
103
+ | 0.0244 | 40.0 | 14000 | 0.0178 | 0.7889 | 0.9696 | 0.9933 | nan | 0.9927 | 0.9854 | 0.8963 | 0.9758 | 0.9980 | 0.0 | 0.9899 | 0.9753 | 0.8268 | 0.9496 | 0.9919 |
104
+ | 0.0679 | 41.0 | 14350 | 0.0157 | 0.7895 | 0.9707 | 0.9936 | nan | 0.9945 | 0.9858 | 0.9012 | 0.9750 | 0.9972 | 0.0 | 0.9908 | 0.9754 | 0.8284 | 0.9499 | 0.9926 |
105
+ | 0.0498 | 42.0 | 14700 | 0.0164 | 0.7866 | 0.9765 | 0.9935 | nan | 0.9938 | 0.9839 | 0.9292 | 0.9781 | 0.9976 | 0.0 | 0.9907 | 0.9748 | 0.8122 | 0.9494 | 0.9925 |
106
+ | 0.0593 | 43.0 | 15050 | 0.0146 | 0.7881 | 0.9644 | 0.9939 | nan | 0.9953 | 0.9873 | 0.8695 | 0.9730 | 0.9970 | 0.0 | 0.9916 | 0.9756 | 0.8186 | 0.9494 | 0.9932 |
107
+ | 0.0068 | 44.0 | 15400 | 0.0151 | 0.7883 | 0.9743 | 0.9938 | nan | 0.9942 | 0.9857 | 0.9191 | 0.9749 | 0.9978 | 0.0 | 0.9913 | 0.9753 | 0.8203 | 0.9498 | 0.9930 |
108
+ | 1.2941 | 45.0 | 15750 | 0.0150 | 0.7888 | 0.9714 | 0.9939 | nan | 0.9954 | 0.9862 | 0.9044 | 0.9742 | 0.9968 | 0.0 | 0.9915 | 0.9754 | 0.8228 | 0.9499 | 0.9932 |
109
+ | 0.0113 | 46.0 | 16100 | 0.0151 | 0.7893 | 0.9732 | 0.9939 | nan | 0.9943 | 0.9866 | 0.9130 | 0.9741 | 0.9978 | 0.0 | 0.9914 | 0.9759 | 0.8251 | 0.9505 | 0.9930 |
110
+ | 0.9812 | 47.0 | 16450 | 0.0185 | 0.7875 | 0.9754 | 0.9933 | nan | 0.9920 | 0.9864 | 0.9257 | 0.9745 | 0.9984 | 0.0 | 0.9898 | 0.9759 | 0.8175 | 0.9503 | 0.9917 |
111
+ | 0.0126 | 48.0 | 16800 | 0.0152 | 0.7887 | 0.9743 | 0.9938 | nan | 0.9942 | 0.9856 | 0.9185 | 0.9755 | 0.9976 | 0.0 | 0.9911 | 0.9756 | 0.8221 | 0.9506 | 0.9929 |
112
+ | 1.4415 | 49.0 | 17150 | 0.0154 | 0.7894 | 0.9674 | 0.9940 | nan | 0.9952 | 0.9872 | 0.8839 | 0.9734 | 0.9972 | 0.0 | 0.9917 | 0.9759 | 0.8255 | 0.9501 | 0.9934 |
113
+ | 0.0285 | 50.0 | 17500 | 0.0162 | 0.7889 | 0.9743 | 0.9937 | nan | 0.9934 | 0.9859 | 0.9183 | 0.9759 | 0.9981 | 0.0 | 0.9909 | 0.9758 | 0.8239 | 0.9504 | 0.9926 |
114
+
115
+
116
+ ### Framework versions
117
+
118
+ - Transformers 4.32.1
119
+ - Pytorch 2.0.1+cu118
120
+ - Datasets 2.14.4
121
+ - Tokenizers 0.13.3
config.json ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "nvidia/mit-b0",
3
+ "architectures": [
4
+ "SegformerForSemanticSegmentation"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.0,
7
+ "classifier_dropout_prob": 0.1,
8
+ "decoder_hidden_size": 256,
9
+ "depths": [
10
+ 2,
11
+ 2,
12
+ 2,
13
+ 2
14
+ ],
15
+ "downsampling_rates": [
16
+ 1,
17
+ 4,
18
+ 8,
19
+ 16
20
+ ],
21
+ "drop_path_rate": 0.1,
22
+ "hidden_act": "gelu",
23
+ "hidden_dropout_prob": 0.0,
24
+ "hidden_sizes": [
25
+ 32,
26
+ 64,
27
+ 160,
28
+ 256
29
+ ],
30
+ "id2label": {
31
+ "0": "background",
32
+ "1": "HAZ",
33
+ "2": "matrix",
34
+ "3": "porosity",
35
+ "4": "carbides",
36
+ "5": "substrate"
37
+ },
38
+ "image_size": 224,
39
+ "initializer_range": 0.02,
40
+ "label2id": {
41
+ "HAZ": 1,
42
+ "background": 0,
43
+ "carbides": 4,
44
+ "matrix": 2,
45
+ "porosity": 3,
46
+ "substrate": 5
47
+ },
48
+ "layer_norm_eps": 1e-06,
49
+ "mlp_ratios": [
50
+ 4,
51
+ 4,
52
+ 4,
53
+ 4
54
+ ],
55
+ "model_type": "segformer",
56
+ "num_attention_heads": [
57
+ 1,
58
+ 2,
59
+ 5,
60
+ 8
61
+ ],
62
+ "num_channels": 3,
63
+ "num_encoder_blocks": 4,
64
+ "patch_sizes": [
65
+ 7,
66
+ 3,
67
+ 3,
68
+ 3
69
+ ],
70
+ "reshape_last_stage": true,
71
+ "semantic_loss_ignore_index": 255,
72
+ "sr_ratios": [
73
+ 8,
74
+ 4,
75
+ 2,
76
+ 1
77
+ ],
78
+ "strides": [
79
+ 4,
80
+ 2,
81
+ 2,
82
+ 2
83
+ ],
84
+ "torch_dtype": "float32",
85
+ "transformers_version": "4.32.1"
86
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9358a302aeac5a851e52ee178ba0c1975ae405dd391ee188011e197742a5535
3
+ size 14935885
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91f4de9f6f72531f06bd3465116139e7ebd57ed7718a02891dbad95970f79b59
3
+ size 4091