Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MPA] Enable SSD and YOLOX model template #1156

Merged
merged 24 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b655ce5
Changes for SC integration for detection tasks
jaegukhyun Jun 28, 2022
32a3659
Add SSD, YOLOX to mpa, and SC integration
jaegukhyun Jun 28, 2022
983a664
changes for conflits
jaegukhyun Jun 28, 2022
0eeef84
Change submodules for YOLOX enable
jaegukhyun Jun 28, 2022
78f52f1
Change default task op as REPLACE
jaegukhyun Jun 28, 2022
4844499
Change default temlates in mmdetection
jaegukhyun Jun 29, 2022
2ad4d5d
Bug fifor YOLOX enable both mpa and ote
jaegukhyun Jul 1, 2022
aff5095
Changes for merge
jaegukhyun Jul 1, 2022
647ea1d
Changes for merge
jaegukhyun Jul 1, 2022
fbf9a27
Change hyperparams for training small dataset
jaegukhyun Jul 5, 2022
09608fa
Change learngin schedules and merge with develop branch
jaegukhyun Jul 7, 2022
b6474f9
Rebuildsubmodule
jaegukhyun Jul 7, 2022
3d4541f
Rebuild submodule
jaegukhyun Jul 7, 2022
25c9035
Change learning schedules
jaegukhyun Jul 7, 2022
4d9842c
Merge branch 'develop' of https://github.com/openvinotoolkit/training…
jaegukhyun Jul 8, 2022
2123bbd
Change ote_sdk requirements.txt
jaegukhyun Jul 8, 2022
ad24aeb
Remove template.yaml
jaegukhyun Jul 8, 2022
b69582e
Unification of recipe
jaegukhyun Jul 8, 2022
61d1e57
Change mpa submodule
jaegukhyun Jul 8, 2022
3318177
Modification for flake8 test
jaegukhyun Jul 8, 2022
ed7b0a4
Change mpa submodule
jaegukhyun Jul 11, 2022
58344f4
Add VfNet
jaegukhyun Jul 11, 2022
2b4df57
Commit for changed mpa submodule
jaegukhyun Jul 11, 2022
233f797
Change mpa submodule and remove remark
jaegukhyun Jul 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
dataset_type = 'CocoDataset'
data_root = 'data/coco/'
samples_per_gpu = 2
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
img_scale = (640, 640)

