Skip to content

Commit

Permalink
Merge branch 'develop' into vsaltykovx/add_mmdetection_input_paramete…
Browse files Browse the repository at this point in the history
…rs_validation

# Conflicts:
#	external/mmdetection/detection_tasks/apis/detection/openvino_task.py
  • Loading branch information
saltykox committed Apr 5, 2022
2 parents 31e179c + 33d11e6 commit 6a7df1c
Show file tree
Hide file tree
Showing 137 changed files with 3,800 additions and 1,411 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
exclude: "tests/"

- repo: https://github.com/psf/black
rev: 21.7b0
rev: 22.3.0
hooks:
- id: black
name: "black (ote_sdk|ote_cli)"
Expand Down
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ disable=logging-fstring-interpolation,
deprecated-sys-function,
exception-escape,
comprehension-escape,
import-outside-toplevel
import-outside-toplevel,
arguments-differ

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
3 changes: 2 additions & 1 deletion external/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ ID | Name | Complexity (GFlops) | Model size (MB) | Path
Custom_Rotated_Detection_via_Instance_Segmentation_MaskRCNN_EfficientNetB2B | MaskRCNN-EfficientNetB2B | 68.48 | 13.27 | mmdetection/configs/rotated_detection/efficientnetb2b_maskrcnn/template.yaml
Custom_Rotated_Detection_via_Instance_Segmentation_MaskRCNN_ResNet50 | MaskRCNN-ResNet50 | 533.8 | 177.9 | mmdetection/configs/rotated_detection/resnet50_maskrcnn/template.yaml

## Semantic Segmentaion
## Semantic Segmentation
ID | Name | Complexity (GFlops) | Model size (MB) | Path
------- | ------- | ------- | ------- | -------
Custom_Semantic_Segmentation_Lite-HRNet-s-mod2_OCR | Lite-HRNet-s-mod2 OCR | 1.82 | 3.5 | mmsegmentation/configs/custom-sematic-segmentation/ocr-lite-hrnet-s-mod2/template.yaml
Custom_Semantic_Segmentation_Lite-HRNet-18_OCR | Lite-HRNet-18 OCR | 3.45 | 4.5 | mmsegmentation/configs/custom-sematic-segmentation/ocr-lite-hrnet-18/template.yaml
Custom_Semantic_Segmentation_Lite-HRNet-18-mod2_OCR | Lite-HRNet-18-mod2 OCR | 3.63 | 4.8 | mmsegmentation/configs/custom-sematic-segmentation/ocr-lite-hrnet-18-mod2/template.yaml
Custom_Semantic_Segmentation_Lite-HRNet-x-mod3_OCR | Lite-HRNet-x-mod3 OCR | 13.97 | 6.4 | mmsegmentation/configs/custom-sematic-segmentation/ocr-lite-hrnet-x-mod3/template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"base": {
"find_unused_parameters": true,
"target_metric_name": "image_F1",
"nncf_config": {
"input_info": {
"sample_size": [1, 3, 256, 256]
},
"compression": [],
"log_dir": "/tmp"
}
},
"nncf_quantization": {
"nncf_config": {
"compression": [
{
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {
"num_init_samples": 250
},
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 250
}
},
"ignored_scopes": [
"PadimModel/sqrt_0",
"PadimModel/interpolate_2",
"PadimModel/__truediv___0",
"PadimModel/__truediv___1",
"PadimModel/matmul_1",
"PadimModel/conv2d_0"
]
}
]
}
},
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,56 @@ pot_parameters:
visible_in_ui: true
warning: null
type: PARAMETER_GROUP
visible_in_ui: true
nncf_optimization:
description: Optimization by NNCF
header: Optimization by NNCF
enable_quantization:
affects_outcome_of: TRAINING
default_value: true
description: Enable quantization algorithm
editable: true
header: Enable quantization algorithm
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: true
visible_in_ui: true
warning: null
enable_pruning:
affects_outcome_of: TRAINING
default_value: false
description: Enable filter pruning algorithm
editable: true
header: Enable filter pruning algorithm
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: false
visible_in_ui: true
warning: null
pruning_supported:
affects_outcome_of: TRAINING
default_value: false
description: Whether filter pruning is supported
editable: false
header: Whether filter pruning is supported
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: false
visible_in_ui: false
warning: null
type: PARAMETER_GROUP
visible_in_ui: false
type: CONFIGURABLE_PARAMETERS
visible_in_ui: true
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ framework: OTEAnomalyClassification v0.1.0

