Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#307 Hotfix/sg 000 fix image loading new detectiondataset

Merged
Ghost merged 1 commits into Deci-AI:master from deci-ai:hotfix/SG-000-fix_image_loading_new_detectiondataset
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
  1. # DDRNet segmentation training example with Cityscapes dataset.
  2. # Paper:
  3. # "Deep Dual-resolution Networks for Real-time and Accurate Semantic Segmentation of Road Scenes"
  4. # https://arxiv.org/abs/2104.13188
  5. #
  6. # Usage DDRNet23:
  7. # python -m torch.distributed.launch --nproc_per_node=4 train_from_recipe.py --config-name=cityscapes_ddrnet checkpoint_params.external_checkpoint_path=<ddrnet23-backbone-pretrained-path>
  8. # Usage DDRNet23-Slim:
  9. # python -m torch.distributed.launch --nproc_per_node=4 train_from_recipe.py --config-name=cityscapes_ddrnet checkpoint_params.external_checkpoint_path=<ddrnet23-backbone-pretrained-path> architecture=ddrnet_23_slim
  10. #
  11. # Validation mIoU - Cityscapes, training time:
  12. # DDRNet23: input-size: [1024, 2048] mIoU: 80.26 4 X RTX A5000, 12 H
  13. # DDRNet23-Slim: input-size: [1024, 2048] mIoU: 78.01 4 X RTX A5000, 9 H
  14. #
  15. # Official git repo:
  16. # https://github.com/ydhongHIT/DDRNet
  17. #
  18. # Pretrained checkpoints:
  19. # Backbones- downloaded from the author's official repo.
  20. # https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet23_bb_imagenet.pth
  21. # https://deci-pretrained-models.s3.amazonaws.com/ddrnet/imagenet_pt_backbones/ddrnet23_slim_bb_imagenet.pth
  22. #
  23. # Logs, tensorboards and network checkpoints:
  24. # DDRNet23: https://deci-pretrained-models.s3.amazonaws.com/ddrnet/cityscapes/ddrnet23/
  25. # DDRNet23-Slim: https://deci-pretrained-models.s3.amazonaws.com/ddrnet/cityscapes/ddrnet23_slim/
  26. #
  27. # Learning rate and batch size parameters, using 4 RTX A5000 with DDP:
  28. # DDRNet23: input-size: [1024, 1024] initial_lr: 0.0075 batch-size: 6 * 4gpus = 24
  29. # DDRNet23-Slim: input-size: [1024, 1024] initial_lr: 0.0075 batch-size: 6 * 4gpus = 24
  30. #
  31. # Comments:
  32. # * Pretrained backbones were used.
  33. defaults:
  34. - training_hyperparams: cityscapes_default_train_params
  35. - dataset_params: cityscapes_dataset_params
  36. - checkpoint_params: default_checkpoint_params
  37. training_hyperparams:
  38. max_epochs: 500
  39. initial_lr: 0.0075 # batch size 24
  40. loss:
  41. dice_ce_edge_loss:
  42. num_classes: 19
  43. ignore_index: 19
  44. num_aux_heads: 1
  45. num_detail_heads: 0
  46. weights: [ 1., 0.4 ]
  47. dice_ce_weights: [ 1., 1. ]
  48. ce_edge_weights: [ .5, .5 ]
  49. edge_kernel: 5
  50. loss_logging_items_names: [main_loss, aux_loss1, loss]
  51. dataset_params:
  52. batch_size: 6
  53. val_batch_size: 6
  54. crop_size: [ 1024, 1024 ]
  55. eval_scale: 1.
  56. random_scales: [ 0.5, 2. ]
  57. color_jitter: 0.5
  58. image_mask_transforms_aug:
  59. Compose:
  60. transforms:
  61. - ColorJitterSeg:
  62. brightness: ${dataset_params.color_jitter}
  63. contrast: ${dataset_params.color_jitter}
  64. saturation: ${dataset_params.color_jitter}
  65. - RandomFlipSeg
  66. - RandomRescaleSeg:
  67. scales: ${dataset_params.random_scales}
  68. - PadShortToCropSizeSeg:
  69. crop_size: ${dataset_params.crop_size}
  70. fill_mask: ${dataset_params.cityscapes_ignored_label}
  71. - CropImageAndMaskSeg:
  72. crop_size: ${dataset_params.crop_size}
  73. mode: random
  74. image_mask_transforms:
  75. Compose:
  76. transforms:
  77. - RescaleSeg:
  78. scale_factor: ${dataset_params.eval_scale}
  79. dataset_interface:
  80. cityscapes:
  81. dataset_params: ${dataset_params}
  82. data_loader_num_workers: 8
  83. arch_params:
  84. num_classes: 19
  85. aux_head: True
  86. sync_bn: True
  87. load_checkpoint: False
  88. checkpoint_params:
  89. load_checkpoint: ${load_checkpoint}
  90. external_checkpoint_path:
  91. load_backbone: True
  92. load_weights_only: True
  93. strict_load: no_key_matching
  94. architecture: ddrnet_23
  95. experiment_name: ${architecture}_cityscapes
  96. model_checkpoints_location: local
  97. ckpt_root_dir:
  98. multi_gpu:
  99. _target_: super_gradients.training.sg_model.MultiGPUMode
  100. value: 'DDP'
  101. sg_model:
  102. _target_: super_gradients.SgModel
  103. experiment_name: ${experiment_name}
  104. model_checkpoints_location: ${model_checkpoints_location}
  105. ckpt_root_dir: ${ckpt_root_dir}
  106. multi_gpu: ${multi_gpu}
Discard
Tip!

Press p or to see the previous file or, n or to see the next file