train_pipeline = [
dict(type='Mosaic', img_scale=img_scale, pad_val=114.0),
dict(
type='RandomAffine',
scaling_ratio_range=(0.5, 1.5),
border=(-img_scale[0] // 2, -img_scale[1] // 2)),
dict(
type='PhotoMetricDistortion',
brightness_delta=32,
contrast_range=(0.5, 1.5),
saturation_range=(0.5, 1.5),
hue_delta=18),
dict(type='RandomFlip', flip_ratio=0.5),
dict(type='Resize', keep_ratio=True),
dict(type='Pad', pad_to_square=True, pad_val=114.0),
dict(type='Normalize', **img_norm_cfg),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels'])
]

test_pipeline = [
dict(type='LoadImageFromFile'),
dict(
type='MultiScaleFlipAug',
img_scale=(416, 416),
flip=False,
transforms=[
dict(type='Resize', keep_ratio=False),
dict(type='RandomFlip'),
dict(type='Pad', size=(416, 416), pad_val=114.0),
dict(type='Normalize', **img_norm_cfg),
dict(type='DefaultFormatBundle'),
dict(type='Collect', keys=['img'])
])
]

data = dict(
samples_per_gpu=samples_per_gpu,
workers_per_gpu=4,
num_classes=2,
train=dict(
type='MultiImageMixDataset',
dataset=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_train2017.json',
img_prefix=data_root + 'train2017/',
pipeline=[
dict(type='LoadImageFromFile', to_float32=True),
dict(type='LoadAnnotations', with_bbox=True)
],
),
pipeline=train_pipeline,
dynamic_scale=img_scale,
),
val=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_val2017.json',
img_prefix=data_root + 'val2017/',
test_mode=True,
pipeline=test_pipeline),
test=dict(
type=dataset_type,
ann_file=data_root + 'annotations/instances_val2017.json',
img_prefix=data_root + 'val2017/',
test_mode=True,
pipeline=test_pipeline)
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
metric: mAP
search_algorithm: smbo
early_stop: None
hp_space:
learning_parameters.learning_rate:
param_type: quniform
range:
- 0.001
- 0.1
- 0.001
learning_parameters.batch_size:
param_type: qloguniform
range:
- 4
- 8
- 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_base_ = [
'../../../submodule/recipes/stages/_base_/models/detectors/yolox.custom.py'
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Description.
model_template_id: ClassIncremental_Object_Detection_YOLOX
name: YOLOX-ClsIncr
task_type: DETECTION
task_family: VISION
instantiation: "CLASS"
summary: Class-Incremental Object Detection for YOLOX
application: ~

# Algo backend.
framework: MPA v1.1.0

# Task implementations.
entrypoints:
base: mpa_tasks.apis.detection.DetectionTrainTask
openvino: detection_tasks.apis.detection.OpenVINODetectionTask

# Capabilities.
capabilities: []

# Hyperparameters.
hyper_parameters:
base_path: ../configuration.yaml
parameter_overrides:
learning_parameters:
batch_size:
default_value: 16
learning_rate:
default_value: 0.0025
learning_rate_warmup_iters:
default_value: 500
num_iters:
default_value: 300
algo_backend:
train_type:
default_value: Incremental

# Training resources.
max_nodes: 1
training_targets:
- GPU
- CPU

# Stats.
gigaflops: 20.6
size: 9.1
# # Inference options. Defined by OpenVINO capabilities, not Algo Backend or Platform.
# inference_targets:
# - CPU
# - GPU
# - VPU
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ hyper_parameters:
learning_rate:
default_value: 0.001
learning_rate_warmup_iters:
default_value: 200
default_value: 10
num_iters:
default_value: 30
default_value: 100
algo_backend:
train_type:
default_value: Incremental
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
metric: mAP
search_algorithm: smbo
early_stop: None
hp_space:
learning_parameters.learning_rate:
param_type: quniform
range:
- 0.001
- 0.1
- 0.001
learning_parameters.batch_size:
param_type: qloguniform
range:
- 4
- 8
- 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
_base_ = [
'../../../submodule/samples/cfgs/models/backbones/ote_mobilenet_v2_w1.yaml',
'../../../submodule/recipes/stages/_base_/models/detectors/ssd.custom.py'
]

model = dict(
backbone=dict(out_indices=(4, 5,))
harimkang marked this conversation as resolved.
Show resolved Hide resolved
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Description.
model_template_id: ClassIncremental_Object_Detection_Gen3_SSD
name: SSD-ClsIncr
task_type: DETECTION
task_family: VISION
instantiation: "CLASS"
summary: Class-Incremental Object Detection for SSD
application: ~

# Algo backend.
framework: MPA v1.1.0

# Task implementations.
entrypoints:
base: mpa_tasks.apis.detection.DetectionTrainTask
openvino: detection_tasks.apis.detection.OpenVINODetectionTask

# Capabilities.
capabilities: []

# Hyperparameters.
hyper_parameters:
base_path: ../configuration.yaml
parameter_overrides:
learning_parameters:
batch_size:
default_value: 4
learning_rate:
default_value: 0.001
learning_rate_warmup_iters:
default_value: 200
num_iters:
default_value: 30
algo_backend:
train_type:
default_value: Incremental

# Training resources.
max_nodes: 1
training_targets:
- GPU
- CPU

# Stats.
gigaflops: 20.6
size: 9.1
# # Inference options. Defined by OpenVINO capabilities, not Algo Backend or Platform.
# inference_targets:
# - CPU
# - GPU
# - VPU
2 changes: 1 addition & 1 deletion ote_sdk/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ numpy>=1.16.4
scikit-learn==0.24.*
Shapely>=1.7.1,<=1.8.0
networkx>=2.5,<2.8.1rc1
opencv-python==4.5.5.*
opencv-python==4.5.*
pymongo==3.12.0
omegaconf==2.1.*
natsort>=6.0.0
Expand Down