Commit 266026c9 authored by TF Object Detection Team's avatar TF Object Detection Team
Browse files

Merge pull request #8894 from syiming:adjust_proto_file_frcnn_fpn

PiperOrigin-RevId: 324505842
parents 03f907d8 4152a5c7
...@@ -8,6 +8,7 @@ import "object_detection/protos/hyperparams.proto"; ...@@ -8,6 +8,7 @@ import "object_detection/protos/hyperparams.proto";
import "object_detection/protos/image_resizer.proto"; import "object_detection/protos/image_resizer.proto";
import "object_detection/protos/losses.proto"; import "object_detection/protos/losses.proto";
import "object_detection/protos/post_processing.proto"; import "object_detection/protos/post_processing.proto";
import "object_detection/protos/fpn.proto";
// Configuration for Faster R-CNN models. // Configuration for Faster R-CNN models.
// See meta_architectures/faster_rcnn_meta_arch.py and models/model_builder.py // See meta_architectures/faster_rcnn_meta_arch.py and models/model_builder.py
...@@ -212,4 +213,21 @@ message FasterRcnnFeatureExtractor { ...@@ -212,4 +213,21 @@ message FasterRcnnFeatureExtractor {
// When training with a relative large batch size (e.g. 8), it could be // When training with a relative large batch size (e.g. 8), it could be
// desirable to enable batch norm update. // desirable to enable batch norm update.
optional bool batch_norm_trainable = 3 [default = false]; optional bool batch_norm_trainable = 3 [default = false];
// Hyperparameters that affect the layers of feature extractor added on top
// of the base feature extractor.
optional Hyperparams conv_hyperparams = 4;
// if the value is set to true, the base feature extractor's hyperparams will
// be overridden with the `conv_hyperparams`.
optional bool override_base_feature_extractor_hyperparams = 5
[default = false];
// The nearest multiple to zero-pad the input height and width dimensions to.
// For example, if pad_to_multiple = 2, input dimensions are zero-padded
// until the resulting dimensions are even.
optional int32 pad_to_multiple = 6 [default = 32];
// Feature Pyramid Networks config.
optional FeaturePyramidNetworks fpn = 7;
} }
syntax = "proto2";
package object_detection.protos;
// Configuration for Feature Pyramid Networks.
message FeaturePyramidNetworks {
// We recommend to use multi_resolution_feature_map_generator with FPN, and
// the levels there must match the levels defined below for better
// performance.
// Correspondence from FPN levels to Resnet/Mobilenet V1 feature maps:
// FPN Level Resnet Feature Map Mobilenet-V1 Feature Map
// 2 Block 1 Conv2d_3_pointwise
// 3 Block 2 Conv2d_5_pointwise
// 4 Block 3 Conv2d_11_pointwise
// 5 Block 4 Conv2d_13_pointwise
// 6 Bottomup_5 bottom_up_Conv2d_14
// 7 Bottomup_6 bottom_up_Conv2d_15
// 8 Bottomup_7 bottom_up_Conv2d_16
// 9 Bottomup_8 bottom_up_Conv2d_17
// minimum level in feature pyramid
optional int32 min_level = 1 [default = 3];
// maximum level in feature pyramid
optional int32 max_level = 2 [default = 7];
// channel depth for additional coarse feature layers.
optional int32 additional_layer_depth = 3 [default = 256];
}
// Configuration for Bidirectional Feature Pyramid Networks.
message BidirectionalFeaturePyramidNetworks {
// minimum level in the feature pyramid.
optional int32 min_level = 1 [default = 3];
// maximum level in the feature pyramid.
optional int32 max_level = 2 [default = 7];
// The number of repeated top-down bottom-up iterations for BiFPN-based
// feature extractors (bidirectional feature pyramid networks).
optional int32 num_iterations = 3;
// The number of filters (channels) to use in feature pyramid layers for
// BiFPN-based feature extractors (bidirectional feature pyramid networks).
optional int32 num_filters = 4;
// Method used to combine inputs to BiFPN nodes.
optional string combine_method = 5 [default = 'fast_attention'];
}
...@@ -11,6 +11,7 @@ import "object_detection/protos/losses.proto"; ...@@ -11,6 +11,7 @@ import "object_detection/protos/losses.proto";
import "object_detection/protos/matcher.proto"; import "object_detection/protos/matcher.proto";
import "object_detection/protos/post_processing.proto"; import "object_detection/protos/post_processing.proto";
import "object_detection/protos/region_similarity_calculator.proto"; import "object_detection/protos/region_similarity_calculator.proto";
import "object_detection/protos/fpn.proto";
// Configuration for Single Shot Detection (SSD) models. // Configuration for Single Shot Detection (SSD) models.
// Next id: 27 // Next id: 27
...@@ -203,50 +204,3 @@ message SsdFeatureExtractor { ...@@ -203,50 +204,3 @@ message SsdFeatureExtractor {
} }
// Configuration for Feature Pyramid Networks.
message FeaturePyramidNetworks {
// We recommend to use multi_resolution_feature_map_generator with FPN, and
// the levels there must match the levels defined below for better
// performance.
// Correspondence from FPN levels to Resnet/Mobilenet V1 feature maps:
// FPN Level Resnet Feature Map Mobilenet-V1 Feature Map
// 2 Block 1 Conv2d_3_pointwise
// 3 Block 2 Conv2d_5_pointwise
// 4 Block 3 Conv2d_11_pointwise
// 5 Block 4 Conv2d_13_pointwise
// 6 Bottomup_5 bottom_up_Conv2d_14
// 7 Bottomup_6 bottom_up_Conv2d_15
// 8 Bottomup_7 bottom_up_Conv2d_16
// 9 Bottomup_8 bottom_up_Conv2d_17
// minimum level in feature pyramid
optional int32 min_level = 1 [default = 3];
// maximum level in feature pyramid
optional int32 max_level = 2 [default = 7];
// channel depth for additional coarse feature layers.
optional int32 additional_layer_depth = 3 [default = 256];
}
// Configuration for Bidirectional Feature Pyramid Networks.
message BidirectionalFeaturePyramidNetworks {
// minimum level in the feature pyramid.
optional int32 min_level = 1 [default = 3];
// maximum level in the feature pyramid.
optional int32 max_level = 2 [default = 7];
// The number of repeated top-down bottom-up iterations for BiFPN-based
// feature extractors (bidirectional feature pyramid networks).
optional int32 num_iterations = 3;
// The number of filters (channels) to use in feature pyramid layers for
// BiFPN-based feature extractors (bidirectional feature pyramid networks).
optional int32 num_filters = 4;
// Method used to combine inputs to BiFPN nodes.
optional string combine_method = 5 [default = 'fast_attention'];
}
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