# Task implementations.
entrypoints:
base: ote_anomalib.BaseAnomalyTask
base: ote_anomalib.AnomalyTrainingTask
openvino: ote_anomalib.OpenVINOAnomalyTask
nncf: ote_anomalib.AnomalyNNCFTask

# Hyper Parameters
hyper_parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"base": {
"find_unused_parameters": true,
"target_metric_name": "image_F1",
"nncf_config": {
"input_info": {
"sample_size": [1, 3, 256, 256]
},
"compression": [],
"log_dir": "/tmp"
}
},
"nncf_quantization": {
"model": {
"lr": 0.004
},
"nncf_config": {
"compression": [
{
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {
"num_init_samples": 250
},
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 250
}
},
"ignored_scopes": [
"{re}.*__pow__.*"
]
}
]
}
},
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,56 @@ pot_parameters:
visible_in_ui: true
warning: null
type: PARAMETER_GROUP
visible_in_ui: true
nncf_optimization:
description: Optimization by NNCF
header: Optimization by NNCF
enable_quantization:
affects_outcome_of: TRAINING
default_value: true
description: Enable quantization algorithm
editable: true
header: Enable quantization algorithm
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: true
visible_in_ui: true
warning: null
enable_pruning:
affects_outcome_of: TRAINING
default_value: false
description: Enable filter pruning algorithm
editable: true
header: Enable filter pruning algorithm
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: false
visible_in_ui: true
warning: null
pruning_supported:
affects_outcome_of: TRAINING
default_value: false
description: Whether filter pruning is supported
editable: false
header: Whether filter pruning is supported
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: false
visible_in_ui: false
warning: null
type: PARAMETER_GROUP
visible_in_ui: false
type: CONFIGURABLE_PARAMETERS
visible_in_ui: true
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ framework: OTEAnomalyClassification v0.1.0

# Task implementations.
entrypoints:
base: ote_anomalib.BaseAnomalyTask
base: ote_anomalib.AnomalyTrainingTask
openvino: ote_anomalib.OpenVINOAnomalyTask
nncf: ote_anomalib.AnomalyNNCFTask

# Hyper Parameters
hyper_parameters:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"base": {
"find_unused_parameters": true,
"target_metric_name": "image_F1",
"nncf_config": {
"input_info": {
"sample_size": [1, 3, 256, 256]
},
"compression": [],
"log_dir": "/tmp"
}
},
"nncf_quantization": {
"nncf_config": {
"compression": [
{
"algorithm": "quantization",
"preset": "mixed",
"initializer": {
"range": {
"num_init_samples": 250
},
"batchnorm_adaptation": {
"num_bn_adaptation_samples": 250
}
},
"ignored_scopes": [
"PadimModel/sqrt_0",
"PadimModel/interpolate_2",
"PadimModel/__truediv___0",
"PadimModel/__truediv___1",
"PadimModel/matmul_1",
"PadimModel/conv2d_0"
]
}
]
}
},
"order_of_parts": [
"nncf_quantization"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,55 @@ pot_parameters:
warning: null
type: PARAMETER_GROUP
visible_in_ui: true
nncf_optimization:
description: Optimization by NNCF
header: Optimization by NNCF
enable_quantization:
affects_outcome_of: TRAINING
default_value: true
description: Enable quantization algorithm
editable: true
header: Enable quantization algorithm
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: true
visible_in_ui: true
warning: null
enable_pruning:
affects_outcome_of: TRAINING
default_value: false
description: Enable filter pruning algorithm
editable: true
header: Enable filter pruning algorithm
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: false
visible_in_ui: true
warning: null
pruning_supported:
affects_outcome_of: TRAINING
default_value: false
description: Whether filter pruning is supported
editable: false
header: Whether filter pruning is supported
type: BOOLEAN
ui_rules:
action: DISABLE_EDITING
operator: AND
rules: []
type: UI_RULES
value: false
visible_in_ui: false
warning: null
type: PARAMETER_GROUP
visible_in_ui: false
type: CONFIGURABLE_PARAMETERS
visible_in_ui: true
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ framework: OTEAnomalyClassification v0.1.0 # TODO: update after the name has bee

# Task implementations.
entrypoints:
base: ote_anomalib.BaseAnomalyTask
base: ote_anomalib.AnomalyTrainingTask
openvino: ote_anomalib.OpenVINOAnomalyTask
nncf: ote_anomalib.AnomalyNNCFTask

# Hyper Parameters
hyper_parameters:
Expand Down
Loading

0 comments on commit 6a7df1c

Please sign in to comment.