Skip to content

Commit

Permalink
Merged commit includes the following changes: (#8830)
Browse files Browse the repository at this point in the history
320622111  by rathodv:

    Internal Change.

--

PiperOrigin-RevId: 320622111

Co-authored-by: TF Object Detection Team <no-reply@google.com>
  • Loading branch information
tombstone and TF Object Detection Team committed Jul 10, 2020
1 parent c9eb355 commit 5245161
Show file tree
Hide file tree
Showing 59 changed files with 6,823 additions and 812 deletions.
448 changes: 107 additions & 341 deletions research/object_detection/README.md

Large diffs are not rendered by default.

@@ -0,0 +1,129 @@
# CenterNet meta-architecture from the "Objects as Points" [2] paper with the
# hourglass[1] backbone.
# [1]: https://arxiv.org/abs/1603.06937
# [2]: https://arxiv.org/abs/1904.07850
# Trained on COCO, initialized from Extremenet Detection checkpoint
# Train on TPU-32 v3
#
# Achieves 44.6 mAP on COCO17 Val


model {
center_net {
num_classes: 90
feature_extractor {
type: "hourglass_104"
bgr_ordering: true
channel_means: [104.01362025, 114.03422265, 119.9165958 ]
channel_stds: [73.6027665 , 69.89082075, 70.9150767 ]
}
image_resizer {
keep_aspect_ratio_resizer {
min_dimension: 1024
max_dimension: 1024
pad_to_max_dimension: true
}
}
object_detection_task {
task_loss_weight: 1.0
offset_loss_weight: 1.0
scale_loss_weight: 0.1
localization_loss {
l1_localization_loss {
}
}
}
object_center_params {
object_center_loss_weight: 1.0
min_box_overlap_iou: 0.7
max_box_predictions: 100
classification_loss {
penalty_reduced_logistic_focal_loss {
alpha: 2.0
beta: 4.0
}
}
}
}
}

train_config: {

batch_size: 128
num_steps: 50000

data_augmentation_options {
random_horizontal_flip {
}
}

data_augmentation_options {
random_adjust_hue {
}
}

data_augmentation_options {
random_adjust_contrast {
}
}

data_augmentation_options {
random_adjust_saturation {
}
}

data_augmentation_options {
random_adjust_brightness {
}
}

data_augmentation_options {
random_square_crop_by_scale {
scale_min: 0.6
scale_max: 1.3
}
}

optimizer {
adam_optimizer: {
epsilon: 1e-7 # Match tf.keras.optimizers.Adam's default.
learning_rate: {
cosine_decay_learning_rate {
learning_rate_base: 1e-3
total_steps: 50000
warmup_learning_rate: 2.5e-4
warmup_steps: 5000
}
}
}
use_moving_average: false
}
max_number_of_boxes: 100
unpad_groundtruth_tensors: false

fine_tune_checkpoint_version: V2
fine_tune_checkpoint: "PATH_TO_BE_CONFIGURED/ckpt-1"
fine_tune_checkpoint_type: "detection"
}

train_input_reader: {
label_map_path: "PATH_TO_BE_CONFIGURED/label_map.txt"
tf_record_input_reader {
input_path: "PATH_TO_BE_CONFIGURED/train2017-?????-of-00256.tfrecord"
}
}

eval_config: {
metrics_set: "coco_detection_metrics"
use_moving_averages: false
batch_size: 1;
}

eval_input_reader: {
label_map_path: "PATH_TO_BE_CONFIGURED/label_map.txt"
shuffle: false
num_epochs: 1
tf_record_input_reader {
input_path: "PATH_TO_BE_CONFIGURED/val2017-?????-of-00032.tfrecord"
}
}
@@ -0,0 +1,143 @@
# CenterNet meta-architecture from the "Objects as Points" [2] paper with the
# hourglass[1] backbone.
# [1]: https://arxiv.org/abs/1603.06937
# [2]: https://arxiv.org/abs/1904.07850
# Trained on COCO, initialized from Extremenet Detection checkpoint
# Train on TPU-8
#
# Achieves 41.9 mAP on COCO17 Val

model {
center_net {
num_classes: 90
feature_extractor {
type: "hourglass_104"
bgr_ordering: true
channel_means: [104.01362025, 114.03422265, 119.9165958 ]
channel_stds: [73.6027665 , 69.89082075, 70.9150767 ]
}
image_resizer {
keep_aspect_ratio_resizer {
min_dimension: 512
max_dimension: 512
pad_to_max_dimension: true
}
}
object_detection_task {
task_loss_weight: 1.0
offset_loss_weight: 1.0
scale_loss_weight: 0.1
localization_loss {
l1_localization_loss {
}
}
}
object_center_params {
object_center_loss_weight: 1.0
min_box_overlap_iou: 0.7
max_box_predictions: 100
classification_loss {
penalty_reduced_logistic_focal_loss {
alpha: 2.0
beta: 4.0
}
}
}
}
}

train_config: {

batch_size: 128
num_steps: 140000

data_augmentation_options {
random_horizontal_flip {
}
}

data_augmentation_options {
random_crop_image {
min_aspect_ratio: 0.5
max_aspect_ratio: 1.7
random_coef: 0.25
}
}


data_augmentation_options {
random_adjust_hue {
}
}

data_augmentation_options {
random_adjust_contrast {
}
}

data_augmentation_options {
random_adjust_saturation {
}
}

data_augmentation_options {
random_adjust_brightness {
}
}

data_augmentation_options {
random_absolute_pad_image {
max_height_padding: 200
max_width_padding: 200
pad_color: [0, 0, 0]
}
}

optimizer {
adam_optimizer: {
epsilon: 1e-7 # Match tf.keras.optimizers.Adam's default.
learning_rate: {
manual_step_learning_rate {
initial_learning_rate: 1e-3
schedule {
step: 90000
learning_rate: 1e-4
}
schedule {
step: 120000
learning_rate: 1e-5
}
}
}
}
use_moving_average: false
}
max_number_of_boxes: 100
unpad_groundtruth_tensors: false

fine_tune_checkpoint_version: V2
fine_tune_checkpoint: "PATH_TO_BE_CONFIGURED/ckpt-1"
fine_tune_checkpoint_type: "detection"
}

train_input_reader: {
label_map_path: "PATH_TO_BE_CONFIGURED/label_map.txt"
tf_record_input_reader {
input_path: "PATH_TO_BE_CONFIGURED/train2017-?????-of-00256.tfrecord"
}
}

eval_config: {
metrics_set: "coco_detection_metrics"
use_moving_averages: false
batch_size: 1;
}

eval_input_reader: {
label_map_path: "PATH_TO_BE_CONFIGURED/label_map.txt"
shuffle: false
num_epochs: 1
tf_record_input_reader {
input_path: "PATH_TO_BE_CONFIGURED/val2017-?????-of-00032.tfrecord"
}
}

0 comments on commit 5245161

Please sign in to comment.