-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1044 from openvinotoolkit/ad/mmseg_mmdet_updates
Add nncf configs for segmentation models
- Loading branch information
Showing
8 changed files
with
191 additions
and
5 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
...tation/configs/custom-sematic-segmentation/ocr-lite-hrnet-18-mod2/compression_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"base": { | ||
"find_unused_parameters": true, | ||
"nncf_config": { | ||
"target_metric_name": "mDice", | ||
"input_info": { | ||
"sample_size": [1, 3, 512, 512] | ||
}, | ||
"compression": [], | ||
"log_dir": "." | ||
}, | ||
"params_config": { | ||
"iters": 0, | ||
"open_layers": [] | ||
}, | ||
"checkpoint_config": { | ||
"interval": -1 | ||
} | ||
}, | ||
"nncf_quantization": { | ||
"optimizer": { | ||
"lr": 1e-4 | ||
}, | ||
"lr_config": { | ||
"fixed": null, | ||
"fixed_iters": 0, | ||
"warmup": null, | ||
"warmup_iters": 0, | ||
"step": [20] | ||
}, | ||
"nncf_config": { | ||
"compression": [ | ||
{ | ||
"algorithm": "quantization", | ||
"preset": "mixed", | ||
"initializer": { | ||
"range": { | ||
"num_init_samples": 500 | ||
}, | ||
"batchnorm_adaptation": { | ||
"num_bn_adaptation_samples": 500 | ||
} | ||
}, | ||
"ignored_scopes": [ | ||
"{re}.*cross_resolution_weighting.*__mul__.*", | ||
"{re}.*spatial_weighting.*__mul__.*" | ||
] | ||
} | ||
], | ||
"accuracy_aware_training": { | ||
"mode": "early_exit", | ||
"params": { | ||
"maximal_absolute_accuracy_degradation": 1.0, | ||
"maximal_total_epochs": 40 | ||
} | ||
} | ||
} | ||
}, | ||
"order_of_parts": [ | ||
"nncf_quantization" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
} | ||
} | ||
}, | ||
"order_of_parts": [ | ||
"order_of_parts": [ | ||
"nncf_quantization" | ||
] | ||
} |
62 changes: 62 additions & 0 deletions
62
...ntation/configs/custom-sematic-segmentation/ocr-lite-hrnet-s-mod2/compression_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"base": { | ||
"find_unused_parameters": true, | ||
"nncf_config": { | ||
"target_metric_name": "mDice", | ||
"input_info": { | ||
"sample_size": [1, 3, 512, 512] | ||
}, | ||
"compression": [], | ||
"log_dir": "." | ||
}, | ||
"params_config": { | ||
"iters": 0, | ||
"open_layers": [] | ||
}, | ||
"checkpoint_config": { | ||
"interval": -1 | ||
} | ||
}, | ||
"nncf_quantization": { | ||
"optimizer": { | ||
"lr": 1e-4 | ||
}, | ||
"lr_config": { | ||
"fixed": null, | ||
"fixed_iters": 0, | ||
"warmup": null, | ||
"warmup_iters": 0, | ||
"step": [20] | ||
}, | ||
"nncf_config": { | ||
"compression": [ | ||
{ | ||
"algorithm": "quantization", | ||
"preset": "mixed", | ||
"initializer": { | ||
"range": { | ||
"num_init_samples": 5 | ||
}, | ||
"batchnorm_adaptation": { | ||
"num_bn_adaptation_samples": 5 | ||
} | ||
}, | ||
"ignored_scopes": [ | ||
"{re}.*cross_resolution_weighting.*__mul__.*", | ||
"{re}.*spatial_weighting.*__mul__.*" | ||
] | ||
} | ||
], | ||
"accuracy_aware_training": { | ||
"mode": "early_exit", | ||
"params": { | ||
"maximal_absolute_accuracy_degradation": 1.0, | ||
"maximal_total_epochs": 40 | ||
} | ||
} | ||
} | ||
}, | ||
"order_of_parts": [ | ||
"nncf_quantization" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
...ntation/configs/custom-sematic-segmentation/ocr-lite-hrnet-x-mod3/compression_config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"base": { | ||
"find_unused_parameters": true, | ||
"nncf_config": { | ||
"target_metric_name": "mDice", | ||
"input_info": { | ||
"sample_size": [1, 3, 512, 512] | ||
}, | ||
"compression": [], | ||
"log_dir": "." | ||
}, | ||
"params_config": { | ||
"iters": 0, | ||
"open_layers": [] | ||
}, | ||
"checkpoint_config": { | ||
"interval": -1 | ||
} | ||
}, | ||
"nncf_quantization": { | ||
"optimizer": { | ||
"lr": 1e-4 | ||
}, | ||
"lr_config": { | ||
"fixed": null, | ||
"fixed_iters": 0, | ||
"warmup": null, | ||
"warmup_iters": 0, | ||
"step": [20] | ||
}, | ||
"nncf_config": { | ||
"compression": [ | ||
{ | ||
"algorithm": "quantization", | ||
"preset": "mixed", | ||
"initializer": { | ||
"range": { | ||
"num_init_samples": 500 | ||
}, | ||
"batchnorm_adaptation": { | ||
"num_bn_adaptation_samples": 500 | ||
} | ||
}, | ||
"ignored_scopes": [ | ||
"{re}.*cross_resolution_weighting.*__mul__.*", | ||
"{re}.*spatial_weighting.*__mul__.*" | ||
] | ||
} | ||
], | ||
"accuracy_aware_training": { | ||
"mode": "early_exit", | ||
"params": { | ||
"maximal_absolute_accuracy_degradation": 1.0, | ||
"maximal_total_epochs": 40 | ||
} | ||
} | ||
} | ||
}, | ||
"order_of_parts": [ | ||
"nncf_quantization" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule submodule
updated
5 files
+15 −0 | mmseg/apis/train.py | |
+8 −0 | mmseg/core/evaluation/eval_hooks.py | |
+13 −11 | mmseg/models/losses/utils.py | |
+6 −0 | third-party-programs.txt | |
+3 −0 | tools/get_flops.py |