Commit 32e4ca51 authored by qianyj's avatar qianyj
Browse files

Update code to v2.11.0

parents 9485aa1d 71060f67
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: fpn
detection_head:
cascade_class_ensemble: true
class_agnostic_bbox_pred: true
num_fcs: 2
input_size: [1280, 1280, 3]
norm_activation:
activation: swish
roi_sampler:
cascade_iou_thresholds: [0.7, 0.8]
train_data:
global_batch_size: 64
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [88704, 125664]
name: PiecewiseConstantDecay
offset: 0
values: [0.16, 0.016, 0.0016]
type: stepwise
steps_per_loop: 1848
summary_interval: 1848
train_steps: 133056
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: nasfpn
detection_head:
num_fcs: 2
include_mask: false
max_level: 7
min_level: 3
norm_activation:
activation: swish
train_data:
global_batch_size: 64
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [1062734, 1090458]
name: PiecewiseConstantDecay
offset: 0
values: [0.16, 0.016, 0.0016]
type: stepwise
steps_per_loop: 1848
summary_interval: 1848
train_steps: 1108940
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: nasfpn
detection_head:
num_fcs: 2
include_mask: false
max_level: 7
min_level: 3
norm_activation:
activation: swish
train_data:
global_batch_size: 64
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [88704, 125664]
name: PiecewiseConstantDecay
offset: 0
values: [0.16, 0.016, 0.0016]
type: stepwise
steps_per_loop: 1848
summary_interval: 1848
train_steps: 133056
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: nasfpn
detection_head:
cascade_class_ensemble: true
class_agnostic_bbox_pred: true
num_fcs: 2
input_size: [1280, 1280, 3]
max_level: 7
min_level: 3
norm_activation:
activation: swish
roi_sampler:
cascade_iou_thresholds: [0.7, 0.8]
train_data:
global_batch_size: 64
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [1062734, 1090458]
name: PiecewiseConstantDecay
offset: 0
values: [0.16, 0.016, 0.0016]
type: stepwise
steps_per_loop: 1848
summary_interval: 1848
train_steps: 1108940
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: nasfpn
detection_head:
cascade_class_ensemble: true
class_agnostic_bbox_pred: true
num_fcs: 2
input_size: [1280, 1280, 3]
max_level: 7
min_level: 3
norm_activation:
activation: swish
roi_sampler:
cascade_iou_thresholds: [0.7, 0.8]
train_data:
global_batch_size: 64
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [88704, 125664]
name: PiecewiseConstantDecay
offset: 0
values: [0.16, 0.016, 0.0016]
type: stepwise
steps_per_loop: 1848
summary_interval: 1848
train_steps: 133056
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: fpn
train_data:
global_batch_size: 256
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [265684, 272615]
name: PiecewiseConstantDecay
offset: 0
values: [0.32, 0.032, 0.0032]
type: stepwise
steps_per_loop: 462
summary_interval: 462
train_steps: 277235
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: fpn
train_data:
global_batch_size: 256
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [22176, 31416]
name: PiecewiseConstantDecay
offset: 0
values: [0.32, 0.032, 0.0032]
type: stepwise
steps_per_loop: 462
summary_interval: 462
train_steps: 33264
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: nasfpn
train_data:
global_batch_size: 256
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [265684, 272615]
name: PiecewiseConstantDecay
offset: 0
values: [0.32, 0.032, 0.0032]
type: stepwise
steps_per_loop: 462
summary_interval: 462
train_steps: 277235
task:
# init_checkpoint: 'a_pretrained_backbone_checkpoint'
init_checkpoint_modules: backbone
freeze_backbone: true
model:
backbone:
resnet:
model_id: 101
replace_stem_max_pool: true
resnetd_shortcut: true
scale_stem: true
se_ratio: 0.25
stem_type: v1
type: resnet
decoder:
type: nasfpn
train_data:
global_batch_size: 256
parser:
aug_rand_hflip: true
aug_scale_max: 2.0
aug_scale_min: 0.1
trainer:
optimizer_config:
learning_rate:
stepwise:
boundaries: [22176, 31416]
name: PiecewiseConstantDecay
offset: 0
values: [0.32, 0.032, 0.0032]
type: stepwise
steps_per_loop: 462
summary_interval: 462
train_steps: 33264
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@ from official.core import config_definitions as cfg
from official.core import exp_factory
from official.modeling import hyperparams
from official.modeling import optimization
from official.vision.beta.configs import common
from official.vision.configs import common
@dataclasses.dataclass
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -20,7 +20,7 @@ import tensorflow as tf
from official.modeling import tf_utils
from official.projects.basnet.modeling import nn_blocks
from official.vision.beta.modeling.backbones import factory
from official.vision.modeling.backbones import factory
# Specifications for BASNet encoder.
# Each element in the block configuration is in the following format:
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -17,11 +17,7 @@
import tensorflow as tf
from official.projects.basnet.tasks import basnet
from official.vision.beta.serving import semantic_segmentation
MEAN_RGB = (0.485 * 255, 0.456 * 255, 0.406 * 255)
STDDEV_RGB = (0.229 * 255, 0.224 * 255, 0.225 * 255)
from official.vision.serving import semantic_segmentation
class BASNetModule(semantic_segmentation.SegmentationModule):
......
# Copyright 2021 The TensorFlow Authors. All Rights Reserved.
# Copyright 2022 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -41,7 +41,7 @@ from absl import flags
from official.core import exp_factory
from official.modeling import hyperparams
from official.projects.basnet.serving import basnet
from official.vision.beta.serving import export_saved_model_lib
from official.vision.serving import export_saved_model_lib
FLAGS = flags.FLAGS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment