Commit ac55f024 authored by A. Unique TensorFlower's avatar A. Unique TensorFlower
Browse files

Internal change

PiperOrigin-RevId: 436761233
parent b12db2db
# Proper Reuse of Image Classification Features Improves Object Detection
Coming soon
1. CVPR 2022 paper
2. Table of results
\ No newline at end of file
...@@ -214,6 +214,10 @@ class MaskRCNNTask(cfg.TaskConfig): ...@@ -214,6 +214,10 @@ class MaskRCNNTask(cfg.TaskConfig):
# If set, the Waymo Open Dataset evaluator would be used. # If set, the Waymo Open Dataset evaluator would be used.
use_wod_metrics: bool = False use_wod_metrics: bool = False
# If set, freezes the backbone during training.
# TODO(crisnv) Add paper link when available.
freeze_backbone: bool = False
COCO_INPUT_PATH_BASE = 'coco' COCO_INPUT_PATH_BASE = 'coco'
......
...@@ -82,10 +82,15 @@ class MaskRCNNTask(base_task.Task): ...@@ -82,10 +82,15 @@ class MaskRCNNTask(base_task.Task):
input_specs=input_specs, input_specs=input_specs,
model_config=self.task_config.model, model_config=self.task_config.model,
l2_regularizer=l2_regularizer) l2_regularizer=l2_regularizer)
if self.task_config.freeze_backbone:
model.backbone.trainable = False
return model return model
def initialize(self, model: tf.keras.Model): def initialize(self, model: tf.keras.Model):
"""Loading pretrained checkpoint.""" """Loading pretrained checkpoint."""
if not self.task_config.init_checkpoint: if not self.task_config.init_checkpoint:
return return
......
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