Tianmu28 commited on
Commit
2dad11b
·
verified ·
1 Parent(s): 6d3c4bf

segmentation-lungs

Browse files
Files changed (5) hide show
  1. README.md +71 -0
  2. config.json +78 -0
  3. model.safetensors +3 -0
  4. preprocessor_config.json +23 -0
  5. training_args.bin +3 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ license: other
4
+ base_model: nvidia/segformer-b0-finetuned-ade-512-512
5
+ tags:
6
+ - generated_from_trainer
7
+ model-index:
8
+ - name: segformer-b0-segments-lungs-xray
9
+ results: []
10
+ ---
11
+
12
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
+ should probably proofread and complete it, then remove this comment. -->
14
+
15
+ # segformer-b0-segments-lungs-xray
16
+
17
+ This model is a fine-tuned version of [nvidia/segformer-b0-finetuned-ade-512-512](https://huggingface.co/nvidia/segformer-b0-finetuned-ade-512-512) on the None dataset.
18
+ It achieves the following results on the evaluation set:
19
+ - Loss: 0.0589
20
+ - Mean Iou: 0.9509
21
+ - Mean Accuracy: 0.9747
22
+ - Overall Accuracy: 0.9814
23
+ - Accuracy Background: 0.9877
24
+ - Accuracy Target: 0.9617
25
+ - Iou Background: 0.9758
26
+ - Iou Target: 0.9260
27
+
28
+ ## Model description
29
+
30
+ More information needed
31
+
32
+ ## Intended uses & limitations
33
+
34
+ More information needed
35
+
36
+ ## Training and evaluation data
37
+
38
+ More information needed
39
+
40
+ ## Training procedure
41
+
42
+ ### Training hyperparameters
43
+
44
+ The following hyperparameters were used during training:
45
+ - learning_rate: 5e-05
46
+ - train_batch_size: 4
47
+ - eval_batch_size: 4
48
+ - seed: 42
49
+ - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
50
+ - lr_scheduler_type: linear
51
+ - num_epochs: 7
52
+
53
+ ### Training results
54
+
55
+ | Training Loss | Epoch | Step | Validation Loss | Mean Iou | Mean Accuracy | Overall Accuracy | Accuracy Background | Accuracy Target | Iou Background | Iou Target |
56
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:-------------:|:----------------:|:-------------------:|:---------------:|:--------------:|:----------:|
57
+ | 0.1417 | 1.0 | 123 | 0.1330 | 0.9172 | 0.9657 | 0.9673 | 0.9688 | 0.9626 | 0.9574 | 0.8770 |
58
+ | 0.0957 | 2.0 | 246 | 0.0860 | 0.9425 | 0.9680 | 0.9782 | 0.9878 | 0.9481 | 0.9717 | 0.9133 |
59
+ | 0.0889 | 3.0 | 369 | 0.0743 | 0.9418 | 0.9734 | 0.9777 | 0.9817 | 0.9650 | 0.9709 | 0.9128 |
60
+ | 0.076 | 4.0 | 492 | 0.0635 | 0.9494 | 0.9724 | 0.9809 | 0.9889 | 0.9559 | 0.9751 | 0.9237 |
61
+ | 0.0621 | 5.0 | 615 | 0.0603 | 0.9508 | 0.9734 | 0.9814 | 0.9890 | 0.9578 | 0.9758 | 0.9259 |
62
+ | 0.0653 | 6.0 | 738 | 0.0589 | 0.9509 | 0.9747 | 0.9814 | 0.9877 | 0.9617 | 0.9758 | 0.9260 |
63
+ | 0.0593 | 7.0 | 861 | 0.0587 | 0.9507 | 0.9748 | 0.9813 | 0.9875 | 0.9622 | 0.9757 | 0.9258 |
64
+
65
+
66
+ ### Framework versions
67
+
68
+ - Transformers 4.46.3
69
+ - Pytorch 2.5.1+cu121
70
+ - Datasets 3.2.0
71
+ - Tokenizers 0.20.3
config.json ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "nvidia/segformer-b0-finetuned-ade-512-512",
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": "target"
33
+ },
34
+ "image_size": 224,
35
+ "initializer_range": 0.02,
36
+ "label2id": {
37
+ "background": 0,
38
+ "target": 1
39
+ },
40
+ "layer_norm_eps": 1e-06,
41
+ "mlp_ratios": [
42
+ 4,
43
+ 4,
44
+ 4,
45
+ 4
46
+ ],
47
+ "model_type": "segformer",
48
+ "num_attention_heads": [
49
+ 1,
50
+ 2,
51
+ 5,
52
+ 8
53
+ ],
54
+ "num_channels": 3,
55
+ "num_encoder_blocks": 4,
56
+ "patch_sizes": [
57
+ 7,
58
+ 3,
59
+ 3,
60
+ 3
61
+ ],
62
+ "reshape_last_stage": true,
63
+ "semantic_loss_ignore_index": 255,
64
+ "sr_ratios": [
65
+ 8,
66
+ 4,
67
+ 2,
68
+ 1
69
+ ],
70
+ "strides": [
71
+ 4,
72
+ 2,
73
+ 2,
74
+ 2
75
+ ],
76
+ "torch_dtype": "float32",
77
+ "transformers_version": "4.46.3"
78
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2700c4dce57c54fd1c302f556c4cae7f096c68dc16c44c63e08576ed78942b5d
3
+ size 14884776
preprocessor_config.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "do_reduce_labels": false,
4
+ "do_rescale": false,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.485,
8
+ 0.456,
9
+ 0.406
10
+ ],
11
+ "image_processor_type": "SegformerImageProcessor",
12
+ "image_std": [
13
+ 0.229,
14
+ 0.224,
15
+ 0.225
16
+ ],
17
+ "resample": 2,
18
+ "rescale_factor": 0.00392156862745098,
19
+ "size": {
20
+ "height": 256,
21
+ "width": 256
22
+ }
23
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a925ad2d0530907165fd758b795f87479fc3f29eea4aa84f30673190197efe50
3
+ size 5304