From fa41aac14c8002d219205ebc2ff11b7c1c7bf8a9 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sun, 8 Sep 2019 21:51:18 -0500 Subject: [PATCH] generated ObjectDetection related protos for tf.models. --- TensorFlow.NET.sln | 6 + .../ObjectDetection/Protos/AnchorGenerator.cs | 343 + .../ObjectDetection/Protos/ArgmaxMatcher.cs | 343 + .../Protos/BipartiteMatcher.cs | 181 + .../ObjectDetection/Protos/BoxCoder.cs | 341 + .../ObjectDetection/Protos/BoxPredictor.cs | 2587 +++++ .../ObjectDetection/Protos/Calibration.cs | 1413 +++ .../ObjectDetection/Protos/Eval.cs | 901 ++ .../ObjectDetection/Protos/FasterRcnn.cs | 1592 +++ .../Protos/FasterRcnnBoxCoder.cs | 272 + .../Protos/FlexibleGridAnchorGenerator.cs | 476 + .../ObjectDetection/Protos/GraphRewriter.cs | 417 + .../Protos/GridAnchorGenerator.cs | 386 + .../ObjectDetection/Protos/Hyperparams.cs | 2106 ++++ .../ObjectDetection/Protos/ImageResizer.cs | 1255 +++ .../ObjectDetection/Protos/InputReader.cs | 1225 +++ .../Protos/KeypointBoxCoder.cs | 300 + .../ObjectDetection/Protos/Losses.cs | 3009 ++++++ .../ObjectDetection/Protos/Matcher.cs | 257 + .../Protos/MeanStddevBoxCoder.cs | 180 + .../ObjectDetection/Protos/Model.cs | 255 + .../Protos/MultiscaleAnchorGenerator.cs | 332 + .../ObjectDetection/Protos/Optimizer.cs | 2231 +++++ .../ObjectDetection/Protos/Pipeline.cs | 352 + .../ObjectDetection/Protos/PostProcessing.cs | 685 ++ .../ObjectDetection/Protos/Preprocessor.cs | 8697 +++++++++++++++++ .../Protos/RegionSimilarityCalculator.cs | 791 ++ .../ObjectDetection/Protos/SquareBoxCoder.cs | 240 + .../ObjectDetection/Protos/Ssd.cs | 2028 ++++ .../Protos/SsdAnchorGenerator.cs | 526 + .../Protos/StringIntLabelMap.cs | 365 + .../ObjectDetection/Protos/Train.cs | 1020 ++ .../TensorFlowNET.Models.csproj | 13 + .../TensorFlowNET.Examples.csproj | 4 + 34 files changed, 35129 insertions(+) create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/AnchorGenerator.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/ArgmaxMatcher.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/BipartiteMatcher.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/BoxCoder.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/BoxPredictor.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Calibration.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Eval.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnn.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnnBoxCoder.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/FlexibleGridAnchorGenerator.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/GraphRewriter.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/GridAnchorGenerator.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Hyperparams.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/ImageResizer.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/InputReader.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/KeypointBoxCoder.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Losses.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Matcher.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/MeanStddevBoxCoder.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Model.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/MultiscaleAnchorGenerator.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Optimizer.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Pipeline.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/PostProcessing.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Preprocessor.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/RegionSimilarityCalculator.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/SquareBoxCoder.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Ssd.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/SsdAnchorGenerator.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/StringIntLabelMap.cs create mode 100644 src/TensorFlowNET.Models/ObjectDetection/Protos/Train.cs create mode 100644 src/TensorFlowNET.Models/TensorFlowNET.Models.csproj diff --git a/TensorFlow.NET.sln b/TensorFlow.NET.sln index ca14ecbd..d941de2f 100644 --- a/TensorFlow.NET.sln +++ b/TensorFlow.NET.sln @@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowDatasets", "src\T EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Examples.GPU", "test\TensorFlowNET.Examples\TensorFlowNET.Examples.GPU.csproj", "{6F6B3382-8F87-4CD9-BF87-C81D5405685A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TensorFlowNET.Models", "src\TensorFlowNET.Models\TensorFlowNET.Models.csproj", "{D03F94CF-B283-4730-B177-21A57641061F}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -63,6 +65,10 @@ Global {6F6B3382-8F87-4CD9-BF87-C81D5405685A}.Debug|Any CPU.Build.0 = Debug|Any CPU {6F6B3382-8F87-4CD9-BF87-C81D5405685A}.Release|Any CPU.ActiveCfg = Release|Any CPU {6F6B3382-8F87-4CD9-BF87-C81D5405685A}.Release|Any CPU.Build.0 = Release|Any CPU + {D03F94CF-B283-4730-B177-21A57641061F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D03F94CF-B283-4730-B177-21A57641061F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D03F94CF-B283-4730-B177-21A57641061F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D03F94CF-B283-4730-B177-21A57641061F}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/AnchorGenerator.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/AnchorGenerator.cs new file mode 100644 index 00000000..8a0e255c --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/AnchorGenerator.cs @@ -0,0 +1,343 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/anchor_generator.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/anchor_generator.proto + public static partial class AnchorGeneratorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/anchor_generator.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static AnchorGeneratorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci5vYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9hbmNob3JfZ2VuZXJhdG9yLnBy", + "b3RvEhdvYmplY3RfZGV0ZWN0aW9uLnByb3Rvcxo8b2JqZWN0X2RldGVjdGlv", + "bi9wcm90b3MvZmxleGlibGVfZ3JpZF9hbmNob3JfZ2VuZXJhdG9yLnByb3Rv", + "GjNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ncmlkX2FuY2hvcl9nZW5lcmF0", + "b3IucHJvdG8aOW9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL211bHRpc2NhbGVf", + "YW5jaG9yX2dlbmVyYXRvci5wcm90bxoyb2JqZWN0X2RldGVjdGlvbi9wcm90", + "b3Mvc3NkX2FuY2hvcl9nZW5lcmF0b3IucHJvdG8iggMKD0FuY2hvckdlbmVy", + "YXRvchJNChVncmlkX2FuY2hvcl9nZW5lcmF0b3IYASABKAsyLC5vYmplY3Rf", + "ZGV0ZWN0aW9uLnByb3Rvcy5HcmlkQW5jaG9yR2VuZXJhdG9ySAASSwoUc3Nk", + "X2FuY2hvcl9nZW5lcmF0b3IYAiABKAsyKy5vYmplY3RfZGV0ZWN0aW9uLnBy", + "b3Rvcy5Tc2RBbmNob3JHZW5lcmF0b3JIABJZChttdWx0aXNjYWxlX2FuY2hv", + "cl9nZW5lcmF0b3IYAyABKAsyMi5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5N", + "dWx0aXNjYWxlQW5jaG9yR2VuZXJhdG9ySAASXgoeZmxleGlibGVfZ3JpZF9h", + "bmNob3JfZ2VuZXJhdG9yGAQgASgLMjQub2JqZWN0X2RldGVjdGlvbi5wcm90", + "b3MuRmxleGlibGVHcmlkQW5jaG9yR2VuZXJhdG9ySABCGAoWYW5jaG9yX2dl", + "bmVyYXRvcl9vbmVvZmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGeneratorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGeneratorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGeneratorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGeneratorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator), global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator.Parser, new[]{ "GridAnchorGenerator", "SsdAnchorGenerator", "MultiscaleAnchorGenerator", "FlexibleGridAnchorGenerator" }, new[]{ "AnchorGeneratorOneof" }, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for the anchor generator to use in the object detection + /// pipeline. See core/anchor_generator.py for details. + /// + public sealed partial class AnchorGenerator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AnchorGenerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.AnchorGeneratorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGenerator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGenerator(AnchorGenerator other) : this() { + switch (other.AnchorGeneratorOneofCase) { + case AnchorGeneratorOneofOneofCase.GridAnchorGenerator: + GridAnchorGenerator = other.GridAnchorGenerator.Clone(); + break; + case AnchorGeneratorOneofOneofCase.SsdAnchorGenerator: + SsdAnchorGenerator = other.SsdAnchorGenerator.Clone(); + break; + case AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator: + MultiscaleAnchorGenerator = other.MultiscaleAnchorGenerator.Clone(); + break; + case AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator: + FlexibleGridAnchorGenerator = other.FlexibleGridAnchorGenerator.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGenerator Clone() { + return new AnchorGenerator(this); + } + + /// Field number for the "grid_anchor_generator" field. + public const int GridAnchorGeneratorFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator GridAnchorGenerator { + get { return anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.GridAnchorGenerator ? (global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator) anchorGeneratorOneof_ : null; } + set { + anchorGeneratorOneof_ = value; + anchorGeneratorOneofCase_ = value == null ? AnchorGeneratorOneofOneofCase.None : AnchorGeneratorOneofOneofCase.GridAnchorGenerator; + } + } + + /// Field number for the "ssd_anchor_generator" field. + public const int SsdAnchorGeneratorFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator SsdAnchorGenerator { + get { return anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.SsdAnchorGenerator ? (global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator) anchorGeneratorOneof_ : null; } + set { + anchorGeneratorOneof_ = value; + anchorGeneratorOneofCase_ = value == null ? AnchorGeneratorOneofOneofCase.None : AnchorGeneratorOneofOneofCase.SsdAnchorGenerator; + } + } + + /// Field number for the "multiscale_anchor_generator" field. + public const int MultiscaleAnchorGeneratorFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator MultiscaleAnchorGenerator { + get { return anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator ? (global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator) anchorGeneratorOneof_ : null; } + set { + anchorGeneratorOneof_ = value; + anchorGeneratorOneofCase_ = value == null ? AnchorGeneratorOneofOneofCase.None : AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator; + } + } + + /// Field number for the "flexible_grid_anchor_generator" field. + public const int FlexibleGridAnchorGeneratorFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator FlexibleGridAnchorGenerator { + get { return anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator ? (global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator) anchorGeneratorOneof_ : null; } + set { + anchorGeneratorOneof_ = value; + anchorGeneratorOneofCase_ = value == null ? AnchorGeneratorOneofOneofCase.None : AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator; + } + } + + private object anchorGeneratorOneof_; + /// Enum of possible cases for the "anchor_generator_oneof" oneof. + public enum AnchorGeneratorOneofOneofCase { + None = 0, + GridAnchorGenerator = 1, + SsdAnchorGenerator = 2, + MultiscaleAnchorGenerator = 3, + FlexibleGridAnchorGenerator = 4, + } + private AnchorGeneratorOneofOneofCase anchorGeneratorOneofCase_ = AnchorGeneratorOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGeneratorOneofOneofCase AnchorGeneratorOneofCase { + get { return anchorGeneratorOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearAnchorGeneratorOneof() { + anchorGeneratorOneofCase_ = AnchorGeneratorOneofOneofCase.None; + anchorGeneratorOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as AnchorGenerator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(AnchorGenerator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(GridAnchorGenerator, other.GridAnchorGenerator)) return false; + if (!object.Equals(SsdAnchorGenerator, other.SsdAnchorGenerator)) return false; + if (!object.Equals(MultiscaleAnchorGenerator, other.MultiscaleAnchorGenerator)) return false; + if (!object.Equals(FlexibleGridAnchorGenerator, other.FlexibleGridAnchorGenerator)) return false; + if (AnchorGeneratorOneofCase != other.AnchorGeneratorOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.GridAnchorGenerator) hash ^= GridAnchorGenerator.GetHashCode(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.SsdAnchorGenerator) hash ^= SsdAnchorGenerator.GetHashCode(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator) hash ^= MultiscaleAnchorGenerator.GetHashCode(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator) hash ^= FlexibleGridAnchorGenerator.GetHashCode(); + hash ^= (int) anchorGeneratorOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.GridAnchorGenerator) { + output.WriteRawTag(10); + output.WriteMessage(GridAnchorGenerator); + } + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.SsdAnchorGenerator) { + output.WriteRawTag(18); + output.WriteMessage(SsdAnchorGenerator); + } + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator) { + output.WriteRawTag(26); + output.WriteMessage(MultiscaleAnchorGenerator); + } + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator) { + output.WriteRawTag(34); + output.WriteMessage(FlexibleGridAnchorGenerator); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.GridAnchorGenerator) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GridAnchorGenerator); + } + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.SsdAnchorGenerator) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SsdAnchorGenerator); + } + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MultiscaleAnchorGenerator); + } + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FlexibleGridAnchorGenerator); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(AnchorGenerator other) { + if (other == null) { + return; + } + switch (other.AnchorGeneratorOneofCase) { + case AnchorGeneratorOneofOneofCase.GridAnchorGenerator: + if (GridAnchorGenerator == null) { + GridAnchorGenerator = new global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator(); + } + GridAnchorGenerator.MergeFrom(other.GridAnchorGenerator); + break; + case AnchorGeneratorOneofOneofCase.SsdAnchorGenerator: + if (SsdAnchorGenerator == null) { + SsdAnchorGenerator = new global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator(); + } + SsdAnchorGenerator.MergeFrom(other.SsdAnchorGenerator); + break; + case AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator: + if (MultiscaleAnchorGenerator == null) { + MultiscaleAnchorGenerator = new global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator(); + } + MultiscaleAnchorGenerator.MergeFrom(other.MultiscaleAnchorGenerator); + break; + case AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator: + if (FlexibleGridAnchorGenerator == null) { + FlexibleGridAnchorGenerator = new global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator(); + } + FlexibleGridAnchorGenerator.MergeFrom(other.FlexibleGridAnchorGenerator); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.GridAnchorGenerator) { + subBuilder.MergeFrom(GridAnchorGenerator); + } + input.ReadMessage(subBuilder); + GridAnchorGenerator = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.SsdAnchorGenerator) { + subBuilder.MergeFrom(SsdAnchorGenerator); + } + input.ReadMessage(subBuilder); + SsdAnchorGenerator = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.MultiscaleAnchorGenerator) { + subBuilder.MergeFrom(MultiscaleAnchorGenerator); + } + input.ReadMessage(subBuilder); + MultiscaleAnchorGenerator = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator(); + if (anchorGeneratorOneofCase_ == AnchorGeneratorOneofOneofCase.FlexibleGridAnchorGenerator) { + subBuilder.MergeFrom(FlexibleGridAnchorGenerator); + } + input.ReadMessage(subBuilder); + FlexibleGridAnchorGenerator = subBuilder; + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/ArgmaxMatcher.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/ArgmaxMatcher.cs new file mode 100644 index 00000000..c967c034 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/ArgmaxMatcher.cs @@ -0,0 +1,343 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/argmax_matcher.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/argmax_matcher.proto + public static partial class ArgmaxMatcherReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/argmax_matcher.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ArgmaxMatcherReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CixvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9hcmdtYXhfbWF0Y2hlci5wcm90", + "bxIXb2JqZWN0X2RldGVjdGlvbi5wcm90b3MixwEKDUFyZ01heE1hdGNoZXIS", + "GQoRbWF0Y2hlZF90aHJlc2hvbGQYASABKAISGwoTdW5tYXRjaGVkX3RocmVz", + "aG9sZBgCIAEoAhIZChFpZ25vcmVfdGhyZXNob2xkcxgDIAEoCBImCh5uZWdh", + "dGl2ZXNfbG93ZXJfdGhhbl91bm1hdGNoZWQYBCABKAgSIAoYZm9yY2VfbWF0", + "Y2hfZm9yX2VhY2hfcm93GAUgASgIEhkKEXVzZV9tYXRtdWxfZ2F0aGVyGAYg", + "ASgIYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher), global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher.Parser, new[]{ "MatchedThreshold", "UnmatchedThreshold", "IgnoreThresholds", "NegativesLowerThanUnmatched", "ForceMatchForEachRow", "UseMatmulGather" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for ArgMaxMatcher. See + /// matchers/argmax_matcher.py for details. + /// + public sealed partial class ArgMaxMatcher : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ArgMaxMatcher()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ArgmaxMatcherReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ArgMaxMatcher() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ArgMaxMatcher(ArgMaxMatcher other) : this() { + matchedThreshold_ = other.matchedThreshold_; + unmatchedThreshold_ = other.unmatchedThreshold_; + ignoreThresholds_ = other.ignoreThresholds_; + negativesLowerThanUnmatched_ = other.negativesLowerThanUnmatched_; + forceMatchForEachRow_ = other.forceMatchForEachRow_; + useMatmulGather_ = other.useMatmulGather_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ArgMaxMatcher Clone() { + return new ArgMaxMatcher(this); + } + + /// Field number for the "matched_threshold" field. + public const int MatchedThresholdFieldNumber = 1; + private float matchedThreshold_; + /// + /// Threshold for positive matches. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MatchedThreshold { + get { return matchedThreshold_; } + set { + matchedThreshold_ = value; + } + } + + /// Field number for the "unmatched_threshold" field. + public const int UnmatchedThresholdFieldNumber = 2; + private float unmatchedThreshold_; + /// + /// Threshold for negative matches. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float UnmatchedThreshold { + get { return unmatchedThreshold_; } + set { + unmatchedThreshold_ = value; + } + } + + /// Field number for the "ignore_thresholds" field. + public const int IgnoreThresholdsFieldNumber = 3; + private bool ignoreThresholds_; + /// + /// Whether to construct ArgMaxMatcher without thresholds. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IgnoreThresholds { + get { return ignoreThresholds_; } + set { + ignoreThresholds_ = value; + } + } + + /// Field number for the "negatives_lower_than_unmatched" field. + public const int NegativesLowerThanUnmatchedFieldNumber = 4; + private bool negativesLowerThanUnmatched_; + /// + /// If True then negative matches are the ones below the unmatched_threshold, + /// whereas ignored matches are in between the matched and umatched + /// threshold. If False, then negative matches are in between the matched + /// and unmatched threshold, and everything lower than unmatched is ignored. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool NegativesLowerThanUnmatched { + get { return negativesLowerThanUnmatched_; } + set { + negativesLowerThanUnmatched_ = value; + } + } + + /// Field number for the "force_match_for_each_row" field. + public const int ForceMatchForEachRowFieldNumber = 5; + private bool forceMatchForEachRow_; + /// + /// Whether to ensure each row is matched to at least one column. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ForceMatchForEachRow { + get { return forceMatchForEachRow_; } + set { + forceMatchForEachRow_ = value; + } + } + + /// Field number for the "use_matmul_gather" field. + public const int UseMatmulGatherFieldNumber = 6; + private bool useMatmulGather_; + /// + /// Force constructed match objects to use matrix multiplication based gather + /// instead of standard tf.gather + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMatmulGather { + get { return useMatmulGather_; } + set { + useMatmulGather_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ArgMaxMatcher); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ArgMaxMatcher other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MatchedThreshold, other.MatchedThreshold)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(UnmatchedThreshold, other.UnmatchedThreshold)) return false; + if (IgnoreThresholds != other.IgnoreThresholds) return false; + if (NegativesLowerThanUnmatched != other.NegativesLowerThanUnmatched) return false; + if (ForceMatchForEachRow != other.ForceMatchForEachRow) return false; + if (UseMatmulGather != other.UseMatmulGather) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MatchedThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MatchedThreshold); + if (UnmatchedThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(UnmatchedThreshold); + if (IgnoreThresholds != false) hash ^= IgnoreThresholds.GetHashCode(); + if (NegativesLowerThanUnmatched != false) hash ^= NegativesLowerThanUnmatched.GetHashCode(); + if (ForceMatchForEachRow != false) hash ^= ForceMatchForEachRow.GetHashCode(); + if (UseMatmulGather != false) hash ^= UseMatmulGather.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MatchedThreshold != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MatchedThreshold); + } + if (UnmatchedThreshold != 0F) { + output.WriteRawTag(21); + output.WriteFloat(UnmatchedThreshold); + } + if (IgnoreThresholds != false) { + output.WriteRawTag(24); + output.WriteBool(IgnoreThresholds); + } + if (NegativesLowerThanUnmatched != false) { + output.WriteRawTag(32); + output.WriteBool(NegativesLowerThanUnmatched); + } + if (ForceMatchForEachRow != false) { + output.WriteRawTag(40); + output.WriteBool(ForceMatchForEachRow); + } + if (UseMatmulGather != false) { + output.WriteRawTag(48); + output.WriteBool(UseMatmulGather); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MatchedThreshold != 0F) { + size += 1 + 4; + } + if (UnmatchedThreshold != 0F) { + size += 1 + 4; + } + if (IgnoreThresholds != false) { + size += 1 + 1; + } + if (NegativesLowerThanUnmatched != false) { + size += 1 + 1; + } + if (ForceMatchForEachRow != false) { + size += 1 + 1; + } + if (UseMatmulGather != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ArgMaxMatcher other) { + if (other == null) { + return; + } + if (other.MatchedThreshold != 0F) { + MatchedThreshold = other.MatchedThreshold; + } + if (other.UnmatchedThreshold != 0F) { + UnmatchedThreshold = other.UnmatchedThreshold; + } + if (other.IgnoreThresholds != false) { + IgnoreThresholds = other.IgnoreThresholds; + } + if (other.NegativesLowerThanUnmatched != false) { + NegativesLowerThanUnmatched = other.NegativesLowerThanUnmatched; + } + if (other.ForceMatchForEachRow != false) { + ForceMatchForEachRow = other.ForceMatchForEachRow; + } + if (other.UseMatmulGather != false) { + UseMatmulGather = other.UseMatmulGather; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MatchedThreshold = input.ReadFloat(); + break; + } + case 21: { + UnmatchedThreshold = input.ReadFloat(); + break; + } + case 24: { + IgnoreThresholds = input.ReadBool(); + break; + } + case 32: { + NegativesLowerThanUnmatched = input.ReadBool(); + break; + } + case 40: { + ForceMatchForEachRow = input.ReadBool(); + break; + } + case 48: { + UseMatmulGather = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/BipartiteMatcher.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/BipartiteMatcher.cs new file mode 100644 index 00000000..5ead27f5 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/BipartiteMatcher.cs @@ -0,0 +1,181 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/bipartite_matcher.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/bipartite_matcher.proto + public static partial class BipartiteMatcherReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/bipartite_matcher.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BipartiteMatcherReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci9vYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9iaXBhcnRpdGVfbWF0Y2hlci5w", + "cm90bxIXb2JqZWN0X2RldGVjdGlvbi5wcm90b3MiLQoQQmlwYXJ0aXRlTWF0", + "Y2hlchIZChF1c2VfbWF0bXVsX2dhdGhlchgGIAEoCGIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher), global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher.Parser, new[]{ "UseMatmulGather" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for bipartite matcher. See + /// matchers/bipartite_matcher.py for details. + /// + public sealed partial class BipartiteMatcher : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BipartiteMatcher()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcherReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BipartiteMatcher() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BipartiteMatcher(BipartiteMatcher other) : this() { + useMatmulGather_ = other.useMatmulGather_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BipartiteMatcher Clone() { + return new BipartiteMatcher(this); + } + + /// Field number for the "use_matmul_gather" field. + public const int UseMatmulGatherFieldNumber = 6; + private bool useMatmulGather_; + /// + /// Force constructed match objects to use matrix multiplication based gather + /// instead of standard tf.gather + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMatmulGather { + get { return useMatmulGather_; } + set { + useMatmulGather_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BipartiteMatcher); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BipartiteMatcher other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UseMatmulGather != other.UseMatmulGather) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (UseMatmulGather != false) hash ^= UseMatmulGather.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (UseMatmulGather != false) { + output.WriteRawTag(48); + output.WriteBool(UseMatmulGather); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (UseMatmulGather != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BipartiteMatcher other) { + if (other == null) { + return; + } + if (other.UseMatmulGather != false) { + UseMatmulGather = other.UseMatmulGather; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 48: { + UseMatmulGather = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/BoxCoder.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/BoxCoder.cs new file mode 100644 index 00000000..d13d3326 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/BoxCoder.cs @@ -0,0 +1,341 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/box_coder.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/box_coder.proto + public static partial class BoxCoderReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/box_coder.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BoxCoderReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CidvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ib3hfY29kZXIucHJvdG8SF29i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zGjNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rv", + "cy9mYXN0ZXJfcmNubl9ib3hfY29kZXIucHJvdG8aMG9iamVjdF9kZXRlY3Rp", + "b24vcHJvdG9zL2tleXBvaW50X2JveF9jb2Rlci5wcm90bxozb2JqZWN0X2Rl", + "dGVjdGlvbi9wcm90b3MvbWVhbl9zdGRkZXZfYm94X2NvZGVyLnByb3RvGi5v", + "YmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9zcXVhcmVfYm94X2NvZGVyLnByb3Rv", + "IscCCghCb3hDb2RlchJMChVmYXN0ZXJfcmNubl9ib3hfY29kZXIYASABKAsy", + "Ky5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5GYXN0ZXJSY25uQm94Q29kZXJI", + "ABJMChVtZWFuX3N0ZGRldl9ib3hfY29kZXIYAiABKAsyKy5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5NZWFuU3RkZGV2Qm94Q29kZXJIABJDChBzcXVhcmVf", + "Ym94X2NvZGVyGAMgASgLMicub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuU3F1", + "YXJlQm94Q29kZXJIABJHChJrZXlwb2ludF9ib3hfY29kZXIYBCABKAsyKS5v", + "YmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5LZXlwb2ludEJveENvZGVySABCEQoP", + "Ym94X2NvZGVyX29uZW9mYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoderReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoderReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoderReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoderReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.BoxCoder), global::Tensorflow.Models.ObjectDetection.Protos.BoxCoder.Parser, new[]{ "FasterRcnnBoxCoder", "MeanStddevBoxCoder", "SquareBoxCoder", "KeypointBoxCoder" }, new[]{ "BoxCoderOneof" }, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for the box coder to be used in the object detection + /// pipeline. See core/box_coder.py for details. + /// + public sealed partial class BoxCoder : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxCoder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BoxCoderReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxCoder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxCoder(BoxCoder other) : this() { + switch (other.BoxCoderOneofCase) { + case BoxCoderOneofOneofCase.FasterRcnnBoxCoder: + FasterRcnnBoxCoder = other.FasterRcnnBoxCoder.Clone(); + break; + case BoxCoderOneofOneofCase.MeanStddevBoxCoder: + MeanStddevBoxCoder = other.MeanStddevBoxCoder.Clone(); + break; + case BoxCoderOneofOneofCase.SquareBoxCoder: + SquareBoxCoder = other.SquareBoxCoder.Clone(); + break; + case BoxCoderOneofOneofCase.KeypointBoxCoder: + KeypointBoxCoder = other.KeypointBoxCoder.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxCoder Clone() { + return new BoxCoder(this); + } + + /// Field number for the "faster_rcnn_box_coder" field. + public const int FasterRcnnBoxCoderFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder FasterRcnnBoxCoder { + get { return boxCoderOneofCase_ == BoxCoderOneofOneofCase.FasterRcnnBoxCoder ? (global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder) boxCoderOneof_ : null; } + set { + boxCoderOneof_ = value; + boxCoderOneofCase_ = value == null ? BoxCoderOneofOneofCase.None : BoxCoderOneofOneofCase.FasterRcnnBoxCoder; + } + } + + /// Field number for the "mean_stddev_box_coder" field. + public const int MeanStddevBoxCoderFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder MeanStddevBoxCoder { + get { return boxCoderOneofCase_ == BoxCoderOneofOneofCase.MeanStddevBoxCoder ? (global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder) boxCoderOneof_ : null; } + set { + boxCoderOneof_ = value; + boxCoderOneofCase_ = value == null ? BoxCoderOneofOneofCase.None : BoxCoderOneofOneofCase.MeanStddevBoxCoder; + } + } + + /// Field number for the "square_box_coder" field. + public const int SquareBoxCoderFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder SquareBoxCoder { + get { return boxCoderOneofCase_ == BoxCoderOneofOneofCase.SquareBoxCoder ? (global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder) boxCoderOneof_ : null; } + set { + boxCoderOneof_ = value; + boxCoderOneofCase_ = value == null ? BoxCoderOneofOneofCase.None : BoxCoderOneofOneofCase.SquareBoxCoder; + } + } + + /// Field number for the "keypoint_box_coder" field. + public const int KeypointBoxCoderFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder KeypointBoxCoder { + get { return boxCoderOneofCase_ == BoxCoderOneofOneofCase.KeypointBoxCoder ? (global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder) boxCoderOneof_ : null; } + set { + boxCoderOneof_ = value; + boxCoderOneofCase_ = value == null ? BoxCoderOneofOneofCase.None : BoxCoderOneofOneofCase.KeypointBoxCoder; + } + } + + private object boxCoderOneof_; + /// Enum of possible cases for the "box_coder_oneof" oneof. + public enum BoxCoderOneofOneofCase { + None = 0, + FasterRcnnBoxCoder = 1, + MeanStddevBoxCoder = 2, + SquareBoxCoder = 3, + KeypointBoxCoder = 4, + } + private BoxCoderOneofOneofCase boxCoderOneofCase_ = BoxCoderOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxCoderOneofOneofCase BoxCoderOneofCase { + get { return boxCoderOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBoxCoderOneof() { + boxCoderOneofCase_ = BoxCoderOneofOneofCase.None; + boxCoderOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BoxCoder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BoxCoder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(FasterRcnnBoxCoder, other.FasterRcnnBoxCoder)) return false; + if (!object.Equals(MeanStddevBoxCoder, other.MeanStddevBoxCoder)) return false; + if (!object.Equals(SquareBoxCoder, other.SquareBoxCoder)) return false; + if (!object.Equals(KeypointBoxCoder, other.KeypointBoxCoder)) return false; + if (BoxCoderOneofCase != other.BoxCoderOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.FasterRcnnBoxCoder) hash ^= FasterRcnnBoxCoder.GetHashCode(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.MeanStddevBoxCoder) hash ^= MeanStddevBoxCoder.GetHashCode(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.SquareBoxCoder) hash ^= SquareBoxCoder.GetHashCode(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.KeypointBoxCoder) hash ^= KeypointBoxCoder.GetHashCode(); + hash ^= (int) boxCoderOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.FasterRcnnBoxCoder) { + output.WriteRawTag(10); + output.WriteMessage(FasterRcnnBoxCoder); + } + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.MeanStddevBoxCoder) { + output.WriteRawTag(18); + output.WriteMessage(MeanStddevBoxCoder); + } + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.SquareBoxCoder) { + output.WriteRawTag(26); + output.WriteMessage(SquareBoxCoder); + } + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.KeypointBoxCoder) { + output.WriteRawTag(34); + output.WriteMessage(KeypointBoxCoder); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.FasterRcnnBoxCoder) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FasterRcnnBoxCoder); + } + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.MeanStddevBoxCoder) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MeanStddevBoxCoder); + } + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.SquareBoxCoder) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SquareBoxCoder); + } + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.KeypointBoxCoder) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(KeypointBoxCoder); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BoxCoder other) { + if (other == null) { + return; + } + switch (other.BoxCoderOneofCase) { + case BoxCoderOneofOneofCase.FasterRcnnBoxCoder: + if (FasterRcnnBoxCoder == null) { + FasterRcnnBoxCoder = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder(); + } + FasterRcnnBoxCoder.MergeFrom(other.FasterRcnnBoxCoder); + break; + case BoxCoderOneofOneofCase.MeanStddevBoxCoder: + if (MeanStddevBoxCoder == null) { + MeanStddevBoxCoder = new global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder(); + } + MeanStddevBoxCoder.MergeFrom(other.MeanStddevBoxCoder); + break; + case BoxCoderOneofOneofCase.SquareBoxCoder: + if (SquareBoxCoder == null) { + SquareBoxCoder = new global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder(); + } + SquareBoxCoder.MergeFrom(other.SquareBoxCoder); + break; + case BoxCoderOneofOneofCase.KeypointBoxCoder: + if (KeypointBoxCoder == null) { + KeypointBoxCoder = new global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder(); + } + KeypointBoxCoder.MergeFrom(other.KeypointBoxCoder); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.FasterRcnnBoxCoder) { + subBuilder.MergeFrom(FasterRcnnBoxCoder); + } + input.ReadMessage(subBuilder); + FasterRcnnBoxCoder = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.MeanStddevBoxCoder) { + subBuilder.MergeFrom(MeanStddevBoxCoder); + } + input.ReadMessage(subBuilder); + MeanStddevBoxCoder = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.SquareBoxCoder) { + subBuilder.MergeFrom(SquareBoxCoder); + } + input.ReadMessage(subBuilder); + SquareBoxCoder = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder(); + if (boxCoderOneofCase_ == BoxCoderOneofOneofCase.KeypointBoxCoder) { + subBuilder.MergeFrom(KeypointBoxCoder); + } + input.ReadMessage(subBuilder); + KeypointBoxCoder = subBuilder; + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/BoxPredictor.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/BoxPredictor.cs new file mode 100644 index 00000000..382c0d21 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/BoxPredictor.cs @@ -0,0 +1,2587 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/box_predictor.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/box_predictor.proto + public static partial class BoxPredictorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/box_predictor.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BoxPredictorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CitvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ib3hfcHJlZGljdG9yLnByb3Rv", + "EhdvYmplY3RfZGV0ZWN0aW9uLnByb3Rvcxopb2JqZWN0X2RldGVjdGlvbi9w", + "cm90b3MvaHlwZXJwYXJhbXMucHJvdG8ikAMKDEJveFByZWRpY3RvchJZChtj", + "b252b2x1dGlvbmFsX2JveF9wcmVkaWN0b3IYASABKAsyMi5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5Db252b2x1dGlvbmFsQm94UHJlZGljdG9ySAASUAoX", + "bWFza19yY25uX2JveF9wcmVkaWN0b3IYAiABKAsyLS5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5NYXNrUkNOTkJveFByZWRpY3RvckgAEkcKEnJmY25fYm94", + "X3ByZWRpY3RvchgDIAEoCzIpLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJm", + "Y25Cb3hQcmVkaWN0b3JIABJzCil3ZWlnaHRfc2hhcmVkX2NvbnZvbHV0aW9u", + "YWxfYm94X3ByZWRpY3RvchgEIAEoCzI+Lm9iamVjdF9kZXRlY3Rpb24ucHJv", + "dG9zLldlaWdodFNoYXJlZENvbnZvbHV0aW9uYWxCb3hQcmVkaWN0b3JIAEIV", + "ChNib3hfcHJlZGljdG9yX29uZW9mIoQEChlDb252b2x1dGlvbmFsQm94UHJl", + "ZGljdG9yEj4KEGNvbnZfaHlwZXJwYXJhbXMYASABKAsyJC5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5IeXBlcnBhcmFtcxIRCgltaW5fZGVwdGgYAiABKAUS", + "EQoJbWF4X2RlcHRoGAMgASgFEiMKG251bV9sYXllcnNfYmVmb3JlX3ByZWRp", + "Y3RvchgEIAEoBRITCgt1c2VfZHJvcG91dBgFIAEoCBIgChhkcm9wb3V0X2tl", + "ZXBfcHJvYmFiaWxpdHkYBiABKAISEwoLa2VybmVsX3NpemUYByABKAUSFQoN", + "Ym94X2NvZGVfc2l6ZRgIIAEoBRIfChdhcHBseV9zaWdtb2lkX3RvX3Njb3Jl", + "cxgJIAEoCBIiChpjbGFzc19wcmVkaWN0aW9uX2JpYXNfaW5pdBgKIAEoAhIV", + "Cg11c2VfZGVwdGh3aXNlGAsgASgIEmoKGGJveF9lbmNvZGluZ3NfY2xpcF9y", + "YW5nZRgMIAEoCzJILm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLkNvbnZvbHV0", + "aW9uYWxCb3hQcmVkaWN0b3IuQm94RW5jb2RpbmdzQ2xpcFJhbmdlGjEKFUJv", + "eEVuY29kaW5nc0NsaXBSYW5nZRILCgNtaW4YASABKAISCwoDbWF4GAIgASgC", + "IpkFCiVXZWlnaHRTaGFyZWRDb252b2x1dGlvbmFsQm94UHJlZGljdG9yEj4K", + "EGNvbnZfaHlwZXJwYXJhbXMYASABKAsyJC5vYmplY3RfZGV0ZWN0aW9uLnBy", + "b3Rvcy5IeXBlcnBhcmFtcxIjChtudW1fbGF5ZXJzX2JlZm9yZV9wcmVkaWN0", + "b3IYBCABKAUSDQoFZGVwdGgYAiABKAUSEwoLa2VybmVsX3NpemUYByABKAUS", + "FQoNYm94X2NvZGVfc2l6ZRgIIAEoBRIiChpjbGFzc19wcmVkaWN0aW9uX2Jp", + "YXNfaW5pdBgKIAEoAhITCgt1c2VfZHJvcG91dBgLIAEoCBIgChhkcm9wb3V0", + "X2tlZXBfcHJvYmFiaWxpdHkYDCABKAISHgoWc2hhcmVfcHJlZGljdGlvbl90", + "b3dlchgNIAEoCBIVCg11c2VfZGVwdGh3aXNlGA4gASgIEmYKD3Njb3JlX2Nv", + "bnZlcnRlchgQIAEoDjJNLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLldlaWdo", + "dFNoYXJlZENvbnZvbHV0aW9uYWxCb3hQcmVkaWN0b3IuU2NvcmVDb252ZXJ0", + "ZXISdgoYYm94X2VuY29kaW5nc19jbGlwX3JhbmdlGBEgASgLMlQub2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MuV2VpZ2h0U2hhcmVkQ29udm9sdXRpb25hbEJv", + "eFByZWRpY3Rvci5Cb3hFbmNvZGluZ3NDbGlwUmFuZ2UaMQoVQm94RW5jb2Rp", + "bmdzQ2xpcFJhbmdlEgsKA21pbhgBIAEoAhILCgNtYXgYAiABKAIiKwoOU2Nv", + "cmVDb252ZXJ0ZXISDAoISURFTlRJVFkQABILCgdTSUdNT0lEEAEi/QMKFE1h", + "c2tSQ05OQm94UHJlZGljdG9yEjwKDmZjX2h5cGVycGFyYW1zGAEgASgLMiQu", + "b2JqZWN0X2RldGVjdGlvbi5wcm90b3MuSHlwZXJwYXJhbXMSEwoLdXNlX2Ry", + "b3BvdXQYAiABKAgSIAoYZHJvcG91dF9rZWVwX3Byb2JhYmlsaXR5GAMgASgC", + "EhUKDWJveF9jb2RlX3NpemUYBCABKAUSPgoQY29udl9oeXBlcnBhcmFtcxgF", + "IAEoCzIkLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLkh5cGVycGFyYW1zEh4K", + "FnByZWRpY3RfaW5zdGFuY2VfbWFza3MYBiABKAgSIgoabWFza19wcmVkaWN0", + "aW9uX2NvbnZfZGVwdGgYByABKAUSGQoRcHJlZGljdF9rZXlwb2ludHMYCCAB", + "KAgSEwoLbWFza19oZWlnaHQYCSABKAUSEgoKbWFza193aWR0aBgKIAEoBRIn", + "Ch9tYXNrX3ByZWRpY3Rpb25fbnVtX2NvbnZfbGF5ZXJzGAsgASgFEiAKGG1h", + "c2tzX2FyZV9jbGFzc19hZ25vc3RpYxgMIAEoCBIgChhzaGFyZV9ib3hfYWNy", + "b3NzX2NsYXNzZXMYDSABKAgSJAocY29udm9sdmVfdGhlbl91cHNhbXBsZV9t", + "YXNrcxgOIAEoCCLiAQoQUmZjbkJveFByZWRpY3RvchI+ChBjb252X2h5cGVy", + "cGFyYW1zGAEgASgLMiQub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuSHlwZXJw", + "YXJhbXMSHwoXbnVtX3NwYXRpYWxfYmluc19oZWlnaHQYAiABKAUSHgoWbnVt", + "X3NwYXRpYWxfYmluc193aWR0aBgDIAEoBRINCgVkZXB0aBgEIAEoBRIVCg1i", + "b3hfY29kZV9zaXplGAUgASgFEhMKC2Nyb3BfaGVpZ2h0GAYgASgFEhIKCmNy", + "b3Bfd2lkdGgYByABKAViBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor), global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor.Parser, new[]{ "ConvolutionalBoxPredictor", "MaskRcnnBoxPredictor", "RfcnBoxPredictor", "WeightSharedConvolutionalBoxPredictor" }, new[]{ "BoxPredictorOneof" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor), global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Parser, new[]{ "ConvHyperparams", "MinDepth", "MaxDepth", "NumLayersBeforePredictor", "UseDropout", "DropoutKeepProbability", "KernelSize", "BoxCodeSize", "ApplySigmoidToScores", "ClassPredictionBiasInit", "UseDepthwise", "BoxEncodingsClipRange" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Types.BoxEncodingsClipRange), global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Types.BoxEncodingsClipRange.Parser, new[]{ "Min", "Max" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor), global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Parser, new[]{ "ConvHyperparams", "NumLayersBeforePredictor", "Depth", "KernelSize", "BoxCodeSize", "ClassPredictionBiasInit", "UseDropout", "DropoutKeepProbability", "SharePredictionTower", "UseDepthwise", "ScoreConverter", "BoxEncodingsClipRange" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.ScoreConverter) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.BoxEncodingsClipRange), global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.BoxEncodingsClipRange.Parser, new[]{ "Min", "Max" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor), global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor.Parser, new[]{ "FcHyperparams", "UseDropout", "DropoutKeepProbability", "BoxCodeSize", "ConvHyperparams", "PredictInstanceMasks", "MaskPredictionConvDepth", "PredictKeypoints", "MaskHeight", "MaskWidth", "MaskPredictionNumConvLayers", "MasksAreClassAgnostic", "ShareBoxAcrossClasses", "ConvolveThenUpsampleMasks" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor), global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor.Parser, new[]{ "ConvHyperparams", "NumSpatialBinsHeight", "NumSpatialBinsWidth", "Depth", "BoxCodeSize", "CropHeight", "CropWidth" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for box predictor. See core/box_predictor.py for details. + /// + public sealed partial class BoxPredictor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxPredictor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxPredictor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxPredictor(BoxPredictor other) : this() { + switch (other.BoxPredictorOneofCase) { + case BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor: + ConvolutionalBoxPredictor = other.ConvolutionalBoxPredictor.Clone(); + break; + case BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor: + MaskRcnnBoxPredictor = other.MaskRcnnBoxPredictor.Clone(); + break; + case BoxPredictorOneofOneofCase.RfcnBoxPredictor: + RfcnBoxPredictor = other.RfcnBoxPredictor.Clone(); + break; + case BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor: + WeightSharedConvolutionalBoxPredictor = other.WeightSharedConvolutionalBoxPredictor.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxPredictor Clone() { + return new BoxPredictor(this); + } + + /// Field number for the "convolutional_box_predictor" field. + public const int ConvolutionalBoxPredictorFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor ConvolutionalBoxPredictor { + get { return boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor ? (global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor) boxPredictorOneof_ : null; } + set { + boxPredictorOneof_ = value; + boxPredictorOneofCase_ = value == null ? BoxPredictorOneofOneofCase.None : BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor; + } + } + + /// Field number for the "mask_rcnn_box_predictor" field. + public const int MaskRcnnBoxPredictorFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor MaskRcnnBoxPredictor { + get { return boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor ? (global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor) boxPredictorOneof_ : null; } + set { + boxPredictorOneof_ = value; + boxPredictorOneofCase_ = value == null ? BoxPredictorOneofOneofCase.None : BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor; + } + } + + /// Field number for the "rfcn_box_predictor" field. + public const int RfcnBoxPredictorFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor RfcnBoxPredictor { + get { return boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.RfcnBoxPredictor ? (global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor) boxPredictorOneof_ : null; } + set { + boxPredictorOneof_ = value; + boxPredictorOneofCase_ = value == null ? BoxPredictorOneofOneofCase.None : BoxPredictorOneofOneofCase.RfcnBoxPredictor; + } + } + + /// Field number for the "weight_shared_convolutional_box_predictor" field. + public const int WeightSharedConvolutionalBoxPredictorFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor WeightSharedConvolutionalBoxPredictor { + get { return boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor) boxPredictorOneof_ : null; } + set { + boxPredictorOneof_ = value; + boxPredictorOneofCase_ = value == null ? BoxPredictorOneofOneofCase.None : BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor; + } + } + + private object boxPredictorOneof_; + /// Enum of possible cases for the "box_predictor_oneof" oneof. + public enum BoxPredictorOneofOneofCase { + None = 0, + ConvolutionalBoxPredictor = 1, + MaskRcnnBoxPredictor = 2, + RfcnBoxPredictor = 3, + WeightSharedConvolutionalBoxPredictor = 4, + } + private BoxPredictorOneofOneofCase boxPredictorOneofCase_ = BoxPredictorOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxPredictorOneofOneofCase BoxPredictorOneofCase { + get { return boxPredictorOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearBoxPredictorOneof() { + boxPredictorOneofCase_ = BoxPredictorOneofOneofCase.None; + boxPredictorOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BoxPredictor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BoxPredictor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConvolutionalBoxPredictor, other.ConvolutionalBoxPredictor)) return false; + if (!object.Equals(MaskRcnnBoxPredictor, other.MaskRcnnBoxPredictor)) return false; + if (!object.Equals(RfcnBoxPredictor, other.RfcnBoxPredictor)) return false; + if (!object.Equals(WeightSharedConvolutionalBoxPredictor, other.WeightSharedConvolutionalBoxPredictor)) return false; + if (BoxPredictorOneofCase != other.BoxPredictorOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor) hash ^= ConvolutionalBoxPredictor.GetHashCode(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor) hash ^= MaskRcnnBoxPredictor.GetHashCode(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.RfcnBoxPredictor) hash ^= RfcnBoxPredictor.GetHashCode(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor) hash ^= WeightSharedConvolutionalBoxPredictor.GetHashCode(); + hash ^= (int) boxPredictorOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor) { + output.WriteRawTag(10); + output.WriteMessage(ConvolutionalBoxPredictor); + } + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor) { + output.WriteRawTag(18); + output.WriteMessage(MaskRcnnBoxPredictor); + } + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.RfcnBoxPredictor) { + output.WriteRawTag(26); + output.WriteMessage(RfcnBoxPredictor); + } + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor) { + output.WriteRawTag(34); + output.WriteMessage(WeightSharedConvolutionalBoxPredictor); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvolutionalBoxPredictor); + } + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MaskRcnnBoxPredictor); + } + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.RfcnBoxPredictor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RfcnBoxPredictor); + } + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightSharedConvolutionalBoxPredictor); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BoxPredictor other) { + if (other == null) { + return; + } + switch (other.BoxPredictorOneofCase) { + case BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor: + if (ConvolutionalBoxPredictor == null) { + ConvolutionalBoxPredictor = new global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor(); + } + ConvolutionalBoxPredictor.MergeFrom(other.ConvolutionalBoxPredictor); + break; + case BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor: + if (MaskRcnnBoxPredictor == null) { + MaskRcnnBoxPredictor = new global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor(); + } + MaskRcnnBoxPredictor.MergeFrom(other.MaskRcnnBoxPredictor); + break; + case BoxPredictorOneofOneofCase.RfcnBoxPredictor: + if (RfcnBoxPredictor == null) { + RfcnBoxPredictor = new global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor(); + } + RfcnBoxPredictor.MergeFrom(other.RfcnBoxPredictor); + break; + case BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor: + if (WeightSharedConvolutionalBoxPredictor == null) { + WeightSharedConvolutionalBoxPredictor = new global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor(); + } + WeightSharedConvolutionalBoxPredictor.MergeFrom(other.WeightSharedConvolutionalBoxPredictor); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.ConvolutionalBoxPredictor) { + subBuilder.MergeFrom(ConvolutionalBoxPredictor); + } + input.ReadMessage(subBuilder); + ConvolutionalBoxPredictor = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.MaskRCNNBoxPredictor(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.MaskRcnnBoxPredictor) { + subBuilder.MergeFrom(MaskRcnnBoxPredictor); + } + input.ReadMessage(subBuilder); + MaskRcnnBoxPredictor = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RfcnBoxPredictor(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.RfcnBoxPredictor) { + subBuilder.MergeFrom(RfcnBoxPredictor); + } + input.ReadMessage(subBuilder); + RfcnBoxPredictor = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor(); + if (boxPredictorOneofCase_ == BoxPredictorOneofOneofCase.WeightSharedConvolutionalBoxPredictor) { + subBuilder.MergeFrom(WeightSharedConvolutionalBoxPredictor); + } + input.ReadMessage(subBuilder); + WeightSharedConvolutionalBoxPredictor = subBuilder; + break; + } + } + } + } + + } + + /// + /// Configuration proto for Convolutional box predictor. + /// Next id: 13 + /// + public sealed partial class ConvolutionalBoxPredictor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConvolutionalBoxPredictor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConvolutionalBoxPredictor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConvolutionalBoxPredictor(ConvolutionalBoxPredictor other) : this() { + convHyperparams_ = other.convHyperparams_ != null ? other.convHyperparams_.Clone() : null; + minDepth_ = other.minDepth_; + maxDepth_ = other.maxDepth_; + numLayersBeforePredictor_ = other.numLayersBeforePredictor_; + useDropout_ = other.useDropout_; + dropoutKeepProbability_ = other.dropoutKeepProbability_; + kernelSize_ = other.kernelSize_; + boxCodeSize_ = other.boxCodeSize_; + applySigmoidToScores_ = other.applySigmoidToScores_; + classPredictionBiasInit_ = other.classPredictionBiasInit_; + useDepthwise_ = other.useDepthwise_; + boxEncodingsClipRange_ = other.boxEncodingsClipRange_ != null ? other.boxEncodingsClipRange_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConvolutionalBoxPredictor Clone() { + return new ConvolutionalBoxPredictor(this); + } + + /// Field number for the "conv_hyperparams" field. + public const int ConvHyperparamsFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams convHyperparams_; + /// + /// Hyperparameters for convolution ops used in the box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams ConvHyperparams { + get { return convHyperparams_; } + set { + convHyperparams_ = value; + } + } + + /// Field number for the "min_depth" field. + public const int MinDepthFieldNumber = 2; + private int minDepth_; + /// + /// Minimum feature depth prior to predicting box encodings and class + /// predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinDepth { + get { return minDepth_; } + set { + minDepth_ = value; + } + } + + /// Field number for the "max_depth" field. + public const int MaxDepthFieldNumber = 3; + private int maxDepth_; + /// + /// Maximum feature depth prior to predicting box encodings and class + /// predictions. If max_depth is set to 0, no additional feature map will be + /// inserted before location and class predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxDepth { + get { return maxDepth_; } + set { + maxDepth_ = value; + } + } + + /// Field number for the "num_layers_before_predictor" field. + public const int NumLayersBeforePredictorFieldNumber = 4; + private int numLayersBeforePredictor_; + /// + /// Number of the additional conv layers before the predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumLayersBeforePredictor { + get { return numLayersBeforePredictor_; } + set { + numLayersBeforePredictor_ = value; + } + } + + /// Field number for the "use_dropout" field. + public const int UseDropoutFieldNumber = 5; + private bool useDropout_; + /// + /// Whether to use dropout for class prediction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDropout { + get { return useDropout_; } + set { + useDropout_ = value; + } + } + + /// Field number for the "dropout_keep_probability" field. + public const int DropoutKeepProbabilityFieldNumber = 6; + private float dropoutKeepProbability_; + /// + /// Keep probability for dropout + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DropoutKeepProbability { + get { return dropoutKeepProbability_; } + set { + dropoutKeepProbability_ = value; + } + } + + /// Field number for the "kernel_size" field. + public const int KernelSizeFieldNumber = 7; + private int kernelSize_; + /// + /// Size of final convolution kernel. If the spatial resolution of the feature + /// map is smaller than the kernel size, then the kernel size is set to + /// min(feature_width, feature_height). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int KernelSize { + get { return kernelSize_; } + set { + kernelSize_ = value; + } + } + + /// Field number for the "box_code_size" field. + public const int BoxCodeSizeFieldNumber = 8; + private int boxCodeSize_; + /// + /// Size of the encoding for boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int BoxCodeSize { + get { return boxCodeSize_; } + set { + boxCodeSize_ = value; + } + } + + /// Field number for the "apply_sigmoid_to_scores" field. + public const int ApplySigmoidToScoresFieldNumber = 9; + private bool applySigmoidToScores_; + /// + /// Whether to apply sigmoid to the output of class predictions. + /// TODO(jonathanhuang): Do we need this since we have a post processing + /// module.? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ApplySigmoidToScores { + get { return applySigmoidToScores_; } + set { + applySigmoidToScores_ = value; + } + } + + /// Field number for the "class_prediction_bias_init" field. + public const int ClassPredictionBiasInitFieldNumber = 10; + private float classPredictionBiasInit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ClassPredictionBiasInit { + get { return classPredictionBiasInit_; } + set { + classPredictionBiasInit_ = value; + } + } + + /// Field number for the "use_depthwise" field. + public const int UseDepthwiseFieldNumber = 11; + private bool useDepthwise_; + /// + /// Whether to use depthwise separable convolution for box predictor layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDepthwise { + get { return useDepthwise_; } + set { + useDepthwise_ = value; + } + } + + /// Field number for the "box_encodings_clip_range" field. + public const int BoxEncodingsClipRangeFieldNumber = 12; + private global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Types.BoxEncodingsClipRange boxEncodingsClipRange_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Types.BoxEncodingsClipRange BoxEncodingsClipRange { + get { return boxEncodingsClipRange_; } + set { + boxEncodingsClipRange_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ConvolutionalBoxPredictor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ConvolutionalBoxPredictor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConvHyperparams, other.ConvHyperparams)) return false; + if (MinDepth != other.MinDepth) return false; + if (MaxDepth != other.MaxDepth) return false; + if (NumLayersBeforePredictor != other.NumLayersBeforePredictor) return false; + if (UseDropout != other.UseDropout) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DropoutKeepProbability, other.DropoutKeepProbability)) return false; + if (KernelSize != other.KernelSize) return false; + if (BoxCodeSize != other.BoxCodeSize) return false; + if (ApplySigmoidToScores != other.ApplySigmoidToScores) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ClassPredictionBiasInit, other.ClassPredictionBiasInit)) return false; + if (UseDepthwise != other.UseDepthwise) return false; + if (!object.Equals(BoxEncodingsClipRange, other.BoxEncodingsClipRange)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (convHyperparams_ != null) hash ^= ConvHyperparams.GetHashCode(); + if (MinDepth != 0) hash ^= MinDepth.GetHashCode(); + if (MaxDepth != 0) hash ^= MaxDepth.GetHashCode(); + if (NumLayersBeforePredictor != 0) hash ^= NumLayersBeforePredictor.GetHashCode(); + if (UseDropout != false) hash ^= UseDropout.GetHashCode(); + if (DropoutKeepProbability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DropoutKeepProbability); + if (KernelSize != 0) hash ^= KernelSize.GetHashCode(); + if (BoxCodeSize != 0) hash ^= BoxCodeSize.GetHashCode(); + if (ApplySigmoidToScores != false) hash ^= ApplySigmoidToScores.GetHashCode(); + if (ClassPredictionBiasInit != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ClassPredictionBiasInit); + if (UseDepthwise != false) hash ^= UseDepthwise.GetHashCode(); + if (boxEncodingsClipRange_ != null) hash ^= BoxEncodingsClipRange.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (convHyperparams_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConvHyperparams); + } + if (MinDepth != 0) { + output.WriteRawTag(16); + output.WriteInt32(MinDepth); + } + if (MaxDepth != 0) { + output.WriteRawTag(24); + output.WriteInt32(MaxDepth); + } + if (NumLayersBeforePredictor != 0) { + output.WriteRawTag(32); + output.WriteInt32(NumLayersBeforePredictor); + } + if (UseDropout != false) { + output.WriteRawTag(40); + output.WriteBool(UseDropout); + } + if (DropoutKeepProbability != 0F) { + output.WriteRawTag(53); + output.WriteFloat(DropoutKeepProbability); + } + if (KernelSize != 0) { + output.WriteRawTag(56); + output.WriteInt32(KernelSize); + } + if (BoxCodeSize != 0) { + output.WriteRawTag(64); + output.WriteInt32(BoxCodeSize); + } + if (ApplySigmoidToScores != false) { + output.WriteRawTag(72); + output.WriteBool(ApplySigmoidToScores); + } + if (ClassPredictionBiasInit != 0F) { + output.WriteRawTag(85); + output.WriteFloat(ClassPredictionBiasInit); + } + if (UseDepthwise != false) { + output.WriteRawTag(88); + output.WriteBool(UseDepthwise); + } + if (boxEncodingsClipRange_ != null) { + output.WriteRawTag(98); + output.WriteMessage(BoxEncodingsClipRange); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (convHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvHyperparams); + } + if (MinDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinDepth); + } + if (MaxDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxDepth); + } + if (NumLayersBeforePredictor != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumLayersBeforePredictor); + } + if (UseDropout != false) { + size += 1 + 1; + } + if (DropoutKeepProbability != 0F) { + size += 1 + 4; + } + if (KernelSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelSize); + } + if (BoxCodeSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BoxCodeSize); + } + if (ApplySigmoidToScores != false) { + size += 1 + 1; + } + if (ClassPredictionBiasInit != 0F) { + size += 1 + 4; + } + if (UseDepthwise != false) { + size += 1 + 1; + } + if (boxEncodingsClipRange_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoxEncodingsClipRange); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ConvolutionalBoxPredictor other) { + if (other == null) { + return; + } + if (other.convHyperparams_ != null) { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + ConvHyperparams.MergeFrom(other.ConvHyperparams); + } + if (other.MinDepth != 0) { + MinDepth = other.MinDepth; + } + if (other.MaxDepth != 0) { + MaxDepth = other.MaxDepth; + } + if (other.NumLayersBeforePredictor != 0) { + NumLayersBeforePredictor = other.NumLayersBeforePredictor; + } + if (other.UseDropout != false) { + UseDropout = other.UseDropout; + } + if (other.DropoutKeepProbability != 0F) { + DropoutKeepProbability = other.DropoutKeepProbability; + } + if (other.KernelSize != 0) { + KernelSize = other.KernelSize; + } + if (other.BoxCodeSize != 0) { + BoxCodeSize = other.BoxCodeSize; + } + if (other.ApplySigmoidToScores != false) { + ApplySigmoidToScores = other.ApplySigmoidToScores; + } + if (other.ClassPredictionBiasInit != 0F) { + ClassPredictionBiasInit = other.ClassPredictionBiasInit; + } + if (other.UseDepthwise != false) { + UseDepthwise = other.UseDepthwise; + } + if (other.boxEncodingsClipRange_ != null) { + if (boxEncodingsClipRange_ == null) { + boxEncodingsClipRange_ = new global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Types.BoxEncodingsClipRange(); + } + BoxEncodingsClipRange.MergeFrom(other.BoxEncodingsClipRange); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(convHyperparams_); + break; + } + case 16: { + MinDepth = input.ReadInt32(); + break; + } + case 24: { + MaxDepth = input.ReadInt32(); + break; + } + case 32: { + NumLayersBeforePredictor = input.ReadInt32(); + break; + } + case 40: { + UseDropout = input.ReadBool(); + break; + } + case 53: { + DropoutKeepProbability = input.ReadFloat(); + break; + } + case 56: { + KernelSize = input.ReadInt32(); + break; + } + case 64: { + BoxCodeSize = input.ReadInt32(); + break; + } + case 72: { + ApplySigmoidToScores = input.ReadBool(); + break; + } + case 85: { + ClassPredictionBiasInit = input.ReadFloat(); + break; + } + case 88: { + UseDepthwise = input.ReadBool(); + break; + } + case 98: { + if (boxEncodingsClipRange_ == null) { + boxEncodingsClipRange_ = new global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Types.BoxEncodingsClipRange(); + } + input.ReadMessage(boxEncodingsClipRange_); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the ConvolutionalBoxPredictor message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// If specified, apply clipping to box encodings. + /// + public sealed partial class BoxEncodingsClipRange : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxEncodingsClipRange()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ConvolutionalBoxPredictor.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxEncodingsClipRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxEncodingsClipRange(BoxEncodingsClipRange other) : this() { + min_ = other.min_; + max_ = other.max_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxEncodingsClipRange Clone() { + return new BoxEncodingsClipRange(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private float min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Min { + get { return min_; } + set { + min_ = value; + } + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private float max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Max { + get { return max_; } + set { + max_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BoxEncodingsClipRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BoxEncodingsClipRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Min, other.Min)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Max, other.Max)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Min != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Min); + if (Max != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Max); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Min != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (Max != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Min != 0F) { + size += 1 + 4; + } + if (Max != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BoxEncodingsClipRange other) { + if (other == null) { + return; + } + if (other.Min != 0F) { + Min = other.Min; + } + if (other.Max != 0F) { + Max = other.Max; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + } + } + } + + } + + } + #endregion + + } + + /// + /// Configuration proto for weight shared convolutional box predictor. + /// Next id: 18 + /// + public sealed partial class WeightSharedConvolutionalBoxPredictor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightSharedConvolutionalBoxPredictor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightSharedConvolutionalBoxPredictor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightSharedConvolutionalBoxPredictor(WeightSharedConvolutionalBoxPredictor other) : this() { + convHyperparams_ = other.convHyperparams_ != null ? other.convHyperparams_.Clone() : null; + numLayersBeforePredictor_ = other.numLayersBeforePredictor_; + depth_ = other.depth_; + kernelSize_ = other.kernelSize_; + boxCodeSize_ = other.boxCodeSize_; + classPredictionBiasInit_ = other.classPredictionBiasInit_; + useDropout_ = other.useDropout_; + dropoutKeepProbability_ = other.dropoutKeepProbability_; + sharePredictionTower_ = other.sharePredictionTower_; + useDepthwise_ = other.useDepthwise_; + scoreConverter_ = other.scoreConverter_; + boxEncodingsClipRange_ = other.boxEncodingsClipRange_ != null ? other.boxEncodingsClipRange_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightSharedConvolutionalBoxPredictor Clone() { + return new WeightSharedConvolutionalBoxPredictor(this); + } + + /// Field number for the "conv_hyperparams" field. + public const int ConvHyperparamsFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams convHyperparams_; + /// + /// Hyperparameters for convolution ops used in the box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams ConvHyperparams { + get { return convHyperparams_; } + set { + convHyperparams_ = value; + } + } + + /// Field number for the "num_layers_before_predictor" field. + public const int NumLayersBeforePredictorFieldNumber = 4; + private int numLayersBeforePredictor_; + /// + /// Number of the additional conv layers before the predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumLayersBeforePredictor { + get { return numLayersBeforePredictor_; } + set { + numLayersBeforePredictor_ = value; + } + } + + /// Field number for the "depth" field. + public const int DepthFieldNumber = 2; + private int depth_; + /// + /// Output depth for the convolution ops prior to predicting box encodings + /// and class predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Depth { + get { return depth_; } + set { + depth_ = value; + } + } + + /// Field number for the "kernel_size" field. + public const int KernelSizeFieldNumber = 7; + private int kernelSize_; + /// + /// Size of final convolution kernel. If the spatial resolution of the feature + /// map is smaller than the kernel size, then the kernel size is set to + /// min(feature_width, feature_height). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int KernelSize { + get { return kernelSize_; } + set { + kernelSize_ = value; + } + } + + /// Field number for the "box_code_size" field. + public const int BoxCodeSizeFieldNumber = 8; + private int boxCodeSize_; + /// + /// Size of the encoding for boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int BoxCodeSize { + get { return boxCodeSize_; } + set { + boxCodeSize_ = value; + } + } + + /// Field number for the "class_prediction_bias_init" field. + public const int ClassPredictionBiasInitFieldNumber = 10; + private float classPredictionBiasInit_; + /// + /// Bias initialization for class prediction. It has been show to stabilize + /// training where there are large number of negative boxes. See + /// https://arxiv.org/abs/1708.02002 for details. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ClassPredictionBiasInit { + get { return classPredictionBiasInit_; } + set { + classPredictionBiasInit_ = value; + } + } + + /// Field number for the "use_dropout" field. + public const int UseDropoutFieldNumber = 11; + private bool useDropout_; + /// + /// Whether to use dropout for class prediction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDropout { + get { return useDropout_; } + set { + useDropout_ = value; + } + } + + /// Field number for the "dropout_keep_probability" field. + public const int DropoutKeepProbabilityFieldNumber = 12; + private float dropoutKeepProbability_; + /// + /// Keep probability for dropout. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DropoutKeepProbability { + get { return dropoutKeepProbability_; } + set { + dropoutKeepProbability_ = value; + } + } + + /// Field number for the "share_prediction_tower" field. + public const int SharePredictionTowerFieldNumber = 13; + private bool sharePredictionTower_; + /// + /// Whether to share the multi-layer tower between box prediction and class + /// prediction heads. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SharePredictionTower { + get { return sharePredictionTower_; } + set { + sharePredictionTower_ = value; + } + } + + /// Field number for the "use_depthwise" field. + public const int UseDepthwiseFieldNumber = 14; + private bool useDepthwise_; + /// + /// Whether to use depthwise separable convolution for box predictor layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDepthwise { + get { return useDepthwise_; } + set { + useDepthwise_ = value; + } + } + + /// Field number for the "score_converter" field. + public const int ScoreConverterFieldNumber = 16; + private global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.ScoreConverter scoreConverter_ = 0; + /// + /// Callable elementwise score converter at inference time. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.ScoreConverter ScoreConverter { + get { return scoreConverter_; } + set { + scoreConverter_ = value; + } + } + + /// Field number for the "box_encodings_clip_range" field. + public const int BoxEncodingsClipRangeFieldNumber = 17; + private global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.BoxEncodingsClipRange boxEncodingsClipRange_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.BoxEncodingsClipRange BoxEncodingsClipRange { + get { return boxEncodingsClipRange_; } + set { + boxEncodingsClipRange_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightSharedConvolutionalBoxPredictor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightSharedConvolutionalBoxPredictor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConvHyperparams, other.ConvHyperparams)) return false; + if (NumLayersBeforePredictor != other.NumLayersBeforePredictor) return false; + if (Depth != other.Depth) return false; + if (KernelSize != other.KernelSize) return false; + if (BoxCodeSize != other.BoxCodeSize) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ClassPredictionBiasInit, other.ClassPredictionBiasInit)) return false; + if (UseDropout != other.UseDropout) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DropoutKeepProbability, other.DropoutKeepProbability)) return false; + if (SharePredictionTower != other.SharePredictionTower) return false; + if (UseDepthwise != other.UseDepthwise) return false; + if (ScoreConverter != other.ScoreConverter) return false; + if (!object.Equals(BoxEncodingsClipRange, other.BoxEncodingsClipRange)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (convHyperparams_ != null) hash ^= ConvHyperparams.GetHashCode(); + if (NumLayersBeforePredictor != 0) hash ^= NumLayersBeforePredictor.GetHashCode(); + if (Depth != 0) hash ^= Depth.GetHashCode(); + if (KernelSize != 0) hash ^= KernelSize.GetHashCode(); + if (BoxCodeSize != 0) hash ^= BoxCodeSize.GetHashCode(); + if (ClassPredictionBiasInit != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ClassPredictionBiasInit); + if (UseDropout != false) hash ^= UseDropout.GetHashCode(); + if (DropoutKeepProbability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DropoutKeepProbability); + if (SharePredictionTower != false) hash ^= SharePredictionTower.GetHashCode(); + if (UseDepthwise != false) hash ^= UseDepthwise.GetHashCode(); + if (ScoreConverter != 0) hash ^= ScoreConverter.GetHashCode(); + if (boxEncodingsClipRange_ != null) hash ^= BoxEncodingsClipRange.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (convHyperparams_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConvHyperparams); + } + if (Depth != 0) { + output.WriteRawTag(16); + output.WriteInt32(Depth); + } + if (NumLayersBeforePredictor != 0) { + output.WriteRawTag(32); + output.WriteInt32(NumLayersBeforePredictor); + } + if (KernelSize != 0) { + output.WriteRawTag(56); + output.WriteInt32(KernelSize); + } + if (BoxCodeSize != 0) { + output.WriteRawTag(64); + output.WriteInt32(BoxCodeSize); + } + if (ClassPredictionBiasInit != 0F) { + output.WriteRawTag(85); + output.WriteFloat(ClassPredictionBiasInit); + } + if (UseDropout != false) { + output.WriteRawTag(88); + output.WriteBool(UseDropout); + } + if (DropoutKeepProbability != 0F) { + output.WriteRawTag(101); + output.WriteFloat(DropoutKeepProbability); + } + if (SharePredictionTower != false) { + output.WriteRawTag(104); + output.WriteBool(SharePredictionTower); + } + if (UseDepthwise != false) { + output.WriteRawTag(112); + output.WriteBool(UseDepthwise); + } + if (ScoreConverter != 0) { + output.WriteRawTag(128, 1); + output.WriteEnum((int) ScoreConverter); + } + if (boxEncodingsClipRange_ != null) { + output.WriteRawTag(138, 1); + output.WriteMessage(BoxEncodingsClipRange); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (convHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvHyperparams); + } + if (NumLayersBeforePredictor != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumLayersBeforePredictor); + } + if (Depth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Depth); + } + if (KernelSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(KernelSize); + } + if (BoxCodeSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BoxCodeSize); + } + if (ClassPredictionBiasInit != 0F) { + size += 1 + 4; + } + if (UseDropout != false) { + size += 1 + 1; + } + if (DropoutKeepProbability != 0F) { + size += 1 + 4; + } + if (SharePredictionTower != false) { + size += 1 + 1; + } + if (UseDepthwise != false) { + size += 1 + 1; + } + if (ScoreConverter != 0) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) ScoreConverter); + } + if (boxEncodingsClipRange_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(BoxEncodingsClipRange); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightSharedConvolutionalBoxPredictor other) { + if (other == null) { + return; + } + if (other.convHyperparams_ != null) { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + ConvHyperparams.MergeFrom(other.ConvHyperparams); + } + if (other.NumLayersBeforePredictor != 0) { + NumLayersBeforePredictor = other.NumLayersBeforePredictor; + } + if (other.Depth != 0) { + Depth = other.Depth; + } + if (other.KernelSize != 0) { + KernelSize = other.KernelSize; + } + if (other.BoxCodeSize != 0) { + BoxCodeSize = other.BoxCodeSize; + } + if (other.ClassPredictionBiasInit != 0F) { + ClassPredictionBiasInit = other.ClassPredictionBiasInit; + } + if (other.UseDropout != false) { + UseDropout = other.UseDropout; + } + if (other.DropoutKeepProbability != 0F) { + DropoutKeepProbability = other.DropoutKeepProbability; + } + if (other.SharePredictionTower != false) { + SharePredictionTower = other.SharePredictionTower; + } + if (other.UseDepthwise != false) { + UseDepthwise = other.UseDepthwise; + } + if (other.ScoreConverter != 0) { + ScoreConverter = other.ScoreConverter; + } + if (other.boxEncodingsClipRange_ != null) { + if (boxEncodingsClipRange_ == null) { + boxEncodingsClipRange_ = new global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.BoxEncodingsClipRange(); + } + BoxEncodingsClipRange.MergeFrom(other.BoxEncodingsClipRange); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(convHyperparams_); + break; + } + case 16: { + Depth = input.ReadInt32(); + break; + } + case 32: { + NumLayersBeforePredictor = input.ReadInt32(); + break; + } + case 56: { + KernelSize = input.ReadInt32(); + break; + } + case 64: { + BoxCodeSize = input.ReadInt32(); + break; + } + case 85: { + ClassPredictionBiasInit = input.ReadFloat(); + break; + } + case 88: { + UseDropout = input.ReadBool(); + break; + } + case 101: { + DropoutKeepProbability = input.ReadFloat(); + break; + } + case 104: { + SharePredictionTower = input.ReadBool(); + break; + } + case 112: { + UseDepthwise = input.ReadBool(); + break; + } + case 128: { + scoreConverter_ = (global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.ScoreConverter) input.ReadEnum(); + break; + } + case 138: { + if (boxEncodingsClipRange_ == null) { + boxEncodingsClipRange_ = new global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Types.BoxEncodingsClipRange(); + } + input.ReadMessage(boxEncodingsClipRange_); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the WeightSharedConvolutionalBoxPredictor message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Enum to specify how to convert the detection scores at inference time. + /// + public enum ScoreConverter { + /// + /// Input scores equals output scores. + /// + [pbr::OriginalName("IDENTITY")] Identity = 0, + /// + /// Applies a sigmoid on input scores. + /// + [pbr::OriginalName("SIGMOID")] Sigmoid = 1, + } + + /// + /// If specified, apply clipping to box encodings. + /// + public sealed partial class BoxEncodingsClipRange : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxEncodingsClipRange()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.WeightSharedConvolutionalBoxPredictor.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxEncodingsClipRange() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxEncodingsClipRange(BoxEncodingsClipRange other) : this() { + min_ = other.min_; + max_ = other.max_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BoxEncodingsClipRange Clone() { + return new BoxEncodingsClipRange(this); + } + + /// Field number for the "min" field. + public const int MinFieldNumber = 1; + private float min_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Min { + get { return min_; } + set { + min_ = value; + } + } + + /// Field number for the "max" field. + public const int MaxFieldNumber = 2; + private float max_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Max { + get { return max_; } + set { + max_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BoxEncodingsClipRange); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BoxEncodingsClipRange other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Min, other.Min)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Max, other.Max)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Min != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Min); + if (Max != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Max); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Min != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Min); + } + if (Max != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Max); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Min != 0F) { + size += 1 + 4; + } + if (Max != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BoxEncodingsClipRange other) { + if (other == null) { + return; + } + if (other.Min != 0F) { + Min = other.Min; + } + if (other.Max != 0F) { + Max = other.Max; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Min = input.ReadFloat(); + break; + } + case 21: { + Max = input.ReadFloat(); + break; + } + } + } + } + + } + + } + #endregion + + } + + /// + /// TODO(alirezafathi): Refactor the proto file to be able to configure mask rcnn + /// head easily. + /// Next id: 15 + /// + public sealed partial class MaskRCNNBoxPredictor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MaskRCNNBoxPredictor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MaskRCNNBoxPredictor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MaskRCNNBoxPredictor(MaskRCNNBoxPredictor other) : this() { + fcHyperparams_ = other.fcHyperparams_ != null ? other.fcHyperparams_.Clone() : null; + useDropout_ = other.useDropout_; + dropoutKeepProbability_ = other.dropoutKeepProbability_; + boxCodeSize_ = other.boxCodeSize_; + convHyperparams_ = other.convHyperparams_ != null ? other.convHyperparams_.Clone() : null; + predictInstanceMasks_ = other.predictInstanceMasks_; + maskPredictionConvDepth_ = other.maskPredictionConvDepth_; + predictKeypoints_ = other.predictKeypoints_; + maskHeight_ = other.maskHeight_; + maskWidth_ = other.maskWidth_; + maskPredictionNumConvLayers_ = other.maskPredictionNumConvLayers_; + masksAreClassAgnostic_ = other.masksAreClassAgnostic_; + shareBoxAcrossClasses_ = other.shareBoxAcrossClasses_; + convolveThenUpsampleMasks_ = other.convolveThenUpsampleMasks_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MaskRCNNBoxPredictor Clone() { + return new MaskRCNNBoxPredictor(this); + } + + /// Field number for the "fc_hyperparams" field. + public const int FcHyperparamsFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams fcHyperparams_; + /// + /// Hyperparameters for fully connected ops used in the box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams FcHyperparams { + get { return fcHyperparams_; } + set { + fcHyperparams_ = value; + } + } + + /// Field number for the "use_dropout" field. + public const int UseDropoutFieldNumber = 2; + private bool useDropout_; + /// + /// Whether to use dropout op prior to the both box and class predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDropout { + get { return useDropout_; } + set { + useDropout_ = value; + } + } + + /// Field number for the "dropout_keep_probability" field. + public const int DropoutKeepProbabilityFieldNumber = 3; + private float dropoutKeepProbability_; + /// + /// Keep probability for dropout. This is only used if use_dropout is true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DropoutKeepProbability { + get { return dropoutKeepProbability_; } + set { + dropoutKeepProbability_ = value; + } + } + + /// Field number for the "box_code_size" field. + public const int BoxCodeSizeFieldNumber = 4; + private int boxCodeSize_; + /// + /// Size of the encoding for the boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int BoxCodeSize { + get { return boxCodeSize_; } + set { + boxCodeSize_ = value; + } + } + + /// Field number for the "conv_hyperparams" field. + public const int ConvHyperparamsFieldNumber = 5; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams convHyperparams_; + /// + /// Hyperparameters for convolution ops used in the box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams ConvHyperparams { + get { return convHyperparams_; } + set { + convHyperparams_ = value; + } + } + + /// Field number for the "predict_instance_masks" field. + public const int PredictInstanceMasksFieldNumber = 6; + private bool predictInstanceMasks_; + /// + /// Whether to predict instance masks inside detection boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool PredictInstanceMasks { + get { return predictInstanceMasks_; } + set { + predictInstanceMasks_ = value; + } + } + + /// Field number for the "mask_prediction_conv_depth" field. + public const int MaskPredictionConvDepthFieldNumber = 7; + private int maskPredictionConvDepth_; + /// + /// The depth for the first conv2d_transpose op applied to the + /// image_features in the mask prediction branch. If set to 0, the value + /// will be set automatically based on the number of channels in the image + /// features and the number of classes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskPredictionConvDepth { + get { return maskPredictionConvDepth_; } + set { + maskPredictionConvDepth_ = value; + } + } + + /// Field number for the "predict_keypoints" field. + public const int PredictKeypointsFieldNumber = 8; + private bool predictKeypoints_; + /// + /// Whether to predict keypoints inside detection boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool PredictKeypoints { + get { return predictKeypoints_; } + set { + predictKeypoints_ = value; + } + } + + /// Field number for the "mask_height" field. + public const int MaskHeightFieldNumber = 9; + private int maskHeight_; + /// + /// The height and the width of the predicted mask. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskHeight { + get { return maskHeight_; } + set { + maskHeight_ = value; + } + } + + /// Field number for the "mask_width" field. + public const int MaskWidthFieldNumber = 10; + private int maskWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskWidth { + get { return maskWidth_; } + set { + maskWidth_ = value; + } + } + + /// Field number for the "mask_prediction_num_conv_layers" field. + public const int MaskPredictionNumConvLayersFieldNumber = 11; + private int maskPredictionNumConvLayers_; + /// + /// The number of convolutions applied to image_features in the mask prediction + /// branch. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskPredictionNumConvLayers { + get { return maskPredictionNumConvLayers_; } + set { + maskPredictionNumConvLayers_ = value; + } + } + + /// Field number for the "masks_are_class_agnostic" field. + public const int MasksAreClassAgnosticFieldNumber = 12; + private bool masksAreClassAgnostic_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool MasksAreClassAgnostic { + get { return masksAreClassAgnostic_; } + set { + masksAreClassAgnostic_ = value; + } + } + + /// Field number for the "share_box_across_classes" field. + public const int ShareBoxAcrossClassesFieldNumber = 13; + private bool shareBoxAcrossClasses_; + /// + /// Whether to use one box for all classes rather than a different box for each + /// class. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ShareBoxAcrossClasses { + get { return shareBoxAcrossClasses_; } + set { + shareBoxAcrossClasses_ = value; + } + } + + /// Field number for the "convolve_then_upsample_masks" field. + public const int ConvolveThenUpsampleMasksFieldNumber = 14; + private bool convolveThenUpsampleMasks_; + /// + /// Whether to apply convolutions on mask features before upsampling using + /// nearest neighbor resizing. + /// By default, mask features are resized to [`mask_height`, `mask_width`] + /// before applying convolutions and predicting masks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ConvolveThenUpsampleMasks { + get { return convolveThenUpsampleMasks_; } + set { + convolveThenUpsampleMasks_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MaskRCNNBoxPredictor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MaskRCNNBoxPredictor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(FcHyperparams, other.FcHyperparams)) return false; + if (UseDropout != other.UseDropout) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DropoutKeepProbability, other.DropoutKeepProbability)) return false; + if (BoxCodeSize != other.BoxCodeSize) return false; + if (!object.Equals(ConvHyperparams, other.ConvHyperparams)) return false; + if (PredictInstanceMasks != other.PredictInstanceMasks) return false; + if (MaskPredictionConvDepth != other.MaskPredictionConvDepth) return false; + if (PredictKeypoints != other.PredictKeypoints) return false; + if (MaskHeight != other.MaskHeight) return false; + if (MaskWidth != other.MaskWidth) return false; + if (MaskPredictionNumConvLayers != other.MaskPredictionNumConvLayers) return false; + if (MasksAreClassAgnostic != other.MasksAreClassAgnostic) return false; + if (ShareBoxAcrossClasses != other.ShareBoxAcrossClasses) return false; + if (ConvolveThenUpsampleMasks != other.ConvolveThenUpsampleMasks) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (fcHyperparams_ != null) hash ^= FcHyperparams.GetHashCode(); + if (UseDropout != false) hash ^= UseDropout.GetHashCode(); + if (DropoutKeepProbability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DropoutKeepProbability); + if (BoxCodeSize != 0) hash ^= BoxCodeSize.GetHashCode(); + if (convHyperparams_ != null) hash ^= ConvHyperparams.GetHashCode(); + if (PredictInstanceMasks != false) hash ^= PredictInstanceMasks.GetHashCode(); + if (MaskPredictionConvDepth != 0) hash ^= MaskPredictionConvDepth.GetHashCode(); + if (PredictKeypoints != false) hash ^= PredictKeypoints.GetHashCode(); + if (MaskHeight != 0) hash ^= MaskHeight.GetHashCode(); + if (MaskWidth != 0) hash ^= MaskWidth.GetHashCode(); + if (MaskPredictionNumConvLayers != 0) hash ^= MaskPredictionNumConvLayers.GetHashCode(); + if (MasksAreClassAgnostic != false) hash ^= MasksAreClassAgnostic.GetHashCode(); + if (ShareBoxAcrossClasses != false) hash ^= ShareBoxAcrossClasses.GetHashCode(); + if (ConvolveThenUpsampleMasks != false) hash ^= ConvolveThenUpsampleMasks.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (fcHyperparams_ != null) { + output.WriteRawTag(10); + output.WriteMessage(FcHyperparams); + } + if (UseDropout != false) { + output.WriteRawTag(16); + output.WriteBool(UseDropout); + } + if (DropoutKeepProbability != 0F) { + output.WriteRawTag(29); + output.WriteFloat(DropoutKeepProbability); + } + if (BoxCodeSize != 0) { + output.WriteRawTag(32); + output.WriteInt32(BoxCodeSize); + } + if (convHyperparams_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ConvHyperparams); + } + if (PredictInstanceMasks != false) { + output.WriteRawTag(48); + output.WriteBool(PredictInstanceMasks); + } + if (MaskPredictionConvDepth != 0) { + output.WriteRawTag(56); + output.WriteInt32(MaskPredictionConvDepth); + } + if (PredictKeypoints != false) { + output.WriteRawTag(64); + output.WriteBool(PredictKeypoints); + } + if (MaskHeight != 0) { + output.WriteRawTag(72); + output.WriteInt32(MaskHeight); + } + if (MaskWidth != 0) { + output.WriteRawTag(80); + output.WriteInt32(MaskWidth); + } + if (MaskPredictionNumConvLayers != 0) { + output.WriteRawTag(88); + output.WriteInt32(MaskPredictionNumConvLayers); + } + if (MasksAreClassAgnostic != false) { + output.WriteRawTag(96); + output.WriteBool(MasksAreClassAgnostic); + } + if (ShareBoxAcrossClasses != false) { + output.WriteRawTag(104); + output.WriteBool(ShareBoxAcrossClasses); + } + if (ConvolveThenUpsampleMasks != false) { + output.WriteRawTag(112); + output.WriteBool(ConvolveThenUpsampleMasks); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (fcHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FcHyperparams); + } + if (UseDropout != false) { + size += 1 + 1; + } + if (DropoutKeepProbability != 0F) { + size += 1 + 4; + } + if (BoxCodeSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BoxCodeSize); + } + if (convHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvHyperparams); + } + if (PredictInstanceMasks != false) { + size += 1 + 1; + } + if (MaskPredictionConvDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskPredictionConvDepth); + } + if (PredictKeypoints != false) { + size += 1 + 1; + } + if (MaskHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskHeight); + } + if (MaskWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskWidth); + } + if (MaskPredictionNumConvLayers != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskPredictionNumConvLayers); + } + if (MasksAreClassAgnostic != false) { + size += 1 + 1; + } + if (ShareBoxAcrossClasses != false) { + size += 1 + 1; + } + if (ConvolveThenUpsampleMasks != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MaskRCNNBoxPredictor other) { + if (other == null) { + return; + } + if (other.fcHyperparams_ != null) { + if (fcHyperparams_ == null) { + fcHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + FcHyperparams.MergeFrom(other.FcHyperparams); + } + if (other.UseDropout != false) { + UseDropout = other.UseDropout; + } + if (other.DropoutKeepProbability != 0F) { + DropoutKeepProbability = other.DropoutKeepProbability; + } + if (other.BoxCodeSize != 0) { + BoxCodeSize = other.BoxCodeSize; + } + if (other.convHyperparams_ != null) { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + ConvHyperparams.MergeFrom(other.ConvHyperparams); + } + if (other.PredictInstanceMasks != false) { + PredictInstanceMasks = other.PredictInstanceMasks; + } + if (other.MaskPredictionConvDepth != 0) { + MaskPredictionConvDepth = other.MaskPredictionConvDepth; + } + if (other.PredictKeypoints != false) { + PredictKeypoints = other.PredictKeypoints; + } + if (other.MaskHeight != 0) { + MaskHeight = other.MaskHeight; + } + if (other.MaskWidth != 0) { + MaskWidth = other.MaskWidth; + } + if (other.MaskPredictionNumConvLayers != 0) { + MaskPredictionNumConvLayers = other.MaskPredictionNumConvLayers; + } + if (other.MasksAreClassAgnostic != false) { + MasksAreClassAgnostic = other.MasksAreClassAgnostic; + } + if (other.ShareBoxAcrossClasses != false) { + ShareBoxAcrossClasses = other.ShareBoxAcrossClasses; + } + if (other.ConvolveThenUpsampleMasks != false) { + ConvolveThenUpsampleMasks = other.ConvolveThenUpsampleMasks; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (fcHyperparams_ == null) { + fcHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(fcHyperparams_); + break; + } + case 16: { + UseDropout = input.ReadBool(); + break; + } + case 29: { + DropoutKeepProbability = input.ReadFloat(); + break; + } + case 32: { + BoxCodeSize = input.ReadInt32(); + break; + } + case 42: { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(convHyperparams_); + break; + } + case 48: { + PredictInstanceMasks = input.ReadBool(); + break; + } + case 56: { + MaskPredictionConvDepth = input.ReadInt32(); + break; + } + case 64: { + PredictKeypoints = input.ReadBool(); + break; + } + case 72: { + MaskHeight = input.ReadInt32(); + break; + } + case 80: { + MaskWidth = input.ReadInt32(); + break; + } + case 88: { + MaskPredictionNumConvLayers = input.ReadInt32(); + break; + } + case 96: { + MasksAreClassAgnostic = input.ReadBool(); + break; + } + case 104: { + ShareBoxAcrossClasses = input.ReadBool(); + break; + } + case 112: { + ConvolveThenUpsampleMasks = input.ReadBool(); + break; + } + } + } + } + + } + + public sealed partial class RfcnBoxPredictor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RfcnBoxPredictor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RfcnBoxPredictor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RfcnBoxPredictor(RfcnBoxPredictor other) : this() { + convHyperparams_ = other.convHyperparams_ != null ? other.convHyperparams_.Clone() : null; + numSpatialBinsHeight_ = other.numSpatialBinsHeight_; + numSpatialBinsWidth_ = other.numSpatialBinsWidth_; + depth_ = other.depth_; + boxCodeSize_ = other.boxCodeSize_; + cropHeight_ = other.cropHeight_; + cropWidth_ = other.cropWidth_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RfcnBoxPredictor Clone() { + return new RfcnBoxPredictor(this); + } + + /// Field number for the "conv_hyperparams" field. + public const int ConvHyperparamsFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams convHyperparams_; + /// + /// Hyperparameters for convolution ops used in the box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams ConvHyperparams { + get { return convHyperparams_; } + set { + convHyperparams_ = value; + } + } + + /// Field number for the "num_spatial_bins_height" field. + public const int NumSpatialBinsHeightFieldNumber = 2; + private int numSpatialBinsHeight_; + /// + /// Bin sizes for RFCN crops. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumSpatialBinsHeight { + get { return numSpatialBinsHeight_; } + set { + numSpatialBinsHeight_ = value; + } + } + + /// Field number for the "num_spatial_bins_width" field. + public const int NumSpatialBinsWidthFieldNumber = 3; + private int numSpatialBinsWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumSpatialBinsWidth { + get { return numSpatialBinsWidth_; } + set { + numSpatialBinsWidth_ = value; + } + } + + /// Field number for the "depth" field. + public const int DepthFieldNumber = 4; + private int depth_; + /// + /// Target depth to reduce the input image features to. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Depth { + get { return depth_; } + set { + depth_ = value; + } + } + + /// Field number for the "box_code_size" field. + public const int BoxCodeSizeFieldNumber = 5; + private int boxCodeSize_; + /// + /// Size of the encoding for the boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int BoxCodeSize { + get { return boxCodeSize_; } + set { + boxCodeSize_ = value; + } + } + + /// Field number for the "crop_height" field. + public const int CropHeightFieldNumber = 6; + private int cropHeight_; + /// + /// Size to resize the rfcn crops to. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CropHeight { + get { return cropHeight_; } + set { + cropHeight_ = value; + } + } + + /// Field number for the "crop_width" field. + public const int CropWidthFieldNumber = 7; + private int cropWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CropWidth { + get { return cropWidth_; } + set { + cropWidth_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RfcnBoxPredictor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RfcnBoxPredictor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConvHyperparams, other.ConvHyperparams)) return false; + if (NumSpatialBinsHeight != other.NumSpatialBinsHeight) return false; + if (NumSpatialBinsWidth != other.NumSpatialBinsWidth) return false; + if (Depth != other.Depth) return false; + if (BoxCodeSize != other.BoxCodeSize) return false; + if (CropHeight != other.CropHeight) return false; + if (CropWidth != other.CropWidth) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (convHyperparams_ != null) hash ^= ConvHyperparams.GetHashCode(); + if (NumSpatialBinsHeight != 0) hash ^= NumSpatialBinsHeight.GetHashCode(); + if (NumSpatialBinsWidth != 0) hash ^= NumSpatialBinsWidth.GetHashCode(); + if (Depth != 0) hash ^= Depth.GetHashCode(); + if (BoxCodeSize != 0) hash ^= BoxCodeSize.GetHashCode(); + if (CropHeight != 0) hash ^= CropHeight.GetHashCode(); + if (CropWidth != 0) hash ^= CropWidth.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (convHyperparams_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ConvHyperparams); + } + if (NumSpatialBinsHeight != 0) { + output.WriteRawTag(16); + output.WriteInt32(NumSpatialBinsHeight); + } + if (NumSpatialBinsWidth != 0) { + output.WriteRawTag(24); + output.WriteInt32(NumSpatialBinsWidth); + } + if (Depth != 0) { + output.WriteRawTag(32); + output.WriteInt32(Depth); + } + if (BoxCodeSize != 0) { + output.WriteRawTag(40); + output.WriteInt32(BoxCodeSize); + } + if (CropHeight != 0) { + output.WriteRawTag(48); + output.WriteInt32(CropHeight); + } + if (CropWidth != 0) { + output.WriteRawTag(56); + output.WriteInt32(CropWidth); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (convHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvHyperparams); + } + if (NumSpatialBinsHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumSpatialBinsHeight); + } + if (NumSpatialBinsWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumSpatialBinsWidth); + } + if (Depth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Depth); + } + if (BoxCodeSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BoxCodeSize); + } + if (CropHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CropHeight); + } + if (CropWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(CropWidth); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RfcnBoxPredictor other) { + if (other == null) { + return; + } + if (other.convHyperparams_ != null) { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + ConvHyperparams.MergeFrom(other.ConvHyperparams); + } + if (other.NumSpatialBinsHeight != 0) { + NumSpatialBinsHeight = other.NumSpatialBinsHeight; + } + if (other.NumSpatialBinsWidth != 0) { + NumSpatialBinsWidth = other.NumSpatialBinsWidth; + } + if (other.Depth != 0) { + Depth = other.Depth; + } + if (other.BoxCodeSize != 0) { + BoxCodeSize = other.BoxCodeSize; + } + if (other.CropHeight != 0) { + CropHeight = other.CropHeight; + } + if (other.CropWidth != 0) { + CropWidth = other.CropWidth; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(convHyperparams_); + break; + } + case 16: { + NumSpatialBinsHeight = input.ReadInt32(); + break; + } + case 24: { + NumSpatialBinsWidth = input.ReadInt32(); + break; + } + case 32: { + Depth = input.ReadInt32(); + break; + } + case 40: { + BoxCodeSize = input.ReadInt32(); + break; + } + case 48: { + CropHeight = input.ReadInt32(); + break; + } + case 56: { + CropWidth = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Calibration.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Calibration.cs new file mode 100644 index 00000000..7bd62280 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Calibration.cs @@ -0,0 +1,1413 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/calibration.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/calibration.proto + public static partial class CalibrationReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/calibration.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static CalibrationReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CilvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9jYWxpYnJhdGlvbi5wcm90bxIX", + "b2JqZWN0X2RldGVjdGlvbi5wcm90b3MigQMKEUNhbGlicmF0aW9uQ29uZmln", + "ElAKFmZ1bmN0aW9uX2FwcHJveGltYXRpb24YASABKAsyLi5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5GdW5jdGlvbkFwcHJveGltYXRpb25IABJiCiBjbGFz", + "c19pZF9mdW5jdGlvbl9hcHByb3hpbWF0aW9ucxgCIAEoCzI2Lm9iamVjdF9k", + "ZXRlY3Rpb24ucHJvdG9zLkNsYXNzSWRGdW5jdGlvbkFwcHJveGltYXRpb25z", + "SAASSgoTc2lnbW9pZF9jYWxpYnJhdGlvbhgDIAEoCzIrLm9iamVjdF9kZXRl", + "Y3Rpb24ucHJvdG9zLlNpZ21vaWRDYWxpYnJhdGlvbkgAElwKHWNsYXNzX2lk", + "X3NpZ21vaWRfY2FsaWJyYXRpb25zGAQgASgLMjMub2JqZWN0X2RldGVjdGlv", + "bi5wcm90b3MuQ2xhc3NJZFNpZ21vaWRDYWxpYnJhdGlvbnNIAEIMCgpjYWxp", + "YnJhdG9yIkwKFUZ1bmN0aW9uQXBwcm94aW1hdGlvbhIzCgl4X3lfcGFpcnMY", + "ASABKAsyIC5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5YWVBhaXJzIukBCh1D", + "bGFzc0lkRnVuY3Rpb25BcHByb3hpbWF0aW9ucxJsChVjbGFzc19pZF94eV9w", + "YWlyc19tYXAYASADKAsyTS5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5DbGFz", + "c0lkRnVuY3Rpb25BcHByb3hpbWF0aW9ucy5DbGFzc0lkWHlQYWlyc01hcEVu", + "dHJ5GloKFkNsYXNzSWRYeVBhaXJzTWFwRW50cnkSCwoDa2V5GAEgASgFEi8K", + "BXZhbHVlGAIgASgLMiAub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuWFlQYWly", + "czoCOAEiXAoSU2lnbW9pZENhbGlicmF0aW9uEkYKEnNpZ21vaWRfcGFyYW1l", + "dGVycxgBIAEoCzIqLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlNpZ21vaWRQ", + "YXJhbWV0ZXJzIosCChpDbGFzc0lkU2lnbW9pZENhbGlicmF0aW9ucxJ9Ch9j", + "bGFzc19pZF9zaWdtb2lkX3BhcmFtZXRlcnNfbWFwGAEgAygLMlQub2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MuQ2xhc3NJZFNpZ21vaWRDYWxpYnJhdGlvbnMu", + "Q2xhc3NJZFNpZ21vaWRQYXJhbWV0ZXJzTWFwRW50cnkabgogQ2xhc3NJZFNp", + "Z21vaWRQYXJhbWV0ZXJzTWFwRW50cnkSCwoDa2V5GAEgASgFEjkKBXZhbHVl", + "GAIgASgLMioub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuU2lnbW9pZFBhcmFt", + "ZXRlcnM6AjgBIqsBCgdYWVBhaXJzEjkKCHhfeV9wYWlyGAEgAygLMicub2Jq", + "ZWN0X2RldGVjdGlvbi5wcm90b3MuWFlQYWlycy5YWVBhaXISRQoSdHJhaW5p", + "bmdfZGF0YV90eXBlGAIgASgOMikub2JqZWN0X2RldGVjdGlvbi5wcm90b3Mu", + "VHJhaW5pbmdEYXRhVHlwZRoeCgZYWVBhaXISCQoBeBgBIAEoAhIJCgF5GAIg", + "ASgCIikKEVNpZ21vaWRQYXJhbWV0ZXJzEgkKAWEYASABKAISCQoBYhgCIAEo", + "AipOChBUcmFpbmluZ0RhdGFUeXBlEhUKEURBVEFfVFlQRV9VTktOT1dOEAAS", + "DwoLQUxMX0NMQVNTRVMQARISCg5DTEFTU19TUEVDSUZJQxACYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.Models.ObjectDetection.Protos.TrainingDataType), }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig), global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig.Parser, new[]{ "FunctionApproximation", "ClassIdFunctionApproximations", "SigmoidCalibration", "ClassIdSigmoidCalibrations" }, new[]{ "Calibrator" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation), global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation.Parser, new[]{ "XYPairs" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations), global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations.Parser, new[]{ "ClassIdXyPairsMap" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration), global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration.Parser, new[]{ "SigmoidParameters" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations), global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations.Parser, new[]{ "ClassIdSigmoidParametersMap" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, }), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.XYPairs), global::Tensorflow.Models.ObjectDetection.Protos.XYPairs.Parser, new[]{ "XYPair", "TrainingDataType" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.XYPairs.Types.XYPair), global::Tensorflow.Models.ObjectDetection.Protos.XYPairs.Types.XYPair.Parser, new[]{ "X", "Y" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters), global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters.Parser, new[]{ "A", "B" }, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// Description of data used to fit the calibration model. CLASS_SPECIFIC + /// indicates that the calibration parameters are derived from detections + /// pertaining to a single class. ALL_CLASSES indicates that parameters were + /// obtained by fitting a model on detections from all classes (including the + /// background class). + /// + public enum TrainingDataType { + [pbr::OriginalName("DATA_TYPE_UNKNOWN")] DataTypeUnknown = 0, + [pbr::OriginalName("ALL_CLASSES")] AllClasses = 1, + [pbr::OriginalName("CLASS_SPECIFIC")] ClassSpecific = 2, + } + + #endregion + + #region Messages + /// + /// Message wrapper for various calibration configurations. + /// + public sealed partial class CalibrationConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CalibrationConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CalibrationConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CalibrationConfig(CalibrationConfig other) : this() { + switch (other.CalibratorCase) { + case CalibratorOneofCase.FunctionApproximation: + FunctionApproximation = other.FunctionApproximation.Clone(); + break; + case CalibratorOneofCase.ClassIdFunctionApproximations: + ClassIdFunctionApproximations = other.ClassIdFunctionApproximations.Clone(); + break; + case CalibratorOneofCase.SigmoidCalibration: + SigmoidCalibration = other.SigmoidCalibration.Clone(); + break; + case CalibratorOneofCase.ClassIdSigmoidCalibrations: + ClassIdSigmoidCalibrations = other.ClassIdSigmoidCalibrations.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CalibrationConfig Clone() { + return new CalibrationConfig(this); + } + + /// Field number for the "function_approximation" field. + public const int FunctionApproximationFieldNumber = 1; + /// + /// Class-agnostic calibration via linear interpolation (usually output from + /// isotonic regression). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation FunctionApproximation { + get { return calibratorCase_ == CalibratorOneofCase.FunctionApproximation ? (global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation) calibrator_ : null; } + set { + calibrator_ = value; + calibratorCase_ = value == null ? CalibratorOneofCase.None : CalibratorOneofCase.FunctionApproximation; + } + } + + /// Field number for the "class_id_function_approximations" field. + public const int ClassIdFunctionApproximationsFieldNumber = 2; + /// + /// Per-class calibration via linear interpolation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations ClassIdFunctionApproximations { + get { return calibratorCase_ == CalibratorOneofCase.ClassIdFunctionApproximations ? (global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations) calibrator_ : null; } + set { + calibrator_ = value; + calibratorCase_ = value == null ? CalibratorOneofCase.None : CalibratorOneofCase.ClassIdFunctionApproximations; + } + } + + /// Field number for the "sigmoid_calibration" field. + public const int SigmoidCalibrationFieldNumber = 3; + /// + /// Class-agnostic sigmoid calibration. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration SigmoidCalibration { + get { return calibratorCase_ == CalibratorOneofCase.SigmoidCalibration ? (global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration) calibrator_ : null; } + set { + calibrator_ = value; + calibratorCase_ = value == null ? CalibratorOneofCase.None : CalibratorOneofCase.SigmoidCalibration; + } + } + + /// Field number for the "class_id_sigmoid_calibrations" field. + public const int ClassIdSigmoidCalibrationsFieldNumber = 4; + /// + /// Per-class sigmoid calibration. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations ClassIdSigmoidCalibrations { + get { return calibratorCase_ == CalibratorOneofCase.ClassIdSigmoidCalibrations ? (global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations) calibrator_ : null; } + set { + calibrator_ = value; + calibratorCase_ = value == null ? CalibratorOneofCase.None : CalibratorOneofCase.ClassIdSigmoidCalibrations; + } + } + + private object calibrator_; + /// Enum of possible cases for the "calibrator" oneof. + public enum CalibratorOneofCase { + None = 0, + FunctionApproximation = 1, + ClassIdFunctionApproximations = 2, + SigmoidCalibration = 3, + ClassIdSigmoidCalibrations = 4, + } + private CalibratorOneofCase calibratorCase_ = CalibratorOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CalibratorOneofCase CalibratorCase { + get { return calibratorCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearCalibrator() { + calibratorCase_ = CalibratorOneofCase.None; + calibrator_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CalibrationConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CalibrationConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(FunctionApproximation, other.FunctionApproximation)) return false; + if (!object.Equals(ClassIdFunctionApproximations, other.ClassIdFunctionApproximations)) return false; + if (!object.Equals(SigmoidCalibration, other.SigmoidCalibration)) return false; + if (!object.Equals(ClassIdSigmoidCalibrations, other.ClassIdSigmoidCalibrations)) return false; + if (CalibratorCase != other.CalibratorCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (calibratorCase_ == CalibratorOneofCase.FunctionApproximation) hash ^= FunctionApproximation.GetHashCode(); + if (calibratorCase_ == CalibratorOneofCase.ClassIdFunctionApproximations) hash ^= ClassIdFunctionApproximations.GetHashCode(); + if (calibratorCase_ == CalibratorOneofCase.SigmoidCalibration) hash ^= SigmoidCalibration.GetHashCode(); + if (calibratorCase_ == CalibratorOneofCase.ClassIdSigmoidCalibrations) hash ^= ClassIdSigmoidCalibrations.GetHashCode(); + hash ^= (int) calibratorCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (calibratorCase_ == CalibratorOneofCase.FunctionApproximation) { + output.WriteRawTag(10); + output.WriteMessage(FunctionApproximation); + } + if (calibratorCase_ == CalibratorOneofCase.ClassIdFunctionApproximations) { + output.WriteRawTag(18); + output.WriteMessage(ClassIdFunctionApproximations); + } + if (calibratorCase_ == CalibratorOneofCase.SigmoidCalibration) { + output.WriteRawTag(26); + output.WriteMessage(SigmoidCalibration); + } + if (calibratorCase_ == CalibratorOneofCase.ClassIdSigmoidCalibrations) { + output.WriteRawTag(34); + output.WriteMessage(ClassIdSigmoidCalibrations); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (calibratorCase_ == CalibratorOneofCase.FunctionApproximation) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FunctionApproximation); + } + if (calibratorCase_ == CalibratorOneofCase.ClassIdFunctionApproximations) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClassIdFunctionApproximations); + } + if (calibratorCase_ == CalibratorOneofCase.SigmoidCalibration) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SigmoidCalibration); + } + if (calibratorCase_ == CalibratorOneofCase.ClassIdSigmoidCalibrations) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClassIdSigmoidCalibrations); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CalibrationConfig other) { + if (other == null) { + return; + } + switch (other.CalibratorCase) { + case CalibratorOneofCase.FunctionApproximation: + if (FunctionApproximation == null) { + FunctionApproximation = new global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation(); + } + FunctionApproximation.MergeFrom(other.FunctionApproximation); + break; + case CalibratorOneofCase.ClassIdFunctionApproximations: + if (ClassIdFunctionApproximations == null) { + ClassIdFunctionApproximations = new global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations(); + } + ClassIdFunctionApproximations.MergeFrom(other.ClassIdFunctionApproximations); + break; + case CalibratorOneofCase.SigmoidCalibration: + if (SigmoidCalibration == null) { + SigmoidCalibration = new global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration(); + } + SigmoidCalibration.MergeFrom(other.SigmoidCalibration); + break; + case CalibratorOneofCase.ClassIdSigmoidCalibrations: + if (ClassIdSigmoidCalibrations == null) { + ClassIdSigmoidCalibrations = new global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations(); + } + ClassIdSigmoidCalibrations.MergeFrom(other.ClassIdSigmoidCalibrations); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.FunctionApproximation(); + if (calibratorCase_ == CalibratorOneofCase.FunctionApproximation) { + subBuilder.MergeFrom(FunctionApproximation); + } + input.ReadMessage(subBuilder); + FunctionApproximation = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ClassIdFunctionApproximations(); + if (calibratorCase_ == CalibratorOneofCase.ClassIdFunctionApproximations) { + subBuilder.MergeFrom(ClassIdFunctionApproximations); + } + input.ReadMessage(subBuilder); + ClassIdFunctionApproximations = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SigmoidCalibration(); + if (calibratorCase_ == CalibratorOneofCase.SigmoidCalibration) { + subBuilder.MergeFrom(SigmoidCalibration); + } + input.ReadMessage(subBuilder); + SigmoidCalibration = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ClassIdSigmoidCalibrations(); + if (calibratorCase_ == CalibratorOneofCase.ClassIdSigmoidCalibrations) { + subBuilder.MergeFrom(ClassIdSigmoidCalibrations); + } + input.ReadMessage(subBuilder); + ClassIdSigmoidCalibrations = subBuilder; + break; + } + } + } + } + + } + + /// + /// Message for class-agnostic domain/range mapping for function + /// approximations. + /// + public sealed partial class FunctionApproximation : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FunctionApproximation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FunctionApproximation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FunctionApproximation(FunctionApproximation other) : this() { + xYPairs_ = other.xYPairs_ != null ? other.xYPairs_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FunctionApproximation Clone() { + return new FunctionApproximation(this); + } + + /// Field number for the "x_y_pairs" field. + public const int XYPairsFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.XYPairs xYPairs_; + /// + /// Message mapping class labels to indices + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.XYPairs XYPairs { + get { return xYPairs_; } + set { + xYPairs_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FunctionApproximation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FunctionApproximation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(XYPairs, other.XYPairs)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (xYPairs_ != null) hash ^= XYPairs.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (xYPairs_ != null) { + output.WriteRawTag(10); + output.WriteMessage(XYPairs); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (xYPairs_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(XYPairs); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FunctionApproximation other) { + if (other == null) { + return; + } + if (other.xYPairs_ != null) { + if (xYPairs_ == null) { + xYPairs_ = new global::Tensorflow.Models.ObjectDetection.Protos.XYPairs(); + } + XYPairs.MergeFrom(other.XYPairs); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (xYPairs_ == null) { + xYPairs_ = new global::Tensorflow.Models.ObjectDetection.Protos.XYPairs(); + } + input.ReadMessage(xYPairs_); + break; + } + } + } + } + + } + + /// + /// Message for class-specific domain/range mapping for function + /// approximations. + /// + public sealed partial class ClassIdFunctionApproximations : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClassIdFunctionApproximations()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassIdFunctionApproximations() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassIdFunctionApproximations(ClassIdFunctionApproximations other) : this() { + classIdXyPairsMap_ = other.classIdXyPairsMap_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassIdFunctionApproximations Clone() { + return new ClassIdFunctionApproximations(this); + } + + /// Field number for the "class_id_xy_pairs_map" field. + public const int ClassIdXyPairsMapFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_classIdXyPairsMap_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Tensorflow.Models.ObjectDetection.Protos.XYPairs.Parser), 10); + private readonly pbc::MapField classIdXyPairsMap_ = new pbc::MapField(); + /// + /// Message mapping class ids to indices. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField ClassIdXyPairsMap { + get { return classIdXyPairsMap_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ClassIdFunctionApproximations); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ClassIdFunctionApproximations other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!ClassIdXyPairsMap.Equals(other.ClassIdXyPairsMap)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= ClassIdXyPairsMap.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + classIdXyPairsMap_.WriteTo(output, _map_classIdXyPairsMap_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += classIdXyPairsMap_.CalculateSize(_map_classIdXyPairsMap_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ClassIdFunctionApproximations other) { + if (other == null) { + return; + } + classIdXyPairsMap_.Add(other.classIdXyPairsMap_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + classIdXyPairsMap_.AddEntriesFrom(input, _map_classIdXyPairsMap_codec); + break; + } + } + } + } + + } + + /// + /// Message for class-agnostic Sigmoid Calibration. + /// + public sealed partial class SigmoidCalibration : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SigmoidCalibration()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidCalibration() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidCalibration(SigmoidCalibration other) : this() { + sigmoidParameters_ = other.sigmoidParameters_ != null ? other.sigmoidParameters_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidCalibration Clone() { + return new SigmoidCalibration(this); + } + + /// Field number for the "sigmoid_parameters" field. + public const int SigmoidParametersFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters sigmoidParameters_; + /// + /// Message mapping class index to Sigmoid Parameters + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters SigmoidParameters { + get { return sigmoidParameters_; } + set { + sigmoidParameters_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SigmoidCalibration); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SigmoidCalibration other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(SigmoidParameters, other.SigmoidParameters)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (sigmoidParameters_ != null) hash ^= SigmoidParameters.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (sigmoidParameters_ != null) { + output.WriteRawTag(10); + output.WriteMessage(SigmoidParameters); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (sigmoidParameters_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SigmoidParameters); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SigmoidCalibration other) { + if (other == null) { + return; + } + if (other.sigmoidParameters_ != null) { + if (sigmoidParameters_ == null) { + sigmoidParameters_ = new global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters(); + } + SigmoidParameters.MergeFrom(other.SigmoidParameters); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (sigmoidParameters_ == null) { + sigmoidParameters_ = new global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters(); + } + input.ReadMessage(sigmoidParameters_); + break; + } + } + } + } + + } + + /// + /// Message for class-specific Sigmoid Calibration. + /// + public sealed partial class ClassIdSigmoidCalibrations : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClassIdSigmoidCalibrations()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassIdSigmoidCalibrations() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassIdSigmoidCalibrations(ClassIdSigmoidCalibrations other) : this() { + classIdSigmoidParametersMap_ = other.classIdSigmoidParametersMap_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassIdSigmoidCalibrations Clone() { + return new ClassIdSigmoidCalibrations(this); + } + + /// Field number for the "class_id_sigmoid_parameters_map" field. + public const int ClassIdSigmoidParametersMapFieldNumber = 1; + private static readonly pbc::MapField.Codec _map_classIdSigmoidParametersMap_codec + = new pbc::MapField.Codec(pb::FieldCodec.ForInt32(8), pb::FieldCodec.ForMessage(18, global::Tensorflow.Models.ObjectDetection.Protos.SigmoidParameters.Parser), 10); + private readonly pbc::MapField classIdSigmoidParametersMap_ = new pbc::MapField(); + /// + /// Message mapping class index to Sigmoid Parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::MapField ClassIdSigmoidParametersMap { + get { return classIdSigmoidParametersMap_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ClassIdSigmoidCalibrations); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ClassIdSigmoidCalibrations other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!ClassIdSigmoidParametersMap.Equals(other.ClassIdSigmoidParametersMap)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= ClassIdSigmoidParametersMap.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + classIdSigmoidParametersMap_.WriteTo(output, _map_classIdSigmoidParametersMap_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += classIdSigmoidParametersMap_.CalculateSize(_map_classIdSigmoidParametersMap_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ClassIdSigmoidCalibrations other) { + if (other == null) { + return; + } + classIdSigmoidParametersMap_.Add(other.classIdSigmoidParametersMap_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + classIdSigmoidParametersMap_.AddEntriesFrom(input, _map_classIdSigmoidParametersMap_codec); + break; + } + } + } + } + + } + + /// + /// Message to store a domain/range pair for function to be approximated. + /// + public sealed partial class XYPairs : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new XYPairs()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public XYPairs() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public XYPairs(XYPairs other) : this() { + xYPair_ = other.xYPair_.Clone(); + trainingDataType_ = other.trainingDataType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public XYPairs Clone() { + return new XYPairs(this); + } + + /// Field number for the "x_y_pair" field. + public const int XYPairFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_xYPair_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.XYPairs.Types.XYPair.Parser); + private readonly pbc::RepeatedField xYPair_ = new pbc::RepeatedField(); + /// + /// Sequence of x/y pairs for function approximation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField XYPair { + get { return xYPair_; } + } + + /// Field number for the "training_data_type" field. + public const int TrainingDataTypeFieldNumber = 2; + private global::Tensorflow.Models.ObjectDetection.Protos.TrainingDataType trainingDataType_ = 0; + /// + /// Description of data used to fit the calibration model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.TrainingDataType TrainingDataType { + get { return trainingDataType_; } + set { + trainingDataType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as XYPairs); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(XYPairs other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!xYPair_.Equals(other.xYPair_)) return false; + if (TrainingDataType != other.TrainingDataType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= xYPair_.GetHashCode(); + if (TrainingDataType != 0) hash ^= TrainingDataType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + xYPair_.WriteTo(output, _repeated_xYPair_codec); + if (TrainingDataType != 0) { + output.WriteRawTag(16); + output.WriteEnum((int) TrainingDataType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += xYPair_.CalculateSize(_repeated_xYPair_codec); + if (TrainingDataType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TrainingDataType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(XYPairs other) { + if (other == null) { + return; + } + xYPair_.Add(other.xYPair_); + if (other.TrainingDataType != 0) { + TrainingDataType = other.TrainingDataType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + xYPair_.AddEntriesFrom(input, _repeated_xYPair_codec); + break; + } + case 16: { + trainingDataType_ = (global::Tensorflow.Models.ObjectDetection.Protos.TrainingDataType) input.ReadEnum(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the XYPairs message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class XYPair : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new XYPair()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.XYPairs.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public XYPair() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public XYPair(XYPair other) : this() { + x_ = other.x_; + y_ = other.y_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public XYPair Clone() { + return new XYPair(this); + } + + /// Field number for the "x" field. + public const int XFieldNumber = 1; + private float x_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float X { + get { return x_; } + set { + x_ = value; + } + } + + /// Field number for the "y" field. + public const int YFieldNumber = 2; + private float y_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Y { + get { return y_; } + set { + y_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as XYPair); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(XYPair other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(X, other.X)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Y, other.Y)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (X != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(X); + if (Y != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Y); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (X != 0F) { + output.WriteRawTag(13); + output.WriteFloat(X); + } + if (Y != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Y); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (X != 0F) { + size += 1 + 4; + } + if (Y != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(XYPair other) { + if (other == null) { + return; + } + if (other.X != 0F) { + X = other.X; + } + if (other.Y != 0F) { + Y = other.Y; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + X = input.ReadFloat(); + break; + } + case 21: { + Y = input.ReadFloat(); + break; + } + } + } + } + + } + + } + #endregion + + } + + /// + /// Message defining parameters for sigmoid calibration. + /// + public sealed partial class SigmoidParameters : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SigmoidParameters()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidParameters() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidParameters(SigmoidParameters other) : this() { + a_ = other.a_; + b_ = other.b_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidParameters Clone() { + return new SigmoidParameters(this); + } + + /// Field number for the "a" field. + public const int AFieldNumber = 1; + private float a_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float A { + get { return a_; } + set { + a_ = value; + } + } + + /// Field number for the "b" field. + public const int BFieldNumber = 2; + private float b_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float B { + get { return b_; } + set { + b_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SigmoidParameters); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SigmoidParameters other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(A, other.A)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(B, other.B)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (A != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(A); + if (B != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(B); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (A != 0F) { + output.WriteRawTag(13); + output.WriteFloat(A); + } + if (B != 0F) { + output.WriteRawTag(21); + output.WriteFloat(B); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (A != 0F) { + size += 1 + 4; + } + if (B != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SigmoidParameters other) { + if (other == null) { + return; + } + if (other.A != 0F) { + A = other.A; + } + if (other.B != 0F) { + B = other.B; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + A = input.ReadFloat(); + break; + } + case 21: { + B = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Eval.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Eval.cs new file mode 100644 index 00000000..b33b5869 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Eval.cs @@ -0,0 +1,901 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/eval.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/eval.proto + public static partial class EvalReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/eval.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static EvalReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiJvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ldmFsLnByb3RvEhdvYmplY3Rf", + "ZGV0ZWN0aW9uLnByb3RvcyK3BQoKRXZhbENvbmZpZxISCgpiYXRjaF9zaXpl", + "GBkgASgNEhoKEm51bV92aXN1YWxpemF0aW9ucxgBIAEoDRIUCgxudW1fZXhh", + "bXBsZXMYAiABKA0SGgoSZXZhbF9pbnRlcnZhbF9zZWNzGAMgASgNEhEKCW1h", + "eF9ldmFscxgEIAEoDRISCgpzYXZlX2dyYXBoGAUgASgIEiAKGHZpc3VhbGl6", + "YXRpb25fZXhwb3J0X2RpchgGIAEoCRITCgtldmFsX21hc3RlchgHIAEoCRIT", + "CgttZXRyaWNzX3NldBgIIAMoCRITCgtleHBvcnRfcGF0aBgJIAEoCRIaChJp", + "Z25vcmVfZ3JvdW5kdHJ1dGgYCiABKAgSGwoTdXNlX21vdmluZ19hdmVyYWdl", + "cxgLIAEoCBIbChNldmFsX2luc3RhbmNlX21hc2tzGAwgASgIEhsKE21pbl9z", + "Y29yZV90aHJlc2hvbGQYDSABKAISIgoabWF4X251bV9ib3hlc190b192aXN1", + "YWxpemUYDiABKAUSEwoLc2tpcF9zY29yZXMYDyABKAgSEwoLc2tpcF9sYWJl", + "bHMYECABKAgSIwobdmlzdWFsaXplX2dyb3VuZHRydXRoX2JveGVzGBEgASgI", + "EisKI2dyb3VuZHRydXRoX2JveF92aXN1YWxpemF0aW9uX2NvbG9yGBIgASgJ", + "Ei4KJmtlZXBfaW1hZ2VfaWRfZm9yX3Zpc3VhbGl6YXRpb25fZXhwb3J0GBMg", + "ASgIEh4KFnJldGFpbl9vcmlnaW5hbF9pbWFnZXMYFyABKAgSJAocaW5jbHVk", + "ZV9tZXRyaWNzX3Blcl9jYXRlZ29yeRgYIAEoCBIaChJyZWNhbGxfbG93ZXJf", + "Ym91bmQYGiABKAISGgoScmVjYWxsX3VwcGVyX2JvdW5kGBsgASgCYgZwcm90", + "bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.EvalConfig), global::Tensorflow.Models.ObjectDetection.Protos.EvalConfig.Parser, new[]{ "BatchSize", "NumVisualizations", "NumExamples", "EvalIntervalSecs", "MaxEvals", "SaveGraph", "VisualizationExportDir", "EvalMaster", "MetricsSet", "ExportPath", "IgnoreGroundtruth", "UseMovingAverages", "EvalInstanceMasks", "MinScoreThreshold", "MaxNumBoxesToVisualize", "SkipScores", "SkipLabels", "VisualizeGroundtruthBoxes", "GroundtruthBoxVisualizationColor", "KeepImageIdForVisualizationExport", "RetainOriginalImages", "IncludeMetricsPerCategory", "RecallLowerBound", "RecallUpperBound" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Message for configuring DetectionModel evaluation jobs (eval.py). + /// + public sealed partial class EvalConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EvalConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.EvalReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public EvalConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public EvalConfig(EvalConfig other) : this() { + batchSize_ = other.batchSize_; + numVisualizations_ = other.numVisualizations_; + numExamples_ = other.numExamples_; + evalIntervalSecs_ = other.evalIntervalSecs_; + maxEvals_ = other.maxEvals_; + saveGraph_ = other.saveGraph_; + visualizationExportDir_ = other.visualizationExportDir_; + evalMaster_ = other.evalMaster_; + metricsSet_ = other.metricsSet_.Clone(); + exportPath_ = other.exportPath_; + ignoreGroundtruth_ = other.ignoreGroundtruth_; + useMovingAverages_ = other.useMovingAverages_; + evalInstanceMasks_ = other.evalInstanceMasks_; + minScoreThreshold_ = other.minScoreThreshold_; + maxNumBoxesToVisualize_ = other.maxNumBoxesToVisualize_; + skipScores_ = other.skipScores_; + skipLabels_ = other.skipLabels_; + visualizeGroundtruthBoxes_ = other.visualizeGroundtruthBoxes_; + groundtruthBoxVisualizationColor_ = other.groundtruthBoxVisualizationColor_; + keepImageIdForVisualizationExport_ = other.keepImageIdForVisualizationExport_; + retainOriginalImages_ = other.retainOriginalImages_; + includeMetricsPerCategory_ = other.includeMetricsPerCategory_; + recallLowerBound_ = other.recallLowerBound_; + recallUpperBound_ = other.recallUpperBound_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public EvalConfig Clone() { + return new EvalConfig(this); + } + + /// Field number for the "batch_size" field. + public const int BatchSizeFieldNumber = 25; + private uint batchSize_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint BatchSize { + get { return batchSize_; } + set { + batchSize_ = value; + } + } + + /// Field number for the "num_visualizations" field. + public const int NumVisualizationsFieldNumber = 1; + private uint numVisualizations_; + /// + /// Number of visualization images to generate. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumVisualizations { + get { return numVisualizations_; } + set { + numVisualizations_ = value; + } + } + + /// Field number for the "num_examples" field. + public const int NumExamplesFieldNumber = 2; + private uint numExamples_; + /// + /// Number of examples to process of evaluation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumExamples { + get { return numExamples_; } + set { + numExamples_ = value; + } + } + + /// Field number for the "eval_interval_secs" field. + public const int EvalIntervalSecsFieldNumber = 3; + private uint evalIntervalSecs_; + /// + /// How often to run evaluation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint EvalIntervalSecs { + get { return evalIntervalSecs_; } + set { + evalIntervalSecs_ = value; + } + } + + /// Field number for the "max_evals" field. + public const int MaxEvalsFieldNumber = 4; + private uint maxEvals_; + /// + /// Maximum number of times to run evaluation. If set to 0, will run forever. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MaxEvals { + get { return maxEvals_; } + set { + maxEvals_ = value; + } + } + + /// Field number for the "save_graph" field. + public const int SaveGraphFieldNumber = 5; + private bool saveGraph_; + /// + /// Whether the TensorFlow graph used for evaluation should be saved to disk. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SaveGraph { + get { return saveGraph_; } + set { + saveGraph_ = value; + } + } + + /// Field number for the "visualization_export_dir" field. + public const int VisualizationExportDirFieldNumber = 6; + private string visualizationExportDir_ = ""; + /// + /// Path to directory to store visualizations in. If empty, visualization + /// images are not exported (only shown on Tensorboard). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string VisualizationExportDir { + get { return visualizationExportDir_; } + set { + visualizationExportDir_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "eval_master" field. + public const int EvalMasterFieldNumber = 7; + private string evalMaster_ = ""; + /// + /// BNS name of the TensorFlow master. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string EvalMaster { + get { return evalMaster_; } + set { + evalMaster_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "metrics_set" field. + public const int MetricsSetFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_metricsSet_codec + = pb::FieldCodec.ForString(66); + private readonly pbc::RepeatedField metricsSet_ = new pbc::RepeatedField(); + /// + /// Type of metrics to use for evaluation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MetricsSet { + get { return metricsSet_; } + } + + /// Field number for the "export_path" field. + public const int ExportPathFieldNumber = 9; + private string exportPath_ = ""; + /// + /// Path to export detections to COCO compatible JSON format. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ExportPath { + get { return exportPath_; } + set { + exportPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ignore_groundtruth" field. + public const int IgnoreGroundtruthFieldNumber = 10; + private bool ignoreGroundtruth_; + /// + /// Option to not read groundtruth labels and only export detections to + /// COCO-compatible JSON file. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IgnoreGroundtruth { + get { return ignoreGroundtruth_; } + set { + ignoreGroundtruth_ = value; + } + } + + /// Field number for the "use_moving_averages" field. + public const int UseMovingAveragesFieldNumber = 11; + private bool useMovingAverages_; + /// + /// Use exponential moving averages of variables for evaluation. + /// TODO(rathodv): When this is false make sure the model is constructed + /// without moving averages in restore_fn. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMovingAverages { + get { return useMovingAverages_; } + set { + useMovingAverages_ = value; + } + } + + /// Field number for the "eval_instance_masks" field. + public const int EvalInstanceMasksFieldNumber = 12; + private bool evalInstanceMasks_; + /// + /// Whether to evaluate instance masks. + /// Note that since there is no evaluation code currently for instance + /// segmenation this option is unused. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool EvalInstanceMasks { + get { return evalInstanceMasks_; } + set { + evalInstanceMasks_ = value; + } + } + + /// Field number for the "min_score_threshold" field. + public const int MinScoreThresholdFieldNumber = 13; + private float minScoreThreshold_; + /// + /// Minimum score threshold for a detected object box to be visualized + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinScoreThreshold { + get { return minScoreThreshold_; } + set { + minScoreThreshold_ = value; + } + } + + /// Field number for the "max_num_boxes_to_visualize" field. + public const int MaxNumBoxesToVisualizeFieldNumber = 14; + private int maxNumBoxesToVisualize_; + /// + /// Maximum number of detections to visualize + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxNumBoxesToVisualize { + get { return maxNumBoxesToVisualize_; } + set { + maxNumBoxesToVisualize_ = value; + } + } + + /// Field number for the "skip_scores" field. + public const int SkipScoresFieldNumber = 15; + private bool skipScores_; + /// + /// When drawing a single detection, each label is by default visualized as + /// <label name> : <label score>. One can skip the name or/and score using the + /// following fields: + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SkipScores { + get { return skipScores_; } + set { + skipScores_ = value; + } + } + + /// Field number for the "skip_labels" field. + public const int SkipLabelsFieldNumber = 16; + private bool skipLabels_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SkipLabels { + get { return skipLabels_; } + set { + skipLabels_ = value; + } + } + + /// Field number for the "visualize_groundtruth_boxes" field. + public const int VisualizeGroundtruthBoxesFieldNumber = 17; + private bool visualizeGroundtruthBoxes_; + /// + /// Whether to show groundtruth boxes in addition to detected boxes in + /// visualizations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool VisualizeGroundtruthBoxes { + get { return visualizeGroundtruthBoxes_; } + set { + visualizeGroundtruthBoxes_ = value; + } + } + + /// Field number for the "groundtruth_box_visualization_color" field. + public const int GroundtruthBoxVisualizationColorFieldNumber = 18; + private string groundtruthBoxVisualizationColor_ = ""; + /// + /// Box color for visualizing groundtruth boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string GroundtruthBoxVisualizationColor { + get { return groundtruthBoxVisualizationColor_; } + set { + groundtruthBoxVisualizationColor_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keep_image_id_for_visualization_export" field. + public const int KeepImageIdForVisualizationExportFieldNumber = 19; + private bool keepImageIdForVisualizationExport_; + /// + /// Whether to keep image identifier in filename when exported to + /// visualization_export_dir. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool KeepImageIdForVisualizationExport { + get { return keepImageIdForVisualizationExport_; } + set { + keepImageIdForVisualizationExport_ = value; + } + } + + /// Field number for the "retain_original_images" field. + public const int RetainOriginalImagesFieldNumber = 23; + private bool retainOriginalImages_; + /// + /// Whether to retain original images (i.e. not pre-processed) in the tensor + /// dictionary, so that they can be displayed in Tensorboard. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool RetainOriginalImages { + get { return retainOriginalImages_; } + set { + retainOriginalImages_ = value; + } + } + + /// Field number for the "include_metrics_per_category" field. + public const int IncludeMetricsPerCategoryFieldNumber = 24; + private bool includeMetricsPerCategory_; + /// + /// If True, additionally include per-category metrics. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool IncludeMetricsPerCategory { + get { return includeMetricsPerCategory_; } + set { + includeMetricsPerCategory_ = value; + } + } + + /// Field number for the "recall_lower_bound" field. + public const int RecallLowerBoundFieldNumber = 26; + private float recallLowerBound_; + /// + /// Recall range within which precision should be computed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RecallLowerBound { + get { return recallLowerBound_; } + set { + recallLowerBound_ = value; + } + } + + /// Field number for the "recall_upper_bound" field. + public const int RecallUpperBoundFieldNumber = 27; + private float recallUpperBound_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RecallUpperBound { + get { return recallUpperBound_; } + set { + recallUpperBound_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as EvalConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(EvalConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (BatchSize != other.BatchSize) return false; + if (NumVisualizations != other.NumVisualizations) return false; + if (NumExamples != other.NumExamples) return false; + if (EvalIntervalSecs != other.EvalIntervalSecs) return false; + if (MaxEvals != other.MaxEvals) return false; + if (SaveGraph != other.SaveGraph) return false; + if (VisualizationExportDir != other.VisualizationExportDir) return false; + if (EvalMaster != other.EvalMaster) return false; + if(!metricsSet_.Equals(other.metricsSet_)) return false; + if (ExportPath != other.ExportPath) return false; + if (IgnoreGroundtruth != other.IgnoreGroundtruth) return false; + if (UseMovingAverages != other.UseMovingAverages) return false; + if (EvalInstanceMasks != other.EvalInstanceMasks) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinScoreThreshold, other.MinScoreThreshold)) return false; + if (MaxNumBoxesToVisualize != other.MaxNumBoxesToVisualize) return false; + if (SkipScores != other.SkipScores) return false; + if (SkipLabels != other.SkipLabels) return false; + if (VisualizeGroundtruthBoxes != other.VisualizeGroundtruthBoxes) return false; + if (GroundtruthBoxVisualizationColor != other.GroundtruthBoxVisualizationColor) return false; + if (KeepImageIdForVisualizationExport != other.KeepImageIdForVisualizationExport) return false; + if (RetainOriginalImages != other.RetainOriginalImages) return false; + if (IncludeMetricsPerCategory != other.IncludeMetricsPerCategory) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RecallLowerBound, other.RecallLowerBound)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RecallUpperBound, other.RecallUpperBound)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (BatchSize != 0) hash ^= BatchSize.GetHashCode(); + if (NumVisualizations != 0) hash ^= NumVisualizations.GetHashCode(); + if (NumExamples != 0) hash ^= NumExamples.GetHashCode(); + if (EvalIntervalSecs != 0) hash ^= EvalIntervalSecs.GetHashCode(); + if (MaxEvals != 0) hash ^= MaxEvals.GetHashCode(); + if (SaveGraph != false) hash ^= SaveGraph.GetHashCode(); + if (VisualizationExportDir.Length != 0) hash ^= VisualizationExportDir.GetHashCode(); + if (EvalMaster.Length != 0) hash ^= EvalMaster.GetHashCode(); + hash ^= metricsSet_.GetHashCode(); + if (ExportPath.Length != 0) hash ^= ExportPath.GetHashCode(); + if (IgnoreGroundtruth != false) hash ^= IgnoreGroundtruth.GetHashCode(); + if (UseMovingAverages != false) hash ^= UseMovingAverages.GetHashCode(); + if (EvalInstanceMasks != false) hash ^= EvalInstanceMasks.GetHashCode(); + if (MinScoreThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinScoreThreshold); + if (MaxNumBoxesToVisualize != 0) hash ^= MaxNumBoxesToVisualize.GetHashCode(); + if (SkipScores != false) hash ^= SkipScores.GetHashCode(); + if (SkipLabels != false) hash ^= SkipLabels.GetHashCode(); + if (VisualizeGroundtruthBoxes != false) hash ^= VisualizeGroundtruthBoxes.GetHashCode(); + if (GroundtruthBoxVisualizationColor.Length != 0) hash ^= GroundtruthBoxVisualizationColor.GetHashCode(); + if (KeepImageIdForVisualizationExport != false) hash ^= KeepImageIdForVisualizationExport.GetHashCode(); + if (RetainOriginalImages != false) hash ^= RetainOriginalImages.GetHashCode(); + if (IncludeMetricsPerCategory != false) hash ^= IncludeMetricsPerCategory.GetHashCode(); + if (RecallLowerBound != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RecallLowerBound); + if (RecallUpperBound != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RecallUpperBound); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NumVisualizations != 0) { + output.WriteRawTag(8); + output.WriteUInt32(NumVisualizations); + } + if (NumExamples != 0) { + output.WriteRawTag(16); + output.WriteUInt32(NumExamples); + } + if (EvalIntervalSecs != 0) { + output.WriteRawTag(24); + output.WriteUInt32(EvalIntervalSecs); + } + if (MaxEvals != 0) { + output.WriteRawTag(32); + output.WriteUInt32(MaxEvals); + } + if (SaveGraph != false) { + output.WriteRawTag(40); + output.WriteBool(SaveGraph); + } + if (VisualizationExportDir.Length != 0) { + output.WriteRawTag(50); + output.WriteString(VisualizationExportDir); + } + if (EvalMaster.Length != 0) { + output.WriteRawTag(58); + output.WriteString(EvalMaster); + } + metricsSet_.WriteTo(output, _repeated_metricsSet_codec); + if (ExportPath.Length != 0) { + output.WriteRawTag(74); + output.WriteString(ExportPath); + } + if (IgnoreGroundtruth != false) { + output.WriteRawTag(80); + output.WriteBool(IgnoreGroundtruth); + } + if (UseMovingAverages != false) { + output.WriteRawTag(88); + output.WriteBool(UseMovingAverages); + } + if (EvalInstanceMasks != false) { + output.WriteRawTag(96); + output.WriteBool(EvalInstanceMasks); + } + if (MinScoreThreshold != 0F) { + output.WriteRawTag(109); + output.WriteFloat(MinScoreThreshold); + } + if (MaxNumBoxesToVisualize != 0) { + output.WriteRawTag(112); + output.WriteInt32(MaxNumBoxesToVisualize); + } + if (SkipScores != false) { + output.WriteRawTag(120); + output.WriteBool(SkipScores); + } + if (SkipLabels != false) { + output.WriteRawTag(128, 1); + output.WriteBool(SkipLabels); + } + if (VisualizeGroundtruthBoxes != false) { + output.WriteRawTag(136, 1); + output.WriteBool(VisualizeGroundtruthBoxes); + } + if (GroundtruthBoxVisualizationColor.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(GroundtruthBoxVisualizationColor); + } + if (KeepImageIdForVisualizationExport != false) { + output.WriteRawTag(152, 1); + output.WriteBool(KeepImageIdForVisualizationExport); + } + if (RetainOriginalImages != false) { + output.WriteRawTag(184, 1); + output.WriteBool(RetainOriginalImages); + } + if (IncludeMetricsPerCategory != false) { + output.WriteRawTag(192, 1); + output.WriteBool(IncludeMetricsPerCategory); + } + if (BatchSize != 0) { + output.WriteRawTag(200, 1); + output.WriteUInt32(BatchSize); + } + if (RecallLowerBound != 0F) { + output.WriteRawTag(213, 1); + output.WriteFloat(RecallLowerBound); + } + if (RecallUpperBound != 0F) { + output.WriteRawTag(221, 1); + output.WriteFloat(RecallUpperBound); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (BatchSize != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(BatchSize); + } + if (NumVisualizations != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumVisualizations); + } + if (NumExamples != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumExamples); + } + if (EvalIntervalSecs != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(EvalIntervalSecs); + } + if (MaxEvals != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MaxEvals); + } + if (SaveGraph != false) { + size += 1 + 1; + } + if (VisualizationExportDir.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VisualizationExportDir); + } + if (EvalMaster.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EvalMaster); + } + size += metricsSet_.CalculateSize(_repeated_metricsSet_codec); + if (ExportPath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ExportPath); + } + if (IgnoreGroundtruth != false) { + size += 1 + 1; + } + if (UseMovingAverages != false) { + size += 1 + 1; + } + if (EvalInstanceMasks != false) { + size += 1 + 1; + } + if (MinScoreThreshold != 0F) { + size += 1 + 4; + } + if (MaxNumBoxesToVisualize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxNumBoxesToVisualize); + } + if (SkipScores != false) { + size += 1 + 1; + } + if (SkipLabels != false) { + size += 2 + 1; + } + if (VisualizeGroundtruthBoxes != false) { + size += 2 + 1; + } + if (GroundtruthBoxVisualizationColor.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(GroundtruthBoxVisualizationColor); + } + if (KeepImageIdForVisualizationExport != false) { + size += 2 + 1; + } + if (RetainOriginalImages != false) { + size += 2 + 1; + } + if (IncludeMetricsPerCategory != false) { + size += 2 + 1; + } + if (RecallLowerBound != 0F) { + size += 2 + 4; + } + if (RecallUpperBound != 0F) { + size += 2 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(EvalConfig other) { + if (other == null) { + return; + } + if (other.BatchSize != 0) { + BatchSize = other.BatchSize; + } + if (other.NumVisualizations != 0) { + NumVisualizations = other.NumVisualizations; + } + if (other.NumExamples != 0) { + NumExamples = other.NumExamples; + } + if (other.EvalIntervalSecs != 0) { + EvalIntervalSecs = other.EvalIntervalSecs; + } + if (other.MaxEvals != 0) { + MaxEvals = other.MaxEvals; + } + if (other.SaveGraph != false) { + SaveGraph = other.SaveGraph; + } + if (other.VisualizationExportDir.Length != 0) { + VisualizationExportDir = other.VisualizationExportDir; + } + if (other.EvalMaster.Length != 0) { + EvalMaster = other.EvalMaster; + } + metricsSet_.Add(other.metricsSet_); + if (other.ExportPath.Length != 0) { + ExportPath = other.ExportPath; + } + if (other.IgnoreGroundtruth != false) { + IgnoreGroundtruth = other.IgnoreGroundtruth; + } + if (other.UseMovingAverages != false) { + UseMovingAverages = other.UseMovingAverages; + } + if (other.EvalInstanceMasks != false) { + EvalInstanceMasks = other.EvalInstanceMasks; + } + if (other.MinScoreThreshold != 0F) { + MinScoreThreshold = other.MinScoreThreshold; + } + if (other.MaxNumBoxesToVisualize != 0) { + MaxNumBoxesToVisualize = other.MaxNumBoxesToVisualize; + } + if (other.SkipScores != false) { + SkipScores = other.SkipScores; + } + if (other.SkipLabels != false) { + SkipLabels = other.SkipLabels; + } + if (other.VisualizeGroundtruthBoxes != false) { + VisualizeGroundtruthBoxes = other.VisualizeGroundtruthBoxes; + } + if (other.GroundtruthBoxVisualizationColor.Length != 0) { + GroundtruthBoxVisualizationColor = other.GroundtruthBoxVisualizationColor; + } + if (other.KeepImageIdForVisualizationExport != false) { + KeepImageIdForVisualizationExport = other.KeepImageIdForVisualizationExport; + } + if (other.RetainOriginalImages != false) { + RetainOriginalImages = other.RetainOriginalImages; + } + if (other.IncludeMetricsPerCategory != false) { + IncludeMetricsPerCategory = other.IncludeMetricsPerCategory; + } + if (other.RecallLowerBound != 0F) { + RecallLowerBound = other.RecallLowerBound; + } + if (other.RecallUpperBound != 0F) { + RecallUpperBound = other.RecallUpperBound; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NumVisualizations = input.ReadUInt32(); + break; + } + case 16: { + NumExamples = input.ReadUInt32(); + break; + } + case 24: { + EvalIntervalSecs = input.ReadUInt32(); + break; + } + case 32: { + MaxEvals = input.ReadUInt32(); + break; + } + case 40: { + SaveGraph = input.ReadBool(); + break; + } + case 50: { + VisualizationExportDir = input.ReadString(); + break; + } + case 58: { + EvalMaster = input.ReadString(); + break; + } + case 66: { + metricsSet_.AddEntriesFrom(input, _repeated_metricsSet_codec); + break; + } + case 74: { + ExportPath = input.ReadString(); + break; + } + case 80: { + IgnoreGroundtruth = input.ReadBool(); + break; + } + case 88: { + UseMovingAverages = input.ReadBool(); + break; + } + case 96: { + EvalInstanceMasks = input.ReadBool(); + break; + } + case 109: { + MinScoreThreshold = input.ReadFloat(); + break; + } + case 112: { + MaxNumBoxesToVisualize = input.ReadInt32(); + break; + } + case 120: { + SkipScores = input.ReadBool(); + break; + } + case 128: { + SkipLabels = input.ReadBool(); + break; + } + case 136: { + VisualizeGroundtruthBoxes = input.ReadBool(); + break; + } + case 146: { + GroundtruthBoxVisualizationColor = input.ReadString(); + break; + } + case 152: { + KeepImageIdForVisualizationExport = input.ReadBool(); + break; + } + case 184: { + RetainOriginalImages = input.ReadBool(); + break; + } + case 192: { + IncludeMetricsPerCategory = input.ReadBool(); + break; + } + case 200: { + BatchSize = input.ReadUInt32(); + break; + } + case 213: { + RecallLowerBound = input.ReadFloat(); + break; + } + case 221: { + RecallUpperBound = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnn.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnn.cs new file mode 100644 index 00000000..f5ed1f2c --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnn.cs @@ -0,0 +1,1592 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/faster_rcnn.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/faster_rcnn.proto + public static partial class FasterRcnnReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/faster_rcnn.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FasterRcnnReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CilvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9mYXN0ZXJfcmNubi5wcm90bxIX", + "b2JqZWN0X2RldGVjdGlvbi5wcm90b3MaLm9iamVjdF9kZXRlY3Rpb24vcHJv", + "dG9zL2FuY2hvcl9nZW5lcmF0b3IucHJvdG8aK29iamVjdF9kZXRlY3Rpb24v", + "cHJvdG9zL2JveF9wcmVkaWN0b3IucHJvdG8aKW9iamVjdF9kZXRlY3Rpb24v", + "cHJvdG9zL2h5cGVycGFyYW1zLnByb3RvGitvYmplY3RfZGV0ZWN0aW9uL3By", + "b3Rvcy9pbWFnZV9yZXNpemVyLnByb3RvGiRvYmplY3RfZGV0ZWN0aW9uL3By", + "b3Rvcy9sb3NzZXMucHJvdG8aLW9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL3Bv", + "c3RfcHJvY2Vzc2luZy5wcm90byL5DAoKRmFzdGVyUmNubhIYChBudW1iZXJf", + "b2Zfc3RhZ2VzGAEgASgFEhMKC251bV9jbGFzc2VzGAMgASgFEjwKDWltYWdl", + "X3Jlc2l6ZXIYBCABKAsyJS5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5JbWFn", + "ZVJlc2l6ZXISTgoRZmVhdHVyZV9leHRyYWN0b3IYBSABKAsyMy5vYmplY3Rf", + "ZGV0ZWN0aW9uLnByb3Rvcy5GYXN0ZXJSY25uRmVhdHVyZUV4dHJhY3RvchJO", + "ChxmaXJzdF9zdGFnZV9hbmNob3JfZ2VuZXJhdG9yGAYgASgLMigub2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MuQW5jaG9yR2VuZXJhdG9yEh8KF2ZpcnN0X3N0", + "YWdlX2F0cm91c19yYXRlGAcgASgFElgKKmZpcnN0X3N0YWdlX2JveF9wcmVk", + "aWN0b3JfY29udl9oeXBlcnBhcmFtcxgIIAEoCzIkLm9iamVjdF9kZXRlY3Rp", + "b24ucHJvdG9zLkh5cGVycGFyYW1zEi0KJWZpcnN0X3N0YWdlX2JveF9wcmVk", + "aWN0b3Jfa2VybmVsX3NpemUYCSABKAUSJwofZmlyc3Rfc3RhZ2VfYm94X3By", + "ZWRpY3Rvcl9kZXB0aBgKIAEoBRIiChpmaXJzdF9zdGFnZV9taW5pYmF0Y2hf", + "c2l6ZRgLIAEoBRItCiVmaXJzdF9zdGFnZV9wb3NpdGl2ZV9iYWxhbmNlX2Zy", + "YWN0aW9uGAwgASgCEicKH2ZpcnN0X3N0YWdlX25tc19zY29yZV90aHJlc2hv", + "bGQYDSABKAISJQodZmlyc3Rfc3RhZ2Vfbm1zX2lvdV90aHJlc2hvbGQYDiAB", + "KAISIQoZZmlyc3Rfc3RhZ2VfbWF4X3Byb3Bvc2FscxgPIAEoBRIsCiRmaXJz", + "dF9zdGFnZV9sb2NhbGl6YXRpb25fbG9zc193ZWlnaHQYECABKAISKgoiZmly", + "c3Rfc3RhZ2Vfb2JqZWN0bmVzc19sb3NzX3dlaWdodBgRIAEoAhIZChFpbml0", + "aWFsX2Nyb3Bfc2l6ZRgSIAEoBRIbChNtYXhwb29sX2tlcm5lbF9zaXplGBMg", + "ASgFEhYKDm1heHBvb2xfc3RyaWRlGBQgASgFEkkKGnNlY29uZF9zdGFnZV9i", + "b3hfcHJlZGljdG9yGBUgASgLMiUub2JqZWN0X2RldGVjdGlvbi5wcm90b3Mu", + "Qm94UHJlZGljdG9yEh8KF3NlY29uZF9zdGFnZV9iYXRjaF9zaXplGBYgASgF", + "EiUKHXNlY29uZF9zdGFnZV9iYWxhbmNlX2ZyYWN0aW9uGBcgASgCEk0KHHNl", + "Y29uZF9zdGFnZV9wb3N0X3Byb2Nlc3NpbmcYGCABKAsyJy5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5Qb3N0UHJvY2Vzc2luZxItCiVzZWNvbmRfc3RhZ2Vf", + "bG9jYWxpemF0aW9uX2xvc3Nfd2VpZ2h0GBkgASgCEi8KJ3NlY29uZF9zdGFn", + "ZV9jbGFzc2lmaWNhdGlvbl9sb3NzX3dlaWdodBgaIAEoAhIwCihzZWNvbmRf", + "c3RhZ2VfbWFza19wcmVkaWN0aW9uX2xvc3Nfd2VpZ2h0GBsgASgCEkUKEmhh", + "cmRfZXhhbXBsZV9taW5lchgcIAEoCzIpLm9iamVjdF9kZXRlY3Rpb24ucHJv", + "dG9zLkhhcmRFeGFtcGxlTWluZXISVQogc2Vjb25kX3N0YWdlX2NsYXNzaWZp", + "Y2F0aW9uX2xvc3MYHSABKAsyKy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5D", + "bGFzc2lmaWNhdGlvbkxvc3MSIAoYaW5wbGFjZV9iYXRjaG5vcm1fdXBkYXRl", + "GB4gASgIEiIKGnVzZV9tYXRtdWxfY3JvcF9hbmRfcmVzaXplGB8gASgIEh0K", + "FWNsaXBfYW5jaG9yc190b19pbWFnZRggIAEoCBIkChx1c2VfbWF0bXVsX2dh", + "dGhlcl9pbl9tYXRjaGVyGCEgASgIEikKIXVzZV9zdGF0aWNfYmFsYW5jZWRf", + "bGFiZWxfc2FtcGxlchgiIAEoCBIZChF1c2Vfc3RhdGljX3NoYXBlcxgjIAEo", + "CBIUCgxyZXNpemVfbWFza3MYJCABKAgSIgoadXNlX3N0YXRpY19zaGFwZXNf", + "Zm9yX2V2YWwYJSABKAgibQoaRmFzdGVyUmNubkZlYXR1cmVFeHRyYWN0b3IS", + "DAoEdHlwZRgBIAEoCRIjChtmaXJzdF9zdGFnZV9mZWF0dXJlc19zdHJpZGUY", + "AiABKAUSHAoUYmF0Y2hfbm9ybV90cmFpbmFibGUYAyABKAhiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.AnchorGeneratorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.PostProcessingReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn), global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn.Parser, new[]{ "NumberOfStages", "NumClasses", "ImageResizer", "FeatureExtractor", "FirstStageAnchorGenerator", "FirstStageAtrousRate", "FirstStageBoxPredictorConvHyperparams", "FirstStageBoxPredictorKernelSize", "FirstStageBoxPredictorDepth", "FirstStageMinibatchSize", "FirstStagePositiveBalanceFraction", "FirstStageNmsScoreThreshold", "FirstStageNmsIouThreshold", "FirstStageMaxProposals", "FirstStageLocalizationLossWeight", "FirstStageObjectnessLossWeight", "InitialCropSize", "MaxpoolKernelSize", "MaxpoolStride", "SecondStageBoxPredictor", "SecondStageBatchSize", "SecondStageBalanceFraction", "SecondStagePostProcessing", "SecondStageLocalizationLossWeight", "SecondStageClassificationLossWeight", "SecondStageMaskPredictionLossWeight", "HardExampleMiner", "SecondStageClassificationLoss", "InplaceBatchnormUpdate", "UseMatmulCropAndResize", "ClipAnchorsToImage", "UseMatmulGatherInMatcher", "UseStaticBalancedLabelSampler", "UseStaticShapes", "ResizeMasks", "UseStaticShapesForEval" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnFeatureExtractor), global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnFeatureExtractor.Parser, new[]{ "Type", "FirstStageFeaturesStride", "BatchNormTrainable" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration for Faster R-CNN models. + /// See meta_architectures/faster_rcnn_meta_arch.py and models/model_builder.py + /// + /// Naming conventions: + /// Faster R-CNN models have two stages: a first stage region proposal network + /// (or RPN) and a second stage box classifier. We thus use the prefixes + /// `first_stage_` and `second_stage_` to indicate the stage to which each + /// parameter pertains when relevant. + /// + public sealed partial class FasterRcnn : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FasterRcnn()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnn() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnn(FasterRcnn other) : this() { + numberOfStages_ = other.numberOfStages_; + numClasses_ = other.numClasses_; + imageResizer_ = other.imageResizer_ != null ? other.imageResizer_.Clone() : null; + featureExtractor_ = other.featureExtractor_ != null ? other.featureExtractor_.Clone() : null; + firstStageAnchorGenerator_ = other.firstStageAnchorGenerator_ != null ? other.firstStageAnchorGenerator_.Clone() : null; + firstStageAtrousRate_ = other.firstStageAtrousRate_; + firstStageBoxPredictorConvHyperparams_ = other.firstStageBoxPredictorConvHyperparams_ != null ? other.firstStageBoxPredictorConvHyperparams_.Clone() : null; + firstStageBoxPredictorKernelSize_ = other.firstStageBoxPredictorKernelSize_; + firstStageBoxPredictorDepth_ = other.firstStageBoxPredictorDepth_; + firstStageMinibatchSize_ = other.firstStageMinibatchSize_; + firstStagePositiveBalanceFraction_ = other.firstStagePositiveBalanceFraction_; + firstStageNmsScoreThreshold_ = other.firstStageNmsScoreThreshold_; + firstStageNmsIouThreshold_ = other.firstStageNmsIouThreshold_; + firstStageMaxProposals_ = other.firstStageMaxProposals_; + firstStageLocalizationLossWeight_ = other.firstStageLocalizationLossWeight_; + firstStageObjectnessLossWeight_ = other.firstStageObjectnessLossWeight_; + initialCropSize_ = other.initialCropSize_; + maxpoolKernelSize_ = other.maxpoolKernelSize_; + maxpoolStride_ = other.maxpoolStride_; + secondStageBoxPredictor_ = other.secondStageBoxPredictor_ != null ? other.secondStageBoxPredictor_.Clone() : null; + secondStageBatchSize_ = other.secondStageBatchSize_; + secondStageBalanceFraction_ = other.secondStageBalanceFraction_; + secondStagePostProcessing_ = other.secondStagePostProcessing_ != null ? other.secondStagePostProcessing_.Clone() : null; + secondStageLocalizationLossWeight_ = other.secondStageLocalizationLossWeight_; + secondStageClassificationLossWeight_ = other.secondStageClassificationLossWeight_; + secondStageMaskPredictionLossWeight_ = other.secondStageMaskPredictionLossWeight_; + hardExampleMiner_ = other.hardExampleMiner_ != null ? other.hardExampleMiner_.Clone() : null; + secondStageClassificationLoss_ = other.secondStageClassificationLoss_ != null ? other.secondStageClassificationLoss_.Clone() : null; + inplaceBatchnormUpdate_ = other.inplaceBatchnormUpdate_; + useMatmulCropAndResize_ = other.useMatmulCropAndResize_; + clipAnchorsToImage_ = other.clipAnchorsToImage_; + useMatmulGatherInMatcher_ = other.useMatmulGatherInMatcher_; + useStaticBalancedLabelSampler_ = other.useStaticBalancedLabelSampler_; + useStaticShapes_ = other.useStaticShapes_; + resizeMasks_ = other.resizeMasks_; + useStaticShapesForEval_ = other.useStaticShapesForEval_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnn Clone() { + return new FasterRcnn(this); + } + + /// Field number for the "number_of_stages" field. + public const int NumberOfStagesFieldNumber = 1; + private int numberOfStages_; + /// + /// Whether to construct only the Region Proposal Network (RPN). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumberOfStages { + get { return numberOfStages_; } + set { + numberOfStages_ = value; + } + } + + /// Field number for the "num_classes" field. + public const int NumClassesFieldNumber = 3; + private int numClasses_; + /// + /// Number of classes to predict. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumClasses { + get { return numClasses_; } + set { + numClasses_ = value; + } + } + + /// Field number for the "image_resizer" field. + public const int ImageResizerFieldNumber = 4; + private global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer imageResizer_; + /// + /// Image resizer for preprocessing the input image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer ImageResizer { + get { return imageResizer_; } + set { + imageResizer_ = value; + } + } + + /// Field number for the "feature_extractor" field. + public const int FeatureExtractorFieldNumber = 5; + private global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnFeatureExtractor featureExtractor_; + /// + /// Feature extractor config. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnFeatureExtractor FeatureExtractor { + get { return featureExtractor_; } + set { + featureExtractor_ = value; + } + } + + /// Field number for the "first_stage_anchor_generator" field. + public const int FirstStageAnchorGeneratorFieldNumber = 6; + private global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator firstStageAnchorGenerator_; + /// + /// Anchor generator to compute RPN anchors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator FirstStageAnchorGenerator { + get { return firstStageAnchorGenerator_; } + set { + firstStageAnchorGenerator_ = value; + } + } + + /// Field number for the "first_stage_atrous_rate" field. + public const int FirstStageAtrousRateFieldNumber = 7; + private int firstStageAtrousRate_; + /// + /// Atrous rate for the convolution op applied to the + /// `first_stage_features_to_crop` tensor to obtain box predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FirstStageAtrousRate { + get { return firstStageAtrousRate_; } + set { + firstStageAtrousRate_ = value; + } + } + + /// Field number for the "first_stage_box_predictor_conv_hyperparams" field. + public const int FirstStageBoxPredictorConvHyperparamsFieldNumber = 8; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams firstStageBoxPredictorConvHyperparams_; + /// + /// Hyperparameters for the convolutional RPN box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams FirstStageBoxPredictorConvHyperparams { + get { return firstStageBoxPredictorConvHyperparams_; } + set { + firstStageBoxPredictorConvHyperparams_ = value; + } + } + + /// Field number for the "first_stage_box_predictor_kernel_size" field. + public const int FirstStageBoxPredictorKernelSizeFieldNumber = 9; + private int firstStageBoxPredictorKernelSize_; + /// + /// Kernel size to use for the convolution op just prior to RPN box + /// predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FirstStageBoxPredictorKernelSize { + get { return firstStageBoxPredictorKernelSize_; } + set { + firstStageBoxPredictorKernelSize_ = value; + } + } + + /// Field number for the "first_stage_box_predictor_depth" field. + public const int FirstStageBoxPredictorDepthFieldNumber = 10; + private int firstStageBoxPredictorDepth_; + /// + /// Output depth for the convolution op just prior to RPN box predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FirstStageBoxPredictorDepth { + get { return firstStageBoxPredictorDepth_; } + set { + firstStageBoxPredictorDepth_ = value; + } + } + + /// Field number for the "first_stage_minibatch_size" field. + public const int FirstStageMinibatchSizeFieldNumber = 11; + private int firstStageMinibatchSize_; + /// + /// The batch size to use for computing the first stage objectness and + /// location losses. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FirstStageMinibatchSize { + get { return firstStageMinibatchSize_; } + set { + firstStageMinibatchSize_ = value; + } + } + + /// Field number for the "first_stage_positive_balance_fraction" field. + public const int FirstStagePositiveBalanceFractionFieldNumber = 12; + private float firstStagePositiveBalanceFraction_; + /// + /// Fraction of positive examples per image for the RPN. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float FirstStagePositiveBalanceFraction { + get { return firstStagePositiveBalanceFraction_; } + set { + firstStagePositiveBalanceFraction_ = value; + } + } + + /// Field number for the "first_stage_nms_score_threshold" field. + public const int FirstStageNmsScoreThresholdFieldNumber = 13; + private float firstStageNmsScoreThreshold_; + /// + /// Non max suppression score threshold applied to first stage RPN proposals. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float FirstStageNmsScoreThreshold { + get { return firstStageNmsScoreThreshold_; } + set { + firstStageNmsScoreThreshold_ = value; + } + } + + /// Field number for the "first_stage_nms_iou_threshold" field. + public const int FirstStageNmsIouThresholdFieldNumber = 14; + private float firstStageNmsIouThreshold_; + /// + /// Non max suppression IOU threshold applied to first stage RPN proposals. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float FirstStageNmsIouThreshold { + get { return firstStageNmsIouThreshold_; } + set { + firstStageNmsIouThreshold_ = value; + } + } + + /// Field number for the "first_stage_max_proposals" field. + public const int FirstStageMaxProposalsFieldNumber = 15; + private int firstStageMaxProposals_; + /// + /// Maximum number of RPN proposals retained after first stage postprocessing. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FirstStageMaxProposals { + get { return firstStageMaxProposals_; } + set { + firstStageMaxProposals_ = value; + } + } + + /// Field number for the "first_stage_localization_loss_weight" field. + public const int FirstStageLocalizationLossWeightFieldNumber = 16; + private float firstStageLocalizationLossWeight_; + /// + /// First stage RPN localization loss weight. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float FirstStageLocalizationLossWeight { + get { return firstStageLocalizationLossWeight_; } + set { + firstStageLocalizationLossWeight_ = value; + } + } + + /// Field number for the "first_stage_objectness_loss_weight" field. + public const int FirstStageObjectnessLossWeightFieldNumber = 17; + private float firstStageObjectnessLossWeight_; + /// + /// First stage RPN objectness loss weight. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float FirstStageObjectnessLossWeight { + get { return firstStageObjectnessLossWeight_; } + set { + firstStageObjectnessLossWeight_ = value; + } + } + + /// Field number for the "initial_crop_size" field. + public const int InitialCropSizeFieldNumber = 18; + private int initialCropSize_; + /// + /// Output size (width and height are set to be the same) of the initial + /// bilinear interpolation based cropping during ROI pooling. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int InitialCropSize { + get { return initialCropSize_; } + set { + initialCropSize_ = value; + } + } + + /// Field number for the "maxpool_kernel_size" field. + public const int MaxpoolKernelSizeFieldNumber = 19; + private int maxpoolKernelSize_; + /// + /// Kernel size of the max pool op on the cropped feature map during + /// ROI pooling. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxpoolKernelSize { + get { return maxpoolKernelSize_; } + set { + maxpoolKernelSize_ = value; + } + } + + /// Field number for the "maxpool_stride" field. + public const int MaxpoolStrideFieldNumber = 20; + private int maxpoolStride_; + /// + /// Stride of the max pool op on the cropped feature map during ROI pooling. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxpoolStride { + get { return maxpoolStride_; } + set { + maxpoolStride_ = value; + } + } + + /// Field number for the "second_stage_box_predictor" field. + public const int SecondStageBoxPredictorFieldNumber = 21; + private global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor secondStageBoxPredictor_; + /// + /// Hyperparameters for the second stage box predictor. If box predictor type + /// is set to rfcn_box_predictor, a R-FCN model is constructed, otherwise a + /// Faster R-CNN model is constructed. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor SecondStageBoxPredictor { + get { return secondStageBoxPredictor_; } + set { + secondStageBoxPredictor_ = value; + } + } + + /// Field number for the "second_stage_batch_size" field. + public const int SecondStageBatchSizeFieldNumber = 22; + private int secondStageBatchSize_; + /// + /// The batch size per image used for computing the classification and refined + /// location loss of the box classifier. + /// Note that this field is ignored if `hard_example_miner` is configured. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int SecondStageBatchSize { + get { return secondStageBatchSize_; } + set { + secondStageBatchSize_ = value; + } + } + + /// Field number for the "second_stage_balance_fraction" field. + public const int SecondStageBalanceFractionFieldNumber = 23; + private float secondStageBalanceFraction_; + /// + /// Fraction of positive examples to use per image for the box classifier. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float SecondStageBalanceFraction { + get { return secondStageBalanceFraction_; } + set { + secondStageBalanceFraction_ = value; + } + } + + /// Field number for the "second_stage_post_processing" field. + public const int SecondStagePostProcessingFieldNumber = 24; + private global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing secondStagePostProcessing_; + /// + /// Post processing to apply on the second stage box classifier predictions. + /// Note: the `score_converter` provided to the FasterRCNNMetaArch constructor + /// is taken from this `second_stage_post_processing` proto. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing SecondStagePostProcessing { + get { return secondStagePostProcessing_; } + set { + secondStagePostProcessing_ = value; + } + } + + /// Field number for the "second_stage_localization_loss_weight" field. + public const int SecondStageLocalizationLossWeightFieldNumber = 25; + private float secondStageLocalizationLossWeight_; + /// + /// Second stage refined localization loss weight. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float SecondStageLocalizationLossWeight { + get { return secondStageLocalizationLossWeight_; } + set { + secondStageLocalizationLossWeight_ = value; + } + } + + /// Field number for the "second_stage_classification_loss_weight" field. + public const int SecondStageClassificationLossWeightFieldNumber = 26; + private float secondStageClassificationLossWeight_; + /// + /// Second stage classification loss weight + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float SecondStageClassificationLossWeight { + get { return secondStageClassificationLossWeight_; } + set { + secondStageClassificationLossWeight_ = value; + } + } + + /// Field number for the "second_stage_mask_prediction_loss_weight" field. + public const int SecondStageMaskPredictionLossWeightFieldNumber = 27; + private float secondStageMaskPredictionLossWeight_; + /// + /// Second stage instance mask loss weight. Note that this is only applicable + /// when `MaskRCNNBoxPredictor` is selected for second stage and configured to + /// predict instance masks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float SecondStageMaskPredictionLossWeight { + get { return secondStageMaskPredictionLossWeight_; } + set { + secondStageMaskPredictionLossWeight_ = value; + } + } + + /// Field number for the "hard_example_miner" field. + public const int HardExampleMinerFieldNumber = 28; + private global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner hardExampleMiner_; + /// + /// If not left to default, applies hard example mining only to classification + /// and localization loss.. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner HardExampleMiner { + get { return hardExampleMiner_; } + set { + hardExampleMiner_ = value; + } + } + + /// Field number for the "second_stage_classification_loss" field. + public const int SecondStageClassificationLossFieldNumber = 29; + private global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss secondStageClassificationLoss_; + /// + /// Loss for second stage box classifers, supports Softmax and Sigmoid. + /// Note that score converter must be consistent with loss type. + /// When there are multiple labels assigned to the same boxes, recommend + /// to use sigmoid loss and enable merge_multiple_label_boxes. + /// If not specified, Softmax loss is used as default. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss SecondStageClassificationLoss { + get { return secondStageClassificationLoss_; } + set { + secondStageClassificationLoss_ = value; + } + } + + /// Field number for the "inplace_batchnorm_update" field. + public const int InplaceBatchnormUpdateFieldNumber = 30; + private bool inplaceBatchnormUpdate_; + /// + /// Whether to update batch_norm inplace during training. This is required + /// for batch norm to work correctly on TPUs. When this is false, user must add + /// a control dependency on tf.GraphKeys.UPDATE_OPS for train/loss op in order + /// to update the batch norm moving average parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool InplaceBatchnormUpdate { + get { return inplaceBatchnormUpdate_; } + set { + inplaceBatchnormUpdate_ = value; + } + } + + /// Field number for the "use_matmul_crop_and_resize" field. + public const int UseMatmulCropAndResizeFieldNumber = 31; + private bool useMatmulCropAndResize_; + /// + /// Force the use of matrix multiplication based crop and resize instead of + /// standard tf.image.crop_and_resize while computing second stage input + /// feature maps. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMatmulCropAndResize { + get { return useMatmulCropAndResize_; } + set { + useMatmulCropAndResize_ = value; + } + } + + /// Field number for the "clip_anchors_to_image" field. + public const int ClipAnchorsToImageFieldNumber = 32; + private bool clipAnchorsToImage_; + /// + /// Normally, anchors generated for a given image size are pruned during + /// training if they lie outside the image window. Setting this option to true, + /// clips the anchors to be within the image instead of pruning. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipAnchorsToImage { + get { return clipAnchorsToImage_; } + set { + clipAnchorsToImage_ = value; + } + } + + /// Field number for the "use_matmul_gather_in_matcher" field. + public const int UseMatmulGatherInMatcherFieldNumber = 33; + private bool useMatmulGatherInMatcher_; + /// + /// After peforming matching between anchors and targets, in order to pull out + /// targets for training Faster R-CNN meta architecture we perform a gather + /// operation. This options specifies whether to use an alternate + /// implementation of tf.gather that is faster on TPUs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMatmulGatherInMatcher { + get { return useMatmulGatherInMatcher_; } + set { + useMatmulGatherInMatcher_ = value; + } + } + + /// Field number for the "use_static_balanced_label_sampler" field. + public const int UseStaticBalancedLabelSamplerFieldNumber = 34; + private bool useStaticBalancedLabelSampler_; + /// + /// Whether to use the balanced positive negative sampler implementation with + /// static shape guarantees. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseStaticBalancedLabelSampler { + get { return useStaticBalancedLabelSampler_; } + set { + useStaticBalancedLabelSampler_ = value; + } + } + + /// Field number for the "use_static_shapes" field. + public const int UseStaticShapesFieldNumber = 35; + private bool useStaticShapes_; + /// + /// If True, uses implementation of ops with static shape guarantees. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseStaticShapes { + get { return useStaticShapes_; } + set { + useStaticShapes_ = value; + } + } + + /// Field number for the "resize_masks" field. + public const int ResizeMasksFieldNumber = 36; + private bool resizeMasks_; + /// + /// Whether the masks present in groundtruth should be resized in the model to + /// match the image size. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ResizeMasks { + get { return resizeMasks_; } + set { + resizeMasks_ = value; + } + } + + /// Field number for the "use_static_shapes_for_eval" field. + public const int UseStaticShapesForEvalFieldNumber = 37; + private bool useStaticShapesForEval_; + /// + /// If True, uses implementation of ops with static shape guarantees when + /// running evaluation (specifically not is_training if False). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseStaticShapesForEval { + get { return useStaticShapesForEval_; } + set { + useStaticShapesForEval_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FasterRcnn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FasterRcnn other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NumberOfStages != other.NumberOfStages) return false; + if (NumClasses != other.NumClasses) return false; + if (!object.Equals(ImageResizer, other.ImageResizer)) return false; + if (!object.Equals(FeatureExtractor, other.FeatureExtractor)) return false; + if (!object.Equals(FirstStageAnchorGenerator, other.FirstStageAnchorGenerator)) return false; + if (FirstStageAtrousRate != other.FirstStageAtrousRate) return false; + if (!object.Equals(FirstStageBoxPredictorConvHyperparams, other.FirstStageBoxPredictorConvHyperparams)) return false; + if (FirstStageBoxPredictorKernelSize != other.FirstStageBoxPredictorKernelSize) return false; + if (FirstStageBoxPredictorDepth != other.FirstStageBoxPredictorDepth) return false; + if (FirstStageMinibatchSize != other.FirstStageMinibatchSize) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FirstStagePositiveBalanceFraction, other.FirstStagePositiveBalanceFraction)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FirstStageNmsScoreThreshold, other.FirstStageNmsScoreThreshold)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FirstStageNmsIouThreshold, other.FirstStageNmsIouThreshold)) return false; + if (FirstStageMaxProposals != other.FirstStageMaxProposals) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FirstStageLocalizationLossWeight, other.FirstStageLocalizationLossWeight)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(FirstStageObjectnessLossWeight, other.FirstStageObjectnessLossWeight)) return false; + if (InitialCropSize != other.InitialCropSize) return false; + if (MaxpoolKernelSize != other.MaxpoolKernelSize) return false; + if (MaxpoolStride != other.MaxpoolStride) return false; + if (!object.Equals(SecondStageBoxPredictor, other.SecondStageBoxPredictor)) return false; + if (SecondStageBatchSize != other.SecondStageBatchSize) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SecondStageBalanceFraction, other.SecondStageBalanceFraction)) return false; + if (!object.Equals(SecondStagePostProcessing, other.SecondStagePostProcessing)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SecondStageLocalizationLossWeight, other.SecondStageLocalizationLossWeight)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SecondStageClassificationLossWeight, other.SecondStageClassificationLossWeight)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SecondStageMaskPredictionLossWeight, other.SecondStageMaskPredictionLossWeight)) return false; + if (!object.Equals(HardExampleMiner, other.HardExampleMiner)) return false; + if (!object.Equals(SecondStageClassificationLoss, other.SecondStageClassificationLoss)) return false; + if (InplaceBatchnormUpdate != other.InplaceBatchnormUpdate) return false; + if (UseMatmulCropAndResize != other.UseMatmulCropAndResize) return false; + if (ClipAnchorsToImage != other.ClipAnchorsToImage) return false; + if (UseMatmulGatherInMatcher != other.UseMatmulGatherInMatcher) return false; + if (UseStaticBalancedLabelSampler != other.UseStaticBalancedLabelSampler) return false; + if (UseStaticShapes != other.UseStaticShapes) return false; + if (ResizeMasks != other.ResizeMasks) return false; + if (UseStaticShapesForEval != other.UseStaticShapesForEval) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NumberOfStages != 0) hash ^= NumberOfStages.GetHashCode(); + if (NumClasses != 0) hash ^= NumClasses.GetHashCode(); + if (imageResizer_ != null) hash ^= ImageResizer.GetHashCode(); + if (featureExtractor_ != null) hash ^= FeatureExtractor.GetHashCode(); + if (firstStageAnchorGenerator_ != null) hash ^= FirstStageAnchorGenerator.GetHashCode(); + if (FirstStageAtrousRate != 0) hash ^= FirstStageAtrousRate.GetHashCode(); + if (firstStageBoxPredictorConvHyperparams_ != null) hash ^= FirstStageBoxPredictorConvHyperparams.GetHashCode(); + if (FirstStageBoxPredictorKernelSize != 0) hash ^= FirstStageBoxPredictorKernelSize.GetHashCode(); + if (FirstStageBoxPredictorDepth != 0) hash ^= FirstStageBoxPredictorDepth.GetHashCode(); + if (FirstStageMinibatchSize != 0) hash ^= FirstStageMinibatchSize.GetHashCode(); + if (FirstStagePositiveBalanceFraction != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FirstStagePositiveBalanceFraction); + if (FirstStageNmsScoreThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FirstStageNmsScoreThreshold); + if (FirstStageNmsIouThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FirstStageNmsIouThreshold); + if (FirstStageMaxProposals != 0) hash ^= FirstStageMaxProposals.GetHashCode(); + if (FirstStageLocalizationLossWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FirstStageLocalizationLossWeight); + if (FirstStageObjectnessLossWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(FirstStageObjectnessLossWeight); + if (InitialCropSize != 0) hash ^= InitialCropSize.GetHashCode(); + if (MaxpoolKernelSize != 0) hash ^= MaxpoolKernelSize.GetHashCode(); + if (MaxpoolStride != 0) hash ^= MaxpoolStride.GetHashCode(); + if (secondStageBoxPredictor_ != null) hash ^= SecondStageBoxPredictor.GetHashCode(); + if (SecondStageBatchSize != 0) hash ^= SecondStageBatchSize.GetHashCode(); + if (SecondStageBalanceFraction != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SecondStageBalanceFraction); + if (secondStagePostProcessing_ != null) hash ^= SecondStagePostProcessing.GetHashCode(); + if (SecondStageLocalizationLossWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SecondStageLocalizationLossWeight); + if (SecondStageClassificationLossWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SecondStageClassificationLossWeight); + if (SecondStageMaskPredictionLossWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SecondStageMaskPredictionLossWeight); + if (hardExampleMiner_ != null) hash ^= HardExampleMiner.GetHashCode(); + if (secondStageClassificationLoss_ != null) hash ^= SecondStageClassificationLoss.GetHashCode(); + if (InplaceBatchnormUpdate != false) hash ^= InplaceBatchnormUpdate.GetHashCode(); + if (UseMatmulCropAndResize != false) hash ^= UseMatmulCropAndResize.GetHashCode(); + if (ClipAnchorsToImage != false) hash ^= ClipAnchorsToImage.GetHashCode(); + if (UseMatmulGatherInMatcher != false) hash ^= UseMatmulGatherInMatcher.GetHashCode(); + if (UseStaticBalancedLabelSampler != false) hash ^= UseStaticBalancedLabelSampler.GetHashCode(); + if (UseStaticShapes != false) hash ^= UseStaticShapes.GetHashCode(); + if (ResizeMasks != false) hash ^= ResizeMasks.GetHashCode(); + if (UseStaticShapesForEval != false) hash ^= UseStaticShapesForEval.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NumberOfStages != 0) { + output.WriteRawTag(8); + output.WriteInt32(NumberOfStages); + } + if (NumClasses != 0) { + output.WriteRawTag(24); + output.WriteInt32(NumClasses); + } + if (imageResizer_ != null) { + output.WriteRawTag(34); + output.WriteMessage(ImageResizer); + } + if (featureExtractor_ != null) { + output.WriteRawTag(42); + output.WriteMessage(FeatureExtractor); + } + if (firstStageAnchorGenerator_ != null) { + output.WriteRawTag(50); + output.WriteMessage(FirstStageAnchorGenerator); + } + if (FirstStageAtrousRate != 0) { + output.WriteRawTag(56); + output.WriteInt32(FirstStageAtrousRate); + } + if (firstStageBoxPredictorConvHyperparams_ != null) { + output.WriteRawTag(66); + output.WriteMessage(FirstStageBoxPredictorConvHyperparams); + } + if (FirstStageBoxPredictorKernelSize != 0) { + output.WriteRawTag(72); + output.WriteInt32(FirstStageBoxPredictorKernelSize); + } + if (FirstStageBoxPredictorDepth != 0) { + output.WriteRawTag(80); + output.WriteInt32(FirstStageBoxPredictorDepth); + } + if (FirstStageMinibatchSize != 0) { + output.WriteRawTag(88); + output.WriteInt32(FirstStageMinibatchSize); + } + if (FirstStagePositiveBalanceFraction != 0F) { + output.WriteRawTag(101); + output.WriteFloat(FirstStagePositiveBalanceFraction); + } + if (FirstStageNmsScoreThreshold != 0F) { + output.WriteRawTag(109); + output.WriteFloat(FirstStageNmsScoreThreshold); + } + if (FirstStageNmsIouThreshold != 0F) { + output.WriteRawTag(117); + output.WriteFloat(FirstStageNmsIouThreshold); + } + if (FirstStageMaxProposals != 0) { + output.WriteRawTag(120); + output.WriteInt32(FirstStageMaxProposals); + } + if (FirstStageLocalizationLossWeight != 0F) { + output.WriteRawTag(133, 1); + output.WriteFloat(FirstStageLocalizationLossWeight); + } + if (FirstStageObjectnessLossWeight != 0F) { + output.WriteRawTag(141, 1); + output.WriteFloat(FirstStageObjectnessLossWeight); + } + if (InitialCropSize != 0) { + output.WriteRawTag(144, 1); + output.WriteInt32(InitialCropSize); + } + if (MaxpoolKernelSize != 0) { + output.WriteRawTag(152, 1); + output.WriteInt32(MaxpoolKernelSize); + } + if (MaxpoolStride != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(MaxpoolStride); + } + if (secondStageBoxPredictor_ != null) { + output.WriteRawTag(170, 1); + output.WriteMessage(SecondStageBoxPredictor); + } + if (SecondStageBatchSize != 0) { + output.WriteRawTag(176, 1); + output.WriteInt32(SecondStageBatchSize); + } + if (SecondStageBalanceFraction != 0F) { + output.WriteRawTag(189, 1); + output.WriteFloat(SecondStageBalanceFraction); + } + if (secondStagePostProcessing_ != null) { + output.WriteRawTag(194, 1); + output.WriteMessage(SecondStagePostProcessing); + } + if (SecondStageLocalizationLossWeight != 0F) { + output.WriteRawTag(205, 1); + output.WriteFloat(SecondStageLocalizationLossWeight); + } + if (SecondStageClassificationLossWeight != 0F) { + output.WriteRawTag(213, 1); + output.WriteFloat(SecondStageClassificationLossWeight); + } + if (SecondStageMaskPredictionLossWeight != 0F) { + output.WriteRawTag(221, 1); + output.WriteFloat(SecondStageMaskPredictionLossWeight); + } + if (hardExampleMiner_ != null) { + output.WriteRawTag(226, 1); + output.WriteMessage(HardExampleMiner); + } + if (secondStageClassificationLoss_ != null) { + output.WriteRawTag(234, 1); + output.WriteMessage(SecondStageClassificationLoss); + } + if (InplaceBatchnormUpdate != false) { + output.WriteRawTag(240, 1); + output.WriteBool(InplaceBatchnormUpdate); + } + if (UseMatmulCropAndResize != false) { + output.WriteRawTag(248, 1); + output.WriteBool(UseMatmulCropAndResize); + } + if (ClipAnchorsToImage != false) { + output.WriteRawTag(128, 2); + output.WriteBool(ClipAnchorsToImage); + } + if (UseMatmulGatherInMatcher != false) { + output.WriteRawTag(136, 2); + output.WriteBool(UseMatmulGatherInMatcher); + } + if (UseStaticBalancedLabelSampler != false) { + output.WriteRawTag(144, 2); + output.WriteBool(UseStaticBalancedLabelSampler); + } + if (UseStaticShapes != false) { + output.WriteRawTag(152, 2); + output.WriteBool(UseStaticShapes); + } + if (ResizeMasks != false) { + output.WriteRawTag(160, 2); + output.WriteBool(ResizeMasks); + } + if (UseStaticShapesForEval != false) { + output.WriteRawTag(168, 2); + output.WriteBool(UseStaticShapesForEval); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NumberOfStages != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfStages); + } + if (NumClasses != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumClasses); + } + if (imageResizer_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ImageResizer); + } + if (featureExtractor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FeatureExtractor); + } + if (firstStageAnchorGenerator_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FirstStageAnchorGenerator); + } + if (FirstStageAtrousRate != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FirstStageAtrousRate); + } + if (firstStageBoxPredictorConvHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FirstStageBoxPredictorConvHyperparams); + } + if (FirstStageBoxPredictorKernelSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FirstStageBoxPredictorKernelSize); + } + if (FirstStageBoxPredictorDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FirstStageBoxPredictorDepth); + } + if (FirstStageMinibatchSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FirstStageMinibatchSize); + } + if (FirstStagePositiveBalanceFraction != 0F) { + size += 1 + 4; + } + if (FirstStageNmsScoreThreshold != 0F) { + size += 1 + 4; + } + if (FirstStageNmsIouThreshold != 0F) { + size += 1 + 4; + } + if (FirstStageMaxProposals != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FirstStageMaxProposals); + } + if (FirstStageLocalizationLossWeight != 0F) { + size += 2 + 4; + } + if (FirstStageObjectnessLossWeight != 0F) { + size += 2 + 4; + } + if (InitialCropSize != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(InitialCropSize); + } + if (MaxpoolKernelSize != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MaxpoolKernelSize); + } + if (MaxpoolStride != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MaxpoolStride); + } + if (secondStageBoxPredictor_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SecondStageBoxPredictor); + } + if (SecondStageBatchSize != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(SecondStageBatchSize); + } + if (SecondStageBalanceFraction != 0F) { + size += 2 + 4; + } + if (secondStagePostProcessing_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SecondStagePostProcessing); + } + if (SecondStageLocalizationLossWeight != 0F) { + size += 2 + 4; + } + if (SecondStageClassificationLossWeight != 0F) { + size += 2 + 4; + } + if (SecondStageMaskPredictionLossWeight != 0F) { + size += 2 + 4; + } + if (hardExampleMiner_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(HardExampleMiner); + } + if (secondStageClassificationLoss_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SecondStageClassificationLoss); + } + if (InplaceBatchnormUpdate != false) { + size += 2 + 1; + } + if (UseMatmulCropAndResize != false) { + size += 2 + 1; + } + if (ClipAnchorsToImage != false) { + size += 2 + 1; + } + if (UseMatmulGatherInMatcher != false) { + size += 2 + 1; + } + if (UseStaticBalancedLabelSampler != false) { + size += 2 + 1; + } + if (UseStaticShapes != false) { + size += 2 + 1; + } + if (ResizeMasks != false) { + size += 2 + 1; + } + if (UseStaticShapesForEval != false) { + size += 2 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FasterRcnn other) { + if (other == null) { + return; + } + if (other.NumberOfStages != 0) { + NumberOfStages = other.NumberOfStages; + } + if (other.NumClasses != 0) { + NumClasses = other.NumClasses; + } + if (other.imageResizer_ != null) { + if (imageResizer_ == null) { + imageResizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer(); + } + ImageResizer.MergeFrom(other.ImageResizer); + } + if (other.featureExtractor_ != null) { + if (featureExtractor_ == null) { + featureExtractor_ = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnFeatureExtractor(); + } + FeatureExtractor.MergeFrom(other.FeatureExtractor); + } + if (other.firstStageAnchorGenerator_ != null) { + if (firstStageAnchorGenerator_ == null) { + firstStageAnchorGenerator_ = new global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator(); + } + FirstStageAnchorGenerator.MergeFrom(other.FirstStageAnchorGenerator); + } + if (other.FirstStageAtrousRate != 0) { + FirstStageAtrousRate = other.FirstStageAtrousRate; + } + if (other.firstStageBoxPredictorConvHyperparams_ != null) { + if (firstStageBoxPredictorConvHyperparams_ == null) { + firstStageBoxPredictorConvHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + FirstStageBoxPredictorConvHyperparams.MergeFrom(other.FirstStageBoxPredictorConvHyperparams); + } + if (other.FirstStageBoxPredictorKernelSize != 0) { + FirstStageBoxPredictorKernelSize = other.FirstStageBoxPredictorKernelSize; + } + if (other.FirstStageBoxPredictorDepth != 0) { + FirstStageBoxPredictorDepth = other.FirstStageBoxPredictorDepth; + } + if (other.FirstStageMinibatchSize != 0) { + FirstStageMinibatchSize = other.FirstStageMinibatchSize; + } + if (other.FirstStagePositiveBalanceFraction != 0F) { + FirstStagePositiveBalanceFraction = other.FirstStagePositiveBalanceFraction; + } + if (other.FirstStageNmsScoreThreshold != 0F) { + FirstStageNmsScoreThreshold = other.FirstStageNmsScoreThreshold; + } + if (other.FirstStageNmsIouThreshold != 0F) { + FirstStageNmsIouThreshold = other.FirstStageNmsIouThreshold; + } + if (other.FirstStageMaxProposals != 0) { + FirstStageMaxProposals = other.FirstStageMaxProposals; + } + if (other.FirstStageLocalizationLossWeight != 0F) { + FirstStageLocalizationLossWeight = other.FirstStageLocalizationLossWeight; + } + if (other.FirstStageObjectnessLossWeight != 0F) { + FirstStageObjectnessLossWeight = other.FirstStageObjectnessLossWeight; + } + if (other.InitialCropSize != 0) { + InitialCropSize = other.InitialCropSize; + } + if (other.MaxpoolKernelSize != 0) { + MaxpoolKernelSize = other.MaxpoolKernelSize; + } + if (other.MaxpoolStride != 0) { + MaxpoolStride = other.MaxpoolStride; + } + if (other.secondStageBoxPredictor_ != null) { + if (secondStageBoxPredictor_ == null) { + secondStageBoxPredictor_ = new global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor(); + } + SecondStageBoxPredictor.MergeFrom(other.SecondStageBoxPredictor); + } + if (other.SecondStageBatchSize != 0) { + SecondStageBatchSize = other.SecondStageBatchSize; + } + if (other.SecondStageBalanceFraction != 0F) { + SecondStageBalanceFraction = other.SecondStageBalanceFraction; + } + if (other.secondStagePostProcessing_ != null) { + if (secondStagePostProcessing_ == null) { + secondStagePostProcessing_ = new global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing(); + } + SecondStagePostProcessing.MergeFrom(other.SecondStagePostProcessing); + } + if (other.SecondStageLocalizationLossWeight != 0F) { + SecondStageLocalizationLossWeight = other.SecondStageLocalizationLossWeight; + } + if (other.SecondStageClassificationLossWeight != 0F) { + SecondStageClassificationLossWeight = other.SecondStageClassificationLossWeight; + } + if (other.SecondStageMaskPredictionLossWeight != 0F) { + SecondStageMaskPredictionLossWeight = other.SecondStageMaskPredictionLossWeight; + } + if (other.hardExampleMiner_ != null) { + if (hardExampleMiner_ == null) { + hardExampleMiner_ = new global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner(); + } + HardExampleMiner.MergeFrom(other.HardExampleMiner); + } + if (other.secondStageClassificationLoss_ != null) { + if (secondStageClassificationLoss_ == null) { + secondStageClassificationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss(); + } + SecondStageClassificationLoss.MergeFrom(other.SecondStageClassificationLoss); + } + if (other.InplaceBatchnormUpdate != false) { + InplaceBatchnormUpdate = other.InplaceBatchnormUpdate; + } + if (other.UseMatmulCropAndResize != false) { + UseMatmulCropAndResize = other.UseMatmulCropAndResize; + } + if (other.ClipAnchorsToImage != false) { + ClipAnchorsToImage = other.ClipAnchorsToImage; + } + if (other.UseMatmulGatherInMatcher != false) { + UseMatmulGatherInMatcher = other.UseMatmulGatherInMatcher; + } + if (other.UseStaticBalancedLabelSampler != false) { + UseStaticBalancedLabelSampler = other.UseStaticBalancedLabelSampler; + } + if (other.UseStaticShapes != false) { + UseStaticShapes = other.UseStaticShapes; + } + if (other.ResizeMasks != false) { + ResizeMasks = other.ResizeMasks; + } + if (other.UseStaticShapesForEval != false) { + UseStaticShapesForEval = other.UseStaticShapesForEval; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NumberOfStages = input.ReadInt32(); + break; + } + case 24: { + NumClasses = input.ReadInt32(); + break; + } + case 34: { + if (imageResizer_ == null) { + imageResizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer(); + } + input.ReadMessage(imageResizer_); + break; + } + case 42: { + if (featureExtractor_ == null) { + featureExtractor_ = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnFeatureExtractor(); + } + input.ReadMessage(featureExtractor_); + break; + } + case 50: { + if (firstStageAnchorGenerator_ == null) { + firstStageAnchorGenerator_ = new global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator(); + } + input.ReadMessage(firstStageAnchorGenerator_); + break; + } + case 56: { + FirstStageAtrousRate = input.ReadInt32(); + break; + } + case 66: { + if (firstStageBoxPredictorConvHyperparams_ == null) { + firstStageBoxPredictorConvHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(firstStageBoxPredictorConvHyperparams_); + break; + } + case 72: { + FirstStageBoxPredictorKernelSize = input.ReadInt32(); + break; + } + case 80: { + FirstStageBoxPredictorDepth = input.ReadInt32(); + break; + } + case 88: { + FirstStageMinibatchSize = input.ReadInt32(); + break; + } + case 101: { + FirstStagePositiveBalanceFraction = input.ReadFloat(); + break; + } + case 109: { + FirstStageNmsScoreThreshold = input.ReadFloat(); + break; + } + case 117: { + FirstStageNmsIouThreshold = input.ReadFloat(); + break; + } + case 120: { + FirstStageMaxProposals = input.ReadInt32(); + break; + } + case 133: { + FirstStageLocalizationLossWeight = input.ReadFloat(); + break; + } + case 141: { + FirstStageObjectnessLossWeight = input.ReadFloat(); + break; + } + case 144: { + InitialCropSize = input.ReadInt32(); + break; + } + case 152: { + MaxpoolKernelSize = input.ReadInt32(); + break; + } + case 160: { + MaxpoolStride = input.ReadInt32(); + break; + } + case 170: { + if (secondStageBoxPredictor_ == null) { + secondStageBoxPredictor_ = new global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor(); + } + input.ReadMessage(secondStageBoxPredictor_); + break; + } + case 176: { + SecondStageBatchSize = input.ReadInt32(); + break; + } + case 189: { + SecondStageBalanceFraction = input.ReadFloat(); + break; + } + case 194: { + if (secondStagePostProcessing_ == null) { + secondStagePostProcessing_ = new global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing(); + } + input.ReadMessage(secondStagePostProcessing_); + break; + } + case 205: { + SecondStageLocalizationLossWeight = input.ReadFloat(); + break; + } + case 213: { + SecondStageClassificationLossWeight = input.ReadFloat(); + break; + } + case 221: { + SecondStageMaskPredictionLossWeight = input.ReadFloat(); + break; + } + case 226: { + if (hardExampleMiner_ == null) { + hardExampleMiner_ = new global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner(); + } + input.ReadMessage(hardExampleMiner_); + break; + } + case 234: { + if (secondStageClassificationLoss_ == null) { + secondStageClassificationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss(); + } + input.ReadMessage(secondStageClassificationLoss_); + break; + } + case 240: { + InplaceBatchnormUpdate = input.ReadBool(); + break; + } + case 248: { + UseMatmulCropAndResize = input.ReadBool(); + break; + } + case 256: { + ClipAnchorsToImage = input.ReadBool(); + break; + } + case 264: { + UseMatmulGatherInMatcher = input.ReadBool(); + break; + } + case 272: { + UseStaticBalancedLabelSampler = input.ReadBool(); + break; + } + case 280: { + UseStaticShapes = input.ReadBool(); + break; + } + case 288: { + ResizeMasks = input.ReadBool(); + break; + } + case 296: { + UseStaticShapesForEval = input.ReadBool(); + break; + } + } + } + } + + } + + public sealed partial class FasterRcnnFeatureExtractor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FasterRcnnFeatureExtractor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnnFeatureExtractor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnnFeatureExtractor(FasterRcnnFeatureExtractor other) : this() { + type_ = other.type_; + firstStageFeaturesStride_ = other.firstStageFeaturesStride_; + batchNormTrainable_ = other.batchNormTrainable_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnnFeatureExtractor Clone() { + return new FasterRcnnFeatureExtractor(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private string type_ = ""; + /// + /// Type of Faster R-CNN model (e.g., 'faster_rcnn_resnet101'; + /// See builders/model_builder.py for expected types). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "first_stage_features_stride" field. + public const int FirstStageFeaturesStrideFieldNumber = 2; + private int firstStageFeaturesStride_; + /// + /// Output stride of extracted RPN feature map. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int FirstStageFeaturesStride { + get { return firstStageFeaturesStride_; } + set { + firstStageFeaturesStride_ = value; + } + } + + /// Field number for the "batch_norm_trainable" field. + public const int BatchNormTrainableFieldNumber = 3; + private bool batchNormTrainable_; + /// + /// Whether to update batch norm parameters during training or not. + /// When training with a relative large batch size (e.g. 8), it could be + /// desirable to enable batch norm update. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool BatchNormTrainable { + get { return batchNormTrainable_; } + set { + batchNormTrainable_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FasterRcnnFeatureExtractor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FasterRcnnFeatureExtractor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (FirstStageFeaturesStride != other.FirstStageFeaturesStride) return false; + if (BatchNormTrainable != other.BatchNormTrainable) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (FirstStageFeaturesStride != 0) hash ^= FirstStageFeaturesStride.GetHashCode(); + if (BatchNormTrainable != false) hash ^= BatchNormTrainable.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (FirstStageFeaturesStride != 0) { + output.WriteRawTag(16); + output.WriteInt32(FirstStageFeaturesStride); + } + if (BatchNormTrainable != false) { + output.WriteRawTag(24); + output.WriteBool(BatchNormTrainable); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (FirstStageFeaturesStride != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FirstStageFeaturesStride); + } + if (BatchNormTrainable != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FasterRcnnFeatureExtractor other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.FirstStageFeaturesStride != 0) { + FirstStageFeaturesStride = other.FirstStageFeaturesStride; + } + if (other.BatchNormTrainable != false) { + BatchNormTrainable = other.BatchNormTrainable; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + FirstStageFeaturesStride = input.ReadInt32(); + break; + } + case 24: { + BatchNormTrainable = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnnBoxCoder.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnnBoxCoder.cs new file mode 100644 index 00000000..bf9dbe92 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/FasterRcnnBoxCoder.cs @@ -0,0 +1,272 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/faster_rcnn_box_coder.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/faster_rcnn_box_coder.proto + public static partial class FasterRcnnBoxCoderReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/faster_rcnn_box_coder.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FasterRcnnBoxCoderReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9mYXN0ZXJfcmNubl9ib3hfY29k", + "ZXIucHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zImEKEkZhc3RlclJj", + "bm5Cb3hDb2RlchIPCgd5X3NjYWxlGAEgASgCEg8KB3hfc2NhbGUYAiABKAIS", + "FAoMaGVpZ2h0X3NjYWxlGAMgASgCEhMKC3dpZHRoX3NjYWxlGAQgASgCYgZw", + "cm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder), global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoder.Parser, new[]{ "YScale", "XScale", "HeightScale", "WidthScale" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for FasterRCNNBoxCoder. See + /// box_coders/faster_rcnn_box_coder.py for details. + /// + public sealed partial class FasterRcnnBoxCoder : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FasterRcnnBoxCoder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnBoxCoderReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnnBoxCoder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnnBoxCoder(FasterRcnnBoxCoder other) : this() { + yScale_ = other.yScale_; + xScale_ = other.xScale_; + heightScale_ = other.heightScale_; + widthScale_ = other.widthScale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FasterRcnnBoxCoder Clone() { + return new FasterRcnnBoxCoder(this); + } + + /// Field number for the "y_scale" field. + public const int YScaleFieldNumber = 1; + private float yScale_; + /// + /// Scale factor for anchor encoded box center. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float YScale { + get { return yScale_; } + set { + yScale_ = value; + } + } + + /// Field number for the "x_scale" field. + public const int XScaleFieldNumber = 2; + private float xScale_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float XScale { + get { return xScale_; } + set { + xScale_ = value; + } + } + + /// Field number for the "height_scale" field. + public const int HeightScaleFieldNumber = 3; + private float heightScale_; + /// + /// Scale factor for anchor encoded box height. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float HeightScale { + get { return heightScale_; } + set { + heightScale_ = value; + } + } + + /// Field number for the "width_scale" field. + public const int WidthScaleFieldNumber = 4; + private float widthScale_; + /// + /// Scale factor for anchor encoded box width. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float WidthScale { + get { return widthScale_; } + set { + widthScale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FasterRcnnBoxCoder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FasterRcnnBoxCoder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(YScale, other.YScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(XScale, other.XScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HeightScale, other.HeightScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(WidthScale, other.WidthScale)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (YScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(YScale); + if (XScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(XScale); + if (HeightScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HeightScale); + if (WidthScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(WidthScale); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (YScale != 0F) { + output.WriteRawTag(13); + output.WriteFloat(YScale); + } + if (XScale != 0F) { + output.WriteRawTag(21); + output.WriteFloat(XScale); + } + if (HeightScale != 0F) { + output.WriteRawTag(29); + output.WriteFloat(HeightScale); + } + if (WidthScale != 0F) { + output.WriteRawTag(37); + output.WriteFloat(WidthScale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (YScale != 0F) { + size += 1 + 4; + } + if (XScale != 0F) { + size += 1 + 4; + } + if (HeightScale != 0F) { + size += 1 + 4; + } + if (WidthScale != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FasterRcnnBoxCoder other) { + if (other == null) { + return; + } + if (other.YScale != 0F) { + YScale = other.YScale; + } + if (other.XScale != 0F) { + XScale = other.XScale; + } + if (other.HeightScale != 0F) { + HeightScale = other.HeightScale; + } + if (other.WidthScale != 0F) { + WidthScale = other.WidthScale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + YScale = input.ReadFloat(); + break; + } + case 21: { + XScale = input.ReadFloat(); + break; + } + case 29: { + HeightScale = input.ReadFloat(); + break; + } + case 37: { + WidthScale = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/FlexibleGridAnchorGenerator.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/FlexibleGridAnchorGenerator.cs new file mode 100644 index 00000000..2847b5fd --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/FlexibleGridAnchorGenerator.cs @@ -0,0 +1,476 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/flexible_grid_anchor_generator.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/flexible_grid_anchor_generator.proto + public static partial class FlexibleGridAnchorGeneratorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/flexible_grid_anchor_generator.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static FlexibleGridAnchorGeneratorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjxvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9mbGV4aWJsZV9ncmlkX2FuY2hv", + "cl9nZW5lcmF0b3IucHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zInYK", + "G0ZsZXhpYmxlR3JpZEFuY2hvckdlbmVyYXRvchI4CgthbmNob3JfZ3JpZBgB", + "IAMoCzIjLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLkFuY2hvckdyaWQSHQoV", + "bm9ybWFsaXplX2Nvb3JkaW5hdGVzGAIgASgIIpEBCgpBbmNob3JHcmlkEhIK", + "CmJhc2Vfc2l6ZXMYASADKAISFQoNYXNwZWN0X3JhdGlvcxgCIAMoAhIVCg1o", + "ZWlnaHRfc3RyaWRlGAMgASgNEhQKDHdpZHRoX3N0cmlkZRgEIAEoDRIVCg1o", + "ZWlnaHRfb2Zmc2V0GAUgASgNEhQKDHdpZHRoX29mZnNldBgGIAEoDWIGcHJv", + "dG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator), global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGenerator.Parser, new[]{ "AnchorGrid", "NormalizeCoordinates" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid), global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid.Parser, new[]{ "BaseSizes", "AspectRatios", "HeightStride", "WidthStride", "HeightOffset", "WidthOffset" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class FlexibleGridAnchorGenerator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FlexibleGridAnchorGenerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGeneratorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FlexibleGridAnchorGenerator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FlexibleGridAnchorGenerator(FlexibleGridAnchorGenerator other) : this() { + anchorGrid_ = other.anchorGrid_.Clone(); + normalizeCoordinates_ = other.normalizeCoordinates_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FlexibleGridAnchorGenerator Clone() { + return new FlexibleGridAnchorGenerator(this); + } + + /// Field number for the "anchor_grid" field. + public const int AnchorGridFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_anchorGrid_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid.Parser); + private readonly pbc::RepeatedField anchorGrid_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField AnchorGrid { + get { return anchorGrid_; } + } + + /// Field number for the "normalize_coordinates" field. + public const int NormalizeCoordinatesFieldNumber = 2; + private bool normalizeCoordinates_; + /// + /// Whether to produce anchors in normalized coordinates. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool NormalizeCoordinates { + get { return normalizeCoordinates_; } + set { + normalizeCoordinates_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FlexibleGridAnchorGenerator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FlexibleGridAnchorGenerator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!anchorGrid_.Equals(other.anchorGrid_)) return false; + if (NormalizeCoordinates != other.NormalizeCoordinates) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= anchorGrid_.GetHashCode(); + if (NormalizeCoordinates != false) hash ^= NormalizeCoordinates.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + anchorGrid_.WriteTo(output, _repeated_anchorGrid_codec); + if (NormalizeCoordinates != false) { + output.WriteRawTag(16); + output.WriteBool(NormalizeCoordinates); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += anchorGrid_.CalculateSize(_repeated_anchorGrid_codec); + if (NormalizeCoordinates != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FlexibleGridAnchorGenerator other) { + if (other == null) { + return; + } + anchorGrid_.Add(other.anchorGrid_); + if (other.NormalizeCoordinates != false) { + NormalizeCoordinates = other.NormalizeCoordinates; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + anchorGrid_.AddEntriesFrom(input, _repeated_anchorGrid_codec); + break; + } + case 16: { + NormalizeCoordinates = input.ReadBool(); + break; + } + } + } + } + + } + + public sealed partial class AnchorGrid : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AnchorGrid()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.FlexibleGridAnchorGeneratorReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGrid() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGrid(AnchorGrid other) : this() { + baseSizes_ = other.baseSizes_.Clone(); + aspectRatios_ = other.aspectRatios_.Clone(); + heightStride_ = other.heightStride_; + widthStride_ = other.widthStride_; + heightOffset_ = other.heightOffset_; + widthOffset_ = other.widthOffset_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AnchorGrid Clone() { + return new AnchorGrid(this); + } + + /// Field number for the "base_sizes" field. + public const int BaseSizesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_baseSizes_codec + = pb::FieldCodec.ForFloat(10); + private readonly pbc::RepeatedField baseSizes_ = new pbc::RepeatedField(); + /// + /// The base sizes in pixels for each anchor in this anchor layer. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField BaseSizes { + get { return baseSizes_; } + } + + /// Field number for the "aspect_ratios" field. + public const int AspectRatiosFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_aspectRatios_codec + = pb::FieldCodec.ForFloat(18); + private readonly pbc::RepeatedField aspectRatios_ = new pbc::RepeatedField(); + /// + /// The aspect ratios for each anchor in this anchor layer. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField AspectRatios { + get { return aspectRatios_; } + } + + /// Field number for the "height_stride" field. + public const int HeightStrideFieldNumber = 3; + private uint heightStride_; + /// + /// The anchor height stride in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint HeightStride { + get { return heightStride_; } + set { + heightStride_ = value; + } + } + + /// Field number for the "width_stride" field. + public const int WidthStrideFieldNumber = 4; + private uint widthStride_; + /// + /// The anchor width stride in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint WidthStride { + get { return widthStride_; } + set { + widthStride_ = value; + } + } + + /// Field number for the "height_offset" field. + public const int HeightOffsetFieldNumber = 5; + private uint heightOffset_; + /// + /// The anchor height offset in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint HeightOffset { + get { return heightOffset_; } + set { + heightOffset_ = value; + } + } + + /// Field number for the "width_offset" field. + public const int WidthOffsetFieldNumber = 6; + private uint widthOffset_; + /// + /// The anchor width offset in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint WidthOffset { + get { return widthOffset_; } + set { + widthOffset_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as AnchorGrid); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(AnchorGrid other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!baseSizes_.Equals(other.baseSizes_)) return false; + if(!aspectRatios_.Equals(other.aspectRatios_)) return false; + if (HeightStride != other.HeightStride) return false; + if (WidthStride != other.WidthStride) return false; + if (HeightOffset != other.HeightOffset) return false; + if (WidthOffset != other.WidthOffset) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= baseSizes_.GetHashCode(); + hash ^= aspectRatios_.GetHashCode(); + if (HeightStride != 0) hash ^= HeightStride.GetHashCode(); + if (WidthStride != 0) hash ^= WidthStride.GetHashCode(); + if (HeightOffset != 0) hash ^= HeightOffset.GetHashCode(); + if (WidthOffset != 0) hash ^= WidthOffset.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + baseSizes_.WriteTo(output, _repeated_baseSizes_codec); + aspectRatios_.WriteTo(output, _repeated_aspectRatios_codec); + if (HeightStride != 0) { + output.WriteRawTag(24); + output.WriteUInt32(HeightStride); + } + if (WidthStride != 0) { + output.WriteRawTag(32); + output.WriteUInt32(WidthStride); + } + if (HeightOffset != 0) { + output.WriteRawTag(40); + output.WriteUInt32(HeightOffset); + } + if (WidthOffset != 0) { + output.WriteRawTag(48); + output.WriteUInt32(WidthOffset); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += baseSizes_.CalculateSize(_repeated_baseSizes_codec); + size += aspectRatios_.CalculateSize(_repeated_aspectRatios_codec); + if (HeightStride != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(HeightStride); + } + if (WidthStride != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(WidthStride); + } + if (HeightOffset != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(HeightOffset); + } + if (WidthOffset != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(WidthOffset); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(AnchorGrid other) { + if (other == null) { + return; + } + baseSizes_.Add(other.baseSizes_); + aspectRatios_.Add(other.aspectRatios_); + if (other.HeightStride != 0) { + HeightStride = other.HeightStride; + } + if (other.WidthStride != 0) { + WidthStride = other.WidthStride; + } + if (other.HeightOffset != 0) { + HeightOffset = other.HeightOffset; + } + if (other.WidthOffset != 0) { + WidthOffset = other.WidthOffset; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 13: { + baseSizes_.AddEntriesFrom(input, _repeated_baseSizes_codec); + break; + } + case 18: + case 21: { + aspectRatios_.AddEntriesFrom(input, _repeated_aspectRatios_codec); + break; + } + case 24: { + HeightStride = input.ReadUInt32(); + break; + } + case 32: { + WidthStride = input.ReadUInt32(); + break; + } + case 40: { + HeightOffset = input.ReadUInt32(); + break; + } + case 48: { + WidthOffset = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/GraphRewriter.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/GraphRewriter.cs new file mode 100644 index 00000000..04d3530c --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/GraphRewriter.cs @@ -0,0 +1,417 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/graph_rewriter.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/graph_rewriter.proto + public static partial class GraphRewriterReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/graph_rewriter.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GraphRewriterReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CixvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ncmFwaF9yZXdyaXRlci5wcm90", + "bxIXb2JqZWN0X2RldGVjdGlvbi5wcm90b3MiTAoNR3JhcGhSZXdyaXRlchI7", + "CgxxdWFudGl6YXRpb24YASABKAsyJS5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5RdWFudGl6YXRpb24iXgoMUXVhbnRpemF0aW9uEg0KBWRlbGF5GAEgASgF", + "EhMKC3dlaWdodF9iaXRzGAIgASgFEhcKD2FjdGl2YXRpb25fYml0cxgDIAEo", + "BRIRCglzeW1tZXRyaWMYBCABKAhiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriter), global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriter.Parser, new[]{ "Quantization" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Quantization), global::Tensorflow.Models.ObjectDetection.Protos.Quantization.Parser, new[]{ "Delay", "WeightBits", "ActivationBits", "Symmetric" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Message to configure graph rewriter for the tf graph. + /// + public sealed partial class GraphRewriter : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GraphRewriter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriterReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GraphRewriter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GraphRewriter(GraphRewriter other) : this() { + quantization_ = other.quantization_ != null ? other.quantization_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GraphRewriter Clone() { + return new GraphRewriter(this); + } + + /// Field number for the "quantization" field. + public const int QuantizationFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.Quantization quantization_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Quantization Quantization { + get { return quantization_; } + set { + quantization_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GraphRewriter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GraphRewriter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Quantization, other.Quantization)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (quantization_ != null) hash ^= Quantization.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (quantization_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Quantization); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (quantization_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Quantization); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GraphRewriter other) { + if (other == null) { + return; + } + if (other.quantization_ != null) { + if (quantization_ == null) { + quantization_ = new global::Tensorflow.Models.ObjectDetection.Protos.Quantization(); + } + Quantization.MergeFrom(other.Quantization); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (quantization_ == null) { + quantization_ = new global::Tensorflow.Models.ObjectDetection.Protos.Quantization(); + } + input.ReadMessage(quantization_); + break; + } + } + } + } + + } + + /// + /// Message for quantization options. See + /// tensorflow/contrib/quantize/python/quantize.py for details. + /// + public sealed partial class Quantization : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Quantization()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriterReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Quantization() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Quantization(Quantization other) : this() { + delay_ = other.delay_; + weightBits_ = other.weightBits_; + activationBits_ = other.activationBits_; + symmetric_ = other.symmetric_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Quantization Clone() { + return new Quantization(this); + } + + /// Field number for the "delay" field. + public const int DelayFieldNumber = 1; + private int delay_; + /// + /// Number of steps to delay before quantization takes effect during training. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Delay { + get { return delay_; } + set { + delay_ = value; + } + } + + /// Field number for the "weight_bits" field. + public const int WeightBitsFieldNumber = 2; + private int weightBits_; + /// + /// Number of bits to use for quantizing weights. + /// Only 8 bit is supported for now. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WeightBits { + get { return weightBits_; } + set { + weightBits_ = value; + } + } + + /// Field number for the "activation_bits" field. + public const int ActivationBitsFieldNumber = 3; + private int activationBits_; + /// + /// Number of bits to use for quantizing activations. + /// Only 8 bit is supported for now. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ActivationBits { + get { return activationBits_; } + set { + activationBits_ = value; + } + } + + /// Field number for the "symmetric" field. + public const int SymmetricFieldNumber = 4; + private bool symmetric_; + /// + /// Whether to use symmetric weight quantization. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Symmetric { + get { return symmetric_; } + set { + symmetric_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Quantization); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Quantization other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Delay != other.Delay) return false; + if (WeightBits != other.WeightBits) return false; + if (ActivationBits != other.ActivationBits) return false; + if (Symmetric != other.Symmetric) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Delay != 0) hash ^= Delay.GetHashCode(); + if (WeightBits != 0) hash ^= WeightBits.GetHashCode(); + if (ActivationBits != 0) hash ^= ActivationBits.GetHashCode(); + if (Symmetric != false) hash ^= Symmetric.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Delay != 0) { + output.WriteRawTag(8); + output.WriteInt32(Delay); + } + if (WeightBits != 0) { + output.WriteRawTag(16); + output.WriteInt32(WeightBits); + } + if (ActivationBits != 0) { + output.WriteRawTag(24); + output.WriteInt32(ActivationBits); + } + if (Symmetric != false) { + output.WriteRawTag(32); + output.WriteBool(Symmetric); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Delay != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Delay); + } + if (WeightBits != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WeightBits); + } + if (ActivationBits != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ActivationBits); + } + if (Symmetric != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Quantization other) { + if (other == null) { + return; + } + if (other.Delay != 0) { + Delay = other.Delay; + } + if (other.WeightBits != 0) { + WeightBits = other.WeightBits; + } + if (other.ActivationBits != 0) { + ActivationBits = other.ActivationBits; + } + if (other.Symmetric != false) { + Symmetric = other.Symmetric; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Delay = input.ReadInt32(); + break; + } + case 16: { + WeightBits = input.ReadInt32(); + break; + } + case 24: { + ActivationBits = input.ReadInt32(); + break; + } + case 32: { + Symmetric = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/GridAnchorGenerator.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/GridAnchorGenerator.cs new file mode 100644 index 00000000..76b31e74 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/GridAnchorGenerator.cs @@ -0,0 +1,386 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/grid_anchor_generator.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/grid_anchor_generator.proto + public static partial class GridAnchorGeneratorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/grid_anchor_generator.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static GridAnchorGeneratorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ncmlkX2FuY2hvcl9nZW5lcmF0", + "b3IucHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zIrUBChNHcmlkQW5j", + "aG9yR2VuZXJhdG9yEg4KBmhlaWdodBgBIAEoBRINCgV3aWR0aBgCIAEoBRIV", + "Cg1oZWlnaHRfc3RyaWRlGAMgASgFEhQKDHdpZHRoX3N0cmlkZRgEIAEoBRIV", + "Cg1oZWlnaHRfb2Zmc2V0GAUgASgFEhQKDHdpZHRoX29mZnNldBgGIAEoBRIO", + "CgZzY2FsZXMYByADKAISFQoNYXNwZWN0X3JhdGlvcxgIIAMoAmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator), global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGenerator.Parser, new[]{ "Height", "Width", "HeightStride", "WidthStride", "HeightOffset", "WidthOffset", "Scales", "AspectRatios" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for GridAnchorGenerator. See + /// anchor_generators/grid_anchor_generator.py for details. + /// + public sealed partial class GridAnchorGenerator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GridAnchorGenerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGeneratorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GridAnchorGenerator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GridAnchorGenerator(GridAnchorGenerator other) : this() { + height_ = other.height_; + width_ = other.width_; + heightStride_ = other.heightStride_; + widthStride_ = other.widthStride_; + heightOffset_ = other.heightOffset_; + widthOffset_ = other.widthOffset_; + scales_ = other.scales_.Clone(); + aspectRatios_ = other.aspectRatios_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GridAnchorGenerator Clone() { + return new GridAnchorGenerator(this); + } + + /// Field number for the "height" field. + public const int HeightFieldNumber = 1; + private int height_; + /// + /// Anchor height in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Height { + get { return height_; } + set { + height_ = value; + } + } + + /// Field number for the "width" field. + public const int WidthFieldNumber = 2; + private int width_; + /// + /// Anchor width in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Width { + get { return width_; } + set { + width_ = value; + } + } + + /// Field number for the "height_stride" field. + public const int HeightStrideFieldNumber = 3; + private int heightStride_; + /// + /// Anchor stride in height dimension in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int HeightStride { + get { return heightStride_; } + set { + heightStride_ = value; + } + } + + /// Field number for the "width_stride" field. + public const int WidthStrideFieldNumber = 4; + private int widthStride_; + /// + /// Anchor stride in width dimension in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WidthStride { + get { return widthStride_; } + set { + widthStride_ = value; + } + } + + /// Field number for the "height_offset" field. + public const int HeightOffsetFieldNumber = 5; + private int heightOffset_; + /// + /// Anchor height offset in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int HeightOffset { + get { return heightOffset_; } + set { + heightOffset_ = value; + } + } + + /// Field number for the "width_offset" field. + public const int WidthOffsetFieldNumber = 6; + private int widthOffset_; + /// + /// Anchor width offset in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int WidthOffset { + get { return widthOffset_; } + set { + widthOffset_ = value; + } + } + + /// Field number for the "scales" field. + public const int ScalesFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_scales_codec + = pb::FieldCodec.ForFloat(58); + private readonly pbc::RepeatedField scales_ = new pbc::RepeatedField(); + /// + /// List of scales for the anchors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Scales { + get { return scales_; } + } + + /// Field number for the "aspect_ratios" field. + public const int AspectRatiosFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_aspectRatios_codec + = pb::FieldCodec.ForFloat(66); + private readonly pbc::RepeatedField aspectRatios_ = new pbc::RepeatedField(); + /// + /// List of aspect ratios for the anchors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField AspectRatios { + get { return aspectRatios_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GridAnchorGenerator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GridAnchorGenerator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Height != other.Height) return false; + if (Width != other.Width) return false; + if (HeightStride != other.HeightStride) return false; + if (WidthStride != other.WidthStride) return false; + if (HeightOffset != other.HeightOffset) return false; + if (WidthOffset != other.WidthOffset) return false; + if(!scales_.Equals(other.scales_)) return false; + if(!aspectRatios_.Equals(other.aspectRatios_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Height != 0) hash ^= Height.GetHashCode(); + if (Width != 0) hash ^= Width.GetHashCode(); + if (HeightStride != 0) hash ^= HeightStride.GetHashCode(); + if (WidthStride != 0) hash ^= WidthStride.GetHashCode(); + if (HeightOffset != 0) hash ^= HeightOffset.GetHashCode(); + if (WidthOffset != 0) hash ^= WidthOffset.GetHashCode(); + hash ^= scales_.GetHashCode(); + hash ^= aspectRatios_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Height != 0) { + output.WriteRawTag(8); + output.WriteInt32(Height); + } + if (Width != 0) { + output.WriteRawTag(16); + output.WriteInt32(Width); + } + if (HeightStride != 0) { + output.WriteRawTag(24); + output.WriteInt32(HeightStride); + } + if (WidthStride != 0) { + output.WriteRawTag(32); + output.WriteInt32(WidthStride); + } + if (HeightOffset != 0) { + output.WriteRawTag(40); + output.WriteInt32(HeightOffset); + } + if (WidthOffset != 0) { + output.WriteRawTag(48); + output.WriteInt32(WidthOffset); + } + scales_.WriteTo(output, _repeated_scales_codec); + aspectRatios_.WriteTo(output, _repeated_aspectRatios_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Height != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Height); + } + if (Width != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Width); + } + if (HeightStride != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(HeightStride); + } + if (WidthStride != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WidthStride); + } + if (HeightOffset != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(HeightOffset); + } + if (WidthOffset != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(WidthOffset); + } + size += scales_.CalculateSize(_repeated_scales_codec); + size += aspectRatios_.CalculateSize(_repeated_aspectRatios_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GridAnchorGenerator other) { + if (other == null) { + return; + } + if (other.Height != 0) { + Height = other.Height; + } + if (other.Width != 0) { + Width = other.Width; + } + if (other.HeightStride != 0) { + HeightStride = other.HeightStride; + } + if (other.WidthStride != 0) { + WidthStride = other.WidthStride; + } + if (other.HeightOffset != 0) { + HeightOffset = other.HeightOffset; + } + if (other.WidthOffset != 0) { + WidthOffset = other.WidthOffset; + } + scales_.Add(other.scales_); + aspectRatios_.Add(other.aspectRatios_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Height = input.ReadInt32(); + break; + } + case 16: { + Width = input.ReadInt32(); + break; + } + case 24: { + HeightStride = input.ReadInt32(); + break; + } + case 32: { + WidthStride = input.ReadInt32(); + break; + } + case 40: { + HeightOffset = input.ReadInt32(); + break; + } + case 48: { + WidthOffset = input.ReadInt32(); + break; + } + case 58: + case 61: { + scales_.AddEntriesFrom(input, _repeated_scales_codec); + break; + } + case 66: + case 69: { + aspectRatios_.AddEntriesFrom(input, _repeated_aspectRatios_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Hyperparams.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Hyperparams.cs new file mode 100644 index 00000000..315b1c68 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Hyperparams.cs @@ -0,0 +1,2106 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/hyperparams.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/hyperparams.proto + public static partial class HyperparamsReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/hyperparams.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static HyperparamsReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CilvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9oeXBlcnBhcmFtcy5wcm90bxIX", + "b2JqZWN0X2RldGVjdGlvbi5wcm90b3Mi8wMKC0h5cGVycGFyYW1zEjMKAm9w", + "GAEgASgOMicub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuSHlwZXJwYXJhbXMu", + "T3ASOQoLcmVndWxhcml6ZXIYAiABKAsyJC5vYmplY3RfZGV0ZWN0aW9uLnBy", + "b3Rvcy5SZWd1bGFyaXplchI5Cgtpbml0aWFsaXplchgDIAEoCzIkLm9iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zLkluaXRpYWxpemVyEkMKCmFjdGl2YXRpb24Y", + "BCABKA4yLy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5IeXBlcnBhcmFtcy5B", + "Y3RpdmF0aW9uEjgKCmJhdGNoX25vcm0YBSABKAsyIi5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5CYXRjaE5vcm1IABI4Cgpncm91cF9ub3JtGAcgASgLMiIu", + "b2JqZWN0X2RldGVjdGlvbi5wcm90b3MuR3JvdXBOb3JtSAASHAoUcmVndWxh", + "cml6ZV9kZXB0aHdpc2UYBiABKAgiIAoCT3ASCAoETlVMTBAAEggKBENPTlYQ", + "ARIGCgJGQxACIiwKCkFjdGl2YXRpb24SCAoETk9ORRAAEggKBFJFTFUQARIK", + "CgZSRUxVXzYQAkISChBub3JtYWxpemVyX29uZW9mIqYBCgtSZWd1bGFyaXpl", + "chJACg5sMV9yZWd1bGFyaXplchgBIAEoCzImLm9iamVjdF9kZXRlY3Rpb24u", + "cHJvdG9zLkwxUmVndWxhcml6ZXJIABJACg5sMl9yZWd1bGFyaXplchgCIAEo", + "CzImLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLkwyUmVndWxhcml6ZXJIAEIT", + "ChFyZWd1bGFyaXplcl9vbmVvZiIfCg1MMVJlZ3VsYXJpemVyEg4KBndlaWdo", + "dBgBIAEoAiIfCg1MMlJlZ3VsYXJpemVyEg4KBndlaWdodBgBIAEoAiKzAgoL", + "SW5pdGlhbGl6ZXISWwocdHJ1bmNhdGVkX25vcm1hbF9pbml0aWFsaXplchgB", + "IAEoCzIzLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlRydW5jYXRlZE5vcm1h", + "bEluaXRpYWxpemVySAASWwocdmFyaWFuY2Vfc2NhbGluZ19pbml0aWFsaXpl", + "chgCIAEoCzIzLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlZhcmlhbmNlU2Nh", + "bGluZ0luaXRpYWxpemVySAASVQoZcmFuZG9tX25vcm1hbF9pbml0aWFsaXpl", + "chgDIAEoCzIwLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJhbmRvbU5vcm1h", + "bEluaXRpYWxpemVySABCEwoRaW5pdGlhbGl6ZXJfb25lb2YiOgoaVHJ1bmNh", + "dGVkTm9ybWFsSW5pdGlhbGl6ZXISDAoEbWVhbhgBIAEoAhIOCgZzdGRkZXYY", + "AiABKAIiswEKGlZhcmlhbmNlU2NhbGluZ0luaXRpYWxpemVyEg4KBmZhY3Rv", + "chgBIAEoAhIPCgd1bmlmb3JtGAIgASgIEkYKBG1vZGUYAyABKA4yOC5vYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcy5WYXJpYW5jZVNjYWxpbmdJbml0aWFsaXpl", + "ci5Nb2RlIiwKBE1vZGUSCgoGRkFOX0lOEAASCwoHRkFOX09VVBABEgsKB0ZB", + "Tl9BVkcQAiI3ChdSYW5kb21Ob3JtYWxJbml0aWFsaXplchIMCgRtZWFuGAEg", + "ASgCEg4KBnN0ZGRldhgCIAEoAiJZCglCYXRjaE5vcm0SDQoFZGVjYXkYASAB", + "KAISDgoGY2VudGVyGAIgASgIEg0KBXNjYWxlGAMgASgIEg8KB2Vwc2lsb24Y", + "BCABKAISDQoFdHJhaW4YBSABKAgiCwoJR3JvdXBOb3JtYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams), global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Parser, new[]{ "Op", "Regularizer", "Initializer", "Activation", "BatchNorm", "GroupNorm", "RegularizeDepthwise" }, new[]{ "NormalizerOneof" }, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Op), typeof(global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Activation) }, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Regularizer), global::Tensorflow.Models.ObjectDetection.Protos.Regularizer.Parser, new[]{ "L1Regularizer", "L2Regularizer" }, new[]{ "RegularizerOneof" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer), global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer.Parser, new[]{ "Weight" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer), global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer.Parser, new[]{ "Weight" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Initializer), global::Tensorflow.Models.ObjectDetection.Protos.Initializer.Parser, new[]{ "TruncatedNormalInitializer", "VarianceScalingInitializer", "RandomNormalInitializer" }, new[]{ "InitializerOneof" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer), global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer.Parser, new[]{ "Mean", "Stddev" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer), global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer.Parser, new[]{ "Factor", "Uniform", "Mode" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer.Types.Mode) }, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer), global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer.Parser, new[]{ "Mean", "Stddev" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm), global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm.Parser, new[]{ "Decay", "Center", "Scale", "Epsilon", "Train" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm), global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for the convolution op hyperparameters to use in the + /// object detection pipeline. + /// + public sealed partial class Hyperparams : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Hyperparams()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Hyperparams() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Hyperparams(Hyperparams other) : this() { + op_ = other.op_; + regularizer_ = other.regularizer_ != null ? other.regularizer_.Clone() : null; + initializer_ = other.initializer_ != null ? other.initializer_.Clone() : null; + activation_ = other.activation_; + regularizeDepthwise_ = other.regularizeDepthwise_; + switch (other.NormalizerOneofCase) { + case NormalizerOneofOneofCase.BatchNorm: + BatchNorm = other.BatchNorm.Clone(); + break; + case NormalizerOneofOneofCase.GroupNorm: + GroupNorm = other.GroupNorm.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Hyperparams Clone() { + return new Hyperparams(this); + } + + /// Field number for the "op" field. + public const int OpFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Op op_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Op Op { + get { return op_; } + set { + op_ = value; + } + } + + /// Field number for the "regularizer" field. + public const int RegularizerFieldNumber = 2; + private global::Tensorflow.Models.ObjectDetection.Protos.Regularizer regularizer_; + /// + /// Regularizer for the weights of the convolution op. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Regularizer Regularizer { + get { return regularizer_; } + set { + regularizer_ = value; + } + } + + /// Field number for the "initializer" field. + public const int InitializerFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.Initializer initializer_; + /// + /// Initializer for the weights of the convolution op. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Initializer Initializer { + get { return initializer_; } + set { + initializer_ = value; + } + } + + /// Field number for the "activation" field. + public const int ActivationFieldNumber = 4; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Activation activation_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Activation Activation { + get { return activation_; } + set { + activation_ = value; + } + } + + /// Field number for the "batch_norm" field. + public const int BatchNormFieldNumber = 5; + /// + /// Note that if nothing below is selected, then no normalization is applied + /// BatchNorm hyperparameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm BatchNorm { + get { return normalizerOneofCase_ == NormalizerOneofOneofCase.BatchNorm ? (global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm) normalizerOneof_ : null; } + set { + normalizerOneof_ = value; + normalizerOneofCase_ = value == null ? NormalizerOneofOneofCase.None : NormalizerOneofOneofCase.BatchNorm; + } + } + + /// Field number for the "group_norm" field. + public const int GroupNormFieldNumber = 7; + /// + /// GroupNorm hyperparameters. This is only supported on a subset of models. + /// Note that the current implementation of group norm instantiated in + /// tf.contrib.group.layers.group_norm() only supports fixed_size_resizer + /// for image preprocessing. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm GroupNorm { + get { return normalizerOneofCase_ == NormalizerOneofOneofCase.GroupNorm ? (global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm) normalizerOneof_ : null; } + set { + normalizerOneof_ = value; + normalizerOneofCase_ = value == null ? NormalizerOneofOneofCase.None : NormalizerOneofOneofCase.GroupNorm; + } + } + + /// Field number for the "regularize_depthwise" field. + public const int RegularizeDepthwiseFieldNumber = 6; + private bool regularizeDepthwise_; + /// + /// Whether depthwise convolutions should be regularized. If this parameter is + /// NOT set then the conv hyperparams will default to the parent scope. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool RegularizeDepthwise { + get { return regularizeDepthwise_; } + set { + regularizeDepthwise_ = value; + } + } + + private object normalizerOneof_; + /// Enum of possible cases for the "normalizer_oneof" oneof. + public enum NormalizerOneofOneofCase { + None = 0, + BatchNorm = 5, + GroupNorm = 7, + } + private NormalizerOneofOneofCase normalizerOneofCase_ = NormalizerOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NormalizerOneofOneofCase NormalizerOneofCase { + get { return normalizerOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearNormalizerOneof() { + normalizerOneofCase_ = NormalizerOneofOneofCase.None; + normalizerOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Hyperparams); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Hyperparams other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Op != other.Op) return false; + if (!object.Equals(Regularizer, other.Regularizer)) return false; + if (!object.Equals(Initializer, other.Initializer)) return false; + if (Activation != other.Activation) return false; + if (!object.Equals(BatchNorm, other.BatchNorm)) return false; + if (!object.Equals(GroupNorm, other.GroupNorm)) return false; + if (RegularizeDepthwise != other.RegularizeDepthwise) return false; + if (NormalizerOneofCase != other.NormalizerOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Op != 0) hash ^= Op.GetHashCode(); + if (regularizer_ != null) hash ^= Regularizer.GetHashCode(); + if (initializer_ != null) hash ^= Initializer.GetHashCode(); + if (Activation != 0) hash ^= Activation.GetHashCode(); + if (normalizerOneofCase_ == NormalizerOneofOneofCase.BatchNorm) hash ^= BatchNorm.GetHashCode(); + if (normalizerOneofCase_ == NormalizerOneofOneofCase.GroupNorm) hash ^= GroupNorm.GetHashCode(); + if (RegularizeDepthwise != false) hash ^= RegularizeDepthwise.GetHashCode(); + hash ^= (int) normalizerOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Op != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) Op); + } + if (regularizer_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Regularizer); + } + if (initializer_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Initializer); + } + if (Activation != 0) { + output.WriteRawTag(32); + output.WriteEnum((int) Activation); + } + if (normalizerOneofCase_ == NormalizerOneofOneofCase.BatchNorm) { + output.WriteRawTag(42); + output.WriteMessage(BatchNorm); + } + if (RegularizeDepthwise != false) { + output.WriteRawTag(48); + output.WriteBool(RegularizeDepthwise); + } + if (normalizerOneofCase_ == NormalizerOneofOneofCase.GroupNorm) { + output.WriteRawTag(58); + output.WriteMessage(GroupNorm); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Op != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Op); + } + if (regularizer_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Regularizer); + } + if (initializer_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Initializer); + } + if (Activation != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Activation); + } + if (normalizerOneofCase_ == NormalizerOneofOneofCase.BatchNorm) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BatchNorm); + } + if (normalizerOneofCase_ == NormalizerOneofOneofCase.GroupNorm) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GroupNorm); + } + if (RegularizeDepthwise != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Hyperparams other) { + if (other == null) { + return; + } + if (other.Op != 0) { + Op = other.Op; + } + if (other.regularizer_ != null) { + if (regularizer_ == null) { + regularizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.Regularizer(); + } + Regularizer.MergeFrom(other.Regularizer); + } + if (other.initializer_ != null) { + if (initializer_ == null) { + initializer_ = new global::Tensorflow.Models.ObjectDetection.Protos.Initializer(); + } + Initializer.MergeFrom(other.Initializer); + } + if (other.Activation != 0) { + Activation = other.Activation; + } + if (other.RegularizeDepthwise != false) { + RegularizeDepthwise = other.RegularizeDepthwise; + } + switch (other.NormalizerOneofCase) { + case NormalizerOneofOneofCase.BatchNorm: + if (BatchNorm == null) { + BatchNorm = new global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm(); + } + BatchNorm.MergeFrom(other.BatchNorm); + break; + case NormalizerOneofOneofCase.GroupNorm: + if (GroupNorm == null) { + GroupNorm = new global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm(); + } + GroupNorm.MergeFrom(other.GroupNorm); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + op_ = (global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Op) input.ReadEnum(); + break; + } + case 18: { + if (regularizer_ == null) { + regularizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.Regularizer(); + } + input.ReadMessage(regularizer_); + break; + } + case 26: { + if (initializer_ == null) { + initializer_ = new global::Tensorflow.Models.ObjectDetection.Protos.Initializer(); + } + input.ReadMessage(initializer_); + break; + } + case 32: { + activation_ = (global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams.Types.Activation) input.ReadEnum(); + break; + } + case 42: { + global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.BatchNorm(); + if (normalizerOneofCase_ == NormalizerOneofOneofCase.BatchNorm) { + subBuilder.MergeFrom(BatchNorm); + } + input.ReadMessage(subBuilder); + BatchNorm = subBuilder; + break; + } + case 48: { + RegularizeDepthwise = input.ReadBool(); + break; + } + case 58: { + global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.GroupNorm(); + if (normalizerOneofCase_ == NormalizerOneofOneofCase.GroupNorm) { + subBuilder.MergeFrom(GroupNorm); + } + input.ReadMessage(subBuilder); + GroupNorm = subBuilder; + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the Hyperparams message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Operations affected by hyperparameters. + /// + public enum Op { + /// + /// Use None + /// + [pbr::OriginalName("NULL")] Null = 0, + /// + /// Convolution, Separable Convolution, Convolution transpose. + /// + [pbr::OriginalName("CONV")] Conv = 1, + /// + /// Fully connected + /// + [pbr::OriginalName("FC")] Fc = 2, + } + + /// + /// Type of activation to apply after convolution. + /// + public enum Activation { + /// + /// Use None (no activation) + /// + [pbr::OriginalName("NONE")] None = 0, + /// + /// Use tf.nn.relu + /// + [pbr::OriginalName("RELU")] Relu = 1, + /// + /// Use tf.nn.relu6 + /// + [pbr::OriginalName("RELU_6")] Relu6 = 2, + } + + } + #endregion + + } + + /// + /// Proto with one-of field for regularizers. + /// + public sealed partial class Regularizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Regularizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Regularizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Regularizer(Regularizer other) : this() { + switch (other.RegularizerOneofCase) { + case RegularizerOneofOneofCase.L1Regularizer: + L1Regularizer = other.L1Regularizer.Clone(); + break; + case RegularizerOneofOneofCase.L2Regularizer: + L2Regularizer = other.L2Regularizer.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Regularizer Clone() { + return new Regularizer(this); + } + + /// Field number for the "l1_regularizer" field. + public const int L1RegularizerFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer L1Regularizer { + get { return regularizerOneofCase_ == RegularizerOneofOneofCase.L1Regularizer ? (global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer) regularizerOneof_ : null; } + set { + regularizerOneof_ = value; + regularizerOneofCase_ = value == null ? RegularizerOneofOneofCase.None : RegularizerOneofOneofCase.L1Regularizer; + } + } + + /// Field number for the "l2_regularizer" field. + public const int L2RegularizerFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer L2Regularizer { + get { return regularizerOneofCase_ == RegularizerOneofOneofCase.L2Regularizer ? (global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer) regularizerOneof_ : null; } + set { + regularizerOneof_ = value; + regularizerOneofCase_ = value == null ? RegularizerOneofOneofCase.None : RegularizerOneofOneofCase.L2Regularizer; + } + } + + private object regularizerOneof_; + /// Enum of possible cases for the "regularizer_oneof" oneof. + public enum RegularizerOneofOneofCase { + None = 0, + L1Regularizer = 1, + L2Regularizer = 2, + } + private RegularizerOneofOneofCase regularizerOneofCase_ = RegularizerOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegularizerOneofOneofCase RegularizerOneofCase { + get { return regularizerOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearRegularizerOneof() { + regularizerOneofCase_ = RegularizerOneofOneofCase.None; + regularizerOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Regularizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Regularizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(L1Regularizer, other.L1Regularizer)) return false; + if (!object.Equals(L2Regularizer, other.L2Regularizer)) return false; + if (RegularizerOneofCase != other.RegularizerOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L1Regularizer) hash ^= L1Regularizer.GetHashCode(); + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L2Regularizer) hash ^= L2Regularizer.GetHashCode(); + hash ^= (int) regularizerOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L1Regularizer) { + output.WriteRawTag(10); + output.WriteMessage(L1Regularizer); + } + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L2Regularizer) { + output.WriteRawTag(18); + output.WriteMessage(L2Regularizer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L1Regularizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(L1Regularizer); + } + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L2Regularizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(L2Regularizer); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Regularizer other) { + if (other == null) { + return; + } + switch (other.RegularizerOneofCase) { + case RegularizerOneofOneofCase.L1Regularizer: + if (L1Regularizer == null) { + L1Regularizer = new global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer(); + } + L1Regularizer.MergeFrom(other.L1Regularizer); + break; + case RegularizerOneofOneofCase.L2Regularizer: + if (L2Regularizer == null) { + L2Regularizer = new global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer(); + } + L2Regularizer.MergeFrom(other.L2Regularizer); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.L1Regularizer(); + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L1Regularizer) { + subBuilder.MergeFrom(L1Regularizer); + } + input.ReadMessage(subBuilder); + L1Regularizer = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.L2Regularizer(); + if (regularizerOneofCase_ == RegularizerOneofOneofCase.L2Regularizer) { + subBuilder.MergeFrom(L2Regularizer); + } + input.ReadMessage(subBuilder); + L2Regularizer = subBuilder; + break; + } + } + } + } + + } + + /// + /// Configuration proto for L1 Regularizer. + /// See https://www.tensorflow.org/api_docs/python/tf/contrib/layers/l1_regularizer + /// + public sealed partial class L1Regularizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new L1Regularizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public L1Regularizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public L1Regularizer(L1Regularizer other) : this() { + weight_ = other.weight_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public L1Regularizer Clone() { + return new L1Regularizer(this); + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 1; + private float weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Weight { + get { return weight_; } + set { + weight_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as L1Regularizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(L1Regularizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Weight, other.Weight)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Weight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Weight != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Weight); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Weight != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(L1Regularizer other) { + if (other == null) { + return; + } + if (other.Weight != 0F) { + Weight = other.Weight; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Weight = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration proto for L2 Regularizer. + /// See https://www.tensorflow.org/api_docs/python/tf/contrib/layers/l2_regularizer + /// + public sealed partial class L2Regularizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new L2Regularizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public L2Regularizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public L2Regularizer(L2Regularizer other) : this() { + weight_ = other.weight_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public L2Regularizer Clone() { + return new L2Regularizer(this); + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 1; + private float weight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Weight { + get { return weight_; } + set { + weight_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as L2Regularizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(L2Regularizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Weight, other.Weight)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Weight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Weight != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Weight); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Weight != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(L2Regularizer other) { + if (other == null) { + return; + } + if (other.Weight != 0F) { + Weight = other.Weight; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Weight = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Proto with one-of field for initializers. + /// + public sealed partial class Initializer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Initializer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Initializer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Initializer(Initializer other) : this() { + switch (other.InitializerOneofCase) { + case InitializerOneofOneofCase.TruncatedNormalInitializer: + TruncatedNormalInitializer = other.TruncatedNormalInitializer.Clone(); + break; + case InitializerOneofOneofCase.VarianceScalingInitializer: + VarianceScalingInitializer = other.VarianceScalingInitializer.Clone(); + break; + case InitializerOneofOneofCase.RandomNormalInitializer: + RandomNormalInitializer = other.RandomNormalInitializer.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Initializer Clone() { + return new Initializer(this); + } + + /// Field number for the "truncated_normal_initializer" field. + public const int TruncatedNormalInitializerFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer TruncatedNormalInitializer { + get { return initializerOneofCase_ == InitializerOneofOneofCase.TruncatedNormalInitializer ? (global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer) initializerOneof_ : null; } + set { + initializerOneof_ = value; + initializerOneofCase_ = value == null ? InitializerOneofOneofCase.None : InitializerOneofOneofCase.TruncatedNormalInitializer; + } + } + + /// Field number for the "variance_scaling_initializer" field. + public const int VarianceScalingInitializerFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer VarianceScalingInitializer { + get { return initializerOneofCase_ == InitializerOneofOneofCase.VarianceScalingInitializer ? (global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer) initializerOneof_ : null; } + set { + initializerOneof_ = value; + initializerOneofCase_ = value == null ? InitializerOneofOneofCase.None : InitializerOneofOneofCase.VarianceScalingInitializer; + } + } + + /// Field number for the "random_normal_initializer" field. + public const int RandomNormalInitializerFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer RandomNormalInitializer { + get { return initializerOneofCase_ == InitializerOneofOneofCase.RandomNormalInitializer ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer) initializerOneof_ : null; } + set { + initializerOneof_ = value; + initializerOneofCase_ = value == null ? InitializerOneofOneofCase.None : InitializerOneofOneofCase.RandomNormalInitializer; + } + } + + private object initializerOneof_; + /// Enum of possible cases for the "initializer_oneof" oneof. + public enum InitializerOneofOneofCase { + None = 0, + TruncatedNormalInitializer = 1, + VarianceScalingInitializer = 2, + RandomNormalInitializer = 3, + } + private InitializerOneofOneofCase initializerOneofCase_ = InitializerOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public InitializerOneofOneofCase InitializerOneofCase { + get { return initializerOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearInitializerOneof() { + initializerOneofCase_ = InitializerOneofOneofCase.None; + initializerOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Initializer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Initializer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(TruncatedNormalInitializer, other.TruncatedNormalInitializer)) return false; + if (!object.Equals(VarianceScalingInitializer, other.VarianceScalingInitializer)) return false; + if (!object.Equals(RandomNormalInitializer, other.RandomNormalInitializer)) return false; + if (InitializerOneofCase != other.InitializerOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (initializerOneofCase_ == InitializerOneofOneofCase.TruncatedNormalInitializer) hash ^= TruncatedNormalInitializer.GetHashCode(); + if (initializerOneofCase_ == InitializerOneofOneofCase.VarianceScalingInitializer) hash ^= VarianceScalingInitializer.GetHashCode(); + if (initializerOneofCase_ == InitializerOneofOneofCase.RandomNormalInitializer) hash ^= RandomNormalInitializer.GetHashCode(); + hash ^= (int) initializerOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (initializerOneofCase_ == InitializerOneofOneofCase.TruncatedNormalInitializer) { + output.WriteRawTag(10); + output.WriteMessage(TruncatedNormalInitializer); + } + if (initializerOneofCase_ == InitializerOneofOneofCase.VarianceScalingInitializer) { + output.WriteRawTag(18); + output.WriteMessage(VarianceScalingInitializer); + } + if (initializerOneofCase_ == InitializerOneofOneofCase.RandomNormalInitializer) { + output.WriteRawTag(26); + output.WriteMessage(RandomNormalInitializer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (initializerOneofCase_ == InitializerOneofOneofCase.TruncatedNormalInitializer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TruncatedNormalInitializer); + } + if (initializerOneofCase_ == InitializerOneofOneofCase.VarianceScalingInitializer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(VarianceScalingInitializer); + } + if (initializerOneofCase_ == InitializerOneofOneofCase.RandomNormalInitializer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomNormalInitializer); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Initializer other) { + if (other == null) { + return; + } + switch (other.InitializerOneofCase) { + case InitializerOneofOneofCase.TruncatedNormalInitializer: + if (TruncatedNormalInitializer == null) { + TruncatedNormalInitializer = new global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer(); + } + TruncatedNormalInitializer.MergeFrom(other.TruncatedNormalInitializer); + break; + case InitializerOneofOneofCase.VarianceScalingInitializer: + if (VarianceScalingInitializer == null) { + VarianceScalingInitializer = new global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer(); + } + VarianceScalingInitializer.MergeFrom(other.VarianceScalingInitializer); + break; + case InitializerOneofOneofCase.RandomNormalInitializer: + if (RandomNormalInitializer == null) { + RandomNormalInitializer = new global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer(); + } + RandomNormalInitializer.MergeFrom(other.RandomNormalInitializer); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.TruncatedNormalInitializer(); + if (initializerOneofCase_ == InitializerOneofOneofCase.TruncatedNormalInitializer) { + subBuilder.MergeFrom(TruncatedNormalInitializer); + } + input.ReadMessage(subBuilder); + TruncatedNormalInitializer = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer(); + if (initializerOneofCase_ == InitializerOneofOneofCase.VarianceScalingInitializer) { + subBuilder.MergeFrom(VarianceScalingInitializer); + } + input.ReadMessage(subBuilder); + VarianceScalingInitializer = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomNormalInitializer(); + if (initializerOneofCase_ == InitializerOneofOneofCase.RandomNormalInitializer) { + subBuilder.MergeFrom(RandomNormalInitializer); + } + input.ReadMessage(subBuilder); + RandomNormalInitializer = subBuilder; + break; + } + } + } + } + + } + + /// + /// Configuration proto for truncated normal initializer. See + /// https://www.tensorflow.org/api_docs/python/tf/truncated_normal_initializer + /// + public sealed partial class TruncatedNormalInitializer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TruncatedNormalInitializer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TruncatedNormalInitializer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TruncatedNormalInitializer(TruncatedNormalInitializer other) : this() { + mean_ = other.mean_; + stddev_ = other.stddev_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TruncatedNormalInitializer Clone() { + return new TruncatedNormalInitializer(this); + } + + /// Field number for the "mean" field. + public const int MeanFieldNumber = 1; + private float mean_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Mean { + get { return mean_; } + set { + mean_ = value; + } + } + + /// Field number for the "stddev" field. + public const int StddevFieldNumber = 2; + private float stddev_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Stddev { + get { return stddev_; } + set { + stddev_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TruncatedNormalInitializer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TruncatedNormalInitializer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Mean, other.Mean)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Stddev, other.Stddev)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Mean != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Mean); + if (Stddev != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Stddev); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Mean != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Mean); + } + if (Stddev != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Stddev); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Mean != 0F) { + size += 1 + 4; + } + if (Stddev != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TruncatedNormalInitializer other) { + if (other == null) { + return; + } + if (other.Mean != 0F) { + Mean = other.Mean; + } + if (other.Stddev != 0F) { + Stddev = other.Stddev; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Mean = input.ReadFloat(); + break; + } + case 21: { + Stddev = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration proto for variance scaling initializer. See + /// https://www.tensorflow.org/api_docs/python/tf/contrib/layers/ + /// variance_scaling_initializer + /// + public sealed partial class VarianceScalingInitializer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new VarianceScalingInitializer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public VarianceScalingInitializer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public VarianceScalingInitializer(VarianceScalingInitializer other) : this() { + factor_ = other.factor_; + uniform_ = other.uniform_; + mode_ = other.mode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public VarianceScalingInitializer Clone() { + return new VarianceScalingInitializer(this); + } + + /// Field number for the "factor" field. + public const int FactorFieldNumber = 1; + private float factor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Factor { + get { return factor_; } + set { + factor_ = value; + } + } + + /// Field number for the "uniform" field. + public const int UniformFieldNumber = 2; + private bool uniform_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Uniform { + get { return uniform_; } + set { + uniform_ = value; + } + } + + /// Field number for the "mode" field. + public const int ModeFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer.Types.Mode mode_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer.Types.Mode Mode { + get { return mode_; } + set { + mode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as VarianceScalingInitializer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(VarianceScalingInitializer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Factor, other.Factor)) return false; + if (Uniform != other.Uniform) return false; + if (Mode != other.Mode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Factor != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Factor); + if (Uniform != false) hash ^= Uniform.GetHashCode(); + if (Mode != 0) hash ^= Mode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Factor != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Factor); + } + if (Uniform != false) { + output.WriteRawTag(16); + output.WriteBool(Uniform); + } + if (Mode != 0) { + output.WriteRawTag(24); + output.WriteEnum((int) Mode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Factor != 0F) { + size += 1 + 4; + } + if (Uniform != false) { + size += 1 + 1; + } + if (Mode != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Mode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(VarianceScalingInitializer other) { + if (other == null) { + return; + } + if (other.Factor != 0F) { + Factor = other.Factor; + } + if (other.Uniform != false) { + Uniform = other.Uniform; + } + if (other.Mode != 0) { + Mode = other.Mode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Factor = input.ReadFloat(); + break; + } + case 16: { + Uniform = input.ReadBool(); + break; + } + case 24: { + mode_ = (global::Tensorflow.Models.ObjectDetection.Protos.VarianceScalingInitializer.Types.Mode) input.ReadEnum(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the VarianceScalingInitializer message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public enum Mode { + [pbr::OriginalName("FAN_IN")] FanIn = 0, + [pbr::OriginalName("FAN_OUT")] FanOut = 1, + [pbr::OriginalName("FAN_AVG")] FanAvg = 2, + } + + } + #endregion + + } + + /// + /// Configuration proto for random normal initializer. See + /// https://www.tensorflow.org/api_docs/python/tf/random_normal_initializer + /// + public sealed partial class RandomNormalInitializer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomNormalInitializer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomNormalInitializer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomNormalInitializer(RandomNormalInitializer other) : this() { + mean_ = other.mean_; + stddev_ = other.stddev_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomNormalInitializer Clone() { + return new RandomNormalInitializer(this); + } + + /// Field number for the "mean" field. + public const int MeanFieldNumber = 1; + private float mean_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Mean { + get { return mean_; } + set { + mean_ = value; + } + } + + /// Field number for the "stddev" field. + public const int StddevFieldNumber = 2; + private float stddev_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Stddev { + get { return stddev_; } + set { + stddev_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomNormalInitializer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomNormalInitializer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Mean, other.Mean)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Stddev, other.Stddev)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Mean != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Mean); + if (Stddev != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Stddev); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Mean != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Mean); + } + if (Stddev != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Stddev); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Mean != 0F) { + size += 1 + 4; + } + if (Stddev != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomNormalInitializer other) { + if (other == null) { + return; + } + if (other.Mean != 0F) { + Mean = other.Mean; + } + if (other.Stddev != 0F) { + Stddev = other.Stddev; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Mean = input.ReadFloat(); + break; + } + case 21: { + Stddev = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration proto for batch norm to apply after convolution op. See + /// https://www.tensorflow.org/api_docs/python/tf/contrib/layers/batch_norm + /// + public sealed partial class BatchNorm : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchNorm()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BatchNorm() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BatchNorm(BatchNorm other) : this() { + decay_ = other.decay_; + center_ = other.center_; + scale_ = other.scale_; + epsilon_ = other.epsilon_; + train_ = other.train_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BatchNorm Clone() { + return new BatchNorm(this); + } + + /// Field number for the "decay" field. + public const int DecayFieldNumber = 1; + private float decay_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Decay { + get { return decay_; } + set { + decay_ = value; + } + } + + /// Field number for the "center" field. + public const int CenterFieldNumber = 2; + private bool center_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Center { + get { return center_; } + set { + center_ = value; + } + } + + /// Field number for the "scale" field. + public const int ScaleFieldNumber = 3; + private bool scale_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Scale { + get { return scale_; } + set { + scale_ = value; + } + } + + /// Field number for the "epsilon" field. + public const int EpsilonFieldNumber = 4; + private float epsilon_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Epsilon { + get { return epsilon_; } + set { + epsilon_ = value; + } + } + + /// Field number for the "train" field. + public const int TrainFieldNumber = 5; + private bool train_; + /// + /// Whether to train the batch norm variables. If this is set to false during + /// training, the current value of the batch_norm variables are used for + /// forward pass but they are never updated. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Train { + get { return train_; } + set { + train_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BatchNorm); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BatchNorm other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Decay, other.Decay)) return false; + if (Center != other.Center) return false; + if (Scale != other.Scale) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Epsilon, other.Epsilon)) return false; + if (Train != other.Train) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Decay != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Decay); + if (Center != false) hash ^= Center.GetHashCode(); + if (Scale != false) hash ^= Scale.GetHashCode(); + if (Epsilon != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Epsilon); + if (Train != false) hash ^= Train.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Decay != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Decay); + } + if (Center != false) { + output.WriteRawTag(16); + output.WriteBool(Center); + } + if (Scale != false) { + output.WriteRawTag(24); + output.WriteBool(Scale); + } + if (Epsilon != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Epsilon); + } + if (Train != false) { + output.WriteRawTag(40); + output.WriteBool(Train); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Decay != 0F) { + size += 1 + 4; + } + if (Center != false) { + size += 1 + 1; + } + if (Scale != false) { + size += 1 + 1; + } + if (Epsilon != 0F) { + size += 1 + 4; + } + if (Train != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BatchNorm other) { + if (other == null) { + return; + } + if (other.Decay != 0F) { + Decay = other.Decay; + } + if (other.Center != false) { + Center = other.Center; + } + if (other.Scale != false) { + Scale = other.Scale; + } + if (other.Epsilon != 0F) { + Epsilon = other.Epsilon; + } + if (other.Train != false) { + Train = other.Train; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Decay = input.ReadFloat(); + break; + } + case 16: { + Center = input.ReadBool(); + break; + } + case 24: { + Scale = input.ReadBool(); + break; + } + case 37: { + Epsilon = input.ReadFloat(); + break; + } + case 40: { + Train = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Configuration proto for group normalization to apply after convolution op. + /// https://arxiv.org/abs/1803.08494 + /// + public sealed partial class GroupNorm : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GroupNorm()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GroupNorm() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GroupNorm(GroupNorm other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public GroupNorm Clone() { + return new GroupNorm(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as GroupNorm); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(GroupNorm other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(GroupNorm other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/ImageResizer.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/ImageResizer.cs new file mode 100644 index 00000000..8f10a4bb --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/ImageResizer.cs @@ -0,0 +1,1255 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/image_resizer.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/image_resizer.proto + public static partial class ImageResizerReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/image_resizer.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ImageResizerReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CitvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9pbWFnZV9yZXNpemVyLnByb3Rv", + "EhdvYmplY3RfZGV0ZWN0aW9uLnByb3RvcyLjAgoMSW1hZ2VSZXNpemVyElQK", + "GWtlZXBfYXNwZWN0X3JhdGlvX3Jlc2l6ZXIYASABKAsyLy5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5LZWVwQXNwZWN0UmF0aW9SZXNpemVySAASSQoTZml4", + "ZWRfc2hhcGVfcmVzaXplchgCIAEoCzIqLm9iamVjdF9kZXRlY3Rpb24ucHJv", + "dG9zLkZpeGVkU2hhcGVSZXNpemVySAASRAoQaWRlbnRpdHlfcmVzaXplchgD", + "IAEoCzIoLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLklkZW50aXR5UmVzaXpl", + "ckgAElUKGWNvbmRpdGlvbmFsX3NoYXBlX3Jlc2l6ZXIYBCABKAsyMC5vYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcy5Db25kaXRpb25hbFNoYXBlUmVzaXplckgA", + "QhUKE2ltYWdlX3Jlc2l6ZXJfb25lb2YiEQoPSWRlbnRpdHlSZXNpemVyIt0B", + "ChZLZWVwQXNwZWN0UmF0aW9SZXNpemVyEhUKDW1pbl9kaW1lbnNpb24YASAB", + "KAUSFQoNbWF4X2RpbWVuc2lvbhgCIAEoBRI6Cg1yZXNpemVfbWV0aG9kGAMg", + "ASgOMiMub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuUmVzaXplVHlwZRIcChRw", + "YWRfdG9fbWF4X2RpbWVuc2lvbhgEIAEoCBIcChRjb252ZXJ0X3RvX2dyYXlz", + "Y2FsZRgFIAEoCBIdChVwZXJfY2hhbm5lbF9wYWRfdmFsdWUYBiADKAIijAEK", + "EUZpeGVkU2hhcGVSZXNpemVyEg4KBmhlaWdodBgBIAEoBRINCgV3aWR0aBgC", + "IAEoBRI6Cg1yZXNpemVfbWV0aG9kGAMgASgOMiMub2JqZWN0X2RldGVjdGlv", + "bi5wcm90b3MuUmVzaXplVHlwZRIcChRjb252ZXJ0X3RvX2dyYXlzY2FsZRgE", + "IAEoCCKaAgoXQ29uZGl0aW9uYWxTaGFwZVJlc2l6ZXISUwoJY29uZGl0aW9u", + "GAEgASgOMkAub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuQ29uZGl0aW9uYWxT", + "aGFwZVJlc2l6ZXIuUmVzaXplQ29uZGl0aW9uEhYKDnNpemVfdGhyZXNob2xk", + "GAIgASgFEjoKDXJlc2l6ZV9tZXRob2QYAyABKA4yIy5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5SZXNpemVUeXBlEhwKFGNvbnZlcnRfdG9fZ3JheXNjYWxl", + "GAQgASgIIjgKD1Jlc2l6ZUNvbmRpdGlvbhILCgdJTlZBTElEEAASCwoHR1JF", + "QVRFUhABEgsKB1NNQUxMRVIQAipHCgpSZXNpemVUeXBlEgwKCEJJTElORUFS", + "EAASFAoQTkVBUkVTVF9ORUlHSEJPUhABEgsKB0JJQ1VCSUMQAhIICgRBUkVB", + "EANiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.Models.ObjectDetection.Protos.ResizeType), }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer), global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer.Parser, new[]{ "KeepAspectRatioResizer", "FixedShapeResizer", "IdentityResizer", "ConditionalShapeResizer" }, new[]{ "ImageResizerOneof" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer), global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer), global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer.Parser, new[]{ "MinDimension", "MaxDimension", "ResizeMethod", "PadToMaxDimension", "ConvertToGrayscale", "PerChannelPadValue" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer), global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer.Parser, new[]{ "Height", "Width", "ResizeMethod", "ConvertToGrayscale" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer), global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer.Parser, new[]{ "Condition", "SizeThreshold", "ResizeMethod", "ConvertToGrayscale" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer.Types.ResizeCondition) }, null) + })); + } + #endregion + + } + #region Enums + /// + /// Enumeration type for image resizing methods provided in TensorFlow. + /// + public enum ResizeType { + /// + /// Corresponds to tf.image.ResizeMethod.BILINEAR + /// + [pbr::OriginalName("BILINEAR")] Bilinear = 0, + /// + /// Corresponds to tf.image.ResizeMethod.NEAREST_NEIGHBOR + /// + [pbr::OriginalName("NEAREST_NEIGHBOR")] NearestNeighbor = 1, + /// + /// Corresponds to tf.image.ResizeMethod.BICUBIC + /// + [pbr::OriginalName("BICUBIC")] Bicubic = 2, + /// + /// Corresponds to tf.image.ResizeMethod.AREA + /// + [pbr::OriginalName("AREA")] Area = 3, + } + + #endregion + + #region Messages + /// + /// Configuration proto for image resizing operations. + /// See builders/image_resizer_builder.py for details. + /// + public sealed partial class ImageResizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ImageResizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ImageResizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ImageResizer(ImageResizer other) : this() { + switch (other.ImageResizerOneofCase) { + case ImageResizerOneofOneofCase.KeepAspectRatioResizer: + KeepAspectRatioResizer = other.KeepAspectRatioResizer.Clone(); + break; + case ImageResizerOneofOneofCase.FixedShapeResizer: + FixedShapeResizer = other.FixedShapeResizer.Clone(); + break; + case ImageResizerOneofOneofCase.IdentityResizer: + IdentityResizer = other.IdentityResizer.Clone(); + break; + case ImageResizerOneofOneofCase.ConditionalShapeResizer: + ConditionalShapeResizer = other.ConditionalShapeResizer.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ImageResizer Clone() { + return new ImageResizer(this); + } + + /// Field number for the "keep_aspect_ratio_resizer" field. + public const int KeepAspectRatioResizerFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer KeepAspectRatioResizer { + get { return imageResizerOneofCase_ == ImageResizerOneofOneofCase.KeepAspectRatioResizer ? (global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer) imageResizerOneof_ : null; } + set { + imageResizerOneof_ = value; + imageResizerOneofCase_ = value == null ? ImageResizerOneofOneofCase.None : ImageResizerOneofOneofCase.KeepAspectRatioResizer; + } + } + + /// Field number for the "fixed_shape_resizer" field. + public const int FixedShapeResizerFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer FixedShapeResizer { + get { return imageResizerOneofCase_ == ImageResizerOneofOneofCase.FixedShapeResizer ? (global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer) imageResizerOneof_ : null; } + set { + imageResizerOneof_ = value; + imageResizerOneofCase_ = value == null ? ImageResizerOneofOneofCase.None : ImageResizerOneofOneofCase.FixedShapeResizer; + } + } + + /// Field number for the "identity_resizer" field. + public const int IdentityResizerFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer IdentityResizer { + get { return imageResizerOneofCase_ == ImageResizerOneofOneofCase.IdentityResizer ? (global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer) imageResizerOneof_ : null; } + set { + imageResizerOneof_ = value; + imageResizerOneofCase_ = value == null ? ImageResizerOneofOneofCase.None : ImageResizerOneofOneofCase.IdentityResizer; + } + } + + /// Field number for the "conditional_shape_resizer" field. + public const int ConditionalShapeResizerFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer ConditionalShapeResizer { + get { return imageResizerOneofCase_ == ImageResizerOneofOneofCase.ConditionalShapeResizer ? (global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer) imageResizerOneof_ : null; } + set { + imageResizerOneof_ = value; + imageResizerOneofCase_ = value == null ? ImageResizerOneofOneofCase.None : ImageResizerOneofOneofCase.ConditionalShapeResizer; + } + } + + private object imageResizerOneof_; + /// Enum of possible cases for the "image_resizer_oneof" oneof. + public enum ImageResizerOneofOneofCase { + None = 0, + KeepAspectRatioResizer = 1, + FixedShapeResizer = 2, + IdentityResizer = 3, + ConditionalShapeResizer = 4, + } + private ImageResizerOneofOneofCase imageResizerOneofCase_ = ImageResizerOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ImageResizerOneofOneofCase ImageResizerOneofCase { + get { return imageResizerOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearImageResizerOneof() { + imageResizerOneofCase_ = ImageResizerOneofOneofCase.None; + imageResizerOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ImageResizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ImageResizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(KeepAspectRatioResizer, other.KeepAspectRatioResizer)) return false; + if (!object.Equals(FixedShapeResizer, other.FixedShapeResizer)) return false; + if (!object.Equals(IdentityResizer, other.IdentityResizer)) return false; + if (!object.Equals(ConditionalShapeResizer, other.ConditionalShapeResizer)) return false; + if (ImageResizerOneofCase != other.ImageResizerOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.KeepAspectRatioResizer) hash ^= KeepAspectRatioResizer.GetHashCode(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.FixedShapeResizer) hash ^= FixedShapeResizer.GetHashCode(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.IdentityResizer) hash ^= IdentityResizer.GetHashCode(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.ConditionalShapeResizer) hash ^= ConditionalShapeResizer.GetHashCode(); + hash ^= (int) imageResizerOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.KeepAspectRatioResizer) { + output.WriteRawTag(10); + output.WriteMessage(KeepAspectRatioResizer); + } + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.FixedShapeResizer) { + output.WriteRawTag(18); + output.WriteMessage(FixedShapeResizer); + } + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.IdentityResizer) { + output.WriteRawTag(26); + output.WriteMessage(IdentityResizer); + } + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.ConditionalShapeResizer) { + output.WriteRawTag(34); + output.WriteMessage(ConditionalShapeResizer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.KeepAspectRatioResizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(KeepAspectRatioResizer); + } + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.FixedShapeResizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FixedShapeResizer); + } + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.IdentityResizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(IdentityResizer); + } + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.ConditionalShapeResizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConditionalShapeResizer); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ImageResizer other) { + if (other == null) { + return; + } + switch (other.ImageResizerOneofCase) { + case ImageResizerOneofOneofCase.KeepAspectRatioResizer: + if (KeepAspectRatioResizer == null) { + KeepAspectRatioResizer = new global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer(); + } + KeepAspectRatioResizer.MergeFrom(other.KeepAspectRatioResizer); + break; + case ImageResizerOneofOneofCase.FixedShapeResizer: + if (FixedShapeResizer == null) { + FixedShapeResizer = new global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer(); + } + FixedShapeResizer.MergeFrom(other.FixedShapeResizer); + break; + case ImageResizerOneofOneofCase.IdentityResizer: + if (IdentityResizer == null) { + IdentityResizer = new global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer(); + } + IdentityResizer.MergeFrom(other.IdentityResizer); + break; + case ImageResizerOneofOneofCase.ConditionalShapeResizer: + if (ConditionalShapeResizer == null) { + ConditionalShapeResizer = new global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer(); + } + ConditionalShapeResizer.MergeFrom(other.ConditionalShapeResizer); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.KeepAspectRatioResizer(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.KeepAspectRatioResizer) { + subBuilder.MergeFrom(KeepAspectRatioResizer); + } + input.ReadMessage(subBuilder); + KeepAspectRatioResizer = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.FixedShapeResizer(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.FixedShapeResizer) { + subBuilder.MergeFrom(FixedShapeResizer); + } + input.ReadMessage(subBuilder); + FixedShapeResizer = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.IdentityResizer(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.IdentityResizer) { + subBuilder.MergeFrom(IdentityResizer); + } + input.ReadMessage(subBuilder); + IdentityResizer = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer(); + if (imageResizerOneofCase_ == ImageResizerOneofOneofCase.ConditionalShapeResizer) { + subBuilder.MergeFrom(ConditionalShapeResizer); + } + input.ReadMessage(subBuilder); + ConditionalShapeResizer = subBuilder; + break; + } + } + } + } + + } + + public sealed partial class IdentityResizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IdentityResizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IdentityResizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IdentityResizer(IdentityResizer other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IdentityResizer Clone() { + return new IdentityResizer(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as IdentityResizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(IdentityResizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(IdentityResizer other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Configuration proto for image resizer that keeps aspect ratio. + /// + public sealed partial class KeepAspectRatioResizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeepAspectRatioResizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KeepAspectRatioResizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KeepAspectRatioResizer(KeepAspectRatioResizer other) : this() { + minDimension_ = other.minDimension_; + maxDimension_ = other.maxDimension_; + resizeMethod_ = other.resizeMethod_; + padToMaxDimension_ = other.padToMaxDimension_; + convertToGrayscale_ = other.convertToGrayscale_; + perChannelPadValue_ = other.perChannelPadValue_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KeepAspectRatioResizer Clone() { + return new KeepAspectRatioResizer(this); + } + + /// Field number for the "min_dimension" field. + public const int MinDimensionFieldNumber = 1; + private int minDimension_; + /// + /// Desired size of the smaller image dimension in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinDimension { + get { return minDimension_; } + set { + minDimension_ = value; + } + } + + /// Field number for the "max_dimension" field. + public const int MaxDimensionFieldNumber = 2; + private int maxDimension_; + /// + /// Desired size of the larger image dimension in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxDimension { + get { return maxDimension_; } + set { + maxDimension_ = value; + } + } + + /// Field number for the "resize_method" field. + public const int ResizeMethodFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.ResizeType resizeMethod_ = 0; + /// + /// Desired method when resizing image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ResizeType ResizeMethod { + get { return resizeMethod_; } + set { + resizeMethod_ = value; + } + } + + /// Field number for the "pad_to_max_dimension" field. + public const int PadToMaxDimensionFieldNumber = 4; + private bool padToMaxDimension_; + /// + /// Whether to pad the image with zeros so the output spatial size is + /// [max_dimension, max_dimension]. Note that the zeros are padded to the + /// bottom and the right of the resized image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool PadToMaxDimension { + get { return padToMaxDimension_; } + set { + padToMaxDimension_ = value; + } + } + + /// Field number for the "convert_to_grayscale" field. + public const int ConvertToGrayscaleFieldNumber = 5; + private bool convertToGrayscale_; + /// + /// Whether to also resize the image channels from 3 to 1 (RGB to grayscale). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ConvertToGrayscale { + get { return convertToGrayscale_; } + set { + convertToGrayscale_ = value; + } + } + + /// Field number for the "per_channel_pad_value" field. + public const int PerChannelPadValueFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_perChannelPadValue_codec + = pb::FieldCodec.ForFloat(50); + private readonly pbc::RepeatedField perChannelPadValue_ = new pbc::RepeatedField(); + /// + /// Per-channel pad value. This is only used when pad_to_max_dimension is True. + /// If unspecified, a default pad value of 0 is applied to all channels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PerChannelPadValue { + get { return perChannelPadValue_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as KeepAspectRatioResizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(KeepAspectRatioResizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MinDimension != other.MinDimension) return false; + if (MaxDimension != other.MaxDimension) return false; + if (ResizeMethod != other.ResizeMethod) return false; + if (PadToMaxDimension != other.PadToMaxDimension) return false; + if (ConvertToGrayscale != other.ConvertToGrayscale) return false; + if(!perChannelPadValue_.Equals(other.perChannelPadValue_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinDimension != 0) hash ^= MinDimension.GetHashCode(); + if (MaxDimension != 0) hash ^= MaxDimension.GetHashCode(); + if (ResizeMethod != 0) hash ^= ResizeMethod.GetHashCode(); + if (PadToMaxDimension != false) hash ^= PadToMaxDimension.GetHashCode(); + if (ConvertToGrayscale != false) hash ^= ConvertToGrayscale.GetHashCode(); + hash ^= perChannelPadValue_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinDimension != 0) { + output.WriteRawTag(8); + output.WriteInt32(MinDimension); + } + if (MaxDimension != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxDimension); + } + if (ResizeMethod != 0) { + output.WriteRawTag(24); + output.WriteEnum((int) ResizeMethod); + } + if (PadToMaxDimension != false) { + output.WriteRawTag(32); + output.WriteBool(PadToMaxDimension); + } + if (ConvertToGrayscale != false) { + output.WriteRawTag(40); + output.WriteBool(ConvertToGrayscale); + } + perChannelPadValue_.WriteTo(output, _repeated_perChannelPadValue_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinDimension != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinDimension); + } + if (MaxDimension != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxDimension); + } + if (ResizeMethod != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResizeMethod); + } + if (PadToMaxDimension != false) { + size += 1 + 1; + } + if (ConvertToGrayscale != false) { + size += 1 + 1; + } + size += perChannelPadValue_.CalculateSize(_repeated_perChannelPadValue_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(KeepAspectRatioResizer other) { + if (other == null) { + return; + } + if (other.MinDimension != 0) { + MinDimension = other.MinDimension; + } + if (other.MaxDimension != 0) { + MaxDimension = other.MaxDimension; + } + if (other.ResizeMethod != 0) { + ResizeMethod = other.ResizeMethod; + } + if (other.PadToMaxDimension != false) { + PadToMaxDimension = other.PadToMaxDimension; + } + if (other.ConvertToGrayscale != false) { + ConvertToGrayscale = other.ConvertToGrayscale; + } + perChannelPadValue_.Add(other.perChannelPadValue_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MinDimension = input.ReadInt32(); + break; + } + case 16: { + MaxDimension = input.ReadInt32(); + break; + } + case 24: { + resizeMethod_ = (global::Tensorflow.Models.ObjectDetection.Protos.ResizeType) input.ReadEnum(); + break; + } + case 32: { + PadToMaxDimension = input.ReadBool(); + break; + } + case 40: { + ConvertToGrayscale = input.ReadBool(); + break; + } + case 50: + case 53: { + perChannelPadValue_.AddEntriesFrom(input, _repeated_perChannelPadValue_codec); + break; + } + } + } + } + + } + + /// + /// Configuration proto for image resizer that resizes to a fixed shape. + /// + public sealed partial class FixedShapeResizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FixedShapeResizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FixedShapeResizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FixedShapeResizer(FixedShapeResizer other) : this() { + height_ = other.height_; + width_ = other.width_; + resizeMethod_ = other.resizeMethod_; + convertToGrayscale_ = other.convertToGrayscale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FixedShapeResizer Clone() { + return new FixedShapeResizer(this); + } + + /// Field number for the "height" field. + public const int HeightFieldNumber = 1; + private int height_; + /// + /// Desired height of image in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Height { + get { return height_; } + set { + height_ = value; + } + } + + /// Field number for the "width" field. + public const int WidthFieldNumber = 2; + private int width_; + /// + /// Desired width of image in pixels. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Width { + get { return width_; } + set { + width_ = value; + } + } + + /// Field number for the "resize_method" field. + public const int ResizeMethodFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.ResizeType resizeMethod_ = 0; + /// + /// Desired method when resizing image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ResizeType ResizeMethod { + get { return resizeMethod_; } + set { + resizeMethod_ = value; + } + } + + /// Field number for the "convert_to_grayscale" field. + public const int ConvertToGrayscaleFieldNumber = 4; + private bool convertToGrayscale_; + /// + /// Whether to also resize the image channels from 3 to 1 (RGB to grayscale). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ConvertToGrayscale { + get { return convertToGrayscale_; } + set { + convertToGrayscale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FixedShapeResizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FixedShapeResizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Height != other.Height) return false; + if (Width != other.Width) return false; + if (ResizeMethod != other.ResizeMethod) return false; + if (ConvertToGrayscale != other.ConvertToGrayscale) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Height != 0) hash ^= Height.GetHashCode(); + if (Width != 0) hash ^= Width.GetHashCode(); + if (ResizeMethod != 0) hash ^= ResizeMethod.GetHashCode(); + if (ConvertToGrayscale != false) hash ^= ConvertToGrayscale.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Height != 0) { + output.WriteRawTag(8); + output.WriteInt32(Height); + } + if (Width != 0) { + output.WriteRawTag(16); + output.WriteInt32(Width); + } + if (ResizeMethod != 0) { + output.WriteRawTag(24); + output.WriteEnum((int) ResizeMethod); + } + if (ConvertToGrayscale != false) { + output.WriteRawTag(32); + output.WriteBool(ConvertToGrayscale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Height != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Height); + } + if (Width != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Width); + } + if (ResizeMethod != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResizeMethod); + } + if (ConvertToGrayscale != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FixedShapeResizer other) { + if (other == null) { + return; + } + if (other.Height != 0) { + Height = other.Height; + } + if (other.Width != 0) { + Width = other.Width; + } + if (other.ResizeMethod != 0) { + ResizeMethod = other.ResizeMethod; + } + if (other.ConvertToGrayscale != false) { + ConvertToGrayscale = other.ConvertToGrayscale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Height = input.ReadInt32(); + break; + } + case 16: { + Width = input.ReadInt32(); + break; + } + case 24: { + resizeMethod_ = (global::Tensorflow.Models.ObjectDetection.Protos.ResizeType) input.ReadEnum(); + break; + } + case 32: { + ConvertToGrayscale = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Configuration proto for image resizer that resizes only if input image height + /// or width is greater or smaller than a certain size. + /// Aspect ratio is maintained. + /// + public sealed partial class ConditionalShapeResizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConditionalShapeResizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConditionalShapeResizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConditionalShapeResizer(ConditionalShapeResizer other) : this() { + condition_ = other.condition_; + sizeThreshold_ = other.sizeThreshold_; + resizeMethod_ = other.resizeMethod_; + convertToGrayscale_ = other.convertToGrayscale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConditionalShapeResizer Clone() { + return new ConditionalShapeResizer(this); + } + + /// Field number for the "condition" field. + public const int ConditionFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer.Types.ResizeCondition condition_ = 0; + /// + /// Condition which must be true to resize the image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer.Types.ResizeCondition Condition { + get { return condition_; } + set { + condition_ = value; + } + } + + /// Field number for the "size_threshold" field. + public const int SizeThresholdFieldNumber = 2; + private int sizeThreshold_; + /// + /// Threshold for the image size. If any image dimension is above or below this + /// (as specified by condition) the image will be resized so that it meets the + /// threshold. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int SizeThreshold { + get { return sizeThreshold_; } + set { + sizeThreshold_ = value; + } + } + + /// Field number for the "resize_method" field. + public const int ResizeMethodFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.ResizeType resizeMethod_ = 0; + /// + /// Desired method when resizing image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ResizeType ResizeMethod { + get { return resizeMethod_; } + set { + resizeMethod_ = value; + } + } + + /// Field number for the "convert_to_grayscale" field. + public const int ConvertToGrayscaleFieldNumber = 4; + private bool convertToGrayscale_; + /// + /// Whether to also resize the image channels from 3 to 1 (RGB to grayscale). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ConvertToGrayscale { + get { return convertToGrayscale_; } + set { + convertToGrayscale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ConditionalShapeResizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ConditionalShapeResizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Condition != other.Condition) return false; + if (SizeThreshold != other.SizeThreshold) return false; + if (ResizeMethod != other.ResizeMethod) return false; + if (ConvertToGrayscale != other.ConvertToGrayscale) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Condition != 0) hash ^= Condition.GetHashCode(); + if (SizeThreshold != 0) hash ^= SizeThreshold.GetHashCode(); + if (ResizeMethod != 0) hash ^= ResizeMethod.GetHashCode(); + if (ConvertToGrayscale != false) hash ^= ConvertToGrayscale.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Condition != 0) { + output.WriteRawTag(8); + output.WriteEnum((int) Condition); + } + if (SizeThreshold != 0) { + output.WriteRawTag(16); + output.WriteInt32(SizeThreshold); + } + if (ResizeMethod != 0) { + output.WriteRawTag(24); + output.WriteEnum((int) ResizeMethod); + } + if (ConvertToGrayscale != false) { + output.WriteRawTag(32); + output.WriteBool(ConvertToGrayscale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Condition != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Condition); + } + if (SizeThreshold != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SizeThreshold); + } + if (ResizeMethod != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResizeMethod); + } + if (ConvertToGrayscale != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ConditionalShapeResizer other) { + if (other == null) { + return; + } + if (other.Condition != 0) { + Condition = other.Condition; + } + if (other.SizeThreshold != 0) { + SizeThreshold = other.SizeThreshold; + } + if (other.ResizeMethod != 0) { + ResizeMethod = other.ResizeMethod; + } + if (other.ConvertToGrayscale != false) { + ConvertToGrayscale = other.ConvertToGrayscale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + condition_ = (global::Tensorflow.Models.ObjectDetection.Protos.ConditionalShapeResizer.Types.ResizeCondition) input.ReadEnum(); + break; + } + case 16: { + SizeThreshold = input.ReadInt32(); + break; + } + case 24: { + resizeMethod_ = (global::Tensorflow.Models.ObjectDetection.Protos.ResizeType) input.ReadEnum(); + break; + } + case 32: { + ConvertToGrayscale = input.ReadBool(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the ConditionalShapeResizer message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Enumeration for the condition on which to resize an image. + /// + public enum ResizeCondition { + /// + /// Default value. + /// + [pbr::OriginalName("INVALID")] Invalid = 0, + /// + /// Resizes image if a dimension is greater than specified size. + /// + [pbr::OriginalName("GREATER")] Greater = 1, + /// + /// Resizes image if a dimension is smaller than specified size. + /// + [pbr::OriginalName("SMALLER")] Smaller = 2, + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/InputReader.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/InputReader.cs new file mode 100644 index 00000000..90f7ae1b --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/InputReader.cs @@ -0,0 +1,1225 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/input_reader.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/input_reader.proto + public static partial class InputReaderReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/input_reader.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static InputReaderReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CipvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9pbnB1dF9yZWFkZXIucHJvdG8S", + "F29iamVjdF9kZXRlY3Rpb24ucHJvdG9zIqsGCgtJbnB1dFJlYWRlchIMCgRu", + "YW1lGBcgASgJEhYKDmxhYmVsX21hcF9wYXRoGAEgASgJEg8KB3NodWZmbGUY", + "AiABKAgSGwoTc2h1ZmZsZV9idWZmZXJfc2l6ZRgLIAEoDRIlCh1maWxlbmFt", + "ZXNfc2h1ZmZsZV9idWZmZXJfc2l6ZRgMIAEoDRISCgpudW1fZXBvY2hzGAUg", + "ASgNEh4KFnNhbXBsZV8xX29mX25fZXhhbXBsZXMYFiABKA0SEwoLbnVtX3Jl", + "YWRlcnMYBiABKA0SHAoUbnVtX3BhcmFsbGVsX2JhdGNoZXMYEyABKA0SHAoU", + "bnVtX3ByZWZldGNoX2JhdGNoZXMYFCABKAUSFgoOcXVldWVfY2FwYWNpdHkY", + "AyABKA0SGQoRbWluX2FmdGVyX2RlcXVldWUYBCABKA0SGQoRcmVhZF9ibG9j", + "a19sZW5ndGgYDyABKA0SFQoNcHJlZmV0Y2hfc2l6ZRgNIAEoDRIeChZudW1f", + "cGFyYWxsZWxfbWFwX2NhbGxzGA4gASgNEh8KF251bV9hZGRpdGlvbmFsX2No", + "YW5uZWxzGBIgASgFEhUKDW51bV9rZXlwb2ludHMYECABKA0SGwoTbWF4X251", + "bWJlcl9vZl9ib3hlcxgVIAEoBRIeChZsb2FkX211bHRpY2xhc3Nfc2NvcmVz", + "GBggASgIEhsKE2xvYWRfaW5zdGFuY2VfbWFza3MYByABKAgSPAoJbWFza190", + "eXBlGAogASgOMikub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuSW5zdGFuY2VN", + "YXNrVHlwZRIYChB1c2VfZGlzcGxheV9uYW1lGBEgASgIEk4KFnRmX3JlY29y", + "ZF9pbnB1dF9yZWFkZXIYCCABKAsyLC5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5URlJlY29yZElucHV0UmVhZGVySAASTQoVZXh0ZXJuYWxfaW5wdXRfcmVh", + "ZGVyGAkgASgLMiwub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuRXh0ZXJuYWxJ", + "bnB1dFJlYWRlckgAQg4KDGlucHV0X3JlYWRlciIpChNURlJlY29yZElucHV0", + "UmVhZGVyEhIKCmlucHV0X3BhdGgYASADKAkiFQoTRXh0ZXJuYWxJbnB1dFJl", + "YWRlcipDChBJbnN0YW5jZU1hc2tUeXBlEgsKB0RFRkFVTFQQABITCg9OVU1F", + "UklDQUxfTUFTS1MQARINCglQTkdfTUFTS1MQAmIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tensorflow.Models.ObjectDetection.Protos.InstanceMaskType), }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.InputReader), global::Tensorflow.Models.ObjectDetection.Protos.InputReader.Parser, new[]{ "Name", "LabelMapPath", "Shuffle", "ShuffleBufferSize", "FilenamesShuffleBufferSize", "NumEpochs", "Sample1OfNExamples", "NumReaders", "NumParallelBatches", "NumPrefetchBatches", "QueueCapacity", "MinAfterDequeue", "ReadBlockLength", "PrefetchSize", "NumParallelMapCalls", "NumAdditionalChannels", "NumKeypoints", "MaxNumberOfBoxes", "LoadMulticlassScores", "LoadInstanceMasks", "MaskType", "UseDisplayName", "TfRecordInputReader", "ExternalInputReader" }, new[]{ "InputReader" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader), global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader.Parser, new[]{ "InputPath" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader), global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader.Parser, null, null, null, null) + })); + } + #endregion + + } + #region Enums + /// + /// Instance mask format. Note that PNG masks are much more space efficient. + /// + public enum InstanceMaskType { + /// + /// Default implementation, currently NUMERICAL_MASKS + /// + [pbr::OriginalName("DEFAULT")] Default = 0, + /// + /// [num_masks, H, W] float32 binary masks. + /// + [pbr::OriginalName("NUMERICAL_MASKS")] NumericalMasks = 1, + /// + /// Encoded PNG masks. + /// + [pbr::OriginalName("PNG_MASKS")] PngMasks = 2, + } + + #endregion + + #region Messages + /// + /// Next id: 25 + /// + public sealed partial class InputReader : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InputReader()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.InputReaderReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public InputReader() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public InputReader(InputReader other) : this() { + name_ = other.name_; + labelMapPath_ = other.labelMapPath_; + shuffle_ = other.shuffle_; + shuffleBufferSize_ = other.shuffleBufferSize_; + filenamesShuffleBufferSize_ = other.filenamesShuffleBufferSize_; + numEpochs_ = other.numEpochs_; + sample1OfNExamples_ = other.sample1OfNExamples_; + numReaders_ = other.numReaders_; + numParallelBatches_ = other.numParallelBatches_; + numPrefetchBatches_ = other.numPrefetchBatches_; + queueCapacity_ = other.queueCapacity_; + minAfterDequeue_ = other.minAfterDequeue_; + readBlockLength_ = other.readBlockLength_; + prefetchSize_ = other.prefetchSize_; + numParallelMapCalls_ = other.numParallelMapCalls_; + numAdditionalChannels_ = other.numAdditionalChannels_; + numKeypoints_ = other.numKeypoints_; + maxNumberOfBoxes_ = other.maxNumberOfBoxes_; + loadMulticlassScores_ = other.loadMulticlassScores_; + loadInstanceMasks_ = other.loadInstanceMasks_; + maskType_ = other.maskType_; + useDisplayName_ = other.useDisplayName_; + switch (other.InputReaderCase) { + case InputReaderOneofCase.TfRecordInputReader: + TfRecordInputReader = other.TfRecordInputReader.Clone(); + break; + case InputReaderOneofCase.ExternalInputReader: + ExternalInputReader = other.ExternalInputReader.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public InputReader Clone() { + return new InputReader(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 23; + private string name_ = ""; + /// + /// Name of input reader. Typically used to describe the dataset that is read + /// by this input reader. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "label_map_path" field. + public const int LabelMapPathFieldNumber = 1; + private string labelMapPath_ = ""; + /// + /// Path to StringIntLabelMap pbtxt file specifying the mapping from string + /// labels to integer ids. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string LabelMapPath { + get { return labelMapPath_; } + set { + labelMapPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "shuffle" field. + public const int ShuffleFieldNumber = 2; + private bool shuffle_; + /// + /// Whether data should be processed in the order they are read in, or + /// shuffled randomly. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Shuffle { + get { return shuffle_; } + set { + shuffle_ = value; + } + } + + /// Field number for the "shuffle_buffer_size" field. + public const int ShuffleBufferSizeFieldNumber = 11; + private uint shuffleBufferSize_; + /// + /// Buffer size to be used when shuffling. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint ShuffleBufferSize { + get { return shuffleBufferSize_; } + set { + shuffleBufferSize_ = value; + } + } + + /// Field number for the "filenames_shuffle_buffer_size" field. + public const int FilenamesShuffleBufferSizeFieldNumber = 12; + private uint filenamesShuffleBufferSize_; + /// + /// Buffer size to be used when shuffling file names. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint FilenamesShuffleBufferSize { + get { return filenamesShuffleBufferSize_; } + set { + filenamesShuffleBufferSize_ = value; + } + } + + /// Field number for the "num_epochs" field. + public const int NumEpochsFieldNumber = 5; + private uint numEpochs_; + /// + /// The number of times a data source is read. If set to zero, the data source + /// will be reused indefinitely. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumEpochs { + get { return numEpochs_; } + set { + numEpochs_ = value; + } + } + + /// Field number for the "sample_1_of_n_examples" field. + public const int Sample1OfNExamplesFieldNumber = 22; + private uint sample1OfNExamples_; + /// + /// Integer representing how often an example should be sampled. To feed + /// only 1/3 of your data into your model, set `sample_1_of_n_examples` to 3. + /// This is particularly useful for evaluation, where you might not prefer to + /// evaluate all of your samples. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Sample1OfNExamples { + get { return sample1OfNExamples_; } + set { + sample1OfNExamples_ = value; + } + } + + /// Field number for the "num_readers" field. + public const int NumReadersFieldNumber = 6; + private uint numReaders_; + /// + /// Number of file shards to read in parallel. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumReaders { + get { return numReaders_; } + set { + numReaders_ = value; + } + } + + /// Field number for the "num_parallel_batches" field. + public const int NumParallelBatchesFieldNumber = 19; + private uint numParallelBatches_; + /// + /// Number of batches to produce in parallel. If this is run on a 2x2 TPU set + /// this to 8. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumParallelBatches { + get { return numParallelBatches_; } + set { + numParallelBatches_ = value; + } + } + + /// Field number for the "num_prefetch_batches" field. + public const int NumPrefetchBatchesFieldNumber = 20; + private int numPrefetchBatches_; + /// + /// Number of batches to prefetch. Prefetch decouples input pipeline and + /// model so they can be pipelined resulting in higher throughput. Set this + /// to a small constant and increment linearly until the improvements become + /// marginal or you exceed your cpu memory budget. Setting this to -1, + /// automatically tunes this value for you. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumPrefetchBatches { + get { return numPrefetchBatches_; } + set { + numPrefetchBatches_ = value; + } + } + + /// Field number for the "queue_capacity" field. + public const int QueueCapacityFieldNumber = 3; + private uint queueCapacity_; + /// + /// Maximum number of records to keep in reader queue. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint QueueCapacity { + get { return queueCapacity_; } + set { + queueCapacity_ = value; + } + } + + /// Field number for the "min_after_dequeue" field. + public const int MinAfterDequeueFieldNumber = 4; + private uint minAfterDequeue_; + /// + /// Minimum number of records to keep in reader queue. A large value is needed + /// to generate a good random shuffle. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint MinAfterDequeue { + get { return minAfterDequeue_; } + set { + minAfterDequeue_ = value; + } + } + + /// Field number for the "read_block_length" field. + public const int ReadBlockLengthFieldNumber = 15; + private uint readBlockLength_; + /// + /// Number of records to read from each reader at once. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint ReadBlockLength { + get { return readBlockLength_; } + set { + readBlockLength_ = value; + } + } + + /// Field number for the "prefetch_size" field. + public const int PrefetchSizeFieldNumber = 13; + private uint prefetchSize_; + /// + /// Number of decoded records to prefetch before batching. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint PrefetchSize { + get { return prefetchSize_; } + set { + prefetchSize_ = value; + } + } + + /// Field number for the "num_parallel_map_calls" field. + public const int NumParallelMapCallsFieldNumber = 14; + private uint numParallelMapCalls_; + /// + /// Number of parallel decode ops to apply. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumParallelMapCalls { + get { return numParallelMapCalls_; } + set { + numParallelMapCalls_ = value; + } + } + + /// Field number for the "num_additional_channels" field. + public const int NumAdditionalChannelsFieldNumber = 18; + private int numAdditionalChannels_; + /// + /// If positive, TfExampleDecoder will try to decode rasters of additional + /// channels from tf.Examples. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumAdditionalChannels { + get { return numAdditionalChannels_; } + set { + numAdditionalChannels_ = value; + } + } + + /// Field number for the "num_keypoints" field. + public const int NumKeypointsFieldNumber = 16; + private uint numKeypoints_; + /// + /// Number of groundtruth keypoints per object. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumKeypoints { + get { return numKeypoints_; } + set { + numKeypoints_ = value; + } + } + + /// Field number for the "max_number_of_boxes" field. + public const int MaxNumberOfBoxesFieldNumber = 21; + private int maxNumberOfBoxes_; + /// + /// Maximum number of boxes to pad to during training / evaluation. + /// Set this to at least the maximum amount of boxes in the input data, + /// otherwise some groundtruth boxes may be clipped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxNumberOfBoxes { + get { return maxNumberOfBoxes_; } + set { + maxNumberOfBoxes_ = value; + } + } + + /// Field number for the "load_multiclass_scores" field. + public const int LoadMulticlassScoresFieldNumber = 24; + private bool loadMulticlassScores_; + /// + /// Whether to load multiclass scores from the dataset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool LoadMulticlassScores { + get { return loadMulticlassScores_; } + set { + loadMulticlassScores_ = value; + } + } + + /// Field number for the "load_instance_masks" field. + public const int LoadInstanceMasksFieldNumber = 7; + private bool loadInstanceMasks_; + /// + /// Whether to load groundtruth instance masks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool LoadInstanceMasks { + get { return loadInstanceMasks_; } + set { + loadInstanceMasks_ = value; + } + } + + /// Field number for the "mask_type" field. + public const int MaskTypeFieldNumber = 10; + private global::Tensorflow.Models.ObjectDetection.Protos.InstanceMaskType maskType_ = 0; + /// + /// Type of instance mask. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.InstanceMaskType MaskType { + get { return maskType_; } + set { + maskType_ = value; + } + } + + /// Field number for the "use_display_name" field. + public const int UseDisplayNameFieldNumber = 17; + private bool useDisplayName_; + /// + /// Whether to use the display name when decoding examples. This is only used + /// when mapping class text strings to integers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDisplayName { + get { return useDisplayName_; } + set { + useDisplayName_ = value; + } + } + + /// Field number for the "tf_record_input_reader" field. + public const int TfRecordInputReaderFieldNumber = 8; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader TfRecordInputReader { + get { return inputReaderCase_ == InputReaderOneofCase.TfRecordInputReader ? (global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader) inputReader_ : null; } + set { + inputReader_ = value; + inputReaderCase_ = value == null ? InputReaderOneofCase.None : InputReaderOneofCase.TfRecordInputReader; + } + } + + /// Field number for the "external_input_reader" field. + public const int ExternalInputReaderFieldNumber = 9; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader ExternalInputReader { + get { return inputReaderCase_ == InputReaderOneofCase.ExternalInputReader ? (global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader) inputReader_ : null; } + set { + inputReader_ = value; + inputReaderCase_ = value == null ? InputReaderOneofCase.None : InputReaderOneofCase.ExternalInputReader; + } + } + + private object inputReader_; + /// Enum of possible cases for the "input_reader" oneof. + public enum InputReaderOneofCase { + None = 0, + TfRecordInputReader = 8, + ExternalInputReader = 9, + } + private InputReaderOneofCase inputReaderCase_ = InputReaderOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public InputReaderOneofCase InputReaderCase { + get { return inputReaderCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearInputReader() { + inputReaderCase_ = InputReaderOneofCase.None; + inputReader_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as InputReader); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(InputReader other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (LabelMapPath != other.LabelMapPath) return false; + if (Shuffle != other.Shuffle) return false; + if (ShuffleBufferSize != other.ShuffleBufferSize) return false; + if (FilenamesShuffleBufferSize != other.FilenamesShuffleBufferSize) return false; + if (NumEpochs != other.NumEpochs) return false; + if (Sample1OfNExamples != other.Sample1OfNExamples) return false; + if (NumReaders != other.NumReaders) return false; + if (NumParallelBatches != other.NumParallelBatches) return false; + if (NumPrefetchBatches != other.NumPrefetchBatches) return false; + if (QueueCapacity != other.QueueCapacity) return false; + if (MinAfterDequeue != other.MinAfterDequeue) return false; + if (ReadBlockLength != other.ReadBlockLength) return false; + if (PrefetchSize != other.PrefetchSize) return false; + if (NumParallelMapCalls != other.NumParallelMapCalls) return false; + if (NumAdditionalChannels != other.NumAdditionalChannels) return false; + if (NumKeypoints != other.NumKeypoints) return false; + if (MaxNumberOfBoxes != other.MaxNumberOfBoxes) return false; + if (LoadMulticlassScores != other.LoadMulticlassScores) return false; + if (LoadInstanceMasks != other.LoadInstanceMasks) return false; + if (MaskType != other.MaskType) return false; + if (UseDisplayName != other.UseDisplayName) return false; + if (!object.Equals(TfRecordInputReader, other.TfRecordInputReader)) return false; + if (!object.Equals(ExternalInputReader, other.ExternalInputReader)) return false; + if (InputReaderCase != other.InputReaderCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (LabelMapPath.Length != 0) hash ^= LabelMapPath.GetHashCode(); + if (Shuffle != false) hash ^= Shuffle.GetHashCode(); + if (ShuffleBufferSize != 0) hash ^= ShuffleBufferSize.GetHashCode(); + if (FilenamesShuffleBufferSize != 0) hash ^= FilenamesShuffleBufferSize.GetHashCode(); + if (NumEpochs != 0) hash ^= NumEpochs.GetHashCode(); + if (Sample1OfNExamples != 0) hash ^= Sample1OfNExamples.GetHashCode(); + if (NumReaders != 0) hash ^= NumReaders.GetHashCode(); + if (NumParallelBatches != 0) hash ^= NumParallelBatches.GetHashCode(); + if (NumPrefetchBatches != 0) hash ^= NumPrefetchBatches.GetHashCode(); + if (QueueCapacity != 0) hash ^= QueueCapacity.GetHashCode(); + if (MinAfterDequeue != 0) hash ^= MinAfterDequeue.GetHashCode(); + if (ReadBlockLength != 0) hash ^= ReadBlockLength.GetHashCode(); + if (PrefetchSize != 0) hash ^= PrefetchSize.GetHashCode(); + if (NumParallelMapCalls != 0) hash ^= NumParallelMapCalls.GetHashCode(); + if (NumAdditionalChannels != 0) hash ^= NumAdditionalChannels.GetHashCode(); + if (NumKeypoints != 0) hash ^= NumKeypoints.GetHashCode(); + if (MaxNumberOfBoxes != 0) hash ^= MaxNumberOfBoxes.GetHashCode(); + if (LoadMulticlassScores != false) hash ^= LoadMulticlassScores.GetHashCode(); + if (LoadInstanceMasks != false) hash ^= LoadInstanceMasks.GetHashCode(); + if (MaskType != 0) hash ^= MaskType.GetHashCode(); + if (UseDisplayName != false) hash ^= UseDisplayName.GetHashCode(); + if (inputReaderCase_ == InputReaderOneofCase.TfRecordInputReader) hash ^= TfRecordInputReader.GetHashCode(); + if (inputReaderCase_ == InputReaderOneofCase.ExternalInputReader) hash ^= ExternalInputReader.GetHashCode(); + hash ^= (int) inputReaderCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (LabelMapPath.Length != 0) { + output.WriteRawTag(10); + output.WriteString(LabelMapPath); + } + if (Shuffle != false) { + output.WriteRawTag(16); + output.WriteBool(Shuffle); + } + if (QueueCapacity != 0) { + output.WriteRawTag(24); + output.WriteUInt32(QueueCapacity); + } + if (MinAfterDequeue != 0) { + output.WriteRawTag(32); + output.WriteUInt32(MinAfterDequeue); + } + if (NumEpochs != 0) { + output.WriteRawTag(40); + output.WriteUInt32(NumEpochs); + } + if (NumReaders != 0) { + output.WriteRawTag(48); + output.WriteUInt32(NumReaders); + } + if (LoadInstanceMasks != false) { + output.WriteRawTag(56); + output.WriteBool(LoadInstanceMasks); + } + if (inputReaderCase_ == InputReaderOneofCase.TfRecordInputReader) { + output.WriteRawTag(66); + output.WriteMessage(TfRecordInputReader); + } + if (inputReaderCase_ == InputReaderOneofCase.ExternalInputReader) { + output.WriteRawTag(74); + output.WriteMessage(ExternalInputReader); + } + if (MaskType != 0) { + output.WriteRawTag(80); + output.WriteEnum((int) MaskType); + } + if (ShuffleBufferSize != 0) { + output.WriteRawTag(88); + output.WriteUInt32(ShuffleBufferSize); + } + if (FilenamesShuffleBufferSize != 0) { + output.WriteRawTag(96); + output.WriteUInt32(FilenamesShuffleBufferSize); + } + if (PrefetchSize != 0) { + output.WriteRawTag(104); + output.WriteUInt32(PrefetchSize); + } + if (NumParallelMapCalls != 0) { + output.WriteRawTag(112); + output.WriteUInt32(NumParallelMapCalls); + } + if (ReadBlockLength != 0) { + output.WriteRawTag(120); + output.WriteUInt32(ReadBlockLength); + } + if (NumKeypoints != 0) { + output.WriteRawTag(128, 1); + output.WriteUInt32(NumKeypoints); + } + if (UseDisplayName != false) { + output.WriteRawTag(136, 1); + output.WriteBool(UseDisplayName); + } + if (NumAdditionalChannels != 0) { + output.WriteRawTag(144, 1); + output.WriteInt32(NumAdditionalChannels); + } + if (NumParallelBatches != 0) { + output.WriteRawTag(152, 1); + output.WriteUInt32(NumParallelBatches); + } + if (NumPrefetchBatches != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(NumPrefetchBatches); + } + if (MaxNumberOfBoxes != 0) { + output.WriteRawTag(168, 1); + output.WriteInt32(MaxNumberOfBoxes); + } + if (Sample1OfNExamples != 0) { + output.WriteRawTag(176, 1); + output.WriteUInt32(Sample1OfNExamples); + } + if (Name.Length != 0) { + output.WriteRawTag(186, 1); + output.WriteString(Name); + } + if (LoadMulticlassScores != false) { + output.WriteRawTag(192, 1); + output.WriteBool(LoadMulticlassScores); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (LabelMapPath.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LabelMapPath); + } + if (Shuffle != false) { + size += 1 + 1; + } + if (ShuffleBufferSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ShuffleBufferSize); + } + if (FilenamesShuffleBufferSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(FilenamesShuffleBufferSize); + } + if (NumEpochs != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumEpochs); + } + if (Sample1OfNExamples != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(Sample1OfNExamples); + } + if (NumReaders != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumReaders); + } + if (NumParallelBatches != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(NumParallelBatches); + } + if (NumPrefetchBatches != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(NumPrefetchBatches); + } + if (QueueCapacity != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(QueueCapacity); + } + if (MinAfterDequeue != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(MinAfterDequeue); + } + if (ReadBlockLength != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(ReadBlockLength); + } + if (PrefetchSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(PrefetchSize); + } + if (NumParallelMapCalls != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumParallelMapCalls); + } + if (NumAdditionalChannels != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(NumAdditionalChannels); + } + if (NumKeypoints != 0) { + size += 2 + pb::CodedOutputStream.ComputeUInt32Size(NumKeypoints); + } + if (MaxNumberOfBoxes != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MaxNumberOfBoxes); + } + if (LoadMulticlassScores != false) { + size += 2 + 1; + } + if (LoadInstanceMasks != false) { + size += 1 + 1; + } + if (MaskType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MaskType); + } + if (UseDisplayName != false) { + size += 2 + 1; + } + if (inputReaderCase_ == InputReaderOneofCase.TfRecordInputReader) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TfRecordInputReader); + } + if (inputReaderCase_ == InputReaderOneofCase.ExternalInputReader) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExternalInputReader); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(InputReader other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.LabelMapPath.Length != 0) { + LabelMapPath = other.LabelMapPath; + } + if (other.Shuffle != false) { + Shuffle = other.Shuffle; + } + if (other.ShuffleBufferSize != 0) { + ShuffleBufferSize = other.ShuffleBufferSize; + } + if (other.FilenamesShuffleBufferSize != 0) { + FilenamesShuffleBufferSize = other.FilenamesShuffleBufferSize; + } + if (other.NumEpochs != 0) { + NumEpochs = other.NumEpochs; + } + if (other.Sample1OfNExamples != 0) { + Sample1OfNExamples = other.Sample1OfNExamples; + } + if (other.NumReaders != 0) { + NumReaders = other.NumReaders; + } + if (other.NumParallelBatches != 0) { + NumParallelBatches = other.NumParallelBatches; + } + if (other.NumPrefetchBatches != 0) { + NumPrefetchBatches = other.NumPrefetchBatches; + } + if (other.QueueCapacity != 0) { + QueueCapacity = other.QueueCapacity; + } + if (other.MinAfterDequeue != 0) { + MinAfterDequeue = other.MinAfterDequeue; + } + if (other.ReadBlockLength != 0) { + ReadBlockLength = other.ReadBlockLength; + } + if (other.PrefetchSize != 0) { + PrefetchSize = other.PrefetchSize; + } + if (other.NumParallelMapCalls != 0) { + NumParallelMapCalls = other.NumParallelMapCalls; + } + if (other.NumAdditionalChannels != 0) { + NumAdditionalChannels = other.NumAdditionalChannels; + } + if (other.NumKeypoints != 0) { + NumKeypoints = other.NumKeypoints; + } + if (other.MaxNumberOfBoxes != 0) { + MaxNumberOfBoxes = other.MaxNumberOfBoxes; + } + if (other.LoadMulticlassScores != false) { + LoadMulticlassScores = other.LoadMulticlassScores; + } + if (other.LoadInstanceMasks != false) { + LoadInstanceMasks = other.LoadInstanceMasks; + } + if (other.MaskType != 0) { + MaskType = other.MaskType; + } + if (other.UseDisplayName != false) { + UseDisplayName = other.UseDisplayName; + } + switch (other.InputReaderCase) { + case InputReaderOneofCase.TfRecordInputReader: + if (TfRecordInputReader == null) { + TfRecordInputReader = new global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader(); + } + TfRecordInputReader.MergeFrom(other.TfRecordInputReader); + break; + case InputReaderOneofCase.ExternalInputReader: + if (ExternalInputReader == null) { + ExternalInputReader = new global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader(); + } + ExternalInputReader.MergeFrom(other.ExternalInputReader); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + LabelMapPath = input.ReadString(); + break; + } + case 16: { + Shuffle = input.ReadBool(); + break; + } + case 24: { + QueueCapacity = input.ReadUInt32(); + break; + } + case 32: { + MinAfterDequeue = input.ReadUInt32(); + break; + } + case 40: { + NumEpochs = input.ReadUInt32(); + break; + } + case 48: { + NumReaders = input.ReadUInt32(); + break; + } + case 56: { + LoadInstanceMasks = input.ReadBool(); + break; + } + case 66: { + global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.TFRecordInputReader(); + if (inputReaderCase_ == InputReaderOneofCase.TfRecordInputReader) { + subBuilder.MergeFrom(TfRecordInputReader); + } + input.ReadMessage(subBuilder); + TfRecordInputReader = subBuilder; + break; + } + case 74: { + global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ExternalInputReader(); + if (inputReaderCase_ == InputReaderOneofCase.ExternalInputReader) { + subBuilder.MergeFrom(ExternalInputReader); + } + input.ReadMessage(subBuilder); + ExternalInputReader = subBuilder; + break; + } + case 80: { + maskType_ = (global::Tensorflow.Models.ObjectDetection.Protos.InstanceMaskType) input.ReadEnum(); + break; + } + case 88: { + ShuffleBufferSize = input.ReadUInt32(); + break; + } + case 96: { + FilenamesShuffleBufferSize = input.ReadUInt32(); + break; + } + case 104: { + PrefetchSize = input.ReadUInt32(); + break; + } + case 112: { + NumParallelMapCalls = input.ReadUInt32(); + break; + } + case 120: { + ReadBlockLength = input.ReadUInt32(); + break; + } + case 128: { + NumKeypoints = input.ReadUInt32(); + break; + } + case 136: { + UseDisplayName = input.ReadBool(); + break; + } + case 144: { + NumAdditionalChannels = input.ReadInt32(); + break; + } + case 152: { + NumParallelBatches = input.ReadUInt32(); + break; + } + case 160: { + NumPrefetchBatches = input.ReadInt32(); + break; + } + case 168: { + MaxNumberOfBoxes = input.ReadInt32(); + break; + } + case 176: { + Sample1OfNExamples = input.ReadUInt32(); + break; + } + case 186: { + Name = input.ReadString(); + break; + } + case 192: { + LoadMulticlassScores = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// An input reader that reads TF Example protos from local TFRecord files. + /// + public sealed partial class TFRecordInputReader : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TFRecordInputReader()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.InputReaderReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TFRecordInputReader() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TFRecordInputReader(TFRecordInputReader other) : this() { + inputPath_ = other.inputPath_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TFRecordInputReader Clone() { + return new TFRecordInputReader(this); + } + + /// Field number for the "input_path" field. + public const int InputPathFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_inputPath_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField inputPath_ = new pbc::RepeatedField(); + /// + /// Path(s) to `TFRecordFile`s. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField InputPath { + get { return inputPath_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TFRecordInputReader); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TFRecordInputReader other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!inputPath_.Equals(other.inputPath_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= inputPath_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + inputPath_.WriteTo(output, _repeated_inputPath_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += inputPath_.CalculateSize(_repeated_inputPath_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TFRecordInputReader other) { + if (other == null) { + return; + } + inputPath_.Add(other.inputPath_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + inputPath_.AddEntriesFrom(input, _repeated_inputPath_codec); + break; + } + } + } + } + + } + + /// + /// An externally defined input reader. Users may define an extension to this + /// proto to interface their own input readers. + /// + public sealed partial class ExternalInputReader : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExternalInputReader()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.InputReaderReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExternalInputReader() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExternalInputReader(ExternalInputReader other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExternalInputReader Clone() { + return new ExternalInputReader(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ExternalInputReader); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ExternalInputReader other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ExternalInputReader other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/KeypointBoxCoder.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/KeypointBoxCoder.cs new file mode 100644 index 00000000..bf1f76bd --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/KeypointBoxCoder.cs @@ -0,0 +1,300 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/keypoint_box_coder.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/keypoint_box_coder.proto + public static partial class KeypointBoxCoderReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/keypoint_box_coder.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static KeypointBoxCoderReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjBvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9rZXlwb2ludF9ib3hfY29kZXIu", + "cHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zInYKEEtleXBvaW50Qm94", + "Q29kZXISFQoNbnVtX2tleXBvaW50cxgBIAEoBRIPCgd5X3NjYWxlGAIgASgC", + "Eg8KB3hfc2NhbGUYAyABKAISFAoMaGVpZ2h0X3NjYWxlGAQgASgCEhMKC3dp", + "ZHRoX3NjYWxlGAUgASgCYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder), global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoder.Parser, new[]{ "NumKeypoints", "YScale", "XScale", "HeightScale", "WidthScale" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for KeypointBoxCoder. See + /// box_coders/keypoint_box_coder.py for details. + /// + public sealed partial class KeypointBoxCoder : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeypointBoxCoder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.KeypointBoxCoderReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KeypointBoxCoder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KeypointBoxCoder(KeypointBoxCoder other) : this() { + numKeypoints_ = other.numKeypoints_; + yScale_ = other.yScale_; + xScale_ = other.xScale_; + heightScale_ = other.heightScale_; + widthScale_ = other.widthScale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public KeypointBoxCoder Clone() { + return new KeypointBoxCoder(this); + } + + /// Field number for the "num_keypoints" field. + public const int NumKeypointsFieldNumber = 1; + private int numKeypoints_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumKeypoints { + get { return numKeypoints_; } + set { + numKeypoints_ = value; + } + } + + /// Field number for the "y_scale" field. + public const int YScaleFieldNumber = 2; + private float yScale_; + /// + /// Scale factor for anchor encoded box center and keypoints. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float YScale { + get { return yScale_; } + set { + yScale_ = value; + } + } + + /// Field number for the "x_scale" field. + public const int XScaleFieldNumber = 3; + private float xScale_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float XScale { + get { return xScale_; } + set { + xScale_ = value; + } + } + + /// Field number for the "height_scale" field. + public const int HeightScaleFieldNumber = 4; + private float heightScale_; + /// + /// Scale factor for anchor encoded box height. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float HeightScale { + get { return heightScale_; } + set { + heightScale_ = value; + } + } + + /// Field number for the "width_scale" field. + public const int WidthScaleFieldNumber = 5; + private float widthScale_; + /// + /// Scale factor for anchor encoded box width. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float WidthScale { + get { return widthScale_; } + set { + widthScale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as KeypointBoxCoder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(KeypointBoxCoder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NumKeypoints != other.NumKeypoints) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(YScale, other.YScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(XScale, other.XScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(HeightScale, other.HeightScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(WidthScale, other.WidthScale)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NumKeypoints != 0) hash ^= NumKeypoints.GetHashCode(); + if (YScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(YScale); + if (XScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(XScale); + if (HeightScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(HeightScale); + if (WidthScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(WidthScale); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NumKeypoints != 0) { + output.WriteRawTag(8); + output.WriteInt32(NumKeypoints); + } + if (YScale != 0F) { + output.WriteRawTag(21); + output.WriteFloat(YScale); + } + if (XScale != 0F) { + output.WriteRawTag(29); + output.WriteFloat(XScale); + } + if (HeightScale != 0F) { + output.WriteRawTag(37); + output.WriteFloat(HeightScale); + } + if (WidthScale != 0F) { + output.WriteRawTag(45); + output.WriteFloat(WidthScale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NumKeypoints != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumKeypoints); + } + if (YScale != 0F) { + size += 1 + 4; + } + if (XScale != 0F) { + size += 1 + 4; + } + if (HeightScale != 0F) { + size += 1 + 4; + } + if (WidthScale != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(KeypointBoxCoder other) { + if (other == null) { + return; + } + if (other.NumKeypoints != 0) { + NumKeypoints = other.NumKeypoints; + } + if (other.YScale != 0F) { + YScale = other.YScale; + } + if (other.XScale != 0F) { + XScale = other.XScale; + } + if (other.HeightScale != 0F) { + HeightScale = other.HeightScale; + } + if (other.WidthScale != 0F) { + WidthScale = other.WidthScale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NumKeypoints = input.ReadInt32(); + break; + } + case 21: { + YScale = input.ReadFloat(); + break; + } + case 29: { + XScale = input.ReadFloat(); + break; + } + case 37: { + HeightScale = input.ReadFloat(); + break; + } + case 45: { + WidthScale = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Losses.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Losses.cs new file mode 100644 index 00000000..e34ed91b --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Losses.cs @@ -0,0 +1,3009 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/losses.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/losses.proto + public static partial class LossesReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/losses.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static LossesReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiRvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9sb3NzZXMucHJvdG8SF29iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zIukFCgRMb3NzEkQKEWxvY2FsaXphdGlvbl9s", + "b3NzGAEgASgLMikub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuTG9jYWxpemF0", + "aW9uTG9zcxJIChNjbGFzc2lmaWNhdGlvbl9sb3NzGAIgASgLMisub2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MuQ2xhc3NpZmljYXRpb25Mb3NzEkUKEmhhcmRf", + "ZXhhbXBsZV9taW5lchgDIAEoCzIpLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9z", + "LkhhcmRFeGFtcGxlTWluZXISHQoVY2xhc3NpZmljYXRpb25fd2VpZ2h0GAQg", + "ASgCEhsKE2xvY2FsaXphdGlvbl93ZWlnaHQYBSABKAISTQoWcmFuZG9tX2V4", + "YW1wbGVfc2FtcGxlchgGIAEoCzItLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9z", + "LlJhbmRvbUV4YW1wbGVTYW1wbGVyEkkKEWVxdWFsaXphdGlvbl9sb3NzGAcg", + "ASgLMi4ub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuTG9zcy5FcXVhbGl6YXRp", + "b25Mb3NzElAKFWV4cGVjdGVkX2xvc3Nfd2VpZ2h0cxgSIAEoDjIxLm9iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zLkxvc3MuRXhwZWN0ZWRMb3NzV2VpZ2h0cxIg", + "ChhtaW5fbnVtX25lZ2F0aXZlX3NhbXBsZXMYEyABKAISJwofZGVzaXJlZF9u", + "ZWdhdGl2ZV9zYW1wbGluZ19yYXRpbxgUIAEoAho8ChBFcXVhbGl6YXRpb25M", + "b3NzEg4KBndlaWdodBgBIAEoAhIYChBleGNsdWRlX3ByZWZpeGVzGAIgAygJ", + "IlkKE0V4cGVjdGVkTG9zc1dlaWdodHMSCAoETk9ORRAAEhUKEUVYUEVDVEVE", + "X1NBTVBMSU5HEAESIQodUkVXRUlHSFRJTkdfVU5NQVRDSEVEX0FOQ0hPUlMQ", + "AiKaAgoQTG9jYWxpemF0aW9uTG9zcxJKCgt3ZWlnaHRlZF9sMhgBIAEoCzIz", + "Lm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLldlaWdodGVkTDJMb2NhbGl6YXRp", + "b25Mb3NzSAASVwoSd2VpZ2h0ZWRfc21vb3RoX2wxGAIgASgLMjkub2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MuV2VpZ2h0ZWRTbW9vdGhMMUxvY2FsaXphdGlv", + "bkxvc3NIABJMCgx3ZWlnaHRlZF9pb3UYAyABKAsyNC5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5XZWlnaHRlZElPVUxvY2FsaXphdGlvbkxvc3NIAEITChFs", + "b2NhbGl6YXRpb25fbG9zcyI3ChpXZWlnaHRlZEwyTG9jYWxpemF0aW9uTG9z", + "cxIZChFhbmNob3J3aXNlX291dHB1dBgBIAEoCCJMCiBXZWlnaHRlZFNtb290", + "aEwxTG9jYWxpemF0aW9uTG9zcxIZChFhbmNob3J3aXNlX291dHB1dBgBIAEo", + "CBINCgVkZWx0YRgCIAEoAiIdChtXZWlnaHRlZElPVUxvY2FsaXphdGlvbkxv", + "c3MiggQKEkNsYXNzaWZpY2F0aW9uTG9zcxJWChB3ZWlnaHRlZF9zaWdtb2lk", + "GAEgASgLMjoub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuV2VpZ2h0ZWRTaWdt", + "b2lkQ2xhc3NpZmljYXRpb25Mb3NzSAASVgoQd2VpZ2h0ZWRfc29mdG1heBgC", + "IAEoCzI6Lm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLldlaWdodGVkU29mdG1h", + "eENsYXNzaWZpY2F0aW9uTG9zc0gAEmoKF3dlaWdodGVkX2xvZ2l0c19zb2Z0", + "bWF4GAUgASgLMkcub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuV2VpZ2h0ZWRT", + "b2Z0bWF4Q2xhc3NpZmljYXRpb25BZ2FpbnN0TG9naXRzTG9zc0gAEl4KFGJv", + "b3RzdHJhcHBlZF9zaWdtb2lkGAMgASgLMj4ub2JqZWN0X2RldGVjdGlvbi5w", + "cm90b3MuQm9vdHN0cmFwcGVkU2lnbW9pZENsYXNzaWZpY2F0aW9uTG9zc0gA", + "ElkKFndlaWdodGVkX3NpZ21vaWRfZm9jYWwYBCABKAsyNy5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5TaWdtb2lkRm9jYWxDbGFzc2lmaWNhdGlvbkxvc3NI", + "AEIVChNjbGFzc2lmaWNhdGlvbl9sb3NzIj4KIVdlaWdodGVkU2lnbW9pZENs", + "YXNzaWZpY2F0aW9uTG9zcxIZChFhbmNob3J3aXNlX291dHB1dBgBIAEoCCJZ", + "Ch5TaWdtb2lkRm9jYWxDbGFzc2lmaWNhdGlvbkxvc3MSGQoRYW5jaG9yd2lz", + "ZV9vdXRwdXQYASABKAgSDQoFZ2FtbWEYAiABKAISDQoFYWxwaGEYAyABKAIi", + "UwohV2VpZ2h0ZWRTb2Z0bWF4Q2xhc3NpZmljYXRpb25Mb3NzEhkKEWFuY2hv", + "cndpc2Vfb3V0cHV0GAEgASgIEhMKC2xvZ2l0X3NjYWxlGAIgASgCImAKLldl", + "aWdodGVkU29mdG1heENsYXNzaWZpY2F0aW9uQWdhaW5zdExvZ2l0c0xvc3MS", + "GQoRYW5jaG9yd2lzZV9vdXRwdXQYASABKAgSEwoLbG9naXRfc2NhbGUYAiAB", + "KAIiaQolQm9vdHN0cmFwcGVkU2lnbW9pZENsYXNzaWZpY2F0aW9uTG9zcxIN", + "CgVhbHBoYRgBIAEoAhIWCg5oYXJkX2Jvb3RzdHJhcBgCIAEoCBIZChFhbmNo", + "b3J3aXNlX291dHB1dBgDIAEoCCKMAgoQSGFyZEV4YW1wbGVNaW5lchIZChFu", + "dW1faGFyZF9leGFtcGxlcxgBIAEoBRIVCg1pb3VfdGhyZXNob2xkGAIgASgC", + "EkUKCWxvc3NfdHlwZRgDIAEoDjIyLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9z", + "LkhhcmRFeGFtcGxlTWluZXIuTG9zc1R5cGUSIgoabWF4X25lZ2F0aXZlc19w", + "ZXJfcG9zaXRpdmUYBCABKAUSHwoXbWluX25lZ2F0aXZlc19wZXJfaW1hZ2UY", + "BSABKAUiOgoITG9zc1R5cGUSCAoEQk9USBAAEhIKDkNMQVNTSUZJQ0FUSU9O", + "EAESEAoMTE9DQUxJWkFUSU9OEAIiOAoUUmFuZG9tRXhhbXBsZVNhbXBsZXIS", + "IAoYcG9zaXRpdmVfc2FtcGxlX2ZyYWN0aW9uGAEgASgCYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Loss), global::Tensorflow.Models.ObjectDetection.Protos.Loss.Parser, new[]{ "LocalizationLoss", "ClassificationLoss", "HardExampleMiner", "ClassificationWeight", "LocalizationWeight", "RandomExampleSampler", "EqualizationLoss", "ExpectedLossWeights", "MinNumNegativeSamples", "DesiredNegativeSamplingRatio" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.ExpectedLossWeights) }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.EqualizationLoss), global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.EqualizationLoss.Parser, new[]{ "Weight", "ExcludePrefixes" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.LocalizationLoss), global::Tensorflow.Models.ObjectDetection.Protos.LocalizationLoss.Parser, new[]{ "WeightedL2", "WeightedSmoothL1", "WeightedIou" }, new[]{ "LocalizationLoss" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss), global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss.Parser, new[]{ "AnchorwiseOutput" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss), global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss.Parser, new[]{ "AnchorwiseOutput", "Delta" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss), global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss), global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss.Parser, new[]{ "WeightedSigmoid", "WeightedSoftmax", "WeightedLogitsSoftmax", "BootstrappedSigmoid", "WeightedSigmoidFocal" }, new[]{ "ClassificationLoss" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss), global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss.Parser, new[]{ "AnchorwiseOutput" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss), global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss.Parser, new[]{ "AnchorwiseOutput", "Gamma", "Alpha" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss), global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss.Parser, new[]{ "AnchorwiseOutput", "LogitScale" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss), global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss.Parser, new[]{ "AnchorwiseOutput", "LogitScale" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss), global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss.Parser, new[]{ "Alpha", "HardBootstrap", "AnchorwiseOutput" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner), global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner.Parser, new[]{ "NumHardExamples", "IouThreshold", "LossType", "MaxNegativesPerPositive", "MinNegativesPerImage" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner.Types.LossType) }, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomExampleSampler), global::Tensorflow.Models.ObjectDetection.Protos.RandomExampleSampler.Parser, new[]{ "PositiveSampleFraction" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Message for configuring the localization loss, classification loss and hard + /// example miner used for training object detection models. See core/losses.py + /// for details + /// + public sealed partial class Loss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Loss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Loss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Loss(Loss other) : this() { + localizationLoss_ = other.localizationLoss_ != null ? other.localizationLoss_.Clone() : null; + classificationLoss_ = other.classificationLoss_ != null ? other.classificationLoss_.Clone() : null; + hardExampleMiner_ = other.hardExampleMiner_ != null ? other.hardExampleMiner_.Clone() : null; + classificationWeight_ = other.classificationWeight_; + localizationWeight_ = other.localizationWeight_; + randomExampleSampler_ = other.randomExampleSampler_ != null ? other.randomExampleSampler_.Clone() : null; + equalizationLoss_ = other.equalizationLoss_ != null ? other.equalizationLoss_.Clone() : null; + expectedLossWeights_ = other.expectedLossWeights_; + minNumNegativeSamples_ = other.minNumNegativeSamples_; + desiredNegativeSamplingRatio_ = other.desiredNegativeSamplingRatio_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Loss Clone() { + return new Loss(this); + } + + /// Field number for the "localization_loss" field. + public const int LocalizationLossFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.LocalizationLoss localizationLoss_; + /// + /// Localization loss to use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.LocalizationLoss LocalizationLoss { + get { return localizationLoss_; } + set { + localizationLoss_ = value; + } + } + + /// Field number for the "classification_loss" field. + public const int ClassificationLossFieldNumber = 2; + private global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss classificationLoss_; + /// + /// Classification loss to use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss ClassificationLoss { + get { return classificationLoss_; } + set { + classificationLoss_ = value; + } + } + + /// Field number for the "hard_example_miner" field. + public const int HardExampleMinerFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner hardExampleMiner_; + /// + /// If not left to default, applies hard example mining. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner HardExampleMiner { + get { return hardExampleMiner_; } + set { + hardExampleMiner_ = value; + } + } + + /// Field number for the "classification_weight" field. + public const int ClassificationWeightFieldNumber = 4; + private float classificationWeight_; + /// + /// Classification loss weight. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ClassificationWeight { + get { return classificationWeight_; } + set { + classificationWeight_ = value; + } + } + + /// Field number for the "localization_weight" field. + public const int LocalizationWeightFieldNumber = 5; + private float localizationWeight_; + /// + /// Localization loss weight. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LocalizationWeight { + get { return localizationWeight_; } + set { + localizationWeight_ = value; + } + } + + /// Field number for the "random_example_sampler" field. + public const int RandomExampleSamplerFieldNumber = 6; + private global::Tensorflow.Models.ObjectDetection.Protos.RandomExampleSampler randomExampleSampler_; + /// + /// If not left to default, applies random example sampling. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomExampleSampler RandomExampleSampler { + get { return randomExampleSampler_; } + set { + randomExampleSampler_ = value; + } + } + + /// Field number for the "equalization_loss" field. + public const int EqualizationLossFieldNumber = 7; + private global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.EqualizationLoss equalizationLoss_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.EqualizationLoss EqualizationLoss { + get { return equalizationLoss_; } + set { + equalizationLoss_ = value; + } + } + + /// Field number for the "expected_loss_weights" field. + public const int ExpectedLossWeightsFieldNumber = 18; + private global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.ExpectedLossWeights expectedLossWeights_ = 0; + /// + /// Method to compute expected loss weights with respect to balanced + /// positive/negative sampling scheme. If NONE, use explicit sampling. + /// TODO(birdbrain): Move under ExpectedLossWeights. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.ExpectedLossWeights ExpectedLossWeights { + get { return expectedLossWeights_; } + set { + expectedLossWeights_ = value; + } + } + + /// Field number for the "min_num_negative_samples" field. + public const int MinNumNegativeSamplesFieldNumber = 19; + private float minNumNegativeSamples_; + /// + /// Minimum number of effective negative samples. + /// Only applies if expected_loss_weights is not NONE. + /// TODO(birdbrain): Move under ExpectedLossWeights. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinNumNegativeSamples { + get { return minNumNegativeSamples_; } + set { + minNumNegativeSamples_ = value; + } + } + + /// Field number for the "desired_negative_sampling_ratio" field. + public const int DesiredNegativeSamplingRatioFieldNumber = 20; + private float desiredNegativeSamplingRatio_; + /// + /// Desired number of effective negative samples per positive sample. + /// Only applies if expected_loss_weights is not NONE. + /// TODO(birdbrain): Move under ExpectedLossWeights. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DesiredNegativeSamplingRatio { + get { return desiredNegativeSamplingRatio_; } + set { + desiredNegativeSamplingRatio_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Loss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Loss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(LocalizationLoss, other.LocalizationLoss)) return false; + if (!object.Equals(ClassificationLoss, other.ClassificationLoss)) return false; + if (!object.Equals(HardExampleMiner, other.HardExampleMiner)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ClassificationWeight, other.ClassificationWeight)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LocalizationWeight, other.LocalizationWeight)) return false; + if (!object.Equals(RandomExampleSampler, other.RandomExampleSampler)) return false; + if (!object.Equals(EqualizationLoss, other.EqualizationLoss)) return false; + if (ExpectedLossWeights != other.ExpectedLossWeights) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinNumNegativeSamples, other.MinNumNegativeSamples)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DesiredNegativeSamplingRatio, other.DesiredNegativeSamplingRatio)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (localizationLoss_ != null) hash ^= LocalizationLoss.GetHashCode(); + if (classificationLoss_ != null) hash ^= ClassificationLoss.GetHashCode(); + if (hardExampleMiner_ != null) hash ^= HardExampleMiner.GetHashCode(); + if (ClassificationWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ClassificationWeight); + if (LocalizationWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LocalizationWeight); + if (randomExampleSampler_ != null) hash ^= RandomExampleSampler.GetHashCode(); + if (equalizationLoss_ != null) hash ^= EqualizationLoss.GetHashCode(); + if (ExpectedLossWeights != 0) hash ^= ExpectedLossWeights.GetHashCode(); + if (MinNumNegativeSamples != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinNumNegativeSamples); + if (DesiredNegativeSamplingRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DesiredNegativeSamplingRatio); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (localizationLoss_ != null) { + output.WriteRawTag(10); + output.WriteMessage(LocalizationLoss); + } + if (classificationLoss_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ClassificationLoss); + } + if (hardExampleMiner_ != null) { + output.WriteRawTag(26); + output.WriteMessage(HardExampleMiner); + } + if (ClassificationWeight != 0F) { + output.WriteRawTag(37); + output.WriteFloat(ClassificationWeight); + } + if (LocalizationWeight != 0F) { + output.WriteRawTag(45); + output.WriteFloat(LocalizationWeight); + } + if (randomExampleSampler_ != null) { + output.WriteRawTag(50); + output.WriteMessage(RandomExampleSampler); + } + if (equalizationLoss_ != null) { + output.WriteRawTag(58); + output.WriteMessage(EqualizationLoss); + } + if (ExpectedLossWeights != 0) { + output.WriteRawTag(144, 1); + output.WriteEnum((int) ExpectedLossWeights); + } + if (MinNumNegativeSamples != 0F) { + output.WriteRawTag(157, 1); + output.WriteFloat(MinNumNegativeSamples); + } + if (DesiredNegativeSamplingRatio != 0F) { + output.WriteRawTag(165, 1); + output.WriteFloat(DesiredNegativeSamplingRatio); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (localizationLoss_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LocalizationLoss); + } + if (classificationLoss_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ClassificationLoss); + } + if (hardExampleMiner_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(HardExampleMiner); + } + if (ClassificationWeight != 0F) { + size += 1 + 4; + } + if (LocalizationWeight != 0F) { + size += 1 + 4; + } + if (randomExampleSampler_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomExampleSampler); + } + if (equalizationLoss_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EqualizationLoss); + } + if (ExpectedLossWeights != 0) { + size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) ExpectedLossWeights); + } + if (MinNumNegativeSamples != 0F) { + size += 2 + 4; + } + if (DesiredNegativeSamplingRatio != 0F) { + size += 2 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Loss other) { + if (other == null) { + return; + } + if (other.localizationLoss_ != null) { + if (localizationLoss_ == null) { + localizationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.LocalizationLoss(); + } + LocalizationLoss.MergeFrom(other.LocalizationLoss); + } + if (other.classificationLoss_ != null) { + if (classificationLoss_ == null) { + classificationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss(); + } + ClassificationLoss.MergeFrom(other.ClassificationLoss); + } + if (other.hardExampleMiner_ != null) { + if (hardExampleMiner_ == null) { + hardExampleMiner_ = new global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner(); + } + HardExampleMiner.MergeFrom(other.HardExampleMiner); + } + if (other.ClassificationWeight != 0F) { + ClassificationWeight = other.ClassificationWeight; + } + if (other.LocalizationWeight != 0F) { + LocalizationWeight = other.LocalizationWeight; + } + if (other.randomExampleSampler_ != null) { + if (randomExampleSampler_ == null) { + randomExampleSampler_ = new global::Tensorflow.Models.ObjectDetection.Protos.RandomExampleSampler(); + } + RandomExampleSampler.MergeFrom(other.RandomExampleSampler); + } + if (other.equalizationLoss_ != null) { + if (equalizationLoss_ == null) { + equalizationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.EqualizationLoss(); + } + EqualizationLoss.MergeFrom(other.EqualizationLoss); + } + if (other.ExpectedLossWeights != 0) { + ExpectedLossWeights = other.ExpectedLossWeights; + } + if (other.MinNumNegativeSamples != 0F) { + MinNumNegativeSamples = other.MinNumNegativeSamples; + } + if (other.DesiredNegativeSamplingRatio != 0F) { + DesiredNegativeSamplingRatio = other.DesiredNegativeSamplingRatio; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (localizationLoss_ == null) { + localizationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.LocalizationLoss(); + } + input.ReadMessage(localizationLoss_); + break; + } + case 18: { + if (classificationLoss_ == null) { + classificationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.ClassificationLoss(); + } + input.ReadMessage(classificationLoss_); + break; + } + case 26: { + if (hardExampleMiner_ == null) { + hardExampleMiner_ = new global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner(); + } + input.ReadMessage(hardExampleMiner_); + break; + } + case 37: { + ClassificationWeight = input.ReadFloat(); + break; + } + case 45: { + LocalizationWeight = input.ReadFloat(); + break; + } + case 50: { + if (randomExampleSampler_ == null) { + randomExampleSampler_ = new global::Tensorflow.Models.ObjectDetection.Protos.RandomExampleSampler(); + } + input.ReadMessage(randomExampleSampler_); + break; + } + case 58: { + if (equalizationLoss_ == null) { + equalizationLoss_ = new global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.EqualizationLoss(); + } + input.ReadMessage(equalizationLoss_); + break; + } + case 144: { + expectedLossWeights_ = (global::Tensorflow.Models.ObjectDetection.Protos.Loss.Types.ExpectedLossWeights) input.ReadEnum(); + break; + } + case 157: { + MinNumNegativeSamples = input.ReadFloat(); + break; + } + case 165: { + DesiredNegativeSamplingRatio = input.ReadFloat(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the Loss message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public enum ExpectedLossWeights { + [pbr::OriginalName("NONE")] None = 0, + /// + /// Use expected_classification_loss_by_expected_sampling + /// from third_party/tensorflow_models/object_detection/utils/ops.py + /// + [pbr::OriginalName("EXPECTED_SAMPLING")] ExpectedSampling = 1, + /// + /// Use expected_classification_loss_by_reweighting_unmatched_anchors + /// from third_party/tensorflow_models/object_detection/utils/ops.py + /// + [pbr::OriginalName("REWEIGHTING_UNMATCHED_ANCHORS")] ReweightingUnmatchedAnchors = 2, + } + + /// + /// Equalization loss. + /// + public sealed partial class EqualizationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EqualizationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.Loss.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public EqualizationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public EqualizationLoss(EqualizationLoss other) : this() { + weight_ = other.weight_; + excludePrefixes_ = other.excludePrefixes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public EqualizationLoss Clone() { + return new EqualizationLoss(this); + } + + /// Field number for the "weight" field. + public const int WeightFieldNumber = 1; + private float weight_; + /// + /// Weight equalization loss strength. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Weight { + get { return weight_; } + set { + weight_ = value; + } + } + + /// Field number for the "exclude_prefixes" field. + public const int ExcludePrefixesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_excludePrefixes_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField excludePrefixes_ = new pbc::RepeatedField(); + /// + /// When computing equalization loss, ops that start with + /// equalization_exclude_prefixes will be ignored. Only used when + /// equalization_weight > 0. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField ExcludePrefixes { + get { return excludePrefixes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as EqualizationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(EqualizationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Weight, other.Weight)) return false; + if(!excludePrefixes_.Equals(other.excludePrefixes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Weight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Weight); + hash ^= excludePrefixes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Weight != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Weight); + } + excludePrefixes_.WriteTo(output, _repeated_excludePrefixes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Weight != 0F) { + size += 1 + 4; + } + size += excludePrefixes_.CalculateSize(_repeated_excludePrefixes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(EqualizationLoss other) { + if (other == null) { + return; + } + if (other.Weight != 0F) { + Weight = other.Weight; + } + excludePrefixes_.Add(other.excludePrefixes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Weight = input.ReadFloat(); + break; + } + case 18: { + excludePrefixes_.AddEntriesFrom(input, _repeated_excludePrefixes_codec); + break; + } + } + } + } + + } + + } + #endregion + + } + + /// + /// Configuration for bounding box localization loss function. + /// + public sealed partial class LocalizationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LocalizationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LocalizationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LocalizationLoss(LocalizationLoss other) : this() { + switch (other.LocalizationLossCase) { + case LocalizationLossOneofCase.WeightedL2: + WeightedL2 = other.WeightedL2.Clone(); + break; + case LocalizationLossOneofCase.WeightedSmoothL1: + WeightedSmoothL1 = other.WeightedSmoothL1.Clone(); + break; + case LocalizationLossOneofCase.WeightedIou: + WeightedIou = other.WeightedIou.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LocalizationLoss Clone() { + return new LocalizationLoss(this); + } + + /// Field number for the "weighted_l2" field. + public const int WeightedL2FieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss WeightedL2 { + get { return localizationLossCase_ == LocalizationLossOneofCase.WeightedL2 ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss) localizationLoss_ : null; } + set { + localizationLoss_ = value; + localizationLossCase_ = value == null ? LocalizationLossOneofCase.None : LocalizationLossOneofCase.WeightedL2; + } + } + + /// Field number for the "weighted_smooth_l1" field. + public const int WeightedSmoothL1FieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss WeightedSmoothL1 { + get { return localizationLossCase_ == LocalizationLossOneofCase.WeightedSmoothL1 ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss) localizationLoss_ : null; } + set { + localizationLoss_ = value; + localizationLossCase_ = value == null ? LocalizationLossOneofCase.None : LocalizationLossOneofCase.WeightedSmoothL1; + } + } + + /// Field number for the "weighted_iou" field. + public const int WeightedIouFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss WeightedIou { + get { return localizationLossCase_ == LocalizationLossOneofCase.WeightedIou ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss) localizationLoss_ : null; } + set { + localizationLoss_ = value; + localizationLossCase_ = value == null ? LocalizationLossOneofCase.None : LocalizationLossOneofCase.WeightedIou; + } + } + + private object localizationLoss_; + /// Enum of possible cases for the "localization_loss" oneof. + public enum LocalizationLossOneofCase { + None = 0, + WeightedL2 = 1, + WeightedSmoothL1 = 2, + WeightedIou = 3, + } + private LocalizationLossOneofCase localizationLossCase_ = LocalizationLossOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LocalizationLossOneofCase LocalizationLossCase { + get { return localizationLossCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearLocalizationLoss() { + localizationLossCase_ = LocalizationLossOneofCase.None; + localizationLoss_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as LocalizationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(LocalizationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(WeightedL2, other.WeightedL2)) return false; + if (!object.Equals(WeightedSmoothL1, other.WeightedSmoothL1)) return false; + if (!object.Equals(WeightedIou, other.WeightedIou)) return false; + if (LocalizationLossCase != other.LocalizationLossCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedL2) hash ^= WeightedL2.GetHashCode(); + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedSmoothL1) hash ^= WeightedSmoothL1.GetHashCode(); + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedIou) hash ^= WeightedIou.GetHashCode(); + hash ^= (int) localizationLossCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedL2) { + output.WriteRawTag(10); + output.WriteMessage(WeightedL2); + } + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedSmoothL1) { + output.WriteRawTag(18); + output.WriteMessage(WeightedSmoothL1); + } + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedIou) { + output.WriteRawTag(26); + output.WriteMessage(WeightedIou); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedL2) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedL2); + } + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedSmoothL1) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedSmoothL1); + } + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedIou) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedIou); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(LocalizationLoss other) { + if (other == null) { + return; + } + switch (other.LocalizationLossCase) { + case LocalizationLossOneofCase.WeightedL2: + if (WeightedL2 == null) { + WeightedL2 = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss(); + } + WeightedL2.MergeFrom(other.WeightedL2); + break; + case LocalizationLossOneofCase.WeightedSmoothL1: + if (WeightedSmoothL1 == null) { + WeightedSmoothL1 = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss(); + } + WeightedSmoothL1.MergeFrom(other.WeightedSmoothL1); + break; + case LocalizationLossOneofCase.WeightedIou: + if (WeightedIou == null) { + WeightedIou = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss(); + } + WeightedIou.MergeFrom(other.WeightedIou); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedL2LocalizationLoss(); + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedL2) { + subBuilder.MergeFrom(WeightedL2); + } + input.ReadMessage(subBuilder); + WeightedL2 = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSmoothL1LocalizationLoss(); + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedSmoothL1) { + subBuilder.MergeFrom(WeightedSmoothL1); + } + input.ReadMessage(subBuilder); + WeightedSmoothL1 = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedIOULocalizationLoss(); + if (localizationLossCase_ == LocalizationLossOneofCase.WeightedIou) { + subBuilder.MergeFrom(WeightedIou); + } + input.ReadMessage(subBuilder); + WeightedIou = subBuilder; + break; + } + } + } + } + + } + + /// + /// L2 location loss: 0.5 * ||weight * (a - b)|| ^ 2 + /// + public sealed partial class WeightedL2LocalizationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightedL2LocalizationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedL2LocalizationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedL2LocalizationLoss(WeightedL2LocalizationLoss other) : this() { + anchorwiseOutput_ = other.anchorwiseOutput_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedL2LocalizationLoss Clone() { + return new WeightedL2LocalizationLoss(this); + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 1; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// Output loss per anchor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightedL2LocalizationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightedL2LocalizationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AnchorwiseOutput != false) { + output.WriteRawTag(8); + output.WriteBool(AnchorwiseOutput); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightedL2LocalizationLoss other) { + if (other == null) { + return; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AnchorwiseOutput = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// SmoothL1 (Huber) location loss. + /// The smooth L1_loss is defined elementwise as .5 x^2 if |x| <= delta and + /// delta * (|x|-0.5*delta) otherwise, where x is the difference between + /// predictions and target. + /// + public sealed partial class WeightedSmoothL1LocalizationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightedSmoothL1LocalizationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSmoothL1LocalizationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSmoothL1LocalizationLoss(WeightedSmoothL1LocalizationLoss other) : this() { + anchorwiseOutput_ = other.anchorwiseOutput_; + delta_ = other.delta_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSmoothL1LocalizationLoss Clone() { + return new WeightedSmoothL1LocalizationLoss(this); + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 1; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// Output loss per anchor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + /// Field number for the "delta" field. + public const int DeltaFieldNumber = 2; + private float delta_; + /// + /// Delta value for huber loss. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Delta { + get { return delta_; } + set { + delta_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightedSmoothL1LocalizationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightedSmoothL1LocalizationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Delta, other.Delta)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (Delta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Delta); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AnchorwiseOutput != false) { + output.WriteRawTag(8); + output.WriteBool(AnchorwiseOutput); + } + if (Delta != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Delta); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (Delta != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightedSmoothL1LocalizationLoss other) { + if (other == null) { + return; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + if (other.Delta != 0F) { + Delta = other.Delta; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AnchorwiseOutput = input.ReadBool(); + break; + } + case 21: { + Delta = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Intersection over union location loss: 1 - IOU + /// + public sealed partial class WeightedIOULocalizationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightedIOULocalizationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedIOULocalizationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedIOULocalizationLoss(WeightedIOULocalizationLoss other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedIOULocalizationLoss Clone() { + return new WeightedIOULocalizationLoss(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightedIOULocalizationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightedIOULocalizationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightedIOULocalizationLoss other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Configuration for class prediction loss function. + /// + public sealed partial class ClassificationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClassificationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassificationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassificationLoss(ClassificationLoss other) : this() { + switch (other.ClassificationLossCase) { + case ClassificationLossOneofCase.WeightedSigmoid: + WeightedSigmoid = other.WeightedSigmoid.Clone(); + break; + case ClassificationLossOneofCase.WeightedSoftmax: + WeightedSoftmax = other.WeightedSoftmax.Clone(); + break; + case ClassificationLossOneofCase.WeightedLogitsSoftmax: + WeightedLogitsSoftmax = other.WeightedLogitsSoftmax.Clone(); + break; + case ClassificationLossOneofCase.BootstrappedSigmoid: + BootstrappedSigmoid = other.BootstrappedSigmoid.Clone(); + break; + case ClassificationLossOneofCase.WeightedSigmoidFocal: + WeightedSigmoidFocal = other.WeightedSigmoidFocal.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassificationLoss Clone() { + return new ClassificationLoss(this); + } + + /// Field number for the "weighted_sigmoid" field. + public const int WeightedSigmoidFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss WeightedSigmoid { + get { return classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoid ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss) classificationLoss_ : null; } + set { + classificationLoss_ = value; + classificationLossCase_ = value == null ? ClassificationLossOneofCase.None : ClassificationLossOneofCase.WeightedSigmoid; + } + } + + /// Field number for the "weighted_softmax" field. + public const int WeightedSoftmaxFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss WeightedSoftmax { + get { return classificationLossCase_ == ClassificationLossOneofCase.WeightedSoftmax ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss) classificationLoss_ : null; } + set { + classificationLoss_ = value; + classificationLossCase_ = value == null ? ClassificationLossOneofCase.None : ClassificationLossOneofCase.WeightedSoftmax; + } + } + + /// Field number for the "weighted_logits_softmax" field. + public const int WeightedLogitsSoftmaxFieldNumber = 5; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss WeightedLogitsSoftmax { + get { return classificationLossCase_ == ClassificationLossOneofCase.WeightedLogitsSoftmax ? (global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss) classificationLoss_ : null; } + set { + classificationLoss_ = value; + classificationLossCase_ = value == null ? ClassificationLossOneofCase.None : ClassificationLossOneofCase.WeightedLogitsSoftmax; + } + } + + /// Field number for the "bootstrapped_sigmoid" field. + public const int BootstrappedSigmoidFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss BootstrappedSigmoid { + get { return classificationLossCase_ == ClassificationLossOneofCase.BootstrappedSigmoid ? (global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss) classificationLoss_ : null; } + set { + classificationLoss_ = value; + classificationLossCase_ = value == null ? ClassificationLossOneofCase.None : ClassificationLossOneofCase.BootstrappedSigmoid; + } + } + + /// Field number for the "weighted_sigmoid_focal" field. + public const int WeightedSigmoidFocalFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss WeightedSigmoidFocal { + get { return classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoidFocal ? (global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss) classificationLoss_ : null; } + set { + classificationLoss_ = value; + classificationLossCase_ = value == null ? ClassificationLossOneofCase.None : ClassificationLossOneofCase.WeightedSigmoidFocal; + } + } + + private object classificationLoss_; + /// Enum of possible cases for the "classification_loss" oneof. + public enum ClassificationLossOneofCase { + None = 0, + WeightedSigmoid = 1, + WeightedSoftmax = 2, + WeightedLogitsSoftmax = 5, + BootstrappedSigmoid = 3, + WeightedSigmoidFocal = 4, + } + private ClassificationLossOneofCase classificationLossCase_ = ClassificationLossOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ClassificationLossOneofCase ClassificationLossCase { + get { return classificationLossCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearClassificationLoss() { + classificationLossCase_ = ClassificationLossOneofCase.None; + classificationLoss_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ClassificationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ClassificationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(WeightedSigmoid, other.WeightedSigmoid)) return false; + if (!object.Equals(WeightedSoftmax, other.WeightedSoftmax)) return false; + if (!object.Equals(WeightedLogitsSoftmax, other.WeightedLogitsSoftmax)) return false; + if (!object.Equals(BootstrappedSigmoid, other.BootstrappedSigmoid)) return false; + if (!object.Equals(WeightedSigmoidFocal, other.WeightedSigmoidFocal)) return false; + if (ClassificationLossCase != other.ClassificationLossCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoid) hash ^= WeightedSigmoid.GetHashCode(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSoftmax) hash ^= WeightedSoftmax.GetHashCode(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedLogitsSoftmax) hash ^= WeightedLogitsSoftmax.GetHashCode(); + if (classificationLossCase_ == ClassificationLossOneofCase.BootstrappedSigmoid) hash ^= BootstrappedSigmoid.GetHashCode(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoidFocal) hash ^= WeightedSigmoidFocal.GetHashCode(); + hash ^= (int) classificationLossCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoid) { + output.WriteRawTag(10); + output.WriteMessage(WeightedSigmoid); + } + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSoftmax) { + output.WriteRawTag(18); + output.WriteMessage(WeightedSoftmax); + } + if (classificationLossCase_ == ClassificationLossOneofCase.BootstrappedSigmoid) { + output.WriteRawTag(26); + output.WriteMessage(BootstrappedSigmoid); + } + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoidFocal) { + output.WriteRawTag(34); + output.WriteMessage(WeightedSigmoidFocal); + } + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedLogitsSoftmax) { + output.WriteRawTag(42); + output.WriteMessage(WeightedLogitsSoftmax); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoid) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedSigmoid); + } + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSoftmax) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedSoftmax); + } + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedLogitsSoftmax) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedLogitsSoftmax); + } + if (classificationLossCase_ == ClassificationLossOneofCase.BootstrappedSigmoid) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BootstrappedSigmoid); + } + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoidFocal) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(WeightedSigmoidFocal); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ClassificationLoss other) { + if (other == null) { + return; + } + switch (other.ClassificationLossCase) { + case ClassificationLossOneofCase.WeightedSigmoid: + if (WeightedSigmoid == null) { + WeightedSigmoid = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss(); + } + WeightedSigmoid.MergeFrom(other.WeightedSigmoid); + break; + case ClassificationLossOneofCase.WeightedSoftmax: + if (WeightedSoftmax == null) { + WeightedSoftmax = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss(); + } + WeightedSoftmax.MergeFrom(other.WeightedSoftmax); + break; + case ClassificationLossOneofCase.WeightedLogitsSoftmax: + if (WeightedLogitsSoftmax == null) { + WeightedLogitsSoftmax = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss(); + } + WeightedLogitsSoftmax.MergeFrom(other.WeightedLogitsSoftmax); + break; + case ClassificationLossOneofCase.BootstrappedSigmoid: + if (BootstrappedSigmoid == null) { + BootstrappedSigmoid = new global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss(); + } + BootstrappedSigmoid.MergeFrom(other.BootstrappedSigmoid); + break; + case ClassificationLossOneofCase.WeightedSigmoidFocal: + if (WeightedSigmoidFocal == null) { + WeightedSigmoidFocal = new global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss(); + } + WeightedSigmoidFocal.MergeFrom(other.WeightedSigmoidFocal); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSigmoidClassificationLoss(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoid) { + subBuilder.MergeFrom(WeightedSigmoid); + } + input.ReadMessage(subBuilder); + WeightedSigmoid = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationLoss(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSoftmax) { + subBuilder.MergeFrom(WeightedSoftmax); + } + input.ReadMessage(subBuilder); + WeightedSoftmax = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.BootstrappedSigmoidClassificationLoss(); + if (classificationLossCase_ == ClassificationLossOneofCase.BootstrappedSigmoid) { + subBuilder.MergeFrom(BootstrappedSigmoid); + } + input.ReadMessage(subBuilder); + BootstrappedSigmoid = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SigmoidFocalClassificationLoss(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedSigmoidFocal) { + subBuilder.MergeFrom(WeightedSigmoidFocal); + } + input.ReadMessage(subBuilder); + WeightedSigmoidFocal = subBuilder; + break; + } + case 42: { + global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.WeightedSoftmaxClassificationAgainstLogitsLoss(); + if (classificationLossCase_ == ClassificationLossOneofCase.WeightedLogitsSoftmax) { + subBuilder.MergeFrom(WeightedLogitsSoftmax); + } + input.ReadMessage(subBuilder); + WeightedLogitsSoftmax = subBuilder; + break; + } + } + } + } + + } + + /// + /// Classification loss using a sigmoid function over class predictions. + /// + public sealed partial class WeightedSigmoidClassificationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightedSigmoidClassificationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSigmoidClassificationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSigmoidClassificationLoss(WeightedSigmoidClassificationLoss other) : this() { + anchorwiseOutput_ = other.anchorwiseOutput_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSigmoidClassificationLoss Clone() { + return new WeightedSigmoidClassificationLoss(this); + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 1; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// Output loss per anchor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightedSigmoidClassificationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightedSigmoidClassificationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AnchorwiseOutput != false) { + output.WriteRawTag(8); + output.WriteBool(AnchorwiseOutput); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightedSigmoidClassificationLoss other) { + if (other == null) { + return; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AnchorwiseOutput = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Sigmoid Focal cross entropy loss as described in + /// https://arxiv.org/abs/1708.02002 + /// + public sealed partial class SigmoidFocalClassificationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SigmoidFocalClassificationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidFocalClassificationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidFocalClassificationLoss(SigmoidFocalClassificationLoss other) : this() { + anchorwiseOutput_ = other.anchorwiseOutput_; + gamma_ = other.gamma_; + alpha_ = other.alpha_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SigmoidFocalClassificationLoss Clone() { + return new SigmoidFocalClassificationLoss(this); + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 1; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + /// Field number for the "gamma" field. + public const int GammaFieldNumber = 2; + private float gamma_; + /// + /// modulating factor for the loss. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Gamma { + get { return gamma_; } + set { + gamma_ = value; + } + } + + /// Field number for the "alpha" field. + public const int AlphaFieldNumber = 3; + private float alpha_; + /// + /// alpha weighting factor for the loss. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Alpha { + get { return alpha_; } + set { + alpha_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SigmoidFocalClassificationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SigmoidFocalClassificationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Gamma, other.Gamma)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Alpha, other.Alpha)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (Gamma != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Gamma); + if (Alpha != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Alpha); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AnchorwiseOutput != false) { + output.WriteRawTag(8); + output.WriteBool(AnchorwiseOutput); + } + if (Gamma != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Gamma); + } + if (Alpha != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Alpha); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (Gamma != 0F) { + size += 1 + 4; + } + if (Alpha != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SigmoidFocalClassificationLoss other) { + if (other == null) { + return; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + if (other.Gamma != 0F) { + Gamma = other.Gamma; + } + if (other.Alpha != 0F) { + Alpha = other.Alpha; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AnchorwiseOutput = input.ReadBool(); + break; + } + case 21: { + Gamma = input.ReadFloat(); + break; + } + case 29: { + Alpha = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Classification loss using a softmax function over class predictions. + /// + public sealed partial class WeightedSoftmaxClassificationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightedSoftmaxClassificationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSoftmaxClassificationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSoftmaxClassificationLoss(WeightedSoftmaxClassificationLoss other) : this() { + anchorwiseOutput_ = other.anchorwiseOutput_; + logitScale_ = other.logitScale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSoftmaxClassificationLoss Clone() { + return new WeightedSoftmaxClassificationLoss(this); + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 1; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// Output loss per anchor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + /// Field number for the "logit_scale" field. + public const int LogitScaleFieldNumber = 2; + private float logitScale_; + /// + /// Scale logit (input) value before calculating softmax classification loss. + /// Typically used for softmax distillation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LogitScale { + get { return logitScale_; } + set { + logitScale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightedSoftmaxClassificationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightedSoftmaxClassificationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LogitScale, other.LogitScale)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (LogitScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LogitScale); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AnchorwiseOutput != false) { + output.WriteRawTag(8); + output.WriteBool(AnchorwiseOutput); + } + if (LogitScale != 0F) { + output.WriteRawTag(21); + output.WriteFloat(LogitScale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (LogitScale != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightedSoftmaxClassificationLoss other) { + if (other == null) { + return; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + if (other.LogitScale != 0F) { + LogitScale = other.LogitScale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AnchorwiseOutput = input.ReadBool(); + break; + } + case 21: { + LogitScale = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Classification loss using a softmax function over class predictions and + /// a softmax function over the groundtruth labels (assumed to be logits). + /// + public sealed partial class WeightedSoftmaxClassificationAgainstLogitsLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WeightedSoftmaxClassificationAgainstLogitsLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSoftmaxClassificationAgainstLogitsLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSoftmaxClassificationAgainstLogitsLoss(WeightedSoftmaxClassificationAgainstLogitsLoss other) : this() { + anchorwiseOutput_ = other.anchorwiseOutput_; + logitScale_ = other.logitScale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public WeightedSoftmaxClassificationAgainstLogitsLoss Clone() { + return new WeightedSoftmaxClassificationAgainstLogitsLoss(this); + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 1; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + /// Field number for the "logit_scale" field. + public const int LogitScaleFieldNumber = 2; + private float logitScale_; + /// + /// Scale and softmax groundtruth logits before calculating softmax + /// classification loss. Typically used for softmax distillation with teacher + /// annotations stored as logits. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LogitScale { + get { return logitScale_; } + set { + logitScale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as WeightedSoftmaxClassificationAgainstLogitsLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(WeightedSoftmaxClassificationAgainstLogitsLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LogitScale, other.LogitScale)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (LogitScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LogitScale); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AnchorwiseOutput != false) { + output.WriteRawTag(8); + output.WriteBool(AnchorwiseOutput); + } + if (LogitScale != 0F) { + output.WriteRawTag(21); + output.WriteFloat(LogitScale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (LogitScale != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(WeightedSoftmaxClassificationAgainstLogitsLoss other) { + if (other == null) { + return; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + if (other.LogitScale != 0F) { + LogitScale = other.LogitScale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + AnchorwiseOutput = input.ReadBool(); + break; + } + case 21: { + LogitScale = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Classification loss using a sigmoid function over the class prediction with + /// the highest prediction score. + /// + public sealed partial class BootstrappedSigmoidClassificationLoss : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BootstrappedSigmoidClassificationLoss()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BootstrappedSigmoidClassificationLoss() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BootstrappedSigmoidClassificationLoss(BootstrappedSigmoidClassificationLoss other) : this() { + alpha_ = other.alpha_; + hardBootstrap_ = other.hardBootstrap_; + anchorwiseOutput_ = other.anchorwiseOutput_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BootstrappedSigmoidClassificationLoss Clone() { + return new BootstrappedSigmoidClassificationLoss(this); + } + + /// Field number for the "alpha" field. + public const int AlphaFieldNumber = 1; + private float alpha_; + /// + /// Interpolation weight between 0 and 1. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Alpha { + get { return alpha_; } + set { + alpha_ = value; + } + } + + /// Field number for the "hard_bootstrap" field. + public const int HardBootstrapFieldNumber = 2; + private bool hardBootstrap_; + /// + /// Whether hard boot strapping should be used or not. If true, will only use + /// one class favored by model. Othewise, will use all predicted class + /// probabilities. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool HardBootstrap { + get { return hardBootstrap_; } + set { + hardBootstrap_ = value; + } + } + + /// Field number for the "anchorwise_output" field. + public const int AnchorwiseOutputFieldNumber = 3; + private bool anchorwiseOutput_; + /// + /// DEPRECATED, do not use. + /// Output loss per anchor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AnchorwiseOutput { + get { return anchorwiseOutput_; } + set { + anchorwiseOutput_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BootstrappedSigmoidClassificationLoss); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BootstrappedSigmoidClassificationLoss other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Alpha, other.Alpha)) return false; + if (HardBootstrap != other.HardBootstrap) return false; + if (AnchorwiseOutput != other.AnchorwiseOutput) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Alpha != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Alpha); + if (HardBootstrap != false) hash ^= HardBootstrap.GetHashCode(); + if (AnchorwiseOutput != false) hash ^= AnchorwiseOutput.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Alpha != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Alpha); + } + if (HardBootstrap != false) { + output.WriteRawTag(16); + output.WriteBool(HardBootstrap); + } + if (AnchorwiseOutput != false) { + output.WriteRawTag(24); + output.WriteBool(AnchorwiseOutput); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Alpha != 0F) { + size += 1 + 4; + } + if (HardBootstrap != false) { + size += 1 + 1; + } + if (AnchorwiseOutput != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BootstrappedSigmoidClassificationLoss other) { + if (other == null) { + return; + } + if (other.Alpha != 0F) { + Alpha = other.Alpha; + } + if (other.HardBootstrap != false) { + HardBootstrap = other.HardBootstrap; + } + if (other.AnchorwiseOutput != false) { + AnchorwiseOutput = other.AnchorwiseOutput; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Alpha = input.ReadFloat(); + break; + } + case 16: { + HardBootstrap = input.ReadBool(); + break; + } + case 24: { + AnchorwiseOutput = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Configuration for hard example miner. + /// + public sealed partial class HardExampleMiner : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new HardExampleMiner()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public HardExampleMiner() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public HardExampleMiner(HardExampleMiner other) : this() { + numHardExamples_ = other.numHardExamples_; + iouThreshold_ = other.iouThreshold_; + lossType_ = other.lossType_; + maxNegativesPerPositive_ = other.maxNegativesPerPositive_; + minNegativesPerImage_ = other.minNegativesPerImage_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public HardExampleMiner Clone() { + return new HardExampleMiner(this); + } + + /// Field number for the "num_hard_examples" field. + public const int NumHardExamplesFieldNumber = 1; + private int numHardExamples_; + /// + /// Maximum number of hard examples to be selected per image (prior to + /// enforcing max negative to positive ratio constraint). If set to 0, + /// all examples obtained after NMS are considered. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumHardExamples { + get { return numHardExamples_; } + set { + numHardExamples_ = value; + } + } + + /// Field number for the "iou_threshold" field. + public const int IouThresholdFieldNumber = 2; + private float iouThreshold_; + /// + /// Minimum intersection over union for an example to be discarded during NMS. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float IouThreshold { + get { return iouThreshold_; } + set { + iouThreshold_ = value; + } + } + + /// Field number for the "loss_type" field. + public const int LossTypeFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner.Types.LossType lossType_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner.Types.LossType LossType { + get { return lossType_; } + set { + lossType_ = value; + } + } + + /// Field number for the "max_negatives_per_positive" field. + public const int MaxNegativesPerPositiveFieldNumber = 4; + private int maxNegativesPerPositive_; + /// + /// Maximum number of negatives to retain for each positive anchor. If + /// num_negatives_per_positive is 0 no prespecified negative:positive ratio is + /// enforced. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxNegativesPerPositive { + get { return maxNegativesPerPositive_; } + set { + maxNegativesPerPositive_ = value; + } + } + + /// Field number for the "min_negatives_per_image" field. + public const int MinNegativesPerImageFieldNumber = 5; + private int minNegativesPerImage_; + /// + /// Minimum number of negative anchors to sample for a given image. Setting + /// this to a positive number samples negatives in an image without any + /// positive anchors and thus not bias the model towards having at least one + /// detection per image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinNegativesPerImage { + get { return minNegativesPerImage_; } + set { + minNegativesPerImage_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as HardExampleMiner); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(HardExampleMiner other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NumHardExamples != other.NumHardExamples) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(IouThreshold, other.IouThreshold)) return false; + if (LossType != other.LossType) return false; + if (MaxNegativesPerPositive != other.MaxNegativesPerPositive) return false; + if (MinNegativesPerImage != other.MinNegativesPerImage) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NumHardExamples != 0) hash ^= NumHardExamples.GetHashCode(); + if (IouThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(IouThreshold); + if (LossType != 0) hash ^= LossType.GetHashCode(); + if (MaxNegativesPerPositive != 0) hash ^= MaxNegativesPerPositive.GetHashCode(); + if (MinNegativesPerImage != 0) hash ^= MinNegativesPerImage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NumHardExamples != 0) { + output.WriteRawTag(8); + output.WriteInt32(NumHardExamples); + } + if (IouThreshold != 0F) { + output.WriteRawTag(21); + output.WriteFloat(IouThreshold); + } + if (LossType != 0) { + output.WriteRawTag(24); + output.WriteEnum((int) LossType); + } + if (MaxNegativesPerPositive != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxNegativesPerPositive); + } + if (MinNegativesPerImage != 0) { + output.WriteRawTag(40); + output.WriteInt32(MinNegativesPerImage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NumHardExamples != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumHardExamples); + } + if (IouThreshold != 0F) { + size += 1 + 4; + } + if (LossType != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LossType); + } + if (MaxNegativesPerPositive != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxNegativesPerPositive); + } + if (MinNegativesPerImage != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinNegativesPerImage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(HardExampleMiner other) { + if (other == null) { + return; + } + if (other.NumHardExamples != 0) { + NumHardExamples = other.NumHardExamples; + } + if (other.IouThreshold != 0F) { + IouThreshold = other.IouThreshold; + } + if (other.LossType != 0) { + LossType = other.LossType; + } + if (other.MaxNegativesPerPositive != 0) { + MaxNegativesPerPositive = other.MaxNegativesPerPositive; + } + if (other.MinNegativesPerImage != 0) { + MinNegativesPerImage = other.MinNegativesPerImage; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NumHardExamples = input.ReadInt32(); + break; + } + case 21: { + IouThreshold = input.ReadFloat(); + break; + } + case 24: { + lossType_ = (global::Tensorflow.Models.ObjectDetection.Protos.HardExampleMiner.Types.LossType) input.ReadEnum(); + break; + } + case 32: { + MaxNegativesPerPositive = input.ReadInt32(); + break; + } + case 40: { + MinNegativesPerImage = input.ReadInt32(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the HardExampleMiner message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Whether to use classification losses ('cls', default), localization losses + /// ('loc') or both losses ('both'). In the case of 'both', cls_loss_weight and + /// loc_loss_weight are used to compute weighted sum of the two losses. + /// + public enum LossType { + [pbr::OriginalName("BOTH")] Both = 0, + [pbr::OriginalName("CLASSIFICATION")] Classification = 1, + [pbr::OriginalName("LOCALIZATION")] Localization = 2, + } + + } + #endregion + + } + + /// + /// Configuration for random example sampler. + /// + public sealed partial class RandomExampleSampler : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomExampleSampler()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomExampleSampler() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomExampleSampler(RandomExampleSampler other) : this() { + positiveSampleFraction_ = other.positiveSampleFraction_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomExampleSampler Clone() { + return new RandomExampleSampler(this); + } + + /// Field number for the "positive_sample_fraction" field. + public const int PositiveSampleFractionFieldNumber = 1; + private float positiveSampleFraction_; + /// + /// The desired fraction of positive samples in batch when applying random + /// example sampling. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float PositiveSampleFraction { + get { return positiveSampleFraction_; } + set { + positiveSampleFraction_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomExampleSampler); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomExampleSampler other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PositiveSampleFraction, other.PositiveSampleFraction)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (PositiveSampleFraction != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PositiveSampleFraction); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (PositiveSampleFraction != 0F) { + output.WriteRawTag(13); + output.WriteFloat(PositiveSampleFraction); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (PositiveSampleFraction != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomExampleSampler other) { + if (other == null) { + return; + } + if (other.PositiveSampleFraction != 0F) { + PositiveSampleFraction = other.PositiveSampleFraction; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + PositiveSampleFraction = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Matcher.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Matcher.cs new file mode 100644 index 00000000..72aa0188 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Matcher.cs @@ -0,0 +1,257 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/matcher.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/matcher.proto + public static partial class MatcherReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/matcher.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MatcherReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiVvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9tYXRjaGVyLnByb3RvEhdvYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcxosb2JqZWN0X2RldGVjdGlvbi9wcm90b3Mv", + "YXJnbWF4X21hdGNoZXIucHJvdG8aL29iamVjdF9kZXRlY3Rpb24vcHJvdG9z", + "L2JpcGFydGl0ZV9tYXRjaGVyLnByb3RvIqQBCgdNYXRjaGVyEkAKDmFyZ21h", + "eF9tYXRjaGVyGAEgASgLMiYub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuQXJn", + "TWF4TWF0Y2hlckgAEkYKEWJpcGFydGl0ZV9tYXRjaGVyGAIgASgLMikub2Jq", + "ZWN0X2RldGVjdGlvbi5wcm90b3MuQmlwYXJ0aXRlTWF0Y2hlckgAQg8KDW1h", + "dGNoZXJfb25lb2ZiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.ArgmaxMatcherReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcherReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Matcher), global::Tensorflow.Models.ObjectDetection.Protos.Matcher.Parser, new[]{ "ArgmaxMatcher", "BipartiteMatcher" }, new[]{ "MatcherOneof" }, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for the matcher to be used in the object detection + /// pipeline. See core/matcher.py for details. + /// + public sealed partial class Matcher : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Matcher()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.MatcherReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Matcher() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Matcher(Matcher other) : this() { + switch (other.MatcherOneofCase) { + case MatcherOneofOneofCase.ArgmaxMatcher: + ArgmaxMatcher = other.ArgmaxMatcher.Clone(); + break; + case MatcherOneofOneofCase.BipartiteMatcher: + BipartiteMatcher = other.BipartiteMatcher.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Matcher Clone() { + return new Matcher(this); + } + + /// Field number for the "argmax_matcher" field. + public const int ArgmaxMatcherFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher ArgmaxMatcher { + get { return matcherOneofCase_ == MatcherOneofOneofCase.ArgmaxMatcher ? (global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher) matcherOneof_ : null; } + set { + matcherOneof_ = value; + matcherOneofCase_ = value == null ? MatcherOneofOneofCase.None : MatcherOneofOneofCase.ArgmaxMatcher; + } + } + + /// Field number for the "bipartite_matcher" field. + public const int BipartiteMatcherFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher BipartiteMatcher { + get { return matcherOneofCase_ == MatcherOneofOneofCase.BipartiteMatcher ? (global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher) matcherOneof_ : null; } + set { + matcherOneof_ = value; + matcherOneofCase_ = value == null ? MatcherOneofOneofCase.None : MatcherOneofOneofCase.BipartiteMatcher; + } + } + + private object matcherOneof_; + /// Enum of possible cases for the "matcher_oneof" oneof. + public enum MatcherOneofOneofCase { + None = 0, + ArgmaxMatcher = 1, + BipartiteMatcher = 2, + } + private MatcherOneofOneofCase matcherOneofCase_ = MatcherOneofOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MatcherOneofOneofCase MatcherOneofCase { + get { return matcherOneofCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearMatcherOneof() { + matcherOneofCase_ = MatcherOneofOneofCase.None; + matcherOneof_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Matcher); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Matcher other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ArgmaxMatcher, other.ArgmaxMatcher)) return false; + if (!object.Equals(BipartiteMatcher, other.BipartiteMatcher)) return false; + if (MatcherOneofCase != other.MatcherOneofCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (matcherOneofCase_ == MatcherOneofOneofCase.ArgmaxMatcher) hash ^= ArgmaxMatcher.GetHashCode(); + if (matcherOneofCase_ == MatcherOneofOneofCase.BipartiteMatcher) hash ^= BipartiteMatcher.GetHashCode(); + hash ^= (int) matcherOneofCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (matcherOneofCase_ == MatcherOneofOneofCase.ArgmaxMatcher) { + output.WriteRawTag(10); + output.WriteMessage(ArgmaxMatcher); + } + if (matcherOneofCase_ == MatcherOneofOneofCase.BipartiteMatcher) { + output.WriteRawTag(18); + output.WriteMessage(BipartiteMatcher); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (matcherOneofCase_ == MatcherOneofOneofCase.ArgmaxMatcher) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ArgmaxMatcher); + } + if (matcherOneofCase_ == MatcherOneofOneofCase.BipartiteMatcher) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BipartiteMatcher); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Matcher other) { + if (other == null) { + return; + } + switch (other.MatcherOneofCase) { + case MatcherOneofOneofCase.ArgmaxMatcher: + if (ArgmaxMatcher == null) { + ArgmaxMatcher = new global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher(); + } + ArgmaxMatcher.MergeFrom(other.ArgmaxMatcher); + break; + case MatcherOneofOneofCase.BipartiteMatcher: + if (BipartiteMatcher == null) { + BipartiteMatcher = new global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher(); + } + BipartiteMatcher.MergeFrom(other.BipartiteMatcher); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ArgMaxMatcher(); + if (matcherOneofCase_ == MatcherOneofOneofCase.ArgmaxMatcher) { + subBuilder.MergeFrom(ArgmaxMatcher); + } + input.ReadMessage(subBuilder); + ArgmaxMatcher = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.BipartiteMatcher(); + if (matcherOneofCase_ == MatcherOneofOneofCase.BipartiteMatcher) { + subBuilder.MergeFrom(BipartiteMatcher); + } + input.ReadMessage(subBuilder); + BipartiteMatcher = subBuilder; + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/MeanStddevBoxCoder.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/MeanStddevBoxCoder.cs new file mode 100644 index 00000000..a5cf55a7 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/MeanStddevBoxCoder.cs @@ -0,0 +1,180 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/mean_stddev_box_coder.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/mean_stddev_box_coder.proto + public static partial class MeanStddevBoxCoderReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/mean_stddev_box_coder.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MeanStddevBoxCoderReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9tZWFuX3N0ZGRldl9ib3hfY29k", + "ZXIucHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zIiQKEk1lYW5TdGRk", + "ZXZCb3hDb2RlchIOCgZzdGRkZXYYASABKAJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder), global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoder.Parser, new[]{ "Stddev" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for MeanStddevBoxCoder. See + /// box_coders/mean_stddev_box_coder.py for details. + /// + public sealed partial class MeanStddevBoxCoder : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MeanStddevBoxCoder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.MeanStddevBoxCoderReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MeanStddevBoxCoder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MeanStddevBoxCoder(MeanStddevBoxCoder other) : this() { + stddev_ = other.stddev_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MeanStddevBoxCoder Clone() { + return new MeanStddevBoxCoder(this); + } + + /// Field number for the "stddev" field. + public const int StddevFieldNumber = 1; + private float stddev_; + /// + /// The standard deviation used to encode and decode boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Stddev { + get { return stddev_; } + set { + stddev_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MeanStddevBoxCoder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MeanStddevBoxCoder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Stddev, other.Stddev)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Stddev != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Stddev); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Stddev != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Stddev); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Stddev != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MeanStddevBoxCoder other) { + if (other == null) { + return; + } + if (other.Stddev != 0F) { + Stddev = other.Stddev; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Stddev = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Model.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Model.cs new file mode 100644 index 00000000..11001ac6 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Model.cs @@ -0,0 +1,255 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/model.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/model.proto + public static partial class ModelReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/model.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ModelReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9tb2RlbC5wcm90bxIXb2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MaKW9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL2Zh", + "c3Rlcl9yY25uLnByb3RvGiFvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9zc2Qu", + "cHJvdG8iggEKDkRldGVjdGlvbk1vZGVsEjoKC2Zhc3Rlcl9yY25uGAEgASgL", + "MiMub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuRmFzdGVyUmNubkgAEisKA3Nz", + "ZBgCIAEoCzIcLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlNzZEgAQgcKBW1v", + "ZGVsYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnnReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.SsdReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.DetectionModel), global::Tensorflow.Models.ObjectDetection.Protos.DetectionModel.Parser, new[]{ "FasterRcnn", "Ssd" }, new[]{ "Model" }, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Top level configuration for DetectionModels. + /// + public sealed partial class DetectionModel : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DetectionModel()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ModelReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DetectionModel() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DetectionModel(DetectionModel other) : this() { + switch (other.ModelCase) { + case ModelOneofCase.FasterRcnn: + FasterRcnn = other.FasterRcnn.Clone(); + break; + case ModelOneofCase.Ssd: + Ssd = other.Ssd.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DetectionModel Clone() { + return new DetectionModel(this); + } + + /// Field number for the "faster_rcnn" field. + public const int FasterRcnnFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn FasterRcnn { + get { return modelCase_ == ModelOneofCase.FasterRcnn ? (global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn) model_ : null; } + set { + model_ = value; + modelCase_ = value == null ? ModelOneofCase.None : ModelOneofCase.FasterRcnn; + } + } + + /// Field number for the "ssd" field. + public const int SsdFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Ssd Ssd { + get { return modelCase_ == ModelOneofCase.Ssd ? (global::Tensorflow.Models.ObjectDetection.Protos.Ssd) model_ : null; } + set { + model_ = value; + modelCase_ = value == null ? ModelOneofCase.None : ModelOneofCase.Ssd; + } + } + + private object model_; + /// Enum of possible cases for the "model" oneof. + public enum ModelOneofCase { + None = 0, + FasterRcnn = 1, + Ssd = 2, + } + private ModelOneofCase modelCase_ = ModelOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ModelOneofCase ModelCase { + get { return modelCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearModel() { + modelCase_ = ModelOneofCase.None; + model_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DetectionModel); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DetectionModel other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(FasterRcnn, other.FasterRcnn)) return false; + if (!object.Equals(Ssd, other.Ssd)) return false; + if (ModelCase != other.ModelCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (modelCase_ == ModelOneofCase.FasterRcnn) hash ^= FasterRcnn.GetHashCode(); + if (modelCase_ == ModelOneofCase.Ssd) hash ^= Ssd.GetHashCode(); + hash ^= (int) modelCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (modelCase_ == ModelOneofCase.FasterRcnn) { + output.WriteRawTag(10); + output.WriteMessage(FasterRcnn); + } + if (modelCase_ == ModelOneofCase.Ssd) { + output.WriteRawTag(18); + output.WriteMessage(Ssd); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (modelCase_ == ModelOneofCase.FasterRcnn) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FasterRcnn); + } + if (modelCase_ == ModelOneofCase.Ssd) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Ssd); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DetectionModel other) { + if (other == null) { + return; + } + switch (other.ModelCase) { + case ModelOneofCase.FasterRcnn: + if (FasterRcnn == null) { + FasterRcnn = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn(); + } + FasterRcnn.MergeFrom(other.FasterRcnn); + break; + case ModelOneofCase.Ssd: + if (Ssd == null) { + Ssd = new global::Tensorflow.Models.ObjectDetection.Protos.Ssd(); + } + Ssd.MergeFrom(other.Ssd); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.FasterRcnn(); + if (modelCase_ == ModelOneofCase.FasterRcnn) { + subBuilder.MergeFrom(FasterRcnn); + } + input.ReadMessage(subBuilder); + FasterRcnn = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.Ssd subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.Ssd(); + if (modelCase_ == ModelOneofCase.Ssd) { + subBuilder.MergeFrom(Ssd); + } + input.ReadMessage(subBuilder); + Ssd = subBuilder; + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/MultiscaleAnchorGenerator.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/MultiscaleAnchorGenerator.cs new file mode 100644 index 00000000..b4d577fc --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/MultiscaleAnchorGenerator.cs @@ -0,0 +1,332 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/multiscale_anchor_generator.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/multiscale_anchor_generator.proto + public static partial class MultiscaleAnchorGeneratorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/multiscale_anchor_generator.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static MultiscaleAnchorGeneratorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjlvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9tdWx0aXNjYWxlX2FuY2hvcl9n", + "ZW5lcmF0b3IucHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zIqgBChlN", + "dWx0aXNjYWxlQW5jaG9yR2VuZXJhdG9yEhEKCW1pbl9sZXZlbBgBIAEoBRIR", + "CgltYXhfbGV2ZWwYAiABKAUSFAoMYW5jaG9yX3NjYWxlGAMgASgCEhUKDWFz", + "cGVjdF9yYXRpb3MYBCADKAISGQoRc2NhbGVzX3Blcl9vY3RhdmUYBSABKAUS", + "HQoVbm9ybWFsaXplX2Nvb3JkaW5hdGVzGAYgASgIYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator), global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGenerator.Parser, new[]{ "MinLevel", "MaxLevel", "AnchorScale", "AspectRatios", "ScalesPerOctave", "NormalizeCoordinates" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for RetinaNet anchor generator described in + /// https://arxiv.org/abs/1708.02002. See + /// anchor_generators/multiscale_grid_anchor_generator.py for details. + /// + public sealed partial class MultiscaleAnchorGenerator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MultiscaleAnchorGenerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.MultiscaleAnchorGeneratorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MultiscaleAnchorGenerator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MultiscaleAnchorGenerator(MultiscaleAnchorGenerator other) : this() { + minLevel_ = other.minLevel_; + maxLevel_ = other.maxLevel_; + anchorScale_ = other.anchorScale_; + aspectRatios_ = other.aspectRatios_.Clone(); + scalesPerOctave_ = other.scalesPerOctave_; + normalizeCoordinates_ = other.normalizeCoordinates_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MultiscaleAnchorGenerator Clone() { + return new MultiscaleAnchorGenerator(this); + } + + /// Field number for the "min_level" field. + public const int MinLevelFieldNumber = 1; + private int minLevel_; + /// + /// minimum level in feature pyramid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinLevel { + get { return minLevel_; } + set { + minLevel_ = value; + } + } + + /// Field number for the "max_level" field. + public const int MaxLevelFieldNumber = 2; + private int maxLevel_; + /// + /// maximum level in feature pyramid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxLevel { + get { return maxLevel_; } + set { + maxLevel_ = value; + } + } + + /// Field number for the "anchor_scale" field. + public const int AnchorScaleFieldNumber = 3; + private float anchorScale_; + /// + /// Scale of anchor to feature stride + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float AnchorScale { + get { return anchorScale_; } + set { + anchorScale_ = value; + } + } + + /// Field number for the "aspect_ratios" field. + public const int AspectRatiosFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_aspectRatios_codec + = pb::FieldCodec.ForFloat(34); + private readonly pbc::RepeatedField aspectRatios_ = new pbc::RepeatedField(); + /// + /// Aspect ratios for anchors at each grid point. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField AspectRatios { + get { return aspectRatios_; } + } + + /// Field number for the "scales_per_octave" field. + public const int ScalesPerOctaveFieldNumber = 5; + private int scalesPerOctave_; + /// + /// Number of intermediate scale each scale octave + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ScalesPerOctave { + get { return scalesPerOctave_; } + set { + scalesPerOctave_ = value; + } + } + + /// Field number for the "normalize_coordinates" field. + public const int NormalizeCoordinatesFieldNumber = 6; + private bool normalizeCoordinates_; + /// + /// Whether to produce anchors in normalized coordinates. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool NormalizeCoordinates { + get { return normalizeCoordinates_; } + set { + normalizeCoordinates_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MultiscaleAnchorGenerator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MultiscaleAnchorGenerator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MinLevel != other.MinLevel) return false; + if (MaxLevel != other.MaxLevel) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(AnchorScale, other.AnchorScale)) return false; + if(!aspectRatios_.Equals(other.aspectRatios_)) return false; + if (ScalesPerOctave != other.ScalesPerOctave) return false; + if (NormalizeCoordinates != other.NormalizeCoordinates) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinLevel != 0) hash ^= MinLevel.GetHashCode(); + if (MaxLevel != 0) hash ^= MaxLevel.GetHashCode(); + if (AnchorScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AnchorScale); + hash ^= aspectRatios_.GetHashCode(); + if (ScalesPerOctave != 0) hash ^= ScalesPerOctave.GetHashCode(); + if (NormalizeCoordinates != false) hash ^= NormalizeCoordinates.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinLevel != 0) { + output.WriteRawTag(8); + output.WriteInt32(MinLevel); + } + if (MaxLevel != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxLevel); + } + if (AnchorScale != 0F) { + output.WriteRawTag(29); + output.WriteFloat(AnchorScale); + } + aspectRatios_.WriteTo(output, _repeated_aspectRatios_codec); + if (ScalesPerOctave != 0) { + output.WriteRawTag(40); + output.WriteInt32(ScalesPerOctave); + } + if (NormalizeCoordinates != false) { + output.WriteRawTag(48); + output.WriteBool(NormalizeCoordinates); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinLevel); + } + if (MaxLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxLevel); + } + if (AnchorScale != 0F) { + size += 1 + 4; + } + size += aspectRatios_.CalculateSize(_repeated_aspectRatios_codec); + if (ScalesPerOctave != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ScalesPerOctave); + } + if (NormalizeCoordinates != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MultiscaleAnchorGenerator other) { + if (other == null) { + return; + } + if (other.MinLevel != 0) { + MinLevel = other.MinLevel; + } + if (other.MaxLevel != 0) { + MaxLevel = other.MaxLevel; + } + if (other.AnchorScale != 0F) { + AnchorScale = other.AnchorScale; + } + aspectRatios_.Add(other.aspectRatios_); + if (other.ScalesPerOctave != 0) { + ScalesPerOctave = other.ScalesPerOctave; + } + if (other.NormalizeCoordinates != false) { + NormalizeCoordinates = other.NormalizeCoordinates; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MinLevel = input.ReadInt32(); + break; + } + case 16: { + MaxLevel = input.ReadInt32(); + break; + } + case 29: { + AnchorScale = input.ReadFloat(); + break; + } + case 34: + case 37: { + aspectRatios_.AddEntriesFrom(input, _repeated_aspectRatios_codec); + break; + } + case 40: { + ScalesPerOctave = input.ReadInt32(); + break; + } + case 48: { + NormalizeCoordinates = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Optimizer.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Optimizer.cs new file mode 100644 index 00000000..c71adfa8 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Optimizer.cs @@ -0,0 +1,2231 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/optimizer.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/optimizer.proto + public static partial class OptimizerReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/optimizer.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static OptimizerReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CidvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9vcHRpbWl6ZXIucHJvdG8SF29i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zIqcCCglPcHRpbWl6ZXISRwoScm1zX3By", + "b3Bfb3B0aW1pemVyGAEgASgLMikub2JqZWN0X2RldGVjdGlvbi5wcm90b3Mu", + "Uk1TUHJvcE9wdGltaXplckgAEkgKEm1vbWVudHVtX29wdGltaXplchgCIAEo", + "CzIqLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLk1vbWVudHVtT3B0aW1pemVy", + "SAASQAoOYWRhbV9vcHRpbWl6ZXIYAyABKAsyJi5vYmplY3RfZGV0ZWN0aW9u", + "LnByb3Rvcy5BZGFtT3B0aW1pemVySAASGgoSdXNlX21vdmluZ19hdmVyYWdl", + "GAQgASgIEhwKFG1vdmluZ19hdmVyYWdlX2RlY2F5GAUgASgCQgsKCW9wdGlt", + "aXplciKSAQoQUk1TUHJvcE9wdGltaXplchI8Cg1sZWFybmluZ19yYXRlGAEg", + "ASgLMiUub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuTGVhcm5pbmdSYXRlEiAK", + "GG1vbWVudHVtX29wdGltaXplcl92YWx1ZRgCIAEoAhINCgVkZWNheRgDIAEo", + "AhIPCgdlcHNpbG9uGAQgASgCInMKEU1vbWVudHVtT3B0aW1pemVyEjwKDWxl", + "YXJuaW5nX3JhdGUYASABKAsyJS5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5M", + "ZWFybmluZ1JhdGUSIAoYbW9tZW50dW1fb3B0aW1pemVyX3ZhbHVlGAIgASgC", + "Ik0KDUFkYW1PcHRpbWl6ZXISPAoNbGVhcm5pbmdfcmF0ZRgBIAEoCzIlLm9i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zLkxlYXJuaW5nUmF0ZSKAAwoMTGVhcm5p", + "bmdSYXRlEk8KFmNvbnN0YW50X2xlYXJuaW5nX3JhdGUYASABKAsyLS5vYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcy5Db25zdGFudExlYXJuaW5nUmF0ZUgAEmAK", + "H2V4cG9uZW50aWFsX2RlY2F5X2xlYXJuaW5nX3JhdGUYAiABKAsyNS5vYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcy5FeHBvbmVudGlhbERlY2F5TGVhcm5pbmdS", + "YXRlSAASVAoZbWFudWFsX3N0ZXBfbGVhcm5pbmdfcmF0ZRgDIAEoCzIvLm9i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zLk1hbnVhbFN0ZXBMZWFybmluZ1JhdGVI", + "ABJWChpjb3NpbmVfZGVjYXlfbGVhcm5pbmdfcmF0ZRgEIAEoCzIwLm9iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zLkNvc2luZURlY2F5TGVhcm5pbmdSYXRlSABC", + "DwoNbGVhcm5pbmdfcmF0ZSItChRDb25zdGFudExlYXJuaW5nUmF0ZRIVCg1s", + "ZWFybmluZ19yYXRlGAEgASgCIsoBChxFeHBvbmVudGlhbERlY2F5TGVhcm5p", + "bmdSYXRlEh0KFWluaXRpYWxfbGVhcm5pbmdfcmF0ZRgBIAEoAhITCgtkZWNh", + "eV9zdGVwcxgCIAEoDRIUCgxkZWNheV9mYWN0b3IYAyABKAISEQoJc3RhaXJj", + "YXNlGAQgASgIEhwKFGJ1cm5pbl9sZWFybmluZ19yYXRlGAUgASgCEhQKDGJ1", + "cm5pbl9zdGVwcxgGIAEoDRIZChFtaW5fbGVhcm5pbmdfcmF0ZRgHIAEoAiLc", + "AQoWTWFudWFsU3RlcExlYXJuaW5nUmF0ZRIdChVpbml0aWFsX2xlYXJuaW5n", + "X3JhdGUYASABKAISVgoIc2NoZWR1bGUYAiADKAsyRC5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5NYW51YWxTdGVwTGVhcm5pbmdSYXRlLkxlYXJuaW5nUmF0", + "ZVNjaGVkdWxlEg4KBndhcm11cBgDIAEoCBo7ChRMZWFybmluZ1JhdGVTY2hl", + "ZHVsZRIMCgRzdGVwGAEgASgNEhUKDWxlYXJuaW5nX3JhdGUYAiABKAIinAEK", + "F0Nvc2luZURlY2F5TGVhcm5pbmdSYXRlEhoKEmxlYXJuaW5nX3JhdGVfYmFz", + "ZRgBIAEoAhITCgt0b3RhbF9zdGVwcxgCIAEoDRIcChR3YXJtdXBfbGVhcm5p", + "bmdfcmF0ZRgDIAEoAhIUCgx3YXJtdXBfc3RlcHMYBCABKA0SHAoUaG9sZF9i", + "YXNlX3JhdGVfc3RlcHMYBSABKA1iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Optimizer), global::Tensorflow.Models.ObjectDetection.Protos.Optimizer.Parser, new[]{ "RmsPropOptimizer", "MomentumOptimizer", "AdamOptimizer", "UseMovingAverage", "MovingAverageDecay" }, new[]{ "Optimizer" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer), global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer.Parser, new[]{ "LearningRate", "MomentumOptimizerValue", "Decay", "Epsilon" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer), global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer.Parser, new[]{ "LearningRate", "MomentumOptimizerValue" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer), global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer.Parser, new[]{ "LearningRate" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.LearningRate), global::Tensorflow.Models.ObjectDetection.Protos.LearningRate.Parser, new[]{ "ConstantLearningRate", "ExponentialDecayLearningRate", "ManualStepLearningRate", "CosineDecayLearningRate" }, new[]{ "LearningRate" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate), global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate.Parser, new[]{ "LearningRate" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate), global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate.Parser, new[]{ "InitialLearningRate", "DecaySteps", "DecayFactor", "Staircase", "BurninLearningRate", "BurninSteps", "MinLearningRate" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate), global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate.Parser, new[]{ "InitialLearningRate", "Schedule", "Warmup" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate.Types.LearningRateSchedule), global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate.Types.LearningRateSchedule.Parser, new[]{ "Step", "LearningRate" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate), global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate.Parser, new[]{ "LearningRateBase", "TotalSteps", "WarmupLearningRate", "WarmupSteps", "HoldBaseRateSteps" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Top level optimizer message. + /// + public sealed partial class Optimizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Optimizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Optimizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Optimizer(Optimizer other) : this() { + useMovingAverage_ = other.useMovingAverage_; + movingAverageDecay_ = other.movingAverageDecay_; + switch (other.OptimizerCase) { + case OptimizerOneofCase.RmsPropOptimizer: + RmsPropOptimizer = other.RmsPropOptimizer.Clone(); + break; + case OptimizerOneofCase.MomentumOptimizer: + MomentumOptimizer = other.MomentumOptimizer.Clone(); + break; + case OptimizerOneofCase.AdamOptimizer: + AdamOptimizer = other.AdamOptimizer.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Optimizer Clone() { + return new Optimizer(this); + } + + /// Field number for the "rms_prop_optimizer" field. + public const int RmsPropOptimizerFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer RmsPropOptimizer { + get { return optimizerCase_ == OptimizerOneofCase.RmsPropOptimizer ? (global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer) optimizer_ : null; } + set { + optimizer_ = value; + optimizerCase_ = value == null ? OptimizerOneofCase.None : OptimizerOneofCase.RmsPropOptimizer; + } + } + + /// Field number for the "momentum_optimizer" field. + public const int MomentumOptimizerFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer MomentumOptimizer { + get { return optimizerCase_ == OptimizerOneofCase.MomentumOptimizer ? (global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer) optimizer_ : null; } + set { + optimizer_ = value; + optimizerCase_ = value == null ? OptimizerOneofCase.None : OptimizerOneofCase.MomentumOptimizer; + } + } + + /// Field number for the "adam_optimizer" field. + public const int AdamOptimizerFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer AdamOptimizer { + get { return optimizerCase_ == OptimizerOneofCase.AdamOptimizer ? (global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer) optimizer_ : null; } + set { + optimizer_ = value; + optimizerCase_ = value == null ? OptimizerOneofCase.None : OptimizerOneofCase.AdamOptimizer; + } + } + + /// Field number for the "use_moving_average" field. + public const int UseMovingAverageFieldNumber = 4; + private bool useMovingAverage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMovingAverage { + get { return useMovingAverage_; } + set { + useMovingAverage_ = value; + } + } + + /// Field number for the "moving_average_decay" field. + public const int MovingAverageDecayFieldNumber = 5; + private float movingAverageDecay_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MovingAverageDecay { + get { return movingAverageDecay_; } + set { + movingAverageDecay_ = value; + } + } + + private object optimizer_; + /// Enum of possible cases for the "optimizer" oneof. + public enum OptimizerOneofCase { + None = 0, + RmsPropOptimizer = 1, + MomentumOptimizer = 2, + AdamOptimizer = 3, + } + private OptimizerOneofCase optimizerCase_ = OptimizerOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public OptimizerOneofCase OptimizerCase { + get { return optimizerCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearOptimizer() { + optimizerCase_ = OptimizerOneofCase.None; + optimizer_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Optimizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Optimizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(RmsPropOptimizer, other.RmsPropOptimizer)) return false; + if (!object.Equals(MomentumOptimizer, other.MomentumOptimizer)) return false; + if (!object.Equals(AdamOptimizer, other.AdamOptimizer)) return false; + if (UseMovingAverage != other.UseMovingAverage) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MovingAverageDecay, other.MovingAverageDecay)) return false; + if (OptimizerCase != other.OptimizerCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (optimizerCase_ == OptimizerOneofCase.RmsPropOptimizer) hash ^= RmsPropOptimizer.GetHashCode(); + if (optimizerCase_ == OptimizerOneofCase.MomentumOptimizer) hash ^= MomentumOptimizer.GetHashCode(); + if (optimizerCase_ == OptimizerOneofCase.AdamOptimizer) hash ^= AdamOptimizer.GetHashCode(); + if (UseMovingAverage != false) hash ^= UseMovingAverage.GetHashCode(); + if (MovingAverageDecay != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MovingAverageDecay); + hash ^= (int) optimizerCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (optimizerCase_ == OptimizerOneofCase.RmsPropOptimizer) { + output.WriteRawTag(10); + output.WriteMessage(RmsPropOptimizer); + } + if (optimizerCase_ == OptimizerOneofCase.MomentumOptimizer) { + output.WriteRawTag(18); + output.WriteMessage(MomentumOptimizer); + } + if (optimizerCase_ == OptimizerOneofCase.AdamOptimizer) { + output.WriteRawTag(26); + output.WriteMessage(AdamOptimizer); + } + if (UseMovingAverage != false) { + output.WriteRawTag(32); + output.WriteBool(UseMovingAverage); + } + if (MovingAverageDecay != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MovingAverageDecay); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (optimizerCase_ == OptimizerOneofCase.RmsPropOptimizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RmsPropOptimizer); + } + if (optimizerCase_ == OptimizerOneofCase.MomentumOptimizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MomentumOptimizer); + } + if (optimizerCase_ == OptimizerOneofCase.AdamOptimizer) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AdamOptimizer); + } + if (UseMovingAverage != false) { + size += 1 + 1; + } + if (MovingAverageDecay != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Optimizer other) { + if (other == null) { + return; + } + if (other.UseMovingAverage != false) { + UseMovingAverage = other.UseMovingAverage; + } + if (other.MovingAverageDecay != 0F) { + MovingAverageDecay = other.MovingAverageDecay; + } + switch (other.OptimizerCase) { + case OptimizerOneofCase.RmsPropOptimizer: + if (RmsPropOptimizer == null) { + RmsPropOptimizer = new global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer(); + } + RmsPropOptimizer.MergeFrom(other.RmsPropOptimizer); + break; + case OptimizerOneofCase.MomentumOptimizer: + if (MomentumOptimizer == null) { + MomentumOptimizer = new global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer(); + } + MomentumOptimizer.MergeFrom(other.MomentumOptimizer); + break; + case OptimizerOneofCase.AdamOptimizer: + if (AdamOptimizer == null) { + AdamOptimizer = new global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer(); + } + AdamOptimizer.MergeFrom(other.AdamOptimizer); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RMSPropOptimizer(); + if (optimizerCase_ == OptimizerOneofCase.RmsPropOptimizer) { + subBuilder.MergeFrom(RmsPropOptimizer); + } + input.ReadMessage(subBuilder); + RmsPropOptimizer = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.MomentumOptimizer(); + if (optimizerCase_ == OptimizerOneofCase.MomentumOptimizer) { + subBuilder.MergeFrom(MomentumOptimizer); + } + input.ReadMessage(subBuilder); + MomentumOptimizer = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.AdamOptimizer(); + if (optimizerCase_ == OptimizerOneofCase.AdamOptimizer) { + subBuilder.MergeFrom(AdamOptimizer); + } + input.ReadMessage(subBuilder); + AdamOptimizer = subBuilder; + break; + } + case 32: { + UseMovingAverage = input.ReadBool(); + break; + } + case 45: { + MovingAverageDecay = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration message for the RMSPropOptimizer + /// See: https://www.tensorflow.org/api_docs/python/tf/train/RMSPropOptimizer + /// + public sealed partial class RMSPropOptimizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RMSPropOptimizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RMSPropOptimizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RMSPropOptimizer(RMSPropOptimizer other) : this() { + learningRate_ = other.learningRate_ != null ? other.learningRate_.Clone() : null; + momentumOptimizerValue_ = other.momentumOptimizerValue_; + decay_ = other.decay_; + epsilon_ = other.epsilon_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RMSPropOptimizer Clone() { + return new RMSPropOptimizer(this); + } + + /// Field number for the "learning_rate" field. + public const int LearningRateFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.LearningRate learningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.LearningRate LearningRate { + get { return learningRate_; } + set { + learningRate_ = value; + } + } + + /// Field number for the "momentum_optimizer_value" field. + public const int MomentumOptimizerValueFieldNumber = 2; + private float momentumOptimizerValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MomentumOptimizerValue { + get { return momentumOptimizerValue_; } + set { + momentumOptimizerValue_ = value; + } + } + + /// Field number for the "decay" field. + public const int DecayFieldNumber = 3; + private float decay_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Decay { + get { return decay_; } + set { + decay_ = value; + } + } + + /// Field number for the "epsilon" field. + public const int EpsilonFieldNumber = 4; + private float epsilon_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Epsilon { + get { return epsilon_; } + set { + epsilon_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RMSPropOptimizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RMSPropOptimizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(LearningRate, other.LearningRate)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MomentumOptimizerValue, other.MomentumOptimizerValue)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Decay, other.Decay)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Epsilon, other.Epsilon)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (learningRate_ != null) hash ^= LearningRate.GetHashCode(); + if (MomentumOptimizerValue != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MomentumOptimizerValue); + if (Decay != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Decay); + if (Epsilon != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Epsilon); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (learningRate_ != null) { + output.WriteRawTag(10); + output.WriteMessage(LearningRate); + } + if (MomentumOptimizerValue != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MomentumOptimizerValue); + } + if (Decay != 0F) { + output.WriteRawTag(29); + output.WriteFloat(Decay); + } + if (Epsilon != 0F) { + output.WriteRawTag(37); + output.WriteFloat(Epsilon); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (learningRate_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LearningRate); + } + if (MomentumOptimizerValue != 0F) { + size += 1 + 4; + } + if (Decay != 0F) { + size += 1 + 4; + } + if (Epsilon != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RMSPropOptimizer other) { + if (other == null) { + return; + } + if (other.learningRate_ != null) { + if (learningRate_ == null) { + learningRate_ = new global::Tensorflow.Models.ObjectDetection.Protos.LearningRate(); + } + LearningRate.MergeFrom(other.LearningRate); + } + if (other.MomentumOptimizerValue != 0F) { + MomentumOptimizerValue = other.MomentumOptimizerValue; + } + if (other.Decay != 0F) { + Decay = other.Decay; + } + if (other.Epsilon != 0F) { + Epsilon = other.Epsilon; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (learningRate_ == null) { + learningRate_ = new global::Tensorflow.Models.ObjectDetection.Protos.LearningRate(); + } + input.ReadMessage(learningRate_); + break; + } + case 21: { + MomentumOptimizerValue = input.ReadFloat(); + break; + } + case 29: { + Decay = input.ReadFloat(); + break; + } + case 37: { + Epsilon = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration message for the MomentumOptimizer + /// See: https://www.tensorflow.org/api_docs/python/tf/train/MomentumOptimizer + /// + public sealed partial class MomentumOptimizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MomentumOptimizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MomentumOptimizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MomentumOptimizer(MomentumOptimizer other) : this() { + learningRate_ = other.learningRate_ != null ? other.learningRate_.Clone() : null; + momentumOptimizerValue_ = other.momentumOptimizerValue_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MomentumOptimizer Clone() { + return new MomentumOptimizer(this); + } + + /// Field number for the "learning_rate" field. + public const int LearningRateFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.LearningRate learningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.LearningRate LearningRate { + get { return learningRate_; } + set { + learningRate_ = value; + } + } + + /// Field number for the "momentum_optimizer_value" field. + public const int MomentumOptimizerValueFieldNumber = 2; + private float momentumOptimizerValue_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MomentumOptimizerValue { + get { return momentumOptimizerValue_; } + set { + momentumOptimizerValue_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MomentumOptimizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MomentumOptimizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(LearningRate, other.LearningRate)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MomentumOptimizerValue, other.MomentumOptimizerValue)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (learningRate_ != null) hash ^= LearningRate.GetHashCode(); + if (MomentumOptimizerValue != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MomentumOptimizerValue); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (learningRate_ != null) { + output.WriteRawTag(10); + output.WriteMessage(LearningRate); + } + if (MomentumOptimizerValue != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MomentumOptimizerValue); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (learningRate_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LearningRate); + } + if (MomentumOptimizerValue != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MomentumOptimizer other) { + if (other == null) { + return; + } + if (other.learningRate_ != null) { + if (learningRate_ == null) { + learningRate_ = new global::Tensorflow.Models.ObjectDetection.Protos.LearningRate(); + } + LearningRate.MergeFrom(other.LearningRate); + } + if (other.MomentumOptimizerValue != 0F) { + MomentumOptimizerValue = other.MomentumOptimizerValue; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (learningRate_ == null) { + learningRate_ = new global::Tensorflow.Models.ObjectDetection.Protos.LearningRate(); + } + input.ReadMessage(learningRate_); + break; + } + case 21: { + MomentumOptimizerValue = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration message for the AdamOptimizer + /// See: https://www.tensorflow.org/api_docs/python/tf/train/AdamOptimizer + /// + public sealed partial class AdamOptimizer : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AdamOptimizer()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AdamOptimizer() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AdamOptimizer(AdamOptimizer other) : this() { + learningRate_ = other.learningRate_ != null ? other.learningRate_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AdamOptimizer Clone() { + return new AdamOptimizer(this); + } + + /// Field number for the "learning_rate" field. + public const int LearningRateFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.LearningRate learningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.LearningRate LearningRate { + get { return learningRate_; } + set { + learningRate_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as AdamOptimizer); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(AdamOptimizer other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(LearningRate, other.LearningRate)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (learningRate_ != null) hash ^= LearningRate.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (learningRate_ != null) { + output.WriteRawTag(10); + output.WriteMessage(LearningRate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (learningRate_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(LearningRate); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(AdamOptimizer other) { + if (other == null) { + return; + } + if (other.learningRate_ != null) { + if (learningRate_ == null) { + learningRate_ = new global::Tensorflow.Models.ObjectDetection.Protos.LearningRate(); + } + LearningRate.MergeFrom(other.LearningRate); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (learningRate_ == null) { + learningRate_ = new global::Tensorflow.Models.ObjectDetection.Protos.LearningRate(); + } + input.ReadMessage(learningRate_); + break; + } + } + } + } + + } + + /// + /// Configuration message for optimizer learning rate. + /// + public sealed partial class LearningRate : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LearningRate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRate(LearningRate other) : this() { + switch (other.LearningRateCase) { + case LearningRateOneofCase.ConstantLearningRate: + ConstantLearningRate = other.ConstantLearningRate.Clone(); + break; + case LearningRateOneofCase.ExponentialDecayLearningRate: + ExponentialDecayLearningRate = other.ExponentialDecayLearningRate.Clone(); + break; + case LearningRateOneofCase.ManualStepLearningRate: + ManualStepLearningRate = other.ManualStepLearningRate.Clone(); + break; + case LearningRateOneofCase.CosineDecayLearningRate: + CosineDecayLearningRate = other.CosineDecayLearningRate.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRate Clone() { + return new LearningRate(this); + } + + /// Field number for the "constant_learning_rate" field. + public const int ConstantLearningRateFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate ConstantLearningRate { + get { return learningRateCase_ == LearningRateOneofCase.ConstantLearningRate ? (global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate) learningRate_ : null; } + set { + learningRate_ = value; + learningRateCase_ = value == null ? LearningRateOneofCase.None : LearningRateOneofCase.ConstantLearningRate; + } + } + + /// Field number for the "exponential_decay_learning_rate" field. + public const int ExponentialDecayLearningRateFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate ExponentialDecayLearningRate { + get { return learningRateCase_ == LearningRateOneofCase.ExponentialDecayLearningRate ? (global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate) learningRate_ : null; } + set { + learningRate_ = value; + learningRateCase_ = value == null ? LearningRateOneofCase.None : LearningRateOneofCase.ExponentialDecayLearningRate; + } + } + + /// Field number for the "manual_step_learning_rate" field. + public const int ManualStepLearningRateFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate ManualStepLearningRate { + get { return learningRateCase_ == LearningRateOneofCase.ManualStepLearningRate ? (global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate) learningRate_ : null; } + set { + learningRate_ = value; + learningRateCase_ = value == null ? LearningRateOneofCase.None : LearningRateOneofCase.ManualStepLearningRate; + } + } + + /// Field number for the "cosine_decay_learning_rate" field. + public const int CosineDecayLearningRateFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate CosineDecayLearningRate { + get { return learningRateCase_ == LearningRateOneofCase.CosineDecayLearningRate ? (global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate) learningRate_ : null; } + set { + learningRate_ = value; + learningRateCase_ = value == null ? LearningRateOneofCase.None : LearningRateOneofCase.CosineDecayLearningRate; + } + } + + private object learningRate_; + /// Enum of possible cases for the "learning_rate" oneof. + public enum LearningRateOneofCase { + None = 0, + ConstantLearningRate = 1, + ExponentialDecayLearningRate = 2, + ManualStepLearningRate = 3, + CosineDecayLearningRate = 4, + } + private LearningRateOneofCase learningRateCase_ = LearningRateOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRateOneofCase LearningRateCase { + get { return learningRateCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearLearningRate() { + learningRateCase_ = LearningRateOneofCase.None; + learningRate_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as LearningRate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(LearningRate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ConstantLearningRate, other.ConstantLearningRate)) return false; + if (!object.Equals(ExponentialDecayLearningRate, other.ExponentialDecayLearningRate)) return false; + if (!object.Equals(ManualStepLearningRate, other.ManualStepLearningRate)) return false; + if (!object.Equals(CosineDecayLearningRate, other.CosineDecayLearningRate)) return false; + if (LearningRateCase != other.LearningRateCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (learningRateCase_ == LearningRateOneofCase.ConstantLearningRate) hash ^= ConstantLearningRate.GetHashCode(); + if (learningRateCase_ == LearningRateOneofCase.ExponentialDecayLearningRate) hash ^= ExponentialDecayLearningRate.GetHashCode(); + if (learningRateCase_ == LearningRateOneofCase.ManualStepLearningRate) hash ^= ManualStepLearningRate.GetHashCode(); + if (learningRateCase_ == LearningRateOneofCase.CosineDecayLearningRate) hash ^= CosineDecayLearningRate.GetHashCode(); + hash ^= (int) learningRateCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (learningRateCase_ == LearningRateOneofCase.ConstantLearningRate) { + output.WriteRawTag(10); + output.WriteMessage(ConstantLearningRate); + } + if (learningRateCase_ == LearningRateOneofCase.ExponentialDecayLearningRate) { + output.WriteRawTag(18); + output.WriteMessage(ExponentialDecayLearningRate); + } + if (learningRateCase_ == LearningRateOneofCase.ManualStepLearningRate) { + output.WriteRawTag(26); + output.WriteMessage(ManualStepLearningRate); + } + if (learningRateCase_ == LearningRateOneofCase.CosineDecayLearningRate) { + output.WriteRawTag(34); + output.WriteMessage(CosineDecayLearningRate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (learningRateCase_ == LearningRateOneofCase.ConstantLearningRate) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConstantLearningRate); + } + if (learningRateCase_ == LearningRateOneofCase.ExponentialDecayLearningRate) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExponentialDecayLearningRate); + } + if (learningRateCase_ == LearningRateOneofCase.ManualStepLearningRate) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ManualStepLearningRate); + } + if (learningRateCase_ == LearningRateOneofCase.CosineDecayLearningRate) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CosineDecayLearningRate); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(LearningRate other) { + if (other == null) { + return; + } + switch (other.LearningRateCase) { + case LearningRateOneofCase.ConstantLearningRate: + if (ConstantLearningRate == null) { + ConstantLearningRate = new global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate(); + } + ConstantLearningRate.MergeFrom(other.ConstantLearningRate); + break; + case LearningRateOneofCase.ExponentialDecayLearningRate: + if (ExponentialDecayLearningRate == null) { + ExponentialDecayLearningRate = new global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate(); + } + ExponentialDecayLearningRate.MergeFrom(other.ExponentialDecayLearningRate); + break; + case LearningRateOneofCase.ManualStepLearningRate: + if (ManualStepLearningRate == null) { + ManualStepLearningRate = new global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate(); + } + ManualStepLearningRate.MergeFrom(other.ManualStepLearningRate); + break; + case LearningRateOneofCase.CosineDecayLearningRate: + if (CosineDecayLearningRate == null) { + CosineDecayLearningRate = new global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate(); + } + CosineDecayLearningRate.MergeFrom(other.CosineDecayLearningRate); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ConstantLearningRate(); + if (learningRateCase_ == LearningRateOneofCase.ConstantLearningRate) { + subBuilder.MergeFrom(ConstantLearningRate); + } + input.ReadMessage(subBuilder); + ConstantLearningRate = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ExponentialDecayLearningRate(); + if (learningRateCase_ == LearningRateOneofCase.ExponentialDecayLearningRate) { + subBuilder.MergeFrom(ExponentialDecayLearningRate); + } + input.ReadMessage(subBuilder); + ExponentialDecayLearningRate = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate(); + if (learningRateCase_ == LearningRateOneofCase.ManualStepLearningRate) { + subBuilder.MergeFrom(ManualStepLearningRate); + } + input.ReadMessage(subBuilder); + ManualStepLearningRate = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.CosineDecayLearningRate(); + if (learningRateCase_ == LearningRateOneofCase.CosineDecayLearningRate) { + subBuilder.MergeFrom(CosineDecayLearningRate); + } + input.ReadMessage(subBuilder); + CosineDecayLearningRate = subBuilder; + break; + } + } + } + } + + } + + /// + /// Configuration message for a constant learning rate. + /// + public sealed partial class ConstantLearningRate : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConstantLearningRate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConstantLearningRate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConstantLearningRate(ConstantLearningRate other) : this() { + learningRate_ = other.learningRate_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConstantLearningRate Clone() { + return new ConstantLearningRate(this); + } + + /// Field number for the "learning_rate" field. + public const int LearningRateFieldNumber = 1; + private float learningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LearningRate { + get { return learningRate_; } + set { + learningRate_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ConstantLearningRate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ConstantLearningRate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LearningRate, other.LearningRate)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (LearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LearningRate); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (LearningRate != 0F) { + output.WriteRawTag(13); + output.WriteFloat(LearningRate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (LearningRate != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ConstantLearningRate other) { + if (other == null) { + return; + } + if (other.LearningRate != 0F) { + LearningRate = other.LearningRate; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + LearningRate = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration message for an exponentially decaying learning rate. + /// See https://www.tensorflow.org/versions/master/api_docs/python/train/ \ + /// decaying_the_learning_rate#exponential_decay + /// + public sealed partial class ExponentialDecayLearningRate : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ExponentialDecayLearningRate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExponentialDecayLearningRate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExponentialDecayLearningRate(ExponentialDecayLearningRate other) : this() { + initialLearningRate_ = other.initialLearningRate_; + decaySteps_ = other.decaySteps_; + decayFactor_ = other.decayFactor_; + staircase_ = other.staircase_; + burninLearningRate_ = other.burninLearningRate_; + burninSteps_ = other.burninSteps_; + minLearningRate_ = other.minLearningRate_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ExponentialDecayLearningRate Clone() { + return new ExponentialDecayLearningRate(this); + } + + /// Field number for the "initial_learning_rate" field. + public const int InitialLearningRateFieldNumber = 1; + private float initialLearningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float InitialLearningRate { + get { return initialLearningRate_; } + set { + initialLearningRate_ = value; + } + } + + /// Field number for the "decay_steps" field. + public const int DecayStepsFieldNumber = 2; + private uint decaySteps_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint DecaySteps { + get { return decaySteps_; } + set { + decaySteps_ = value; + } + } + + /// Field number for the "decay_factor" field. + public const int DecayFactorFieldNumber = 3; + private float decayFactor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DecayFactor { + get { return decayFactor_; } + set { + decayFactor_ = value; + } + } + + /// Field number for the "staircase" field. + public const int StaircaseFieldNumber = 4; + private bool staircase_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Staircase { + get { return staircase_; } + set { + staircase_ = value; + } + } + + /// Field number for the "burnin_learning_rate" field. + public const int BurninLearningRateFieldNumber = 5; + private float burninLearningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float BurninLearningRate { + get { return burninLearningRate_; } + set { + burninLearningRate_ = value; + } + } + + /// Field number for the "burnin_steps" field. + public const int BurninStepsFieldNumber = 6; + private uint burninSteps_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint BurninSteps { + get { return burninSteps_; } + set { + burninSteps_ = value; + } + } + + /// Field number for the "min_learning_rate" field. + public const int MinLearningRateFieldNumber = 7; + private float minLearningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinLearningRate { + get { return minLearningRate_; } + set { + minLearningRate_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ExponentialDecayLearningRate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ExponentialDecayLearningRate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(InitialLearningRate, other.InitialLearningRate)) return false; + if (DecaySteps != other.DecaySteps) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DecayFactor, other.DecayFactor)) return false; + if (Staircase != other.Staircase) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BurninLearningRate, other.BurninLearningRate)) return false; + if (BurninSteps != other.BurninSteps) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinLearningRate, other.MinLearningRate)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (InitialLearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(InitialLearningRate); + if (DecaySteps != 0) hash ^= DecaySteps.GetHashCode(); + if (DecayFactor != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DecayFactor); + if (Staircase != false) hash ^= Staircase.GetHashCode(); + if (BurninLearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BurninLearningRate); + if (BurninSteps != 0) hash ^= BurninSteps.GetHashCode(); + if (MinLearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinLearningRate); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (InitialLearningRate != 0F) { + output.WriteRawTag(13); + output.WriteFloat(InitialLearningRate); + } + if (DecaySteps != 0) { + output.WriteRawTag(16); + output.WriteUInt32(DecaySteps); + } + if (DecayFactor != 0F) { + output.WriteRawTag(29); + output.WriteFloat(DecayFactor); + } + if (Staircase != false) { + output.WriteRawTag(32); + output.WriteBool(Staircase); + } + if (BurninLearningRate != 0F) { + output.WriteRawTag(45); + output.WriteFloat(BurninLearningRate); + } + if (BurninSteps != 0) { + output.WriteRawTag(48); + output.WriteUInt32(BurninSteps); + } + if (MinLearningRate != 0F) { + output.WriteRawTag(61); + output.WriteFloat(MinLearningRate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (InitialLearningRate != 0F) { + size += 1 + 4; + } + if (DecaySteps != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DecaySteps); + } + if (DecayFactor != 0F) { + size += 1 + 4; + } + if (Staircase != false) { + size += 1 + 1; + } + if (BurninLearningRate != 0F) { + size += 1 + 4; + } + if (BurninSteps != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(BurninSteps); + } + if (MinLearningRate != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ExponentialDecayLearningRate other) { + if (other == null) { + return; + } + if (other.InitialLearningRate != 0F) { + InitialLearningRate = other.InitialLearningRate; + } + if (other.DecaySteps != 0) { + DecaySteps = other.DecaySteps; + } + if (other.DecayFactor != 0F) { + DecayFactor = other.DecayFactor; + } + if (other.Staircase != false) { + Staircase = other.Staircase; + } + if (other.BurninLearningRate != 0F) { + BurninLearningRate = other.BurninLearningRate; + } + if (other.BurninSteps != 0) { + BurninSteps = other.BurninSteps; + } + if (other.MinLearningRate != 0F) { + MinLearningRate = other.MinLearningRate; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + InitialLearningRate = input.ReadFloat(); + break; + } + case 16: { + DecaySteps = input.ReadUInt32(); + break; + } + case 29: { + DecayFactor = input.ReadFloat(); + break; + } + case 32: { + Staircase = input.ReadBool(); + break; + } + case 45: { + BurninLearningRate = input.ReadFloat(); + break; + } + case 48: { + BurninSteps = input.ReadUInt32(); + break; + } + case 61: { + MinLearningRate = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration message for a manually defined learning rate schedule. + /// + public sealed partial class ManualStepLearningRate : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManualStepLearningRate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ManualStepLearningRate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ManualStepLearningRate(ManualStepLearningRate other) : this() { + initialLearningRate_ = other.initialLearningRate_; + schedule_ = other.schedule_.Clone(); + warmup_ = other.warmup_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ManualStepLearningRate Clone() { + return new ManualStepLearningRate(this); + } + + /// Field number for the "initial_learning_rate" field. + public const int InitialLearningRateFieldNumber = 1; + private float initialLearningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float InitialLearningRate { + get { return initialLearningRate_; } + set { + initialLearningRate_ = value; + } + } + + /// Field number for the "schedule" field. + public const int ScheduleFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_schedule_codec + = pb::FieldCodec.ForMessage(18, global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate.Types.LearningRateSchedule.Parser); + private readonly pbc::RepeatedField schedule_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Schedule { + get { return schedule_; } + } + + /// Field number for the "warmup" field. + public const int WarmupFieldNumber = 3; + private bool warmup_; + /// + /// Whether to linearly interpolate learning rates for steps in + /// [0, schedule[0].step]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Warmup { + get { return warmup_; } + set { + warmup_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ManualStepLearningRate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ManualStepLearningRate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(InitialLearningRate, other.InitialLearningRate)) return false; + if(!schedule_.Equals(other.schedule_)) return false; + if (Warmup != other.Warmup) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (InitialLearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(InitialLearningRate); + hash ^= schedule_.GetHashCode(); + if (Warmup != false) hash ^= Warmup.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (InitialLearningRate != 0F) { + output.WriteRawTag(13); + output.WriteFloat(InitialLearningRate); + } + schedule_.WriteTo(output, _repeated_schedule_codec); + if (Warmup != false) { + output.WriteRawTag(24); + output.WriteBool(Warmup); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (InitialLearningRate != 0F) { + size += 1 + 4; + } + size += schedule_.CalculateSize(_repeated_schedule_codec); + if (Warmup != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ManualStepLearningRate other) { + if (other == null) { + return; + } + if (other.InitialLearningRate != 0F) { + InitialLearningRate = other.InitialLearningRate; + } + schedule_.Add(other.schedule_); + if (other.Warmup != false) { + Warmup = other.Warmup; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + InitialLearningRate = input.ReadFloat(); + break; + } + case 18: { + schedule_.AddEntriesFrom(input, _repeated_schedule_codec); + break; + } + case 24: { + Warmup = input.ReadBool(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the ManualStepLearningRate message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public sealed partial class LearningRateSchedule : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LearningRateSchedule()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.ManualStepLearningRate.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRateSchedule() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRateSchedule(LearningRateSchedule other) : this() { + step_ = other.step_; + learningRate_ = other.learningRate_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public LearningRateSchedule Clone() { + return new LearningRateSchedule(this); + } + + /// Field number for the "step" field. + public const int StepFieldNumber = 1; + private uint step_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint Step { + get { return step_; } + set { + step_ = value; + } + } + + /// Field number for the "learning_rate" field. + public const int LearningRateFieldNumber = 2; + private float learningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LearningRate { + get { return learningRate_; } + set { + learningRate_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as LearningRateSchedule); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(LearningRateSchedule other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Step != other.Step) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LearningRate, other.LearningRate)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Step != 0) hash ^= Step.GetHashCode(); + if (LearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LearningRate); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Step != 0) { + output.WriteRawTag(8); + output.WriteUInt32(Step); + } + if (LearningRate != 0F) { + output.WriteRawTag(21); + output.WriteFloat(LearningRate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Step != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Step); + } + if (LearningRate != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(LearningRateSchedule other) { + if (other == null) { + return; + } + if (other.Step != 0) { + Step = other.Step; + } + if (other.LearningRate != 0F) { + LearningRate = other.LearningRate; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Step = input.ReadUInt32(); + break; + } + case 21: { + LearningRate = input.ReadFloat(); + break; + } + } + } + } + + } + + } + #endregion + + } + + /// + /// Configuration message for a cosine decaying learning rate as defined in + /// object_detection/utils/learning_schedules.py + /// + public sealed partial class CosineDecayLearningRate : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CosineDecayLearningRate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CosineDecayLearningRate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CosineDecayLearningRate(CosineDecayLearningRate other) : this() { + learningRateBase_ = other.learningRateBase_; + totalSteps_ = other.totalSteps_; + warmupLearningRate_ = other.warmupLearningRate_; + warmupSteps_ = other.warmupSteps_; + holdBaseRateSteps_ = other.holdBaseRateSteps_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public CosineDecayLearningRate Clone() { + return new CosineDecayLearningRate(this); + } + + /// Field number for the "learning_rate_base" field. + public const int LearningRateBaseFieldNumber = 1; + private float learningRateBase_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LearningRateBase { + get { return learningRateBase_; } + set { + learningRateBase_ = value; + } + } + + /// Field number for the "total_steps" field. + public const int TotalStepsFieldNumber = 2; + private uint totalSteps_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint TotalSteps { + get { return totalSteps_; } + set { + totalSteps_ = value; + } + } + + /// Field number for the "warmup_learning_rate" field. + public const int WarmupLearningRateFieldNumber = 3; + private float warmupLearningRate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float WarmupLearningRate { + get { return warmupLearningRate_; } + set { + warmupLearningRate_ = value; + } + } + + /// Field number for the "warmup_steps" field. + public const int WarmupStepsFieldNumber = 4; + private uint warmupSteps_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint WarmupSteps { + get { return warmupSteps_; } + set { + warmupSteps_ = value; + } + } + + /// Field number for the "hold_base_rate_steps" field. + public const int HoldBaseRateStepsFieldNumber = 5; + private uint holdBaseRateSteps_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint HoldBaseRateSteps { + get { return holdBaseRateSteps_; } + set { + holdBaseRateSteps_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as CosineDecayLearningRate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(CosineDecayLearningRate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LearningRateBase, other.LearningRateBase)) return false; + if (TotalSteps != other.TotalSteps) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(WarmupLearningRate, other.WarmupLearningRate)) return false; + if (WarmupSteps != other.WarmupSteps) return false; + if (HoldBaseRateSteps != other.HoldBaseRateSteps) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (LearningRateBase != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LearningRateBase); + if (TotalSteps != 0) hash ^= TotalSteps.GetHashCode(); + if (WarmupLearningRate != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(WarmupLearningRate); + if (WarmupSteps != 0) hash ^= WarmupSteps.GetHashCode(); + if (HoldBaseRateSteps != 0) hash ^= HoldBaseRateSteps.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (LearningRateBase != 0F) { + output.WriteRawTag(13); + output.WriteFloat(LearningRateBase); + } + if (TotalSteps != 0) { + output.WriteRawTag(16); + output.WriteUInt32(TotalSteps); + } + if (WarmupLearningRate != 0F) { + output.WriteRawTag(29); + output.WriteFloat(WarmupLearningRate); + } + if (WarmupSteps != 0) { + output.WriteRawTag(32); + output.WriteUInt32(WarmupSteps); + } + if (HoldBaseRateSteps != 0) { + output.WriteRawTag(40); + output.WriteUInt32(HoldBaseRateSteps); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (LearningRateBase != 0F) { + size += 1 + 4; + } + if (TotalSteps != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TotalSteps); + } + if (WarmupLearningRate != 0F) { + size += 1 + 4; + } + if (WarmupSteps != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(WarmupSteps); + } + if (HoldBaseRateSteps != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(HoldBaseRateSteps); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(CosineDecayLearningRate other) { + if (other == null) { + return; + } + if (other.LearningRateBase != 0F) { + LearningRateBase = other.LearningRateBase; + } + if (other.TotalSteps != 0) { + TotalSteps = other.TotalSteps; + } + if (other.WarmupLearningRate != 0F) { + WarmupLearningRate = other.WarmupLearningRate; + } + if (other.WarmupSteps != 0) { + WarmupSteps = other.WarmupSteps; + } + if (other.HoldBaseRateSteps != 0) { + HoldBaseRateSteps = other.HoldBaseRateSteps; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + LearningRateBase = input.ReadFloat(); + break; + } + case 16: { + TotalSteps = input.ReadUInt32(); + break; + } + case 29: { + WarmupLearningRate = input.ReadFloat(); + break; + } + case 32: { + WarmupSteps = input.ReadUInt32(); + break; + } + case 40: { + HoldBaseRateSteps = input.ReadUInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Pipeline.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Pipeline.cs new file mode 100644 index 00000000..d5bef7cb --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Pipeline.cs @@ -0,0 +1,352 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/pipeline.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/pipeline.proto + public static partial class PipelineReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/pipeline.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static PipelineReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiZvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9waXBlbGluZS5wcm90bxIXb2Jq", + "ZWN0X2RldGVjdGlvbi5wcm90b3MaIm9iamVjdF9kZXRlY3Rpb24vcHJvdG9z", + "L2V2YWwucHJvdG8aLG9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL2dyYXBoX3Jl", + "d3JpdGVyLnByb3RvGipvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9pbnB1dF9y", + "ZWFkZXIucHJvdG8aI29iamVjdF9kZXRlY3Rpb24vcHJvdG9zL21vZGVsLnBy", + "b3RvGiNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy90cmFpbi5wcm90byKKAwoX", + "VHJhaW5FdmFsUGlwZWxpbmVDb25maWcSNgoFbW9kZWwYASABKAsyJy5vYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcy5EZXRlY3Rpb25Nb2RlbBI6Cgx0cmFpbl9j", + "b25maWcYAiABKAsyJC5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5UcmFpbkNv", + "bmZpZxJAChJ0cmFpbl9pbnB1dF9yZWFkZXIYAyABKAsyJC5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5JbnB1dFJlYWRlchI4CgtldmFsX2NvbmZpZxgEIAEo", + "CzIjLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLkV2YWxDb25maWcSPwoRZXZh", + "bF9pbnB1dF9yZWFkZXIYBSADKAsyJC5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5JbnB1dFJlYWRlchI+Cg5ncmFwaF9yZXdyaXRlchgGIAEoCzImLm9iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zLkdyYXBoUmV3cml0ZXJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.EvalReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriterReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.InputReaderReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.ModelReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.TrainReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.TrainEvalPipelineConfig), global::Tensorflow.Models.ObjectDetection.Protos.TrainEvalPipelineConfig.Parser, new[]{ "Model", "TrainConfig", "TrainInputReader", "EvalConfig", "EvalInputReader", "GraphRewriter" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Convenience message for configuring a training and eval pipeline. Allows all + /// of the pipeline parameters to be configured from one file. + /// Next id: 7 + /// + public sealed partial class TrainEvalPipelineConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrainEvalPipelineConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PipelineReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrainEvalPipelineConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrainEvalPipelineConfig(TrainEvalPipelineConfig other) : this() { + model_ = other.model_ != null ? other.model_.Clone() : null; + trainConfig_ = other.trainConfig_ != null ? other.trainConfig_.Clone() : null; + trainInputReader_ = other.trainInputReader_ != null ? other.trainInputReader_.Clone() : null; + evalConfig_ = other.evalConfig_ != null ? other.evalConfig_.Clone() : null; + evalInputReader_ = other.evalInputReader_.Clone(); + graphRewriter_ = other.graphRewriter_ != null ? other.graphRewriter_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrainEvalPipelineConfig Clone() { + return new TrainEvalPipelineConfig(this); + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.DetectionModel model_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.DetectionModel Model { + get { return model_; } + set { + model_ = value; + } + } + + /// Field number for the "train_config" field. + public const int TrainConfigFieldNumber = 2; + private global::Tensorflow.Models.ObjectDetection.Protos.TrainConfig trainConfig_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.TrainConfig TrainConfig { + get { return trainConfig_; } + set { + trainConfig_ = value; + } + } + + /// Field number for the "train_input_reader" field. + public const int TrainInputReaderFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.InputReader trainInputReader_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.InputReader TrainInputReader { + get { return trainInputReader_; } + set { + trainInputReader_ = value; + } + } + + /// Field number for the "eval_config" field. + public const int EvalConfigFieldNumber = 4; + private global::Tensorflow.Models.ObjectDetection.Protos.EvalConfig evalConfig_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.EvalConfig EvalConfig { + get { return evalConfig_; } + set { + evalConfig_ = value; + } + } + + /// Field number for the "eval_input_reader" field. + public const int EvalInputReaderFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_evalInputReader_codec + = pb::FieldCodec.ForMessage(42, global::Tensorflow.Models.ObjectDetection.Protos.InputReader.Parser); + private readonly pbc::RepeatedField evalInputReader_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField EvalInputReader { + get { return evalInputReader_; } + } + + /// Field number for the "graph_rewriter" field. + public const int GraphRewriterFieldNumber = 6; + private global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriter graphRewriter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriter GraphRewriter { + get { return graphRewriter_; } + set { + graphRewriter_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TrainEvalPipelineConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TrainEvalPipelineConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Model, other.Model)) return false; + if (!object.Equals(TrainConfig, other.TrainConfig)) return false; + if (!object.Equals(TrainInputReader, other.TrainInputReader)) return false; + if (!object.Equals(EvalConfig, other.EvalConfig)) return false; + if(!evalInputReader_.Equals(other.evalInputReader_)) return false; + if (!object.Equals(GraphRewriter, other.GraphRewriter)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (model_ != null) hash ^= Model.GetHashCode(); + if (trainConfig_ != null) hash ^= TrainConfig.GetHashCode(); + if (trainInputReader_ != null) hash ^= TrainInputReader.GetHashCode(); + if (evalConfig_ != null) hash ^= EvalConfig.GetHashCode(); + hash ^= evalInputReader_.GetHashCode(); + if (graphRewriter_ != null) hash ^= GraphRewriter.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (model_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Model); + } + if (trainConfig_ != null) { + output.WriteRawTag(18); + output.WriteMessage(TrainConfig); + } + if (trainInputReader_ != null) { + output.WriteRawTag(26); + output.WriteMessage(TrainInputReader); + } + if (evalConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(EvalConfig); + } + evalInputReader_.WriteTo(output, _repeated_evalInputReader_codec); + if (graphRewriter_ != null) { + output.WriteRawTag(50); + output.WriteMessage(GraphRewriter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (model_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Model); + } + if (trainConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TrainConfig); + } + if (trainInputReader_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TrainInputReader); + } + if (evalConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EvalConfig); + } + size += evalInputReader_.CalculateSize(_repeated_evalInputReader_codec); + if (graphRewriter_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GraphRewriter); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TrainEvalPipelineConfig other) { + if (other == null) { + return; + } + if (other.model_ != null) { + if (model_ == null) { + model_ = new global::Tensorflow.Models.ObjectDetection.Protos.DetectionModel(); + } + Model.MergeFrom(other.Model); + } + if (other.trainConfig_ != null) { + if (trainConfig_ == null) { + trainConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.TrainConfig(); + } + TrainConfig.MergeFrom(other.TrainConfig); + } + if (other.trainInputReader_ != null) { + if (trainInputReader_ == null) { + trainInputReader_ = new global::Tensorflow.Models.ObjectDetection.Protos.InputReader(); + } + TrainInputReader.MergeFrom(other.TrainInputReader); + } + if (other.evalConfig_ != null) { + if (evalConfig_ == null) { + evalConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.EvalConfig(); + } + EvalConfig.MergeFrom(other.EvalConfig); + } + evalInputReader_.Add(other.evalInputReader_); + if (other.graphRewriter_ != null) { + if (graphRewriter_ == null) { + graphRewriter_ = new global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriter(); + } + GraphRewriter.MergeFrom(other.GraphRewriter); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (model_ == null) { + model_ = new global::Tensorflow.Models.ObjectDetection.Protos.DetectionModel(); + } + input.ReadMessage(model_); + break; + } + case 18: { + if (trainConfig_ == null) { + trainConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.TrainConfig(); + } + input.ReadMessage(trainConfig_); + break; + } + case 26: { + if (trainInputReader_ == null) { + trainInputReader_ = new global::Tensorflow.Models.ObjectDetection.Protos.InputReader(); + } + input.ReadMessage(trainInputReader_); + break; + } + case 34: { + if (evalConfig_ == null) { + evalConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.EvalConfig(); + } + input.ReadMessage(evalConfig_); + break; + } + case 42: { + evalInputReader_.AddEntriesFrom(input, _repeated_evalInputReader_codec); + break; + } + case 50: { + if (graphRewriter_ == null) { + graphRewriter_ = new global::Tensorflow.Models.ObjectDetection.Protos.GraphRewriter(); + } + input.ReadMessage(graphRewriter_); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/PostProcessing.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/PostProcessing.cs new file mode 100644 index 00000000..708364dd --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/PostProcessing.cs @@ -0,0 +1,685 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/post_processing.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/post_processing.proto + public static partial class PostProcessingReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/post_processing.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static PostProcessingReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci1vYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9wb3N0X3Byb2Nlc3NpbmcucHJv", + "dG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zGilvYmplY3RfZGV0ZWN0aW9u", + "L3Byb3Rvcy9jYWxpYnJhdGlvbi5wcm90byL+AQoWQmF0Y2hOb25NYXhTdXBw", + "cmVzc2lvbhIXCg9zY29yZV90aHJlc2hvbGQYASABKAISFQoNaW91X3RocmVz", + "aG9sZBgCIAEoAhIgChhtYXhfZGV0ZWN0aW9uc19wZXJfY2xhc3MYAyABKAUS", + "HAoUbWF4X3RvdGFsX2RldGVjdGlvbnMYBSABKAUSGQoRdXNlX3N0YXRpY19z", + "aGFwZXMYBiABKAgSHgoWdXNlX2NsYXNzX2Fnbm9zdGljX25tcxgHIAEoCBIh", + "ChltYXhfY2xhc3Nlc19wZXJfZGV0ZWN0aW9uGAggASgFEhYKDnNvZnRfbm1z", + "X3NpZ21hGAkgASgCIswCCg5Qb3N0UHJvY2Vzc2luZxJSChliYXRjaF9ub25f", + "bWF4X3N1cHByZXNzaW9uGAEgASgLMi8ub2JqZWN0X2RldGVjdGlvbi5wcm90", + "b3MuQmF0Y2hOb25NYXhTdXBwcmVzc2lvbhJPCg9zY29yZV9jb252ZXJ0ZXIY", + "AiABKA4yNi5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5Qb3N0UHJvY2Vzc2lu", + "Zy5TY29yZUNvbnZlcnRlchITCgtsb2dpdF9zY2FsZRgDIAEoAhJGChJjYWxp", + "YnJhdGlvbl9jb25maWcYBCABKAsyKi5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5DYWxpYnJhdGlvbkNvbmZpZyI4Cg5TY29yZUNvbnZlcnRlchIMCghJREVO", + "VElUWRAAEgsKB1NJR01PSUQQARILCgdTT0ZUTUFYEAJiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.CalibrationReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression), global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression.Parser, new[]{ "ScoreThreshold", "IouThreshold", "MaxDetectionsPerClass", "MaxTotalDetections", "UseStaticShapes", "UseClassAgnosticNms", "MaxClassesPerDetection", "SoftNmsSigma" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing), global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Parser, new[]{ "BatchNonMaxSuppression", "ScoreConverter", "LogitScale", "CalibrationConfig" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Types.ScoreConverter) }, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for non-max-suppression operation on a batch of + /// detections. + /// + public sealed partial class BatchNonMaxSuppression : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BatchNonMaxSuppression()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PostProcessingReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BatchNonMaxSuppression() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BatchNonMaxSuppression(BatchNonMaxSuppression other) : this() { + scoreThreshold_ = other.scoreThreshold_; + iouThreshold_ = other.iouThreshold_; + maxDetectionsPerClass_ = other.maxDetectionsPerClass_; + maxTotalDetections_ = other.maxTotalDetections_; + useStaticShapes_ = other.useStaticShapes_; + useClassAgnosticNms_ = other.useClassAgnosticNms_; + maxClassesPerDetection_ = other.maxClassesPerDetection_; + softNmsSigma_ = other.softNmsSigma_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public BatchNonMaxSuppression Clone() { + return new BatchNonMaxSuppression(this); + } + + /// Field number for the "score_threshold" field. + public const int ScoreThresholdFieldNumber = 1; + private float scoreThreshold_; + /// + /// Scalar threshold for score (low scoring boxes are removed). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ScoreThreshold { + get { return scoreThreshold_; } + set { + scoreThreshold_ = value; + } + } + + /// Field number for the "iou_threshold" field. + public const int IouThresholdFieldNumber = 2; + private float iouThreshold_; + /// + /// Scalar threshold for IOU (boxes that have high IOU overlap + /// with previously selected boxes are removed). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float IouThreshold { + get { return iouThreshold_; } + set { + iouThreshold_ = value; + } + } + + /// Field number for the "max_detections_per_class" field. + public const int MaxDetectionsPerClassFieldNumber = 3; + private int maxDetectionsPerClass_; + /// + /// Maximum number of detections to retain per class. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxDetectionsPerClass { + get { return maxDetectionsPerClass_; } + set { + maxDetectionsPerClass_ = value; + } + } + + /// Field number for the "max_total_detections" field. + public const int MaxTotalDetectionsFieldNumber = 5; + private int maxTotalDetections_; + /// + /// Maximum number of detections to retain across all classes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxTotalDetections { + get { return maxTotalDetections_; } + set { + maxTotalDetections_ = value; + } + } + + /// Field number for the "use_static_shapes" field. + public const int UseStaticShapesFieldNumber = 6; + private bool useStaticShapes_; + /// + /// Whether to use the implementation of NMS that guarantees static shapes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseStaticShapes { + get { return useStaticShapes_; } + set { + useStaticShapes_ = value; + } + } + + /// Field number for the "use_class_agnostic_nms" field. + public const int UseClassAgnosticNmsFieldNumber = 7; + private bool useClassAgnosticNms_; + /// + /// Whether to use class agnostic NMS. + /// Class-agnostic NMS function implements a class-agnostic version + /// of Non Maximal Suppression where if max_classes_per_detection=k, + /// 1) we keep the top-k scores for each detection and + /// 2) during NMS, each detection only uses the highest class score for sorting. + /// 3) Compared to regular NMS, the worst runtime of this version is O(N^2) + /// instead of O(KN^2) where N is the number of detections and K the number of + /// classes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseClassAgnosticNms { + get { return useClassAgnosticNms_; } + set { + useClassAgnosticNms_ = value; + } + } + + /// Field number for the "max_classes_per_detection" field. + public const int MaxClassesPerDetectionFieldNumber = 8; + private int maxClassesPerDetection_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxClassesPerDetection { + get { return maxClassesPerDetection_; } + set { + maxClassesPerDetection_ = value; + } + } + + /// Field number for the "soft_nms_sigma" field. + public const int SoftNmsSigmaFieldNumber = 9; + private float softNmsSigma_; + /// + /// Soft NMS sigma parameter; Bodla et al, https://arxiv.org/abs/1704.04503) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float SoftNmsSigma { + get { return softNmsSigma_; } + set { + softNmsSigma_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as BatchNonMaxSuppression); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(BatchNonMaxSuppression other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ScoreThreshold, other.ScoreThreshold)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(IouThreshold, other.IouThreshold)) return false; + if (MaxDetectionsPerClass != other.MaxDetectionsPerClass) return false; + if (MaxTotalDetections != other.MaxTotalDetections) return false; + if (UseStaticShapes != other.UseStaticShapes) return false; + if (UseClassAgnosticNms != other.UseClassAgnosticNms) return false; + if (MaxClassesPerDetection != other.MaxClassesPerDetection) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SoftNmsSigma, other.SoftNmsSigma)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ScoreThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ScoreThreshold); + if (IouThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(IouThreshold); + if (MaxDetectionsPerClass != 0) hash ^= MaxDetectionsPerClass.GetHashCode(); + if (MaxTotalDetections != 0) hash ^= MaxTotalDetections.GetHashCode(); + if (UseStaticShapes != false) hash ^= UseStaticShapes.GetHashCode(); + if (UseClassAgnosticNms != false) hash ^= UseClassAgnosticNms.GetHashCode(); + if (MaxClassesPerDetection != 0) hash ^= MaxClassesPerDetection.GetHashCode(); + if (SoftNmsSigma != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SoftNmsSigma); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (ScoreThreshold != 0F) { + output.WriteRawTag(13); + output.WriteFloat(ScoreThreshold); + } + if (IouThreshold != 0F) { + output.WriteRawTag(21); + output.WriteFloat(IouThreshold); + } + if (MaxDetectionsPerClass != 0) { + output.WriteRawTag(24); + output.WriteInt32(MaxDetectionsPerClass); + } + if (MaxTotalDetections != 0) { + output.WriteRawTag(40); + output.WriteInt32(MaxTotalDetections); + } + if (UseStaticShapes != false) { + output.WriteRawTag(48); + output.WriteBool(UseStaticShapes); + } + if (UseClassAgnosticNms != false) { + output.WriteRawTag(56); + output.WriteBool(UseClassAgnosticNms); + } + if (MaxClassesPerDetection != 0) { + output.WriteRawTag(64); + output.WriteInt32(MaxClassesPerDetection); + } + if (SoftNmsSigma != 0F) { + output.WriteRawTag(77); + output.WriteFloat(SoftNmsSigma); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ScoreThreshold != 0F) { + size += 1 + 4; + } + if (IouThreshold != 0F) { + size += 1 + 4; + } + if (MaxDetectionsPerClass != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxDetectionsPerClass); + } + if (MaxTotalDetections != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxTotalDetections); + } + if (UseStaticShapes != false) { + size += 1 + 1; + } + if (UseClassAgnosticNms != false) { + size += 1 + 1; + } + if (MaxClassesPerDetection != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxClassesPerDetection); + } + if (SoftNmsSigma != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(BatchNonMaxSuppression other) { + if (other == null) { + return; + } + if (other.ScoreThreshold != 0F) { + ScoreThreshold = other.ScoreThreshold; + } + if (other.IouThreshold != 0F) { + IouThreshold = other.IouThreshold; + } + if (other.MaxDetectionsPerClass != 0) { + MaxDetectionsPerClass = other.MaxDetectionsPerClass; + } + if (other.MaxTotalDetections != 0) { + MaxTotalDetections = other.MaxTotalDetections; + } + if (other.UseStaticShapes != false) { + UseStaticShapes = other.UseStaticShapes; + } + if (other.UseClassAgnosticNms != false) { + UseClassAgnosticNms = other.UseClassAgnosticNms; + } + if (other.MaxClassesPerDetection != 0) { + MaxClassesPerDetection = other.MaxClassesPerDetection; + } + if (other.SoftNmsSigma != 0F) { + SoftNmsSigma = other.SoftNmsSigma; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + ScoreThreshold = input.ReadFloat(); + break; + } + case 21: { + IouThreshold = input.ReadFloat(); + break; + } + case 24: { + MaxDetectionsPerClass = input.ReadInt32(); + break; + } + case 40: { + MaxTotalDetections = input.ReadInt32(); + break; + } + case 48: { + UseStaticShapes = input.ReadBool(); + break; + } + case 56: { + UseClassAgnosticNms = input.ReadBool(); + break; + } + case 64: { + MaxClassesPerDetection = input.ReadInt32(); + break; + } + case 77: { + SoftNmsSigma = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Configuration proto for post-processing predicted boxes and + /// scores. + /// + public sealed partial class PostProcessing : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PostProcessing()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PostProcessingReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PostProcessing() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PostProcessing(PostProcessing other) : this() { + batchNonMaxSuppression_ = other.batchNonMaxSuppression_ != null ? other.batchNonMaxSuppression_.Clone() : null; + scoreConverter_ = other.scoreConverter_; + logitScale_ = other.logitScale_; + calibrationConfig_ = other.calibrationConfig_ != null ? other.calibrationConfig_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PostProcessing Clone() { + return new PostProcessing(this); + } + + /// Field number for the "batch_non_max_suppression" field. + public const int BatchNonMaxSuppressionFieldNumber = 1; + private global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression batchNonMaxSuppression_; + /// + /// Non max suppression parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression BatchNonMaxSuppression { + get { return batchNonMaxSuppression_; } + set { + batchNonMaxSuppression_ = value; + } + } + + /// Field number for the "score_converter" field. + public const int ScoreConverterFieldNumber = 2; + private global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Types.ScoreConverter scoreConverter_ = 0; + /// + /// Score converter to use. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Types.ScoreConverter ScoreConverter { + get { return scoreConverter_; } + set { + scoreConverter_ = value; + } + } + + /// Field number for the "logit_scale" field. + public const int LogitScaleFieldNumber = 3; + private float logitScale_; + /// + /// Scale logit (input) value before conversion in post-processing step. + /// Typically used for softmax distillation, though can be used to scale for + /// other reasons. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LogitScale { + get { return logitScale_; } + set { + logitScale_ = value; + } + } + + /// Field number for the "calibration_config" field. + public const int CalibrationConfigFieldNumber = 4; + private global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig calibrationConfig_; + /// + /// Calibrate score outputs. Calibration is applied after score converter + /// and before non max suppression. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig CalibrationConfig { + get { return calibrationConfig_; } + set { + calibrationConfig_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as PostProcessing); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(PostProcessing other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(BatchNonMaxSuppression, other.BatchNonMaxSuppression)) return false; + if (ScoreConverter != other.ScoreConverter) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LogitScale, other.LogitScale)) return false; + if (!object.Equals(CalibrationConfig, other.CalibrationConfig)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (batchNonMaxSuppression_ != null) hash ^= BatchNonMaxSuppression.GetHashCode(); + if (ScoreConverter != 0) hash ^= ScoreConverter.GetHashCode(); + if (LogitScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LogitScale); + if (calibrationConfig_ != null) hash ^= CalibrationConfig.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (batchNonMaxSuppression_ != null) { + output.WriteRawTag(10); + output.WriteMessage(BatchNonMaxSuppression); + } + if (ScoreConverter != 0) { + output.WriteRawTag(16); + output.WriteEnum((int) ScoreConverter); + } + if (LogitScale != 0F) { + output.WriteRawTag(29); + output.WriteFloat(LogitScale); + } + if (calibrationConfig_ != null) { + output.WriteRawTag(34); + output.WriteMessage(CalibrationConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (batchNonMaxSuppression_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BatchNonMaxSuppression); + } + if (ScoreConverter != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ScoreConverter); + } + if (LogitScale != 0F) { + size += 1 + 4; + } + if (calibrationConfig_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CalibrationConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(PostProcessing other) { + if (other == null) { + return; + } + if (other.batchNonMaxSuppression_ != null) { + if (batchNonMaxSuppression_ == null) { + batchNonMaxSuppression_ = new global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression(); + } + BatchNonMaxSuppression.MergeFrom(other.BatchNonMaxSuppression); + } + if (other.ScoreConverter != 0) { + ScoreConverter = other.ScoreConverter; + } + if (other.LogitScale != 0F) { + LogitScale = other.LogitScale; + } + if (other.calibrationConfig_ != null) { + if (calibrationConfig_ == null) { + calibrationConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig(); + } + CalibrationConfig.MergeFrom(other.CalibrationConfig); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (batchNonMaxSuppression_ == null) { + batchNonMaxSuppression_ = new global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression(); + } + input.ReadMessage(batchNonMaxSuppression_); + break; + } + case 16: { + scoreConverter_ = (global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Types.ScoreConverter) input.ReadEnum(); + break; + } + case 29: { + LogitScale = input.ReadFloat(); + break; + } + case 34: { + if (calibrationConfig_ == null) { + calibrationConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig(); + } + input.ReadMessage(calibrationConfig_); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the PostProcessing message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Enum to specify how to convert the detection scores. + /// + public enum ScoreConverter { + /// + /// Input scores equals output scores. + /// + [pbr::OriginalName("IDENTITY")] Identity = 0, + /// + /// Applies a sigmoid on input scores. + /// + [pbr::OriginalName("SIGMOID")] Sigmoid = 1, + /// + /// Applies a softmax on input scores + /// + [pbr::OriginalName("SOFTMAX")] Softmax = 2, + } + + } + #endregion + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Preprocessor.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Preprocessor.cs new file mode 100644 index 00000000..7412fb52 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Preprocessor.cs @@ -0,0 +1,8697 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/preprocessor.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/preprocessor.proto + public static partial class PreprocessorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/preprocessor.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static PreprocessorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CipvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9wcmVwcm9jZXNzb3IucHJvdG8S", + "F29iamVjdF9kZXRlY3Rpb24ucHJvdG9zItgUChFQcmVwcm9jZXNzaW5nU3Rl", + "cBJCCg9ub3JtYWxpemVfaW1hZ2UYASABKAsyJy5vYmplY3RfZGV0ZWN0aW9u", + "LnByb3Rvcy5Ob3JtYWxpemVJbWFnZUgAEk8KFnJhbmRvbV9ob3Jpem9udGFs", + "X2ZsaXAYAiABKAsyLS5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5SYW5kb21I", + "b3Jpem9udGFsRmxpcEgAElIKGHJhbmRvbV9waXhlbF92YWx1ZV9zY2FsZRgD", + "IAEoCzIuLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJhbmRvbVBpeGVsVmFs", + "dWVTY2FsZUgAEkcKEnJhbmRvbV9pbWFnZV9zY2FsZRgEIAEoCzIpLm9iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zLlJhbmRvbUltYWdlU2NhbGVIABJGChJyYW5k", + "b21fcmdiX3RvX2dyYXkYBSABKAsyKC5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5SYW5kb21SR0J0b0dyYXlIABJTChhyYW5kb21fYWRqdXN0X2JyaWdodG5l", + "c3MYBiABKAsyLy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5SYW5kb21BZGp1", + "c3RCcmlnaHRuZXNzSAASTwoWcmFuZG9tX2FkanVzdF9jb250cmFzdBgHIAEo", + "CzItLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJhbmRvbUFkanVzdENvbnRy", + "YXN0SAASRQoRcmFuZG9tX2FkanVzdF9odWUYCCABKAsyKC5vYmplY3RfZGV0", + "ZWN0aW9uLnByb3Rvcy5SYW5kb21BZGp1c3RIdWVIABJTChhyYW5kb21fYWRq", + "dXN0X3NhdHVyYXRpb24YCSABKAsyLy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5SYW5kb21BZGp1c3RTYXR1cmF0aW9uSAASSwoUcmFuZG9tX2Rpc3RvcnRf", + "Y29sb3IYCiABKAsyKy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5SYW5kb21E", + "aXN0b3J0Q29sb3JIABJJChNyYW5kb21faml0dGVyX2JveGVzGAsgASgLMiou", + "b2JqZWN0X2RldGVjdGlvbi5wcm90b3MuUmFuZG9tSml0dGVyQm94ZXNIABJF", + "ChFyYW5kb21fY3JvcF9pbWFnZRgMIAEoCzIoLm9iamVjdF9kZXRlY3Rpb24u", + "cHJvdG9zLlJhbmRvbUNyb3BJbWFnZUgAEkMKEHJhbmRvbV9wYWRfaW1hZ2UY", + "DSABKAsyJy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5SYW5kb21QYWRJbWFn", + "ZUgAEkwKFXJhbmRvbV9jcm9wX3BhZF9pbWFnZRgOIAEoCzIrLm9iamVjdF9k", + "ZXRlY3Rpb24ucHJvdG9zLlJhbmRvbUNyb3BQYWRJbWFnZUgAElcKG3JhbmRv", + "bV9jcm9wX3RvX2FzcGVjdF9yYXRpbxgPIAEoCzIwLm9iamVjdF9kZXRlY3Rp", + "b24ucHJvdG9zLlJhbmRvbUNyb3BUb0FzcGVjdFJhdGlvSAASSwoUcmFuZG9t", + "X2JsYWNrX3BhdGNoZXMYECABKAsyKy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rv", + "cy5SYW5kb21CbGFja1BhdGNoZXNIABJLChRyYW5kb21fcmVzaXplX21ldGhv", + "ZBgRIAEoCzIrLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJhbmRvbVJlc2l6", + "ZU1ldGhvZEgAEmEKIHNjYWxlX2JveGVzX3RvX3BpeGVsX2Nvb3JkaW5hdGVz", + "GBIgASgLMjUub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuU2NhbGVCb3hlc1Rv", + "UGl4ZWxDb29yZGluYXRlc0gAEjwKDHJlc2l6ZV9pbWFnZRgTIAEoCzIkLm9i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zLlJlc2l6ZUltYWdlSAASTQoVc3VidHJh", + "Y3RfY2hhbm5lbF9tZWFuGBQgASgLMiwub2JqZWN0X2RldGVjdGlvbi5wcm90", + "b3MuU3VidHJhY3RDaGFubmVsTWVhbkgAEkEKD3NzZF9yYW5kb21fY3JvcBgV", + "IAEoCzImLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlNTRFJhbmRvbUNyb3BI", + "ABJIChNzc2RfcmFuZG9tX2Nyb3BfcGFkGBYgASgLMikub2JqZWN0X2RldGVj", + "dGlvbi5wcm90b3MuU1NEUmFuZG9tQ3JvcFBhZEgAEmQKInNzZF9yYW5kb21f", + "Y3JvcF9maXhlZF9hc3BlY3RfcmF0aW8YFyABKAsyNi5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5TU0RSYW5kb21Dcm9wRml4ZWRBc3BlY3RSYXRpb0gAEmsK", + "JnNzZF9yYW5kb21fY3JvcF9wYWRfZml4ZWRfYXNwZWN0X3JhdGlvGBggASgL", + "Mjkub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuU1NEUmFuZG9tQ3JvcFBhZEZp", + "eGVkQXNwZWN0UmF0aW9IABJLChRyYW5kb21fdmVydGljYWxfZmxpcBgZIAEo", + "CzIrLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJhbmRvbVZlcnRpY2FsRmxp", + "cEgAEkYKEXJhbmRvbV9yb3RhdGlvbjkwGBogASgLMikub2JqZWN0X2RldGVj", + "dGlvbi5wcm90b3MuUmFuZG9tUm90YXRpb245MEgAEjkKC3JnYl90b19ncmF5", + "GBsgASgLMiIub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuUkdCdG9HcmF5SAAS", + "XwofY29udmVydF9jbGFzc19sb2dpdHNfdG9fc29mdG1heBgcIAEoCzI0Lm9i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zLkNvbnZlcnRDbGFzc0xvZ2l0c1RvU29m", + "dG1heEgAElQKGXJhbmRvbV9hYnNvbHV0ZV9wYWRfaW1hZ2UYHSABKAsyLy5v", + "YmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5SYW5kb21BYnNvbHV0ZVBhZEltYWdl", + "SAASUgoYcmFuZG9tX3NlbGZfY29uY2F0X2ltYWdlGB4gASgLMi4ub2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MuUmFuZG9tU2VsZkNvbmNhdEltYWdlSAASRgoR", + "YXV0b2F1Z21lbnRfaW1hZ2UYHyABKAsyKS5vYmplY3RfZGV0ZWN0aW9uLnBy", + "b3Rvcy5BdXRvQXVnbWVudEltYWdlSAASWwocZHJvcF9sYWJlbF9wcm9iYWJp", + "bGlzdGljYWxseRggIAEoCzIzLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLkRy", + "b3BMYWJlbFByb2JhYmlsaXN0aWNhbGx5SAASPAoMcmVtYXBfbGFiZWxzGCEg", + "ASgLMiQub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuUmVtYXBMYWJlbHNIAEIU", + "ChJwcmVwcm9jZXNzaW5nX3N0ZXAicAoOTm9ybWFsaXplSW1hZ2USFwoPb3Jp", + "Z2luYWxfbWludmFsGAEgASgCEhcKD29yaWdpbmFsX21heHZhbBgCIAEoAhIV", + "Cg10YXJnZXRfbWludmFsGAMgASgCEhUKDXRhcmdldF9tYXh2YWwYBCABKAIi", + "OQoUUmFuZG9tSG9yaXpvbnRhbEZsaXASIQoZa2V5cG9pbnRfZmxpcF9wZXJt", + "dXRhdGlvbhgBIAMoBSI3ChJSYW5kb21WZXJ0aWNhbEZsaXASIQoZa2V5cG9p", + "bnRfZmxpcF9wZXJtdXRhdGlvbhgBIAMoBSISChBSYW5kb21Sb3RhdGlvbjkw", + "IjcKFVJhbmRvbVBpeGVsVmFsdWVTY2FsZRIOCgZtaW52YWwYASABKAISDgoG", + "bWF4dmFsGAIgASgCIkQKEFJhbmRvbUltYWdlU2NhbGUSFwoPbWluX3NjYWxl", + "X3JhdGlvGAEgASgCEhcKD21heF9zY2FsZV9yYXRpbxgCIAEoAiImCg9SYW5k", + "b21SR0J0b0dyYXkSEwoLcHJvYmFiaWxpdHkYASABKAIiKwoWUmFuZG9tQWRq", + "dXN0QnJpZ2h0bmVzcxIRCgltYXhfZGVsdGEYASABKAIiPAoUUmFuZG9tQWRq", + "dXN0Q29udHJhc3QSEQoJbWluX2RlbHRhGAEgASgCEhEKCW1heF9kZWx0YRgC", + "IAEoAiIkCg9SYW5kb21BZGp1c3RIdWUSEQoJbWF4X2RlbHRhGAEgASgCIj4K", + "FlJhbmRvbUFkanVzdFNhdHVyYXRpb24SEQoJbWluX2RlbHRhGAEgASgCEhEK", + "CW1heF9kZWx0YRgCIAEoAiIsChJSYW5kb21EaXN0b3J0Q29sb3ISFgoOY29s", + "b3Jfb3JkZXJpbmcYASABKAUiIgoRUmFuZG9tSml0dGVyQm94ZXMSDQoFcmF0", + "aW8YASABKAIixgEKD1JhbmRvbUNyb3BJbWFnZRIaChJtaW5fb2JqZWN0X2Nv", + "dmVyZWQYASABKAISGAoQbWluX2FzcGVjdF9yYXRpbxgCIAEoAhIYChBtYXhf", + "YXNwZWN0X3JhdGlvGAMgASgCEhAKCG1pbl9hcmVhGAQgASgCEhAKCG1heF9h", + "cmVhGAUgASgCEhYKDm92ZXJsYXBfdGhyZXNoGAYgASgCEhIKCmNsaXBfYm94", + "ZXMYCCABKAgSEwoLcmFuZG9tX2NvZWYYByABKAIiiQEKDlJhbmRvbVBhZElt", + "YWdlEhgKEG1pbl9pbWFnZV9oZWlnaHQYASABKAUSFwoPbWluX2ltYWdlX3dp", + "ZHRoGAIgASgFEhgKEG1heF9pbWFnZV9oZWlnaHQYAyABKAUSFwoPbWF4X2lt", + "YWdlX3dpZHRoGAQgASgFEhEKCXBhZF9jb2xvchgFIAMoAiJiChZSYW5kb21B", + "YnNvbHV0ZVBhZEltYWdlEhoKEm1heF9oZWlnaHRfcGFkZGluZxgBIAEoBRIZ", + "ChFtYXhfd2lkdGhfcGFkZGluZxgCIAEoBRIRCglwYWRfY29sb3IYAyADKAIi", + "mgIKElJhbmRvbUNyb3BQYWRJbWFnZRIaChJtaW5fb2JqZWN0X2NvdmVyZWQY", + "ASABKAISGAoQbWluX2FzcGVjdF9yYXRpbxgCIAEoAhIYChBtYXhfYXNwZWN0", + "X3JhdGlvGAMgASgCEhAKCG1pbl9hcmVhGAQgASgCEhAKCG1heF9hcmVhGAUg", + "ASgCEhYKDm92ZXJsYXBfdGhyZXNoGAYgASgCEhIKCmNsaXBfYm94ZXMYCyAB", + "KAgSEwoLcmFuZG9tX2NvZWYYByABKAISHQoVbWluX3BhZGRlZF9zaXplX3Jh", + "dGlvGAggAygCEh0KFW1heF9wYWRkZWRfc2l6ZV9yYXRpbxgJIAMoAhIRCglw", + "YWRfY29sb3IYCiADKAIiWwoXUmFuZG9tQ3JvcFRvQXNwZWN0UmF0aW8SFAoM", + "YXNwZWN0X3JhdGlvGAEgASgCEhYKDm92ZXJsYXBfdGhyZXNoGAIgASgCEhIK", + "CmNsaXBfYm94ZXMYAyABKAgiYQoSUmFuZG9tQmxhY2tQYXRjaGVzEhkKEW1h", + "eF9ibGFja19wYXRjaGVzGAEgASgFEhMKC3Byb2JhYmlsaXR5GAIgASgCEhsK", + "E3NpemVfdG9faW1hZ2VfcmF0aW8YAyABKAIiQQoSUmFuZG9tUmVzaXplTWV0", + "aG9kEhUKDXRhcmdldF9oZWlnaHQYASABKAUSFAoMdGFyZ2V0X3dpZHRoGAIg", + "ASgFIgsKCVJHQnRvR3JheSIeChxTY2FsZUJveGVzVG9QaXhlbENvb3JkaW5h", + "dGVzIsABCgtSZXNpemVJbWFnZRISCgpuZXdfaGVpZ2h0GAEgASgFEhEKCW5l", + "d193aWR0aBgCIAEoBRI7CgZtZXRob2QYAyABKA4yKy5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5SZXNpemVJbWFnZS5NZXRob2QiTQoGTWV0aG9kEggKBE5P", + "TkUQABIICgRBUkVBEAESCwoHQklDVUJJQxACEgwKCEJJTElORUFSEAMSFAoQ", + "TkVBUkVTVF9ORUlHSEJPUhAEIiQKE1N1YnRyYWN0Q2hhbm5lbE1lYW4SDQoF", + "bWVhbnMYASADKAIizQEKFlNTRFJhbmRvbUNyb3BPcGVyYXRpb24SGgoSbWlu", + "X29iamVjdF9jb3ZlcmVkGAEgASgCEhgKEG1pbl9hc3BlY3RfcmF0aW8YAiAB", + "KAISGAoQbWF4X2FzcGVjdF9yYXRpbxgDIAEoAhIQCghtaW5fYXJlYRgEIAEo", + "AhIQCghtYXhfYXJlYRgFIAEoAhIWCg5vdmVybGFwX3RocmVzaBgGIAEoAhIS", + "CgpjbGlwX2JveGVzGAggASgIEhMKC3JhbmRvbV9jb2VmGAcgASgCIlQKDVNT", + "RFJhbmRvbUNyb3ASQwoKb3BlcmF0aW9ucxgBIAMoCzIvLm9iamVjdF9kZXRl", + "Y3Rpb24ucHJvdG9zLlNTRFJhbmRvbUNyb3BPcGVyYXRpb24izQIKGVNTRFJh", + "bmRvbUNyb3BQYWRPcGVyYXRpb24SGgoSbWluX29iamVjdF9jb3ZlcmVkGAEg", + "ASgCEhgKEG1pbl9hc3BlY3RfcmF0aW8YAiABKAISGAoQbWF4X2FzcGVjdF9y", + "YXRpbxgDIAEoAhIQCghtaW5fYXJlYRgEIAEoAhIQCghtYXhfYXJlYRgFIAEo", + "AhIWCg5vdmVybGFwX3RocmVzaBgGIAEoAhISCgpjbGlwX2JveGVzGA0gASgI", + "EhMKC3JhbmRvbV9jb2VmGAcgASgCEh0KFW1pbl9wYWRkZWRfc2l6ZV9yYXRp", + "bxgIIAMoAhIdChVtYXhfcGFkZGVkX3NpemVfcmF0aW8YCSADKAISEwoLcGFk", + "X2NvbG9yX3IYCiABKAISEwoLcGFkX2NvbG9yX2cYCyABKAISEwoLcGFkX2Nv", + "bG9yX2IYDCABKAIiWgoQU1NEUmFuZG9tQ3JvcFBhZBJGCgpvcGVyYXRpb25z", + "GAEgAygLMjIub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuU1NEUmFuZG9tQ3Jv", + "cFBhZE9wZXJhdGlvbiKpAQomU1NEUmFuZG9tQ3JvcEZpeGVkQXNwZWN0UmF0", + "aW9PcGVyYXRpb24SGgoSbWluX29iamVjdF9jb3ZlcmVkGAEgASgCEhAKCG1p", + "bl9hcmVhGAQgASgCEhAKCG1heF9hcmVhGAUgASgCEhYKDm92ZXJsYXBfdGhy", + "ZXNoGAYgASgCEhIKCmNsaXBfYm94ZXMYCCABKAgSEwoLcmFuZG9tX2NvZWYY", + "ByABKAIiigEKHVNTRFJhbmRvbUNyb3BGaXhlZEFzcGVjdFJhdGlvElMKCm9w", + "ZXJhdGlvbnMYASADKAsyPy5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5TU0RS", + "YW5kb21Dcm9wRml4ZWRBc3BlY3RSYXRpb09wZXJhdGlvbhIUCgxhc3BlY3Rf", + "cmF0aW8YAiABKAIi4AEKKVNTRFJhbmRvbUNyb3BQYWRGaXhlZEFzcGVjdFJh", + "dGlvT3BlcmF0aW9uEhoKEm1pbl9vYmplY3RfY292ZXJlZBgBIAEoAhIYChBt", + "aW5fYXNwZWN0X3JhdGlvGAIgASgCEhgKEG1heF9hc3BlY3RfcmF0aW8YAyAB", + "KAISEAoIbWluX2FyZWEYBCABKAISEAoIbWF4X2FyZWEYBSABKAISFgoOb3Zl", + "cmxhcF90aHJlc2gYBiABKAISEgoKY2xpcF9ib3hlcxgIIAEoCBITCgtyYW5k", + "b21fY29lZhgHIAEoAiLOAQogU1NEUmFuZG9tQ3JvcFBhZEZpeGVkQXNwZWN0", + "UmF0aW8SVgoKb3BlcmF0aW9ucxgBIAMoCzJCLm9iamVjdF9kZXRlY3Rpb24u", + "cHJvdG9zLlNTRFJhbmRvbUNyb3BQYWRGaXhlZEFzcGVjdFJhdGlvT3BlcmF0", + "aW9uEhQKDGFzcGVjdF9yYXRpbxgCIAEoAhIdChVtaW5fcGFkZGVkX3NpemVf", + "cmF0aW8YAyADKAISHQoVbWF4X3BhZGRlZF9zaXplX3JhdGlvGAQgAygCIjIK", + "G0NvbnZlcnRDbGFzc0xvZ2l0c1RvU29mdG1heBITCgt0ZW1wZXJhdHVyZRgB", + "IAEoAiJjChVSYW5kb21TZWxmQ29uY2F0SW1hZ2USIwobY29uY2F0X3ZlcnRp", + "Y2FsX3Byb2JhYmlsaXR5GAEgASgCEiUKHWNvbmNhdF9ob3Jpem9udGFsX3By", + "b2JhYmlsaXR5GAIgASgCIicKEEF1dG9BdWdtZW50SW1hZ2USEwoLcG9saWN5", + "X25hbWUYASABKAkiRQoaRHJvcExhYmVsUHJvYmFiaWxpc3RpY2FsbHkSDQoF", + "bGFiZWwYASABKAUSGAoQZHJvcF9wcm9iYWJpbGl0eRgCIAEoAiI5CgtSZW1h", + "cExhYmVscxIXCg9vcmlnaW5hbF9sYWJlbHMYASADKAUSEQoJbmV3X2xhYmVs", + "GAIgASgFYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.PreprocessingStep), global::Tensorflow.Models.ObjectDetection.Protos.PreprocessingStep.Parser, new[]{ "NormalizeImage", "RandomHorizontalFlip", "RandomPixelValueScale", "RandomImageScale", "RandomRgbToGray", "RandomAdjustBrightness", "RandomAdjustContrast", "RandomAdjustHue", "RandomAdjustSaturation", "RandomDistortColor", "RandomJitterBoxes", "RandomCropImage", "RandomPadImage", "RandomCropPadImage", "RandomCropToAspectRatio", "RandomBlackPatches", "RandomResizeMethod", "ScaleBoxesToPixelCoordinates", "ResizeImage", "SubtractChannelMean", "SsdRandomCrop", "SsdRandomCropPad", "SsdRandomCropFixedAspectRatio", "SsdRandomCropPadFixedAspectRatio", "RandomVerticalFlip", "RandomRotation90", "RgbToGray", "ConvertClassLogitsToSoftmax", "RandomAbsolutePadImage", "RandomSelfConcatImage", "AutoaugmentImage", "DropLabelProbabilistically", "RemapLabels" }, new[]{ "PreprocessingStep" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage), global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage.Parser, new[]{ "OriginalMinval", "OriginalMaxval", "TargetMinval", "TargetMaxval" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip), global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip.Parser, new[]{ "KeypointFlipPermutation" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip), global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip.Parser, new[]{ "KeypointFlipPermutation" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90), global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale), global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale.Parser, new[]{ "Minval", "Maxval" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale), global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale.Parser, new[]{ "MinScaleRatio", "MaxScaleRatio" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray), global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray.Parser, new[]{ "Probability" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness), global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness.Parser, new[]{ "MaxDelta" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast), global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast.Parser, new[]{ "MinDelta", "MaxDelta" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue), global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue.Parser, new[]{ "MaxDelta" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation), global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation.Parser, new[]{ "MinDelta", "MaxDelta" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor), global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor.Parser, new[]{ "ColorOrdering" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes), global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes.Parser, new[]{ "Ratio" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage), global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage.Parser, new[]{ "MinObjectCovered", "MinAspectRatio", "MaxAspectRatio", "MinArea", "MaxArea", "OverlapThresh", "ClipBoxes", "RandomCoef" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage), global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage.Parser, new[]{ "MinImageHeight", "MinImageWidth", "MaxImageHeight", "MaxImageWidth", "PadColor" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage), global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage.Parser, new[]{ "MaxHeightPadding", "MaxWidthPadding", "PadColor" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage), global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage.Parser, new[]{ "MinObjectCovered", "MinAspectRatio", "MaxAspectRatio", "MinArea", "MaxArea", "OverlapThresh", "ClipBoxes", "RandomCoef", "MinPaddedSizeRatio", "MaxPaddedSizeRatio", "PadColor" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio), global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio.Parser, new[]{ "AspectRatio", "OverlapThresh", "ClipBoxes" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches), global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches.Parser, new[]{ "MaxBlackPatches", "Probability", "SizeToImageRatio" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod), global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod.Parser, new[]{ "TargetHeight", "TargetWidth" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray), global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates), global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage), global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage.Parser, new[]{ "NewHeight", "NewWidth", "Method" }, null, new[]{ typeof(global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage.Types.Method) }, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean), global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean.Parser, new[]{ "Means" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropOperation), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropOperation.Parser, new[]{ "MinObjectCovered", "MinAspectRatio", "MaxAspectRatio", "MinArea", "MaxArea", "OverlapThresh", "ClipBoxes", "RandomCoef" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop.Parser, new[]{ "Operations" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadOperation), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadOperation.Parser, new[]{ "MinObjectCovered", "MinAspectRatio", "MaxAspectRatio", "MinArea", "MaxArea", "OverlapThresh", "ClipBoxes", "RandomCoef", "MinPaddedSizeRatio", "MaxPaddedSizeRatio", "PadColorR", "PadColorG", "PadColorB" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad.Parser, new[]{ "Operations" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatioOperation), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatioOperation.Parser, new[]{ "MinObjectCovered", "MinArea", "MaxArea", "OverlapThresh", "ClipBoxes", "RandomCoef" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio.Parser, new[]{ "Operations", "AspectRatio" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatioOperation), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatioOperation.Parser, new[]{ "MinObjectCovered", "MinAspectRatio", "MaxAspectRatio", "MinArea", "MaxArea", "OverlapThresh", "ClipBoxes", "RandomCoef" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio), global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio.Parser, new[]{ "Operations", "AspectRatio", "MinPaddedSizeRatio", "MaxPaddedSizeRatio" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax), global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax.Parser, new[]{ "Temperature" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage), global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage.Parser, new[]{ "ConcatVerticalProbability", "ConcatHorizontalProbability" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage), global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage.Parser, new[]{ "PolicyName" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically), global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically.Parser, new[]{ "Label", "DropProbability" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels), global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels.Parser, new[]{ "OriginalLabels", "NewLabel" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Message for defining a preprocessing operation on input data. + /// See: //third_party/tensorflow_models/object_detection/core/preprocessor.py + /// + public sealed partial class PreprocessingStep : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PreprocessingStep()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PreprocessingStep() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PreprocessingStep(PreprocessingStep other) : this() { + switch (other.PreprocessingStepCase) { + case PreprocessingStepOneofCase.NormalizeImage: + NormalizeImage = other.NormalizeImage.Clone(); + break; + case PreprocessingStepOneofCase.RandomHorizontalFlip: + RandomHorizontalFlip = other.RandomHorizontalFlip.Clone(); + break; + case PreprocessingStepOneofCase.RandomPixelValueScale: + RandomPixelValueScale = other.RandomPixelValueScale.Clone(); + break; + case PreprocessingStepOneofCase.RandomImageScale: + RandomImageScale = other.RandomImageScale.Clone(); + break; + case PreprocessingStepOneofCase.RandomRgbToGray: + RandomRgbToGray = other.RandomRgbToGray.Clone(); + break; + case PreprocessingStepOneofCase.RandomAdjustBrightness: + RandomAdjustBrightness = other.RandomAdjustBrightness.Clone(); + break; + case PreprocessingStepOneofCase.RandomAdjustContrast: + RandomAdjustContrast = other.RandomAdjustContrast.Clone(); + break; + case PreprocessingStepOneofCase.RandomAdjustHue: + RandomAdjustHue = other.RandomAdjustHue.Clone(); + break; + case PreprocessingStepOneofCase.RandomAdjustSaturation: + RandomAdjustSaturation = other.RandomAdjustSaturation.Clone(); + break; + case PreprocessingStepOneofCase.RandomDistortColor: + RandomDistortColor = other.RandomDistortColor.Clone(); + break; + case PreprocessingStepOneofCase.RandomJitterBoxes: + RandomJitterBoxes = other.RandomJitterBoxes.Clone(); + break; + case PreprocessingStepOneofCase.RandomCropImage: + RandomCropImage = other.RandomCropImage.Clone(); + break; + case PreprocessingStepOneofCase.RandomPadImage: + RandomPadImage = other.RandomPadImage.Clone(); + break; + case PreprocessingStepOneofCase.RandomCropPadImage: + RandomCropPadImage = other.RandomCropPadImage.Clone(); + break; + case PreprocessingStepOneofCase.RandomCropToAspectRatio: + RandomCropToAspectRatio = other.RandomCropToAspectRatio.Clone(); + break; + case PreprocessingStepOneofCase.RandomBlackPatches: + RandomBlackPatches = other.RandomBlackPatches.Clone(); + break; + case PreprocessingStepOneofCase.RandomResizeMethod: + RandomResizeMethod = other.RandomResizeMethod.Clone(); + break; + case PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates: + ScaleBoxesToPixelCoordinates = other.ScaleBoxesToPixelCoordinates.Clone(); + break; + case PreprocessingStepOneofCase.ResizeImage: + ResizeImage = other.ResizeImage.Clone(); + break; + case PreprocessingStepOneofCase.SubtractChannelMean: + SubtractChannelMean = other.SubtractChannelMean.Clone(); + break; + case PreprocessingStepOneofCase.SsdRandomCrop: + SsdRandomCrop = other.SsdRandomCrop.Clone(); + break; + case PreprocessingStepOneofCase.SsdRandomCropPad: + SsdRandomCropPad = other.SsdRandomCropPad.Clone(); + break; + case PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio: + SsdRandomCropFixedAspectRatio = other.SsdRandomCropFixedAspectRatio.Clone(); + break; + case PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio: + SsdRandomCropPadFixedAspectRatio = other.SsdRandomCropPadFixedAspectRatio.Clone(); + break; + case PreprocessingStepOneofCase.RandomVerticalFlip: + RandomVerticalFlip = other.RandomVerticalFlip.Clone(); + break; + case PreprocessingStepOneofCase.RandomRotation90: + RandomRotation90 = other.RandomRotation90.Clone(); + break; + case PreprocessingStepOneofCase.RgbToGray: + RgbToGray = other.RgbToGray.Clone(); + break; + case PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax: + ConvertClassLogitsToSoftmax = other.ConvertClassLogitsToSoftmax.Clone(); + break; + case PreprocessingStepOneofCase.RandomAbsolutePadImage: + RandomAbsolutePadImage = other.RandomAbsolutePadImage.Clone(); + break; + case PreprocessingStepOneofCase.RandomSelfConcatImage: + RandomSelfConcatImage = other.RandomSelfConcatImage.Clone(); + break; + case PreprocessingStepOneofCase.AutoaugmentImage: + AutoaugmentImage = other.AutoaugmentImage.Clone(); + break; + case PreprocessingStepOneofCase.DropLabelProbabilistically: + DropLabelProbabilistically = other.DropLabelProbabilistically.Clone(); + break; + case PreprocessingStepOneofCase.RemapLabels: + RemapLabels = other.RemapLabels.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PreprocessingStep Clone() { + return new PreprocessingStep(this); + } + + /// Field number for the "normalize_image" field. + public const int NormalizeImageFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage NormalizeImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.NormalizeImage ? (global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.NormalizeImage; + } + } + + /// Field number for the "random_horizontal_flip" field. + public const int RandomHorizontalFlipFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip RandomHorizontalFlip { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomHorizontalFlip ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomHorizontalFlip; + } + } + + /// Field number for the "random_pixel_value_scale" field. + public const int RandomPixelValueScaleFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale RandomPixelValueScale { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPixelValueScale ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomPixelValueScale; + } + } + + /// Field number for the "random_image_scale" field. + public const int RandomImageScaleFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale RandomImageScale { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomImageScale ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomImageScale; + } + } + + /// Field number for the "random_rgb_to_gray" field. + public const int RandomRgbToGrayFieldNumber = 5; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray RandomRgbToGray { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRgbToGray ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomRgbToGray; + } + } + + /// Field number for the "random_adjust_brightness" field. + public const int RandomAdjustBrightnessFieldNumber = 6; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness RandomAdjustBrightness { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustBrightness ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomAdjustBrightness; + } + } + + /// Field number for the "random_adjust_contrast" field. + public const int RandomAdjustContrastFieldNumber = 7; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast RandomAdjustContrast { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustContrast ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomAdjustContrast; + } + } + + /// Field number for the "random_adjust_hue" field. + public const int RandomAdjustHueFieldNumber = 8; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue RandomAdjustHue { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustHue ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomAdjustHue; + } + } + + /// Field number for the "random_adjust_saturation" field. + public const int RandomAdjustSaturationFieldNumber = 9; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation RandomAdjustSaturation { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustSaturation ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomAdjustSaturation; + } + } + + /// Field number for the "random_distort_color" field. + public const int RandomDistortColorFieldNumber = 10; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor RandomDistortColor { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomDistortColor ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomDistortColor; + } + } + + /// Field number for the "random_jitter_boxes" field. + public const int RandomJitterBoxesFieldNumber = 11; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes RandomJitterBoxes { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomJitterBoxes ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomJitterBoxes; + } + } + + /// Field number for the "random_crop_image" field. + public const int RandomCropImageFieldNumber = 12; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage RandomCropImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropImage ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomCropImage; + } + } + + /// Field number for the "random_pad_image" field. + public const int RandomPadImageFieldNumber = 13; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage RandomPadImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPadImage ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomPadImage; + } + } + + /// Field number for the "random_crop_pad_image" field. + public const int RandomCropPadImageFieldNumber = 14; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage RandomCropPadImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropPadImage ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomCropPadImage; + } + } + + /// Field number for the "random_crop_to_aspect_ratio" field. + public const int RandomCropToAspectRatioFieldNumber = 15; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio RandomCropToAspectRatio { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropToAspectRatio ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomCropToAspectRatio; + } + } + + /// Field number for the "random_black_patches" field. + public const int RandomBlackPatchesFieldNumber = 16; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches RandomBlackPatches { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomBlackPatches ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomBlackPatches; + } + } + + /// Field number for the "random_resize_method" field. + public const int RandomResizeMethodFieldNumber = 17; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod RandomResizeMethod { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomResizeMethod ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomResizeMethod; + } + } + + /// Field number for the "scale_boxes_to_pixel_coordinates" field. + public const int ScaleBoxesToPixelCoordinatesFieldNumber = 18; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates ScaleBoxesToPixelCoordinates { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates ? (global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates; + } + } + + /// Field number for the "resize_image" field. + public const int ResizeImageFieldNumber = 19; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage ResizeImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.ResizeImage ? (global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.ResizeImage; + } + } + + /// Field number for the "subtract_channel_mean" field. + public const int SubtractChannelMeanFieldNumber = 20; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean SubtractChannelMean { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.SubtractChannelMean ? (global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.SubtractChannelMean; + } + } + + /// Field number for the "ssd_random_crop" field. + public const int SsdRandomCropFieldNumber = 21; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop SsdRandomCrop { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCrop ? (global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.SsdRandomCrop; + } + } + + /// Field number for the "ssd_random_crop_pad" field. + public const int SsdRandomCropPadFieldNumber = 22; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad SsdRandomCropPad { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPad ? (global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.SsdRandomCropPad; + } + } + + /// Field number for the "ssd_random_crop_fixed_aspect_ratio" field. + public const int SsdRandomCropFixedAspectRatioFieldNumber = 23; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio SsdRandomCropFixedAspectRatio { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio ? (global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio; + } + } + + /// Field number for the "ssd_random_crop_pad_fixed_aspect_ratio" field. + public const int SsdRandomCropPadFixedAspectRatioFieldNumber = 24; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio SsdRandomCropPadFixedAspectRatio { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio ? (global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio; + } + } + + /// Field number for the "random_vertical_flip" field. + public const int RandomVerticalFlipFieldNumber = 25; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip RandomVerticalFlip { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomVerticalFlip ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomVerticalFlip; + } + } + + /// Field number for the "random_rotation90" field. + public const int RandomRotation90FieldNumber = 26; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90 RandomRotation90 { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRotation90 ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomRotation90; + } + } + + /// Field number for the "rgb_to_gray" field. + public const int RgbToGrayFieldNumber = 27; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray RgbToGray { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RgbToGray ? (global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RgbToGray; + } + } + + /// Field number for the "convert_class_logits_to_softmax" field. + public const int ConvertClassLogitsToSoftmaxFieldNumber = 28; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax ConvertClassLogitsToSoftmax { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax ? (global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax; + } + } + + /// Field number for the "random_absolute_pad_image" field. + public const int RandomAbsolutePadImageFieldNumber = 29; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage RandomAbsolutePadImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAbsolutePadImage ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomAbsolutePadImage; + } + } + + /// Field number for the "random_self_concat_image" field. + public const int RandomSelfConcatImageFieldNumber = 30; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage RandomSelfConcatImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RandomSelfConcatImage ? (global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RandomSelfConcatImage; + } + } + + /// Field number for the "autoaugment_image" field. + public const int AutoaugmentImageFieldNumber = 31; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage AutoaugmentImage { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.AutoaugmentImage ? (global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.AutoaugmentImage; + } + } + + /// Field number for the "drop_label_probabilistically" field. + public const int DropLabelProbabilisticallyFieldNumber = 32; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically DropLabelProbabilistically { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.DropLabelProbabilistically ? (global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.DropLabelProbabilistically; + } + } + + /// Field number for the "remap_labels" field. + public const int RemapLabelsFieldNumber = 33; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels RemapLabels { + get { return preprocessingStepCase_ == PreprocessingStepOneofCase.RemapLabels ? (global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels) preprocessingStep_ : null; } + set { + preprocessingStep_ = value; + preprocessingStepCase_ = value == null ? PreprocessingStepOneofCase.None : PreprocessingStepOneofCase.RemapLabels; + } + } + + private object preprocessingStep_; + /// Enum of possible cases for the "preprocessing_step" oneof. + public enum PreprocessingStepOneofCase { + None = 0, + NormalizeImage = 1, + RandomHorizontalFlip = 2, + RandomPixelValueScale = 3, + RandomImageScale = 4, + RandomRgbToGray = 5, + RandomAdjustBrightness = 6, + RandomAdjustContrast = 7, + RandomAdjustHue = 8, + RandomAdjustSaturation = 9, + RandomDistortColor = 10, + RandomJitterBoxes = 11, + RandomCropImage = 12, + RandomPadImage = 13, + RandomCropPadImage = 14, + RandomCropToAspectRatio = 15, + RandomBlackPatches = 16, + RandomResizeMethod = 17, + ScaleBoxesToPixelCoordinates = 18, + ResizeImage = 19, + SubtractChannelMean = 20, + SsdRandomCrop = 21, + SsdRandomCropPad = 22, + SsdRandomCropFixedAspectRatio = 23, + SsdRandomCropPadFixedAspectRatio = 24, + RandomVerticalFlip = 25, + RandomRotation90 = 26, + RgbToGray = 27, + ConvertClassLogitsToSoftmax = 28, + RandomAbsolutePadImage = 29, + RandomSelfConcatImage = 30, + AutoaugmentImage = 31, + DropLabelProbabilistically = 32, + RemapLabels = 33, + } + private PreprocessingStepOneofCase preprocessingStepCase_ = PreprocessingStepOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public PreprocessingStepOneofCase PreprocessingStepCase { + get { return preprocessingStepCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearPreprocessingStep() { + preprocessingStepCase_ = PreprocessingStepOneofCase.None; + preprocessingStep_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as PreprocessingStep); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(PreprocessingStep other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(NormalizeImage, other.NormalizeImage)) return false; + if (!object.Equals(RandomHorizontalFlip, other.RandomHorizontalFlip)) return false; + if (!object.Equals(RandomPixelValueScale, other.RandomPixelValueScale)) return false; + if (!object.Equals(RandomImageScale, other.RandomImageScale)) return false; + if (!object.Equals(RandomRgbToGray, other.RandomRgbToGray)) return false; + if (!object.Equals(RandomAdjustBrightness, other.RandomAdjustBrightness)) return false; + if (!object.Equals(RandomAdjustContrast, other.RandomAdjustContrast)) return false; + if (!object.Equals(RandomAdjustHue, other.RandomAdjustHue)) return false; + if (!object.Equals(RandomAdjustSaturation, other.RandomAdjustSaturation)) return false; + if (!object.Equals(RandomDistortColor, other.RandomDistortColor)) return false; + if (!object.Equals(RandomJitterBoxes, other.RandomJitterBoxes)) return false; + if (!object.Equals(RandomCropImage, other.RandomCropImage)) return false; + if (!object.Equals(RandomPadImage, other.RandomPadImage)) return false; + if (!object.Equals(RandomCropPadImage, other.RandomCropPadImage)) return false; + if (!object.Equals(RandomCropToAspectRatio, other.RandomCropToAspectRatio)) return false; + if (!object.Equals(RandomBlackPatches, other.RandomBlackPatches)) return false; + if (!object.Equals(RandomResizeMethod, other.RandomResizeMethod)) return false; + if (!object.Equals(ScaleBoxesToPixelCoordinates, other.ScaleBoxesToPixelCoordinates)) return false; + if (!object.Equals(ResizeImage, other.ResizeImage)) return false; + if (!object.Equals(SubtractChannelMean, other.SubtractChannelMean)) return false; + if (!object.Equals(SsdRandomCrop, other.SsdRandomCrop)) return false; + if (!object.Equals(SsdRandomCropPad, other.SsdRandomCropPad)) return false; + if (!object.Equals(SsdRandomCropFixedAspectRatio, other.SsdRandomCropFixedAspectRatio)) return false; + if (!object.Equals(SsdRandomCropPadFixedAspectRatio, other.SsdRandomCropPadFixedAspectRatio)) return false; + if (!object.Equals(RandomVerticalFlip, other.RandomVerticalFlip)) return false; + if (!object.Equals(RandomRotation90, other.RandomRotation90)) return false; + if (!object.Equals(RgbToGray, other.RgbToGray)) return false; + if (!object.Equals(ConvertClassLogitsToSoftmax, other.ConvertClassLogitsToSoftmax)) return false; + if (!object.Equals(RandomAbsolutePadImage, other.RandomAbsolutePadImage)) return false; + if (!object.Equals(RandomSelfConcatImage, other.RandomSelfConcatImage)) return false; + if (!object.Equals(AutoaugmentImage, other.AutoaugmentImage)) return false; + if (!object.Equals(DropLabelProbabilistically, other.DropLabelProbabilistically)) return false; + if (!object.Equals(RemapLabels, other.RemapLabels)) return false; + if (PreprocessingStepCase != other.PreprocessingStepCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (preprocessingStepCase_ == PreprocessingStepOneofCase.NormalizeImage) hash ^= NormalizeImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomHorizontalFlip) hash ^= RandomHorizontalFlip.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPixelValueScale) hash ^= RandomPixelValueScale.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomImageScale) hash ^= RandomImageScale.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRgbToGray) hash ^= RandomRgbToGray.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustBrightness) hash ^= RandomAdjustBrightness.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustContrast) hash ^= RandomAdjustContrast.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustHue) hash ^= RandomAdjustHue.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustSaturation) hash ^= RandomAdjustSaturation.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomDistortColor) hash ^= RandomDistortColor.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomJitterBoxes) hash ^= RandomJitterBoxes.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropImage) hash ^= RandomCropImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPadImage) hash ^= RandomPadImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropPadImage) hash ^= RandomCropPadImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropToAspectRatio) hash ^= RandomCropToAspectRatio.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomBlackPatches) hash ^= RandomBlackPatches.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomResizeMethod) hash ^= RandomResizeMethod.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates) hash ^= ScaleBoxesToPixelCoordinates.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ResizeImage) hash ^= ResizeImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SubtractChannelMean) hash ^= SubtractChannelMean.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCrop) hash ^= SsdRandomCrop.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPad) hash ^= SsdRandomCropPad.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio) hash ^= SsdRandomCropFixedAspectRatio.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio) hash ^= SsdRandomCropPadFixedAspectRatio.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomVerticalFlip) hash ^= RandomVerticalFlip.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRotation90) hash ^= RandomRotation90.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RgbToGray) hash ^= RgbToGray.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax) hash ^= ConvertClassLogitsToSoftmax.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAbsolutePadImage) hash ^= RandomAbsolutePadImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomSelfConcatImage) hash ^= RandomSelfConcatImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.AutoaugmentImage) hash ^= AutoaugmentImage.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.DropLabelProbabilistically) hash ^= DropLabelProbabilistically.GetHashCode(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RemapLabels) hash ^= RemapLabels.GetHashCode(); + hash ^= (int) preprocessingStepCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (preprocessingStepCase_ == PreprocessingStepOneofCase.NormalizeImage) { + output.WriteRawTag(10); + output.WriteMessage(NormalizeImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomHorizontalFlip) { + output.WriteRawTag(18); + output.WriteMessage(RandomHorizontalFlip); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPixelValueScale) { + output.WriteRawTag(26); + output.WriteMessage(RandomPixelValueScale); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomImageScale) { + output.WriteRawTag(34); + output.WriteMessage(RandomImageScale); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRgbToGray) { + output.WriteRawTag(42); + output.WriteMessage(RandomRgbToGray); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustBrightness) { + output.WriteRawTag(50); + output.WriteMessage(RandomAdjustBrightness); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustContrast) { + output.WriteRawTag(58); + output.WriteMessage(RandomAdjustContrast); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustHue) { + output.WriteRawTag(66); + output.WriteMessage(RandomAdjustHue); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustSaturation) { + output.WriteRawTag(74); + output.WriteMessage(RandomAdjustSaturation); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomDistortColor) { + output.WriteRawTag(82); + output.WriteMessage(RandomDistortColor); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomJitterBoxes) { + output.WriteRawTag(90); + output.WriteMessage(RandomJitterBoxes); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropImage) { + output.WriteRawTag(98); + output.WriteMessage(RandomCropImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPadImage) { + output.WriteRawTag(106); + output.WriteMessage(RandomPadImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropPadImage) { + output.WriteRawTag(114); + output.WriteMessage(RandomCropPadImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropToAspectRatio) { + output.WriteRawTag(122); + output.WriteMessage(RandomCropToAspectRatio); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomBlackPatches) { + output.WriteRawTag(130, 1); + output.WriteMessage(RandomBlackPatches); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomResizeMethod) { + output.WriteRawTag(138, 1); + output.WriteMessage(RandomResizeMethod); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates) { + output.WriteRawTag(146, 1); + output.WriteMessage(ScaleBoxesToPixelCoordinates); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ResizeImage) { + output.WriteRawTag(154, 1); + output.WriteMessage(ResizeImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SubtractChannelMean) { + output.WriteRawTag(162, 1); + output.WriteMessage(SubtractChannelMean); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCrop) { + output.WriteRawTag(170, 1); + output.WriteMessage(SsdRandomCrop); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPad) { + output.WriteRawTag(178, 1); + output.WriteMessage(SsdRandomCropPad); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio) { + output.WriteRawTag(186, 1); + output.WriteMessage(SsdRandomCropFixedAspectRatio); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio) { + output.WriteRawTag(194, 1); + output.WriteMessage(SsdRandomCropPadFixedAspectRatio); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomVerticalFlip) { + output.WriteRawTag(202, 1); + output.WriteMessage(RandomVerticalFlip); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRotation90) { + output.WriteRawTag(210, 1); + output.WriteMessage(RandomRotation90); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RgbToGray) { + output.WriteRawTag(218, 1); + output.WriteMessage(RgbToGray); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax) { + output.WriteRawTag(226, 1); + output.WriteMessage(ConvertClassLogitsToSoftmax); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAbsolutePadImage) { + output.WriteRawTag(234, 1); + output.WriteMessage(RandomAbsolutePadImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomSelfConcatImage) { + output.WriteRawTag(242, 1); + output.WriteMessage(RandomSelfConcatImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.AutoaugmentImage) { + output.WriteRawTag(250, 1); + output.WriteMessage(AutoaugmentImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.DropLabelProbabilistically) { + output.WriteRawTag(130, 2); + output.WriteMessage(DropLabelProbabilistically); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RemapLabels) { + output.WriteRawTag(138, 2); + output.WriteMessage(RemapLabels); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (preprocessingStepCase_ == PreprocessingStepOneofCase.NormalizeImage) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(NormalizeImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomHorizontalFlip) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomHorizontalFlip); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPixelValueScale) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomPixelValueScale); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomImageScale) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomImageScale); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRgbToGray) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomRgbToGray); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustBrightness) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomAdjustBrightness); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustContrast) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomAdjustContrast); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustHue) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomAdjustHue); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustSaturation) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomAdjustSaturation); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomDistortColor) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomDistortColor); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomJitterBoxes) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomJitterBoxes); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropImage) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomCropImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPadImage) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomPadImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropPadImage) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomCropPadImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropToAspectRatio) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RandomCropToAspectRatio); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomBlackPatches) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RandomBlackPatches); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomResizeMethod) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RandomResizeMethod); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ScaleBoxesToPixelCoordinates); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ResizeImage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ResizeImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SubtractChannelMean) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SubtractChannelMean); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCrop) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SsdRandomCrop); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPad) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SsdRandomCropPad); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SsdRandomCropFixedAspectRatio); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(SsdRandomCropPadFixedAspectRatio); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomVerticalFlip) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RandomVerticalFlip); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRotation90) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RandomRotation90); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RgbToGray) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RgbToGray); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ConvertClassLogitsToSoftmax); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAbsolutePadImage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RandomAbsolutePadImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomSelfConcatImage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RandomSelfConcatImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.AutoaugmentImage) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(AutoaugmentImage); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.DropLabelProbabilistically) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(DropLabelProbabilistically); + } + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RemapLabels) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(RemapLabels); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(PreprocessingStep other) { + if (other == null) { + return; + } + switch (other.PreprocessingStepCase) { + case PreprocessingStepOneofCase.NormalizeImage: + if (NormalizeImage == null) { + NormalizeImage = new global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage(); + } + NormalizeImage.MergeFrom(other.NormalizeImage); + break; + case PreprocessingStepOneofCase.RandomHorizontalFlip: + if (RandomHorizontalFlip == null) { + RandomHorizontalFlip = new global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip(); + } + RandomHorizontalFlip.MergeFrom(other.RandomHorizontalFlip); + break; + case PreprocessingStepOneofCase.RandomPixelValueScale: + if (RandomPixelValueScale == null) { + RandomPixelValueScale = new global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale(); + } + RandomPixelValueScale.MergeFrom(other.RandomPixelValueScale); + break; + case PreprocessingStepOneofCase.RandomImageScale: + if (RandomImageScale == null) { + RandomImageScale = new global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale(); + } + RandomImageScale.MergeFrom(other.RandomImageScale); + break; + case PreprocessingStepOneofCase.RandomRgbToGray: + if (RandomRgbToGray == null) { + RandomRgbToGray = new global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray(); + } + RandomRgbToGray.MergeFrom(other.RandomRgbToGray); + break; + case PreprocessingStepOneofCase.RandomAdjustBrightness: + if (RandomAdjustBrightness == null) { + RandomAdjustBrightness = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness(); + } + RandomAdjustBrightness.MergeFrom(other.RandomAdjustBrightness); + break; + case PreprocessingStepOneofCase.RandomAdjustContrast: + if (RandomAdjustContrast == null) { + RandomAdjustContrast = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast(); + } + RandomAdjustContrast.MergeFrom(other.RandomAdjustContrast); + break; + case PreprocessingStepOneofCase.RandomAdjustHue: + if (RandomAdjustHue == null) { + RandomAdjustHue = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue(); + } + RandomAdjustHue.MergeFrom(other.RandomAdjustHue); + break; + case PreprocessingStepOneofCase.RandomAdjustSaturation: + if (RandomAdjustSaturation == null) { + RandomAdjustSaturation = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation(); + } + RandomAdjustSaturation.MergeFrom(other.RandomAdjustSaturation); + break; + case PreprocessingStepOneofCase.RandomDistortColor: + if (RandomDistortColor == null) { + RandomDistortColor = new global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor(); + } + RandomDistortColor.MergeFrom(other.RandomDistortColor); + break; + case PreprocessingStepOneofCase.RandomJitterBoxes: + if (RandomJitterBoxes == null) { + RandomJitterBoxes = new global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes(); + } + RandomJitterBoxes.MergeFrom(other.RandomJitterBoxes); + break; + case PreprocessingStepOneofCase.RandomCropImage: + if (RandomCropImage == null) { + RandomCropImage = new global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage(); + } + RandomCropImage.MergeFrom(other.RandomCropImage); + break; + case PreprocessingStepOneofCase.RandomPadImage: + if (RandomPadImage == null) { + RandomPadImage = new global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage(); + } + RandomPadImage.MergeFrom(other.RandomPadImage); + break; + case PreprocessingStepOneofCase.RandomCropPadImage: + if (RandomCropPadImage == null) { + RandomCropPadImage = new global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage(); + } + RandomCropPadImage.MergeFrom(other.RandomCropPadImage); + break; + case PreprocessingStepOneofCase.RandomCropToAspectRatio: + if (RandomCropToAspectRatio == null) { + RandomCropToAspectRatio = new global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio(); + } + RandomCropToAspectRatio.MergeFrom(other.RandomCropToAspectRatio); + break; + case PreprocessingStepOneofCase.RandomBlackPatches: + if (RandomBlackPatches == null) { + RandomBlackPatches = new global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches(); + } + RandomBlackPatches.MergeFrom(other.RandomBlackPatches); + break; + case PreprocessingStepOneofCase.RandomResizeMethod: + if (RandomResizeMethod == null) { + RandomResizeMethod = new global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod(); + } + RandomResizeMethod.MergeFrom(other.RandomResizeMethod); + break; + case PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates: + if (ScaleBoxesToPixelCoordinates == null) { + ScaleBoxesToPixelCoordinates = new global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates(); + } + ScaleBoxesToPixelCoordinates.MergeFrom(other.ScaleBoxesToPixelCoordinates); + break; + case PreprocessingStepOneofCase.ResizeImage: + if (ResizeImage == null) { + ResizeImage = new global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage(); + } + ResizeImage.MergeFrom(other.ResizeImage); + break; + case PreprocessingStepOneofCase.SubtractChannelMean: + if (SubtractChannelMean == null) { + SubtractChannelMean = new global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean(); + } + SubtractChannelMean.MergeFrom(other.SubtractChannelMean); + break; + case PreprocessingStepOneofCase.SsdRandomCrop: + if (SsdRandomCrop == null) { + SsdRandomCrop = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop(); + } + SsdRandomCrop.MergeFrom(other.SsdRandomCrop); + break; + case PreprocessingStepOneofCase.SsdRandomCropPad: + if (SsdRandomCropPad == null) { + SsdRandomCropPad = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad(); + } + SsdRandomCropPad.MergeFrom(other.SsdRandomCropPad); + break; + case PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio: + if (SsdRandomCropFixedAspectRatio == null) { + SsdRandomCropFixedAspectRatio = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio(); + } + SsdRandomCropFixedAspectRatio.MergeFrom(other.SsdRandomCropFixedAspectRatio); + break; + case PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio: + if (SsdRandomCropPadFixedAspectRatio == null) { + SsdRandomCropPadFixedAspectRatio = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio(); + } + SsdRandomCropPadFixedAspectRatio.MergeFrom(other.SsdRandomCropPadFixedAspectRatio); + break; + case PreprocessingStepOneofCase.RandomVerticalFlip: + if (RandomVerticalFlip == null) { + RandomVerticalFlip = new global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip(); + } + RandomVerticalFlip.MergeFrom(other.RandomVerticalFlip); + break; + case PreprocessingStepOneofCase.RandomRotation90: + if (RandomRotation90 == null) { + RandomRotation90 = new global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90(); + } + RandomRotation90.MergeFrom(other.RandomRotation90); + break; + case PreprocessingStepOneofCase.RgbToGray: + if (RgbToGray == null) { + RgbToGray = new global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray(); + } + RgbToGray.MergeFrom(other.RgbToGray); + break; + case PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax: + if (ConvertClassLogitsToSoftmax == null) { + ConvertClassLogitsToSoftmax = new global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax(); + } + ConvertClassLogitsToSoftmax.MergeFrom(other.ConvertClassLogitsToSoftmax); + break; + case PreprocessingStepOneofCase.RandomAbsolutePadImage: + if (RandomAbsolutePadImage == null) { + RandomAbsolutePadImage = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage(); + } + RandomAbsolutePadImage.MergeFrom(other.RandomAbsolutePadImage); + break; + case PreprocessingStepOneofCase.RandomSelfConcatImage: + if (RandomSelfConcatImage == null) { + RandomSelfConcatImage = new global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage(); + } + RandomSelfConcatImage.MergeFrom(other.RandomSelfConcatImage); + break; + case PreprocessingStepOneofCase.AutoaugmentImage: + if (AutoaugmentImage == null) { + AutoaugmentImage = new global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage(); + } + AutoaugmentImage.MergeFrom(other.AutoaugmentImage); + break; + case PreprocessingStepOneofCase.DropLabelProbabilistically: + if (DropLabelProbabilistically == null) { + DropLabelProbabilistically = new global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically(); + } + DropLabelProbabilistically.MergeFrom(other.DropLabelProbabilistically); + break; + case PreprocessingStepOneofCase.RemapLabels: + if (RemapLabels == null) { + RemapLabels = new global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels(); + } + RemapLabels.MergeFrom(other.RemapLabels); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.NormalizeImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.NormalizeImage) { + subBuilder.MergeFrom(NormalizeImage); + } + input.ReadMessage(subBuilder); + NormalizeImage = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomHorizontalFlip(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomHorizontalFlip) { + subBuilder.MergeFrom(RandomHorizontalFlip); + } + input.ReadMessage(subBuilder); + RandomHorizontalFlip = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomPixelValueScale(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPixelValueScale) { + subBuilder.MergeFrom(RandomPixelValueScale); + } + input.ReadMessage(subBuilder); + RandomPixelValueScale = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomImageScale(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomImageScale) { + subBuilder.MergeFrom(RandomImageScale); + } + input.ReadMessage(subBuilder); + RandomImageScale = subBuilder; + break; + } + case 42: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomRGBtoGray(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRgbToGray) { + subBuilder.MergeFrom(RandomRgbToGray); + } + input.ReadMessage(subBuilder); + RandomRgbToGray = subBuilder; + break; + } + case 50: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustBrightness(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustBrightness) { + subBuilder.MergeFrom(RandomAdjustBrightness); + } + input.ReadMessage(subBuilder); + RandomAdjustBrightness = subBuilder; + break; + } + case 58: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustContrast(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustContrast) { + subBuilder.MergeFrom(RandomAdjustContrast); + } + input.ReadMessage(subBuilder); + RandomAdjustContrast = subBuilder; + break; + } + case 66: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustHue(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustHue) { + subBuilder.MergeFrom(RandomAdjustHue); + } + input.ReadMessage(subBuilder); + RandomAdjustHue = subBuilder; + break; + } + case 74: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAdjustSaturation(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAdjustSaturation) { + subBuilder.MergeFrom(RandomAdjustSaturation); + } + input.ReadMessage(subBuilder); + RandomAdjustSaturation = subBuilder; + break; + } + case 82: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomDistortColor(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomDistortColor) { + subBuilder.MergeFrom(RandomDistortColor); + } + input.ReadMessage(subBuilder); + RandomDistortColor = subBuilder; + break; + } + case 90: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomJitterBoxes(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomJitterBoxes) { + subBuilder.MergeFrom(RandomJitterBoxes); + } + input.ReadMessage(subBuilder); + RandomJitterBoxes = subBuilder; + break; + } + case 98: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomCropImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropImage) { + subBuilder.MergeFrom(RandomCropImage); + } + input.ReadMessage(subBuilder); + RandomCropImage = subBuilder; + break; + } + case 106: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomPadImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomPadImage) { + subBuilder.MergeFrom(RandomPadImage); + } + input.ReadMessage(subBuilder); + RandomPadImage = subBuilder; + break; + } + case 114: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomCropPadImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropPadImage) { + subBuilder.MergeFrom(RandomCropPadImage); + } + input.ReadMessage(subBuilder); + RandomCropPadImage = subBuilder; + break; + } + case 122: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomCropToAspectRatio(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomCropToAspectRatio) { + subBuilder.MergeFrom(RandomCropToAspectRatio); + } + input.ReadMessage(subBuilder); + RandomCropToAspectRatio = subBuilder; + break; + } + case 130: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomBlackPatches(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomBlackPatches) { + subBuilder.MergeFrom(RandomBlackPatches); + } + input.ReadMessage(subBuilder); + RandomBlackPatches = subBuilder; + break; + } + case 138: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomResizeMethod(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomResizeMethod) { + subBuilder.MergeFrom(RandomResizeMethod); + } + input.ReadMessage(subBuilder); + RandomResizeMethod = subBuilder; + break; + } + case 146: { + global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ScaleBoxesToPixelCoordinates(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ScaleBoxesToPixelCoordinates) { + subBuilder.MergeFrom(ScaleBoxesToPixelCoordinates); + } + input.ReadMessage(subBuilder); + ScaleBoxesToPixelCoordinates = subBuilder; + break; + } + case 154: { + global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ResizeImage) { + subBuilder.MergeFrom(ResizeImage); + } + input.ReadMessage(subBuilder); + ResizeImage = subBuilder; + break; + } + case 162: { + global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SubtractChannelMean(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SubtractChannelMean) { + subBuilder.MergeFrom(SubtractChannelMean); + } + input.ReadMessage(subBuilder); + SubtractChannelMean = subBuilder; + break; + } + case 170: { + global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCrop(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCrop) { + subBuilder.MergeFrom(SsdRandomCrop); + } + input.ReadMessage(subBuilder); + SsdRandomCrop = subBuilder; + break; + } + case 178: { + global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPad(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPad) { + subBuilder.MergeFrom(SsdRandomCropPad); + } + input.ReadMessage(subBuilder); + SsdRandomCropPad = subBuilder; + break; + } + case 186: { + global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatio(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropFixedAspectRatio) { + subBuilder.MergeFrom(SsdRandomCropFixedAspectRatio); + } + input.ReadMessage(subBuilder); + SsdRandomCropFixedAspectRatio = subBuilder; + break; + } + case 194: { + global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatio(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.SsdRandomCropPadFixedAspectRatio) { + subBuilder.MergeFrom(SsdRandomCropPadFixedAspectRatio); + } + input.ReadMessage(subBuilder); + SsdRandomCropPadFixedAspectRatio = subBuilder; + break; + } + case 202: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomVerticalFlip(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomVerticalFlip) { + subBuilder.MergeFrom(RandomVerticalFlip); + } + input.ReadMessage(subBuilder); + RandomVerticalFlip = subBuilder; + break; + } + case 210: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90 subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomRotation90(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomRotation90) { + subBuilder.MergeFrom(RandomRotation90); + } + input.ReadMessage(subBuilder); + RandomRotation90 = subBuilder; + break; + } + case 218: { + global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RGBtoGray(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RgbToGray) { + subBuilder.MergeFrom(RgbToGray); + } + input.ReadMessage(subBuilder); + RgbToGray = subBuilder; + break; + } + case 226: { + global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ConvertClassLogitsToSoftmax(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.ConvertClassLogitsToSoftmax) { + subBuilder.MergeFrom(ConvertClassLogitsToSoftmax); + } + input.ReadMessage(subBuilder); + ConvertClassLogitsToSoftmax = subBuilder; + break; + } + case 234: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomAbsolutePadImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomAbsolutePadImage) { + subBuilder.MergeFrom(RandomAbsolutePadImage); + } + input.ReadMessage(subBuilder); + RandomAbsolutePadImage = subBuilder; + break; + } + case 242: { + global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RandomSelfConcatImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RandomSelfConcatImage) { + subBuilder.MergeFrom(RandomSelfConcatImage); + } + input.ReadMessage(subBuilder); + RandomSelfConcatImage = subBuilder; + break; + } + case 250: { + global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.AutoAugmentImage(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.AutoaugmentImage) { + subBuilder.MergeFrom(AutoaugmentImage); + } + input.ReadMessage(subBuilder); + AutoaugmentImage = subBuilder; + break; + } + case 258: { + global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.DropLabelProbabilistically(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.DropLabelProbabilistically) { + subBuilder.MergeFrom(DropLabelProbabilistically); + } + input.ReadMessage(subBuilder); + DropLabelProbabilistically = subBuilder; + break; + } + case 266: { + global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.RemapLabels(); + if (preprocessingStepCase_ == PreprocessingStepOneofCase.RemapLabels) { + subBuilder.MergeFrom(RemapLabels); + } + input.ReadMessage(subBuilder); + RemapLabels = subBuilder; + break; + } + } + } + } + + } + + /// + /// Normalizes pixel values in an image. + /// For every channel in the image, moves the pixel values from the range + /// [original_minval, original_maxval] to [target_minval, target_maxval]. + /// + public sealed partial class NormalizeImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NormalizeImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NormalizeImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NormalizeImage(NormalizeImage other) : this() { + originalMinval_ = other.originalMinval_; + originalMaxval_ = other.originalMaxval_; + targetMinval_ = other.targetMinval_; + targetMaxval_ = other.targetMaxval_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NormalizeImage Clone() { + return new NormalizeImage(this); + } + + /// Field number for the "original_minval" field. + public const int OriginalMinvalFieldNumber = 1; + private float originalMinval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OriginalMinval { + get { return originalMinval_; } + set { + originalMinval_ = value; + } + } + + /// Field number for the "original_maxval" field. + public const int OriginalMaxvalFieldNumber = 2; + private float originalMaxval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OriginalMaxval { + get { return originalMaxval_; } + set { + originalMaxval_ = value; + } + } + + /// Field number for the "target_minval" field. + public const int TargetMinvalFieldNumber = 3; + private float targetMinval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float TargetMinval { + get { return targetMinval_; } + set { + targetMinval_ = value; + } + } + + /// Field number for the "target_maxval" field. + public const int TargetMaxvalFieldNumber = 4; + private float targetMaxval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float TargetMaxval { + get { return targetMaxval_; } + set { + targetMaxval_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as NormalizeImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(NormalizeImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OriginalMinval, other.OriginalMinval)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OriginalMaxval, other.OriginalMaxval)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TargetMinval, other.TargetMinval)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(TargetMaxval, other.TargetMaxval)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (OriginalMinval != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OriginalMinval); + if (OriginalMaxval != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OriginalMaxval); + if (TargetMinval != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TargetMinval); + if (TargetMaxval != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TargetMaxval); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (OriginalMinval != 0F) { + output.WriteRawTag(13); + output.WriteFloat(OriginalMinval); + } + if (OriginalMaxval != 0F) { + output.WriteRawTag(21); + output.WriteFloat(OriginalMaxval); + } + if (TargetMinval != 0F) { + output.WriteRawTag(29); + output.WriteFloat(TargetMinval); + } + if (TargetMaxval != 0F) { + output.WriteRawTag(37); + output.WriteFloat(TargetMaxval); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (OriginalMinval != 0F) { + size += 1 + 4; + } + if (OriginalMaxval != 0F) { + size += 1 + 4; + } + if (TargetMinval != 0F) { + size += 1 + 4; + } + if (TargetMaxval != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(NormalizeImage other) { + if (other == null) { + return; + } + if (other.OriginalMinval != 0F) { + OriginalMinval = other.OriginalMinval; + } + if (other.OriginalMaxval != 0F) { + OriginalMaxval = other.OriginalMaxval; + } + if (other.TargetMinval != 0F) { + TargetMinval = other.TargetMinval; + } + if (other.TargetMaxval != 0F) { + TargetMaxval = other.TargetMaxval; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + OriginalMinval = input.ReadFloat(); + break; + } + case 21: { + OriginalMaxval = input.ReadFloat(); + break; + } + case 29: { + TargetMinval = input.ReadFloat(); + break; + } + case 37: { + TargetMaxval = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly horizontally flips the image and detections 50% of the time. + /// + public sealed partial class RandomHorizontalFlip : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomHorizontalFlip()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomHorizontalFlip() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomHorizontalFlip(RandomHorizontalFlip other) : this() { + keypointFlipPermutation_ = other.keypointFlipPermutation_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomHorizontalFlip Clone() { + return new RandomHorizontalFlip(this); + } + + /// Field number for the "keypoint_flip_permutation" field. + public const int KeypointFlipPermutationFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keypointFlipPermutation_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField keypointFlipPermutation_ = new pbc::RepeatedField(); + /// + /// Specifies a mapping from the original keypoint indices to horizontally + /// flipped indices. This is used in the event that keypoints are specified, + /// in which case when the image is horizontally flipped the keypoints will + /// need to be permuted. E.g. for keypoints representing left_eye, right_eye, + /// nose_tip, mouth, left_ear, right_ear (in that order), one might specify + /// the keypoint_flip_permutation below: + /// keypoint_flip_permutation: 1 + /// keypoint_flip_permutation: 0 + /// keypoint_flip_permutation: 2 + /// keypoint_flip_permutation: 3 + /// keypoint_flip_permutation: 5 + /// keypoint_flip_permutation: 4 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField KeypointFlipPermutation { + get { return keypointFlipPermutation_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomHorizontalFlip); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomHorizontalFlip other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keypointFlipPermutation_.Equals(other.keypointFlipPermutation_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= keypointFlipPermutation_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + keypointFlipPermutation_.WriteTo(output, _repeated_keypointFlipPermutation_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += keypointFlipPermutation_.CalculateSize(_repeated_keypointFlipPermutation_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomHorizontalFlip other) { + if (other == null) { + return; + } + keypointFlipPermutation_.Add(other.keypointFlipPermutation_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + keypointFlipPermutation_.AddEntriesFrom(input, _repeated_keypointFlipPermutation_codec); + break; + } + } + } + } + + } + + /// + /// Randomly vertically flips the image and detections 50% of the time. + /// + public sealed partial class RandomVerticalFlip : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomVerticalFlip()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomVerticalFlip() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomVerticalFlip(RandomVerticalFlip other) : this() { + keypointFlipPermutation_ = other.keypointFlipPermutation_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomVerticalFlip Clone() { + return new RandomVerticalFlip(this); + } + + /// Field number for the "keypoint_flip_permutation" field. + public const int KeypointFlipPermutationFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keypointFlipPermutation_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField keypointFlipPermutation_ = new pbc::RepeatedField(); + /// + /// Specifies a mapping from the original keypoint indices to vertically + /// flipped indices. This is used in the event that keypoints are specified, + /// in which case when the image is vertically flipped the keypoints will + /// need to be permuted. E.g. for keypoints representing left_eye, right_eye, + /// nose_tip, mouth, left_ear, right_ear (in that order), one might specify + /// the keypoint_flip_permutation below: + /// keypoint_flip_permutation: 1 + /// keypoint_flip_permutation: 0 + /// keypoint_flip_permutation: 2 + /// keypoint_flip_permutation: 3 + /// keypoint_flip_permutation: 5 + /// keypoint_flip_permutation: 4 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField KeypointFlipPermutation { + get { return keypointFlipPermutation_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomVerticalFlip); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomVerticalFlip other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keypointFlipPermutation_.Equals(other.keypointFlipPermutation_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= keypointFlipPermutation_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + keypointFlipPermutation_.WriteTo(output, _repeated_keypointFlipPermutation_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += keypointFlipPermutation_.CalculateSize(_repeated_keypointFlipPermutation_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomVerticalFlip other) { + if (other == null) { + return; + } + keypointFlipPermutation_.Add(other.keypointFlipPermutation_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + keypointFlipPermutation_.AddEntriesFrom(input, _repeated_keypointFlipPermutation_codec); + break; + } + } + } + } + + } + + /// + /// Randomly rotates the image and detections by 90 degrees counter-clockwise + /// 50% of the time. + /// + public sealed partial class RandomRotation90 : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomRotation90()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomRotation90() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomRotation90(RandomRotation90 other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomRotation90 Clone() { + return new RandomRotation90(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomRotation90); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomRotation90 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomRotation90 other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Randomly scales the values of all pixels in the image by some constant value + /// between [minval, maxval], then clip the value to a range between [0, 1.0]. + /// + public sealed partial class RandomPixelValueScale : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomPixelValueScale()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomPixelValueScale() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomPixelValueScale(RandomPixelValueScale other) : this() { + minval_ = other.minval_; + maxval_ = other.maxval_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomPixelValueScale Clone() { + return new RandomPixelValueScale(this); + } + + /// Field number for the "minval" field. + public const int MinvalFieldNumber = 1; + private float minval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Minval { + get { return minval_; } + set { + minval_ = value; + } + } + + /// Field number for the "maxval" field. + public const int MaxvalFieldNumber = 2; + private float maxval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Maxval { + get { return maxval_; } + set { + maxval_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomPixelValueScale); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomPixelValueScale other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Minval, other.Minval)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Maxval, other.Maxval)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Minval != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Minval); + if (Maxval != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Maxval); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Minval != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Minval); + } + if (Maxval != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Maxval); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Minval != 0F) { + size += 1 + 4; + } + if (Maxval != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomPixelValueScale other) { + if (other == null) { + return; + } + if (other.Minval != 0F) { + Minval = other.Minval; + } + if (other.Maxval != 0F) { + Maxval = other.Maxval; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Minval = input.ReadFloat(); + break; + } + case 21: { + Maxval = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly enlarges or shrinks image (keeping aspect ratio). + /// + public sealed partial class RandomImageScale : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomImageScale()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomImageScale() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomImageScale(RandomImageScale other) : this() { + minScaleRatio_ = other.minScaleRatio_; + maxScaleRatio_ = other.maxScaleRatio_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomImageScale Clone() { + return new RandomImageScale(this); + } + + /// Field number for the "min_scale_ratio" field. + public const int MinScaleRatioFieldNumber = 1; + private float minScaleRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinScaleRatio { + get { return minScaleRatio_; } + set { + minScaleRatio_ = value; + } + } + + /// Field number for the "max_scale_ratio" field. + public const int MaxScaleRatioFieldNumber = 2; + private float maxScaleRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxScaleRatio { + get { return maxScaleRatio_; } + set { + maxScaleRatio_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomImageScale); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomImageScale other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinScaleRatio, other.MinScaleRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxScaleRatio, other.MaxScaleRatio)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinScaleRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinScaleRatio); + if (MaxScaleRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxScaleRatio); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinScaleRatio != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinScaleRatio); + } + if (MaxScaleRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MaxScaleRatio); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinScaleRatio != 0F) { + size += 1 + 4; + } + if (MaxScaleRatio != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomImageScale other) { + if (other == null) { + return; + } + if (other.MinScaleRatio != 0F) { + MinScaleRatio = other.MinScaleRatio; + } + if (other.MaxScaleRatio != 0F) { + MaxScaleRatio = other.MaxScaleRatio; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinScaleRatio = input.ReadFloat(); + break; + } + case 21: { + MaxScaleRatio = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly convert entire image to grey scale. + /// + public sealed partial class RandomRGBtoGray : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomRGBtoGray()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomRGBtoGray() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomRGBtoGray(RandomRGBtoGray other) : this() { + probability_ = other.probability_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomRGBtoGray Clone() { + return new RandomRGBtoGray(this); + } + + /// Field number for the "probability" field. + public const int ProbabilityFieldNumber = 1; + private float probability_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Probability { + get { return probability_; } + set { + probability_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomRGBtoGray); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomRGBtoGray other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Probability, other.Probability)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Probability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Probability); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Probability != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Probability); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Probability != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomRGBtoGray other) { + if (other == null) { + return; + } + if (other.Probability != 0F) { + Probability = other.Probability; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Probability = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly changes image brightness by up to max_delta. Image outputs will be + /// saturated between 0 and 1. + /// + public sealed partial class RandomAdjustBrightness : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomAdjustBrightness()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustBrightness() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustBrightness(RandomAdjustBrightness other) : this() { + maxDelta_ = other.maxDelta_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustBrightness Clone() { + return new RandomAdjustBrightness(this); + } + + /// Field number for the "max_delta" field. + public const int MaxDeltaFieldNumber = 1; + private float maxDelta_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxDelta { + get { return maxDelta_; } + set { + maxDelta_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomAdjustBrightness); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomAdjustBrightness other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxDelta, other.MaxDelta)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MaxDelta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxDelta); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MaxDelta != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MaxDelta); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MaxDelta != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomAdjustBrightness other) { + if (other == null) { + return; + } + if (other.MaxDelta != 0F) { + MaxDelta = other.MaxDelta; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MaxDelta = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly scales contract by a value between [min_delta, max_delta]. + /// + public sealed partial class RandomAdjustContrast : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomAdjustContrast()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustContrast() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustContrast(RandomAdjustContrast other) : this() { + minDelta_ = other.minDelta_; + maxDelta_ = other.maxDelta_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustContrast Clone() { + return new RandomAdjustContrast(this); + } + + /// Field number for the "min_delta" field. + public const int MinDeltaFieldNumber = 1; + private float minDelta_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinDelta { + get { return minDelta_; } + set { + minDelta_ = value; + } + } + + /// Field number for the "max_delta" field. + public const int MaxDeltaFieldNumber = 2; + private float maxDelta_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxDelta { + get { return maxDelta_; } + set { + maxDelta_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomAdjustContrast); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomAdjustContrast other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinDelta, other.MinDelta)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxDelta, other.MaxDelta)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinDelta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinDelta); + if (MaxDelta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxDelta); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinDelta != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinDelta); + } + if (MaxDelta != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MaxDelta); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinDelta != 0F) { + size += 1 + 4; + } + if (MaxDelta != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomAdjustContrast other) { + if (other == null) { + return; + } + if (other.MinDelta != 0F) { + MinDelta = other.MinDelta; + } + if (other.MaxDelta != 0F) { + MaxDelta = other.MaxDelta; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinDelta = input.ReadFloat(); + break; + } + case 21: { + MaxDelta = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly alters hue by a value of up to max_delta. + /// + public sealed partial class RandomAdjustHue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomAdjustHue()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustHue() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustHue(RandomAdjustHue other) : this() { + maxDelta_ = other.maxDelta_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustHue Clone() { + return new RandomAdjustHue(this); + } + + /// Field number for the "max_delta" field. + public const int MaxDeltaFieldNumber = 1; + private float maxDelta_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxDelta { + get { return maxDelta_; } + set { + maxDelta_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomAdjustHue); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomAdjustHue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxDelta, other.MaxDelta)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MaxDelta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxDelta); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MaxDelta != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MaxDelta); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MaxDelta != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomAdjustHue other) { + if (other == null) { + return; + } + if (other.MaxDelta != 0F) { + MaxDelta = other.MaxDelta; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MaxDelta = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly changes saturation by a value between [min_delta, max_delta]. + /// + public sealed partial class RandomAdjustSaturation : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomAdjustSaturation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustSaturation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustSaturation(RandomAdjustSaturation other) : this() { + minDelta_ = other.minDelta_; + maxDelta_ = other.maxDelta_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAdjustSaturation Clone() { + return new RandomAdjustSaturation(this); + } + + /// Field number for the "min_delta" field. + public const int MinDeltaFieldNumber = 1; + private float minDelta_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinDelta { + get { return minDelta_; } + set { + minDelta_ = value; + } + } + + /// Field number for the "max_delta" field. + public const int MaxDeltaFieldNumber = 2; + private float maxDelta_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxDelta { + get { return maxDelta_; } + set { + maxDelta_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomAdjustSaturation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomAdjustSaturation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinDelta, other.MinDelta)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxDelta, other.MaxDelta)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinDelta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinDelta); + if (MaxDelta != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxDelta); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinDelta != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinDelta); + } + if (MaxDelta != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MaxDelta); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinDelta != 0F) { + size += 1 + 4; + } + if (MaxDelta != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomAdjustSaturation other) { + if (other == null) { + return; + } + if (other.MinDelta != 0F) { + MinDelta = other.MinDelta; + } + if (other.MaxDelta != 0F) { + MaxDelta = other.MaxDelta; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinDelta = input.ReadFloat(); + break; + } + case 21: { + MaxDelta = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Performs a random color distortion. color_orderings should either be 0 or 1. + /// + public sealed partial class RandomDistortColor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomDistortColor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomDistortColor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomDistortColor(RandomDistortColor other) : this() { + colorOrdering_ = other.colorOrdering_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomDistortColor Clone() { + return new RandomDistortColor(this); + } + + /// Field number for the "color_ordering" field. + public const int ColorOrderingFieldNumber = 1; + private int colorOrdering_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ColorOrdering { + get { return colorOrdering_; } + set { + colorOrdering_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomDistortColor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomDistortColor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ColorOrdering != other.ColorOrdering) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ColorOrdering != 0) hash ^= ColorOrdering.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (ColorOrdering != 0) { + output.WriteRawTag(8); + output.WriteInt32(ColorOrdering); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ColorOrdering != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ColorOrdering); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomDistortColor other) { + if (other == null) { + return; + } + if (other.ColorOrdering != 0) { + ColorOrdering = other.ColorOrdering; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ColorOrdering = input.ReadInt32(); + break; + } + } + } + } + + } + + /// + /// Randomly jitters corners of boxes in the image determined by ratio. + /// ie. If a box is [100, 200] and ratio is 0.02, the corners can move by [1, 4]. + /// + public sealed partial class RandomJitterBoxes : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomJitterBoxes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomJitterBoxes() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomJitterBoxes(RandomJitterBoxes other) : this() { + ratio_ = other.ratio_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomJitterBoxes Clone() { + return new RandomJitterBoxes(this); + } + + /// Field number for the "ratio" field. + public const int RatioFieldNumber = 1; + private float ratio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Ratio { + get { return ratio_; } + set { + ratio_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomJitterBoxes); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomJitterBoxes other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Ratio, other.Ratio)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Ratio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Ratio); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Ratio != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Ratio); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Ratio != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomJitterBoxes other) { + if (other == null) { + return; + } + if (other.Ratio != 0F) { + Ratio = other.Ratio; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Ratio = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly crops the image and bounding boxes. + /// + public sealed partial class RandomCropImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomCropImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropImage(RandomCropImage other) : this() { + minObjectCovered_ = other.minObjectCovered_; + minAspectRatio_ = other.minAspectRatio_; + maxAspectRatio_ = other.maxAspectRatio_; + minArea_ = other.minArea_; + maxArea_ = other.maxArea_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + randomCoef_ = other.randomCoef_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropImage Clone() { + return new RandomCropImage(this); + } + + /// Field number for the "min_object_covered" field. + public const int MinObjectCoveredFieldNumber = 1; + private float minObjectCovered_; + /// + /// Cropped image must cover at least one box by this fraction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinObjectCovered { + get { return minObjectCovered_; } + set { + minObjectCovered_ = value; + } + } + + /// Field number for the "min_aspect_ratio" field. + public const int MinAspectRatioFieldNumber = 2; + private float minAspectRatio_; + /// + /// Aspect ratio bounds of cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinAspectRatio { + get { return minAspectRatio_; } + set { + minAspectRatio_ = value; + } + } + + /// Field number for the "max_aspect_ratio" field. + public const int MaxAspectRatioFieldNumber = 3; + private float maxAspectRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxAspectRatio { + get { return maxAspectRatio_; } + set { + maxAspectRatio_ = value; + } + } + + /// Field number for the "min_area" field. + public const int MinAreaFieldNumber = 4; + private float minArea_; + /// + /// Allowed area ratio of cropped image to original image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinArea { + get { return minArea_; } + set { + minArea_ = value; + } + } + + /// Field number for the "max_area" field. + public const int MaxAreaFieldNumber = 5; + private float maxArea_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxArea { + get { return maxArea_; } + set { + maxArea_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 6; + private float overlapThresh_; + /// + /// Minimum overlap threshold of cropped boxes to keep in new image. If the + /// ratio between a cropped bounding box and the original is less than this + /// value, it is removed from the new image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 8; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + /// Field number for the "random_coef" field. + public const int RandomCoefFieldNumber = 7; + private float randomCoef_; + /// + /// Probability of keeping the original image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RandomCoef { + get { return randomCoef_; } + set { + randomCoef_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomCropImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomCropImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinObjectCovered, other.MinObjectCovered)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinAspectRatio, other.MinAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxAspectRatio, other.MaxAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinArea, other.MinArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxArea, other.MaxArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RandomCoef, other.RandomCoef)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinObjectCovered != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinObjectCovered); + if (MinAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinAspectRatio); + if (MaxAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxAspectRatio); + if (MinArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinArea); + if (MaxArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxArea); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (RandomCoef != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RandomCoef); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinObjectCovered != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinObjectCovered); + } + if (MinAspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MinAspectRatio); + } + if (MaxAspectRatio != 0F) { + output.WriteRawTag(29); + output.WriteFloat(MaxAspectRatio); + } + if (MinArea != 0F) { + output.WriteRawTag(37); + output.WriteFloat(MinArea); + } + if (MaxArea != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MaxArea); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(53); + output.WriteFloat(OverlapThresh); + } + if (RandomCoef != 0F) { + output.WriteRawTag(61); + output.WriteFloat(RandomCoef); + } + if (ClipBoxes != false) { + output.WriteRawTag(64); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinObjectCovered != 0F) { + size += 1 + 4; + } + if (MinAspectRatio != 0F) { + size += 1 + 4; + } + if (MaxAspectRatio != 0F) { + size += 1 + 4; + } + if (MinArea != 0F) { + size += 1 + 4; + } + if (MaxArea != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (RandomCoef != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomCropImage other) { + if (other == null) { + return; + } + if (other.MinObjectCovered != 0F) { + MinObjectCovered = other.MinObjectCovered; + } + if (other.MinAspectRatio != 0F) { + MinAspectRatio = other.MinAspectRatio; + } + if (other.MaxAspectRatio != 0F) { + MaxAspectRatio = other.MaxAspectRatio; + } + if (other.MinArea != 0F) { + MinArea = other.MinArea; + } + if (other.MaxArea != 0F) { + MaxArea = other.MaxArea; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + if (other.RandomCoef != 0F) { + RandomCoef = other.RandomCoef; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinObjectCovered = input.ReadFloat(); + break; + } + case 21: { + MinAspectRatio = input.ReadFloat(); + break; + } + case 29: { + MaxAspectRatio = input.ReadFloat(); + break; + } + case 37: { + MinArea = input.ReadFloat(); + break; + } + case 45: { + MaxArea = input.ReadFloat(); + break; + } + case 53: { + OverlapThresh = input.ReadFloat(); + break; + } + case 61: { + RandomCoef = input.ReadFloat(); + break; + } + case 64: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly adds padding to the image. + /// + public sealed partial class RandomPadImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomPadImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomPadImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomPadImage(RandomPadImage other) : this() { + minImageHeight_ = other.minImageHeight_; + minImageWidth_ = other.minImageWidth_; + maxImageHeight_ = other.maxImageHeight_; + maxImageWidth_ = other.maxImageWidth_; + padColor_ = other.padColor_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomPadImage Clone() { + return new RandomPadImage(this); + } + + /// Field number for the "min_image_height" field. + public const int MinImageHeightFieldNumber = 1; + private int minImageHeight_; + /// + /// Minimum dimensions for padded image. If unset, will use original image + /// dimension as a lower bound. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinImageHeight { + get { return minImageHeight_; } + set { + minImageHeight_ = value; + } + } + + /// Field number for the "min_image_width" field. + public const int MinImageWidthFieldNumber = 2; + private int minImageWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinImageWidth { + get { return minImageWidth_; } + set { + minImageWidth_ = value; + } + } + + /// Field number for the "max_image_height" field. + public const int MaxImageHeightFieldNumber = 3; + private int maxImageHeight_; + /// + /// Maximum dimensions for padded image. If unset, will use double the original + /// image dimension as a lower bound. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxImageHeight { + get { return maxImageHeight_; } + set { + maxImageHeight_ = value; + } + } + + /// Field number for the "max_image_width" field. + public const int MaxImageWidthFieldNumber = 4; + private int maxImageWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxImageWidth { + get { return maxImageWidth_; } + set { + maxImageWidth_ = value; + } + } + + /// Field number for the "pad_color" field. + public const int PadColorFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_padColor_codec + = pb::FieldCodec.ForFloat(42); + private readonly pbc::RepeatedField padColor_ = new pbc::RepeatedField(); + /// + /// Color of the padding. If unset, will pad using average color of the input + /// image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PadColor { + get { return padColor_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomPadImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomPadImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MinImageHeight != other.MinImageHeight) return false; + if (MinImageWidth != other.MinImageWidth) return false; + if (MaxImageHeight != other.MaxImageHeight) return false; + if (MaxImageWidth != other.MaxImageWidth) return false; + if(!padColor_.Equals(other.padColor_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinImageHeight != 0) hash ^= MinImageHeight.GetHashCode(); + if (MinImageWidth != 0) hash ^= MinImageWidth.GetHashCode(); + if (MaxImageHeight != 0) hash ^= MaxImageHeight.GetHashCode(); + if (MaxImageWidth != 0) hash ^= MaxImageWidth.GetHashCode(); + hash ^= padColor_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinImageHeight != 0) { + output.WriteRawTag(8); + output.WriteInt32(MinImageHeight); + } + if (MinImageWidth != 0) { + output.WriteRawTag(16); + output.WriteInt32(MinImageWidth); + } + if (MaxImageHeight != 0) { + output.WriteRawTag(24); + output.WriteInt32(MaxImageHeight); + } + if (MaxImageWidth != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxImageWidth); + } + padColor_.WriteTo(output, _repeated_padColor_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinImageHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinImageHeight); + } + if (MinImageWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinImageWidth); + } + if (MaxImageHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxImageHeight); + } + if (MaxImageWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxImageWidth); + } + size += padColor_.CalculateSize(_repeated_padColor_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomPadImage other) { + if (other == null) { + return; + } + if (other.MinImageHeight != 0) { + MinImageHeight = other.MinImageHeight; + } + if (other.MinImageWidth != 0) { + MinImageWidth = other.MinImageWidth; + } + if (other.MaxImageHeight != 0) { + MaxImageHeight = other.MaxImageHeight; + } + if (other.MaxImageWidth != 0) { + MaxImageWidth = other.MaxImageWidth; + } + padColor_.Add(other.padColor_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MinImageHeight = input.ReadInt32(); + break; + } + case 16: { + MinImageWidth = input.ReadInt32(); + break; + } + case 24: { + MaxImageHeight = input.ReadInt32(); + break; + } + case 32: { + MaxImageWidth = input.ReadInt32(); + break; + } + case 42: + case 45: { + padColor_.AddEntriesFrom(input, _repeated_padColor_codec); + break; + } + } + } + } + + } + + /// + /// Randomly adds a padding of size [0, max_height_padding), [0, max_width_padding). + /// + public sealed partial class RandomAbsolutePadImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomAbsolutePadImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAbsolutePadImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAbsolutePadImage(RandomAbsolutePadImage other) : this() { + maxHeightPadding_ = other.maxHeightPadding_; + maxWidthPadding_ = other.maxWidthPadding_; + padColor_ = other.padColor_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomAbsolutePadImage Clone() { + return new RandomAbsolutePadImage(this); + } + + /// Field number for the "max_height_padding" field. + public const int MaxHeightPaddingFieldNumber = 1; + private int maxHeightPadding_; + /// + /// Height will be padded uniformly at random from [0, max_height_padding). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxHeightPadding { + get { return maxHeightPadding_; } + set { + maxHeightPadding_ = value; + } + } + + /// Field number for the "max_width_padding" field. + public const int MaxWidthPaddingFieldNumber = 2; + private int maxWidthPadding_; + /// + /// Width will be padded uniformly at random from [0, max_width_padding). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxWidthPadding { + get { return maxWidthPadding_; } + set { + maxWidthPadding_ = value; + } + } + + /// Field number for the "pad_color" field. + public const int PadColorFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_padColor_codec + = pb::FieldCodec.ForFloat(26); + private readonly pbc::RepeatedField padColor_ = new pbc::RepeatedField(); + /// + /// Color of the padding. If unset, will pad using average color of the input + /// image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PadColor { + get { return padColor_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomAbsolutePadImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomAbsolutePadImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MaxHeightPadding != other.MaxHeightPadding) return false; + if (MaxWidthPadding != other.MaxWidthPadding) return false; + if(!padColor_.Equals(other.padColor_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MaxHeightPadding != 0) hash ^= MaxHeightPadding.GetHashCode(); + if (MaxWidthPadding != 0) hash ^= MaxWidthPadding.GetHashCode(); + hash ^= padColor_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MaxHeightPadding != 0) { + output.WriteRawTag(8); + output.WriteInt32(MaxHeightPadding); + } + if (MaxWidthPadding != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxWidthPadding); + } + padColor_.WriteTo(output, _repeated_padColor_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MaxHeightPadding != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxHeightPadding); + } + if (MaxWidthPadding != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxWidthPadding); + } + size += padColor_.CalculateSize(_repeated_padColor_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomAbsolutePadImage other) { + if (other == null) { + return; + } + if (other.MaxHeightPadding != 0) { + MaxHeightPadding = other.MaxHeightPadding; + } + if (other.MaxWidthPadding != 0) { + MaxWidthPadding = other.MaxWidthPadding; + } + padColor_.Add(other.padColor_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MaxHeightPadding = input.ReadInt32(); + break; + } + case 16: { + MaxWidthPadding = input.ReadInt32(); + break; + } + case 26: + case 29: { + padColor_.AddEntriesFrom(input, _repeated_padColor_codec); + break; + } + } + } + } + + } + + /// + /// Randomly crops an image followed by a random pad. + /// + public sealed partial class RandomCropPadImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomCropPadImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropPadImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropPadImage(RandomCropPadImage other) : this() { + minObjectCovered_ = other.minObjectCovered_; + minAspectRatio_ = other.minAspectRatio_; + maxAspectRatio_ = other.maxAspectRatio_; + minArea_ = other.minArea_; + maxArea_ = other.maxArea_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + randomCoef_ = other.randomCoef_; + minPaddedSizeRatio_ = other.minPaddedSizeRatio_.Clone(); + maxPaddedSizeRatio_ = other.maxPaddedSizeRatio_.Clone(); + padColor_ = other.padColor_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropPadImage Clone() { + return new RandomCropPadImage(this); + } + + /// Field number for the "min_object_covered" field. + public const int MinObjectCoveredFieldNumber = 1; + private float minObjectCovered_; + /// + /// Cropping operation must cover at least one box by this fraction. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinObjectCovered { + get { return minObjectCovered_; } + set { + minObjectCovered_ = value; + } + } + + /// Field number for the "min_aspect_ratio" field. + public const int MinAspectRatioFieldNumber = 2; + private float minAspectRatio_; + /// + /// Aspect ratio bounds of image after cropping operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinAspectRatio { + get { return minAspectRatio_; } + set { + minAspectRatio_ = value; + } + } + + /// Field number for the "max_aspect_ratio" field. + public const int MaxAspectRatioFieldNumber = 3; + private float maxAspectRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxAspectRatio { + get { return maxAspectRatio_; } + set { + maxAspectRatio_ = value; + } + } + + /// Field number for the "min_area" field. + public const int MinAreaFieldNumber = 4; + private float minArea_; + /// + /// Allowed area ratio of image after cropping operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinArea { + get { return minArea_; } + set { + minArea_ = value; + } + } + + /// Field number for the "max_area" field. + public const int MaxAreaFieldNumber = 5; + private float maxArea_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxArea { + get { return maxArea_; } + set { + maxArea_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 6; + private float overlapThresh_; + /// + /// Minimum overlap threshold of cropped boxes to keep in new image. If the + /// ratio between a cropped bounding box and the original is less than this + /// value, it is removed from the new image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 11; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + /// Field number for the "random_coef" field. + public const int RandomCoefFieldNumber = 7; + private float randomCoef_; + /// + /// Probability of keeping the original image during the crop operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RandomCoef { + get { return randomCoef_; } + set { + randomCoef_ = value; + } + } + + /// Field number for the "min_padded_size_ratio" field. + public const int MinPaddedSizeRatioFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_minPaddedSizeRatio_codec + = pb::FieldCodec.ForFloat(66); + private readonly pbc::RepeatedField minPaddedSizeRatio_ = new pbc::RepeatedField(); + /// + /// Maximum dimensions for padded image. If unset, will use double the original + /// image dimension as a lower bound. Both of the following fields should be + /// length 2. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MinPaddedSizeRatio { + get { return minPaddedSizeRatio_; } + } + + /// Field number for the "max_padded_size_ratio" field. + public const int MaxPaddedSizeRatioFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_maxPaddedSizeRatio_codec + = pb::FieldCodec.ForFloat(74); + private readonly pbc::RepeatedField maxPaddedSizeRatio_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MaxPaddedSizeRatio { + get { return maxPaddedSizeRatio_; } + } + + /// Field number for the "pad_color" field. + public const int PadColorFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_padColor_codec + = pb::FieldCodec.ForFloat(82); + private readonly pbc::RepeatedField padColor_ = new pbc::RepeatedField(); + /// + /// Color of the padding. If unset, will pad using average color of the input + /// image. This field should be of length 3. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField PadColor { + get { return padColor_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomCropPadImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomCropPadImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinObjectCovered, other.MinObjectCovered)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinAspectRatio, other.MinAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxAspectRatio, other.MaxAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinArea, other.MinArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxArea, other.MaxArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RandomCoef, other.RandomCoef)) return false; + if(!minPaddedSizeRatio_.Equals(other.minPaddedSizeRatio_)) return false; + if(!maxPaddedSizeRatio_.Equals(other.maxPaddedSizeRatio_)) return false; + if(!padColor_.Equals(other.padColor_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinObjectCovered != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinObjectCovered); + if (MinAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinAspectRatio); + if (MaxAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxAspectRatio); + if (MinArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinArea); + if (MaxArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxArea); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (RandomCoef != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RandomCoef); + hash ^= minPaddedSizeRatio_.GetHashCode(); + hash ^= maxPaddedSizeRatio_.GetHashCode(); + hash ^= padColor_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinObjectCovered != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinObjectCovered); + } + if (MinAspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MinAspectRatio); + } + if (MaxAspectRatio != 0F) { + output.WriteRawTag(29); + output.WriteFloat(MaxAspectRatio); + } + if (MinArea != 0F) { + output.WriteRawTag(37); + output.WriteFloat(MinArea); + } + if (MaxArea != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MaxArea); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(53); + output.WriteFloat(OverlapThresh); + } + if (RandomCoef != 0F) { + output.WriteRawTag(61); + output.WriteFloat(RandomCoef); + } + minPaddedSizeRatio_.WriteTo(output, _repeated_minPaddedSizeRatio_codec); + maxPaddedSizeRatio_.WriteTo(output, _repeated_maxPaddedSizeRatio_codec); + padColor_.WriteTo(output, _repeated_padColor_codec); + if (ClipBoxes != false) { + output.WriteRawTag(88); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinObjectCovered != 0F) { + size += 1 + 4; + } + if (MinAspectRatio != 0F) { + size += 1 + 4; + } + if (MaxAspectRatio != 0F) { + size += 1 + 4; + } + if (MinArea != 0F) { + size += 1 + 4; + } + if (MaxArea != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (RandomCoef != 0F) { + size += 1 + 4; + } + size += minPaddedSizeRatio_.CalculateSize(_repeated_minPaddedSizeRatio_codec); + size += maxPaddedSizeRatio_.CalculateSize(_repeated_maxPaddedSizeRatio_codec); + size += padColor_.CalculateSize(_repeated_padColor_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomCropPadImage other) { + if (other == null) { + return; + } + if (other.MinObjectCovered != 0F) { + MinObjectCovered = other.MinObjectCovered; + } + if (other.MinAspectRatio != 0F) { + MinAspectRatio = other.MinAspectRatio; + } + if (other.MaxAspectRatio != 0F) { + MaxAspectRatio = other.MaxAspectRatio; + } + if (other.MinArea != 0F) { + MinArea = other.MinArea; + } + if (other.MaxArea != 0F) { + MaxArea = other.MaxArea; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + if (other.RandomCoef != 0F) { + RandomCoef = other.RandomCoef; + } + minPaddedSizeRatio_.Add(other.minPaddedSizeRatio_); + maxPaddedSizeRatio_.Add(other.maxPaddedSizeRatio_); + padColor_.Add(other.padColor_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinObjectCovered = input.ReadFloat(); + break; + } + case 21: { + MinAspectRatio = input.ReadFloat(); + break; + } + case 29: { + MaxAspectRatio = input.ReadFloat(); + break; + } + case 37: { + MinArea = input.ReadFloat(); + break; + } + case 45: { + MaxArea = input.ReadFloat(); + break; + } + case 53: { + OverlapThresh = input.ReadFloat(); + break; + } + case 61: { + RandomCoef = input.ReadFloat(); + break; + } + case 66: + case 69: { + minPaddedSizeRatio_.AddEntriesFrom(input, _repeated_minPaddedSizeRatio_codec); + break; + } + case 74: + case 77: { + maxPaddedSizeRatio_.AddEntriesFrom(input, _repeated_maxPaddedSizeRatio_codec); + break; + } + case 82: + case 85: { + padColor_.AddEntriesFrom(input, _repeated_padColor_codec); + break; + } + case 88: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly crops an iamge to a given aspect ratio. + /// + public sealed partial class RandomCropToAspectRatio : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomCropToAspectRatio()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropToAspectRatio() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropToAspectRatio(RandomCropToAspectRatio other) : this() { + aspectRatio_ = other.aspectRatio_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomCropToAspectRatio Clone() { + return new RandomCropToAspectRatio(this); + } + + /// Field number for the "aspect_ratio" field. + public const int AspectRatioFieldNumber = 1; + private float aspectRatio_; + /// + /// Aspect ratio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float AspectRatio { + get { return aspectRatio_; } + set { + aspectRatio_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 2; + private float overlapThresh_; + /// + /// Minimum overlap threshold of cropped boxes to keep in new image. If the + /// ratio between a cropped bounding box and the original is less than this + /// value, it is removed from the new image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 3; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomCropToAspectRatio); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomCropToAspectRatio other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(AspectRatio, other.AspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (AspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AspectRatio); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (AspectRatio != 0F) { + output.WriteRawTag(13); + output.WriteFloat(AspectRatio); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(21); + output.WriteFloat(OverlapThresh); + } + if (ClipBoxes != false) { + output.WriteRawTag(24); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (AspectRatio != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomCropToAspectRatio other) { + if (other == null) { + return; + } + if (other.AspectRatio != 0F) { + AspectRatio = other.AspectRatio; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + AspectRatio = input.ReadFloat(); + break; + } + case 21: { + OverlapThresh = input.ReadFloat(); + break; + } + case 24: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly adds black square patches to an image. + /// + public sealed partial class RandomBlackPatches : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomBlackPatches()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomBlackPatches() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomBlackPatches(RandomBlackPatches other) : this() { + maxBlackPatches_ = other.maxBlackPatches_; + probability_ = other.probability_; + sizeToImageRatio_ = other.sizeToImageRatio_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomBlackPatches Clone() { + return new RandomBlackPatches(this); + } + + /// Field number for the "max_black_patches" field. + public const int MaxBlackPatchesFieldNumber = 1; + private int maxBlackPatches_; + /// + /// The maximum number of black patches to add. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxBlackPatches { + get { return maxBlackPatches_; } + set { + maxBlackPatches_ = value; + } + } + + /// Field number for the "probability" field. + public const int ProbabilityFieldNumber = 2; + private float probability_; + /// + /// The probability of a black patch being added to an image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Probability { + get { return probability_; } + set { + probability_ = value; + } + } + + /// Field number for the "size_to_image_ratio" field. + public const int SizeToImageRatioFieldNumber = 3; + private float sizeToImageRatio_; + /// + /// Ratio between the dimension of the black patch to the minimum dimension of + /// the image (patch_width = patch_height = min(image_height, image_width)). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float SizeToImageRatio { + get { return sizeToImageRatio_; } + set { + sizeToImageRatio_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomBlackPatches); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomBlackPatches other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MaxBlackPatches != other.MaxBlackPatches) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Probability, other.Probability)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(SizeToImageRatio, other.SizeToImageRatio)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MaxBlackPatches != 0) hash ^= MaxBlackPatches.GetHashCode(); + if (Probability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Probability); + if (SizeToImageRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(SizeToImageRatio); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MaxBlackPatches != 0) { + output.WriteRawTag(8); + output.WriteInt32(MaxBlackPatches); + } + if (Probability != 0F) { + output.WriteRawTag(21); + output.WriteFloat(Probability); + } + if (SizeToImageRatio != 0F) { + output.WriteRawTag(29); + output.WriteFloat(SizeToImageRatio); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MaxBlackPatches != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxBlackPatches); + } + if (Probability != 0F) { + size += 1 + 4; + } + if (SizeToImageRatio != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomBlackPatches other) { + if (other == null) { + return; + } + if (other.MaxBlackPatches != 0) { + MaxBlackPatches = other.MaxBlackPatches; + } + if (other.Probability != 0F) { + Probability = other.Probability; + } + if (other.SizeToImageRatio != 0F) { + SizeToImageRatio = other.SizeToImageRatio; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MaxBlackPatches = input.ReadInt32(); + break; + } + case 21: { + Probability = input.ReadFloat(); + break; + } + case 29: { + SizeToImageRatio = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly resizes the image up to [target_height, target_width]. + /// + public sealed partial class RandomResizeMethod : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomResizeMethod()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomResizeMethod() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomResizeMethod(RandomResizeMethod other) : this() { + targetHeight_ = other.targetHeight_; + targetWidth_ = other.targetWidth_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomResizeMethod Clone() { + return new RandomResizeMethod(this); + } + + /// Field number for the "target_height" field. + public const int TargetHeightFieldNumber = 1; + private int targetHeight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int TargetHeight { + get { return targetHeight_; } + set { + targetHeight_ = value; + } + } + + /// Field number for the "target_width" field. + public const int TargetWidthFieldNumber = 2; + private int targetWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int TargetWidth { + get { return targetWidth_; } + set { + targetWidth_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomResizeMethod); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomResizeMethod other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TargetHeight != other.TargetHeight) return false; + if (TargetWidth != other.TargetWidth) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (TargetHeight != 0) hash ^= TargetHeight.GetHashCode(); + if (TargetWidth != 0) hash ^= TargetWidth.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (TargetHeight != 0) { + output.WriteRawTag(8); + output.WriteInt32(TargetHeight); + } + if (TargetWidth != 0) { + output.WriteRawTag(16); + output.WriteInt32(TargetWidth); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (TargetHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetHeight); + } + if (TargetWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TargetWidth); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomResizeMethod other) { + if (other == null) { + return; + } + if (other.TargetHeight != 0) { + TargetHeight = other.TargetHeight; + } + if (other.TargetWidth != 0) { + TargetWidth = other.TargetWidth; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TargetHeight = input.ReadInt32(); + break; + } + case 16: { + TargetWidth = input.ReadInt32(); + break; + } + } + } + } + + } + + /// + /// Converts the RGB image to a grayscale image. This also converts the image + /// depth from 3 to 1, unlike RandomRGBtoGray which does not change the image + /// depth. + /// + public sealed partial class RGBtoGray : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RGBtoGray()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RGBtoGray() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RGBtoGray(RGBtoGray other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RGBtoGray Clone() { + return new RGBtoGray(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RGBtoGray); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RGBtoGray other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RGBtoGray other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Scales boxes from normalized coordinates to pixel coordinates. + /// + public sealed partial class ScaleBoxesToPixelCoordinates : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ScaleBoxesToPixelCoordinates()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ScaleBoxesToPixelCoordinates() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ScaleBoxesToPixelCoordinates(ScaleBoxesToPixelCoordinates other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ScaleBoxesToPixelCoordinates Clone() { + return new ScaleBoxesToPixelCoordinates(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ScaleBoxesToPixelCoordinates); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ScaleBoxesToPixelCoordinates other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ScaleBoxesToPixelCoordinates other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Resizes images to [new_height, new_width]. + /// + public sealed partial class ResizeImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ResizeImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ResizeImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ResizeImage(ResizeImage other) : this() { + newHeight_ = other.newHeight_; + newWidth_ = other.newWidth_; + method_ = other.method_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ResizeImage Clone() { + return new ResizeImage(this); + } + + /// Field number for the "new_height" field. + public const int NewHeightFieldNumber = 1; + private int newHeight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NewHeight { + get { return newHeight_; } + set { + newHeight_ = value; + } + } + + /// Field number for the "new_width" field. + public const int NewWidthFieldNumber = 2; + private int newWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NewWidth { + get { return newWidth_; } + set { + newWidth_ = value; + } + } + + /// Field number for the "method" field. + public const int MethodFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage.Types.Method method_ = 0; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage.Types.Method Method { + get { return method_; } + set { + method_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ResizeImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ResizeImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NewHeight != other.NewHeight) return false; + if (NewWidth != other.NewWidth) return false; + if (Method != other.Method) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NewHeight != 0) hash ^= NewHeight.GetHashCode(); + if (NewWidth != 0) hash ^= NewWidth.GetHashCode(); + if (Method != 0) hash ^= Method.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NewHeight != 0) { + output.WriteRawTag(8); + output.WriteInt32(NewHeight); + } + if (NewWidth != 0) { + output.WriteRawTag(16); + output.WriteInt32(NewWidth); + } + if (Method != 0) { + output.WriteRawTag(24); + output.WriteEnum((int) Method); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NewHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NewHeight); + } + if (NewWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NewWidth); + } + if (Method != 0) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Method); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ResizeImage other) { + if (other == null) { + return; + } + if (other.NewHeight != 0) { + NewHeight = other.NewHeight; + } + if (other.NewWidth != 0) { + NewWidth = other.NewWidth; + } + if (other.Method != 0) { + Method = other.Method; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NewHeight = input.ReadInt32(); + break; + } + case 16: { + NewWidth = input.ReadInt32(); + break; + } + case 24: { + method_ = (global::Tensorflow.Models.ObjectDetection.Protos.ResizeImage.Types.Method) input.ReadEnum(); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the ResizeImage message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + public enum Method { + [pbr::OriginalName("NONE")] None = 0, + [pbr::OriginalName("AREA")] Area = 1, + [pbr::OriginalName("BICUBIC")] Bicubic = 2, + [pbr::OriginalName("BILINEAR")] Bilinear = 3, + [pbr::OriginalName("NEAREST_NEIGHBOR")] NearestNeighbor = 4, + } + + } + #endregion + + } + + /// + /// Normalizes an image by subtracting a mean from each channel. + /// + public sealed partial class SubtractChannelMean : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubtractChannelMean()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[24]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SubtractChannelMean() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SubtractChannelMean(SubtractChannelMean other) : this() { + means_ = other.means_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SubtractChannelMean Clone() { + return new SubtractChannelMean(this); + } + + /// Field number for the "means" field. + public const int MeansFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_means_codec + = pb::FieldCodec.ForFloat(10); + private readonly pbc::RepeatedField means_ = new pbc::RepeatedField(); + /// + /// The mean to subtract from each channel. Should be of same dimension of + /// channels in the input image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Means { + get { return means_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SubtractChannelMean); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SubtractChannelMean other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!means_.Equals(other.means_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= means_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + means_.WriteTo(output, _repeated_means_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += means_.CalculateSize(_repeated_means_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SubtractChannelMean other) { + if (other == null) { + return; + } + means_.Add(other.means_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 13: { + means_.AddEntriesFrom(input, _repeated_means_codec); + break; + } + } + } + } + + } + + public sealed partial class SSDRandomCropOperation : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropOperation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[25]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropOperation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropOperation(SSDRandomCropOperation other) : this() { + minObjectCovered_ = other.minObjectCovered_; + minAspectRatio_ = other.minAspectRatio_; + maxAspectRatio_ = other.maxAspectRatio_; + minArea_ = other.minArea_; + maxArea_ = other.maxArea_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + randomCoef_ = other.randomCoef_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropOperation Clone() { + return new SSDRandomCropOperation(this); + } + + /// Field number for the "min_object_covered" field. + public const int MinObjectCoveredFieldNumber = 1; + private float minObjectCovered_; + /// + /// Cropped image must cover at least this fraction of one original bounding + /// box. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinObjectCovered { + get { return minObjectCovered_; } + set { + minObjectCovered_ = value; + } + } + + /// Field number for the "min_aspect_ratio" field. + public const int MinAspectRatioFieldNumber = 2; + private float minAspectRatio_; + /// + /// The aspect ratio of the cropped image must be within the range of + /// [min_aspect_ratio, max_aspect_ratio]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinAspectRatio { + get { return minAspectRatio_; } + set { + minAspectRatio_ = value; + } + } + + /// Field number for the "max_aspect_ratio" field. + public const int MaxAspectRatioFieldNumber = 3; + private float maxAspectRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxAspectRatio { + get { return maxAspectRatio_; } + set { + maxAspectRatio_ = value; + } + } + + /// Field number for the "min_area" field. + public const int MinAreaFieldNumber = 4; + private float minArea_; + /// + /// The area of the cropped image must be within the range of + /// [min_area, max_area]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinArea { + get { return minArea_; } + set { + minArea_ = value; + } + } + + /// Field number for the "max_area" field. + public const int MaxAreaFieldNumber = 5; + private float maxArea_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxArea { + get { return maxArea_; } + set { + maxArea_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 6; + private float overlapThresh_; + /// + /// Cropped box area ratio must be above this threhold to be kept. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 8; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + /// Field number for the "random_coef" field. + public const int RandomCoefFieldNumber = 7; + private float randomCoef_; + /// + /// Probability a crop operation is skipped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RandomCoef { + get { return randomCoef_; } + set { + randomCoef_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropOperation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropOperation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinObjectCovered, other.MinObjectCovered)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinAspectRatio, other.MinAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxAspectRatio, other.MaxAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinArea, other.MinArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxArea, other.MaxArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RandomCoef, other.RandomCoef)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinObjectCovered != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinObjectCovered); + if (MinAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinAspectRatio); + if (MaxAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxAspectRatio); + if (MinArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinArea); + if (MaxArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxArea); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (RandomCoef != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RandomCoef); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinObjectCovered != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinObjectCovered); + } + if (MinAspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MinAspectRatio); + } + if (MaxAspectRatio != 0F) { + output.WriteRawTag(29); + output.WriteFloat(MaxAspectRatio); + } + if (MinArea != 0F) { + output.WriteRawTag(37); + output.WriteFloat(MinArea); + } + if (MaxArea != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MaxArea); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(53); + output.WriteFloat(OverlapThresh); + } + if (RandomCoef != 0F) { + output.WriteRawTag(61); + output.WriteFloat(RandomCoef); + } + if (ClipBoxes != false) { + output.WriteRawTag(64); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinObjectCovered != 0F) { + size += 1 + 4; + } + if (MinAspectRatio != 0F) { + size += 1 + 4; + } + if (MaxAspectRatio != 0F) { + size += 1 + 4; + } + if (MinArea != 0F) { + size += 1 + 4; + } + if (MaxArea != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (RandomCoef != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropOperation other) { + if (other == null) { + return; + } + if (other.MinObjectCovered != 0F) { + MinObjectCovered = other.MinObjectCovered; + } + if (other.MinAspectRatio != 0F) { + MinAspectRatio = other.MinAspectRatio; + } + if (other.MaxAspectRatio != 0F) { + MaxAspectRatio = other.MaxAspectRatio; + } + if (other.MinArea != 0F) { + MinArea = other.MinArea; + } + if (other.MaxArea != 0F) { + MaxArea = other.MaxArea; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + if (other.RandomCoef != 0F) { + RandomCoef = other.RandomCoef; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinObjectCovered = input.ReadFloat(); + break; + } + case 21: { + MinAspectRatio = input.ReadFloat(); + break; + } + case 29: { + MaxAspectRatio = input.ReadFloat(); + break; + } + case 37: { + MinArea = input.ReadFloat(); + break; + } + case 45: { + MaxArea = input.ReadFloat(); + break; + } + case 53: { + OverlapThresh = input.ReadFloat(); + break; + } + case 61: { + RandomCoef = input.ReadFloat(); + break; + } + case 64: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly crops a image according to: + /// Liu et al., SSD: Single shot multibox detector. + /// This preprocessing step defines multiple SSDRandomCropOperations. Only one + /// operation (chosen at random) is actually performed on an image. + /// + public sealed partial class SSDRandomCrop : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCrop()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[26]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCrop() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCrop(SSDRandomCrop other) : this() { + operations_ = other.operations_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCrop Clone() { + return new SSDRandomCrop(this); + } + + /// Field number for the "operations" field. + public const int OperationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_operations_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropOperation.Parser); + private readonly pbc::RepeatedField operations_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Operations { + get { return operations_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCrop); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCrop other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!operations_.Equals(other.operations_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= operations_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + operations_.WriteTo(output, _repeated_operations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += operations_.CalculateSize(_repeated_operations_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCrop other) { + if (other == null) { + return; + } + operations_.Add(other.operations_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + operations_.AddEntriesFrom(input, _repeated_operations_codec); + break; + } + } + } + } + + } + + public sealed partial class SSDRandomCropPadOperation : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropPadOperation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[27]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadOperation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadOperation(SSDRandomCropPadOperation other) : this() { + minObjectCovered_ = other.minObjectCovered_; + minAspectRatio_ = other.minAspectRatio_; + maxAspectRatio_ = other.maxAspectRatio_; + minArea_ = other.minArea_; + maxArea_ = other.maxArea_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + randomCoef_ = other.randomCoef_; + minPaddedSizeRatio_ = other.minPaddedSizeRatio_.Clone(); + maxPaddedSizeRatio_ = other.maxPaddedSizeRatio_.Clone(); + padColorR_ = other.padColorR_; + padColorG_ = other.padColorG_; + padColorB_ = other.padColorB_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadOperation Clone() { + return new SSDRandomCropPadOperation(this); + } + + /// Field number for the "min_object_covered" field. + public const int MinObjectCoveredFieldNumber = 1; + private float minObjectCovered_; + /// + /// Cropped image must cover at least this fraction of one original bounding + /// box. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinObjectCovered { + get { return minObjectCovered_; } + set { + minObjectCovered_ = value; + } + } + + /// Field number for the "min_aspect_ratio" field. + public const int MinAspectRatioFieldNumber = 2; + private float minAspectRatio_; + /// + /// The aspect ratio of the cropped image must be within the range of + /// [min_aspect_ratio, max_aspect_ratio]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinAspectRatio { + get { return minAspectRatio_; } + set { + minAspectRatio_ = value; + } + } + + /// Field number for the "max_aspect_ratio" field. + public const int MaxAspectRatioFieldNumber = 3; + private float maxAspectRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxAspectRatio { + get { return maxAspectRatio_; } + set { + maxAspectRatio_ = value; + } + } + + /// Field number for the "min_area" field. + public const int MinAreaFieldNumber = 4; + private float minArea_; + /// + /// The area of the cropped image must be within the range of + /// [min_area, max_area]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinArea { + get { return minArea_; } + set { + minArea_ = value; + } + } + + /// Field number for the "max_area" field. + public const int MaxAreaFieldNumber = 5; + private float maxArea_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxArea { + get { return maxArea_; } + set { + maxArea_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 6; + private float overlapThresh_; + /// + /// Cropped box area ratio must be above this threhold to be kept. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 13; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + /// Field number for the "random_coef" field. + public const int RandomCoefFieldNumber = 7; + private float randomCoef_; + /// + /// Probability a crop operation is skipped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RandomCoef { + get { return randomCoef_; } + set { + randomCoef_ = value; + } + } + + /// Field number for the "min_padded_size_ratio" field. + public const int MinPaddedSizeRatioFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_minPaddedSizeRatio_codec + = pb::FieldCodec.ForFloat(66); + private readonly pbc::RepeatedField minPaddedSizeRatio_ = new pbc::RepeatedField(); + /// + /// Min ratio of padded image height and width to the input image's height and + /// width. Two entries per operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MinPaddedSizeRatio { + get { return minPaddedSizeRatio_; } + } + + /// Field number for the "max_padded_size_ratio" field. + public const int MaxPaddedSizeRatioFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_maxPaddedSizeRatio_codec + = pb::FieldCodec.ForFloat(74); + private readonly pbc::RepeatedField maxPaddedSizeRatio_ = new pbc::RepeatedField(); + /// + /// Max ratio of padded image height and width to the input image's height and + /// width. Two entries per operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MaxPaddedSizeRatio { + get { return maxPaddedSizeRatio_; } + } + + /// Field number for the "pad_color_r" field. + public const int PadColorRFieldNumber = 10; + private float padColorR_; + /// + /// Padding color. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float PadColorR { + get { return padColorR_; } + set { + padColorR_ = value; + } + } + + /// Field number for the "pad_color_g" field. + public const int PadColorGFieldNumber = 11; + private float padColorG_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float PadColorG { + get { return padColorG_; } + set { + padColorG_ = value; + } + } + + /// Field number for the "pad_color_b" field. + public const int PadColorBFieldNumber = 12; + private float padColorB_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float PadColorB { + get { return padColorB_; } + set { + padColorB_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropPadOperation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropPadOperation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinObjectCovered, other.MinObjectCovered)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinAspectRatio, other.MinAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxAspectRatio, other.MaxAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinArea, other.MinArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxArea, other.MaxArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RandomCoef, other.RandomCoef)) return false; + if(!minPaddedSizeRatio_.Equals(other.minPaddedSizeRatio_)) return false; + if(!maxPaddedSizeRatio_.Equals(other.maxPaddedSizeRatio_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PadColorR, other.PadColorR)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PadColorG, other.PadColorG)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PadColorB, other.PadColorB)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinObjectCovered != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinObjectCovered); + if (MinAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinAspectRatio); + if (MaxAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxAspectRatio); + if (MinArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinArea); + if (MaxArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxArea); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (RandomCoef != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RandomCoef); + hash ^= minPaddedSizeRatio_.GetHashCode(); + hash ^= maxPaddedSizeRatio_.GetHashCode(); + if (PadColorR != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PadColorR); + if (PadColorG != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PadColorG); + if (PadColorB != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PadColorB); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinObjectCovered != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinObjectCovered); + } + if (MinAspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MinAspectRatio); + } + if (MaxAspectRatio != 0F) { + output.WriteRawTag(29); + output.WriteFloat(MaxAspectRatio); + } + if (MinArea != 0F) { + output.WriteRawTag(37); + output.WriteFloat(MinArea); + } + if (MaxArea != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MaxArea); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(53); + output.WriteFloat(OverlapThresh); + } + if (RandomCoef != 0F) { + output.WriteRawTag(61); + output.WriteFloat(RandomCoef); + } + minPaddedSizeRatio_.WriteTo(output, _repeated_minPaddedSizeRatio_codec); + maxPaddedSizeRatio_.WriteTo(output, _repeated_maxPaddedSizeRatio_codec); + if (PadColorR != 0F) { + output.WriteRawTag(85); + output.WriteFloat(PadColorR); + } + if (PadColorG != 0F) { + output.WriteRawTag(93); + output.WriteFloat(PadColorG); + } + if (PadColorB != 0F) { + output.WriteRawTag(101); + output.WriteFloat(PadColorB); + } + if (ClipBoxes != false) { + output.WriteRawTag(104); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinObjectCovered != 0F) { + size += 1 + 4; + } + if (MinAspectRatio != 0F) { + size += 1 + 4; + } + if (MaxAspectRatio != 0F) { + size += 1 + 4; + } + if (MinArea != 0F) { + size += 1 + 4; + } + if (MaxArea != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (RandomCoef != 0F) { + size += 1 + 4; + } + size += minPaddedSizeRatio_.CalculateSize(_repeated_minPaddedSizeRatio_codec); + size += maxPaddedSizeRatio_.CalculateSize(_repeated_maxPaddedSizeRatio_codec); + if (PadColorR != 0F) { + size += 1 + 4; + } + if (PadColorG != 0F) { + size += 1 + 4; + } + if (PadColorB != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropPadOperation other) { + if (other == null) { + return; + } + if (other.MinObjectCovered != 0F) { + MinObjectCovered = other.MinObjectCovered; + } + if (other.MinAspectRatio != 0F) { + MinAspectRatio = other.MinAspectRatio; + } + if (other.MaxAspectRatio != 0F) { + MaxAspectRatio = other.MaxAspectRatio; + } + if (other.MinArea != 0F) { + MinArea = other.MinArea; + } + if (other.MaxArea != 0F) { + MaxArea = other.MaxArea; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + if (other.RandomCoef != 0F) { + RandomCoef = other.RandomCoef; + } + minPaddedSizeRatio_.Add(other.minPaddedSizeRatio_); + maxPaddedSizeRatio_.Add(other.maxPaddedSizeRatio_); + if (other.PadColorR != 0F) { + PadColorR = other.PadColorR; + } + if (other.PadColorG != 0F) { + PadColorG = other.PadColorG; + } + if (other.PadColorB != 0F) { + PadColorB = other.PadColorB; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinObjectCovered = input.ReadFloat(); + break; + } + case 21: { + MinAspectRatio = input.ReadFloat(); + break; + } + case 29: { + MaxAspectRatio = input.ReadFloat(); + break; + } + case 37: { + MinArea = input.ReadFloat(); + break; + } + case 45: { + MaxArea = input.ReadFloat(); + break; + } + case 53: { + OverlapThresh = input.ReadFloat(); + break; + } + case 61: { + RandomCoef = input.ReadFloat(); + break; + } + case 66: + case 69: { + minPaddedSizeRatio_.AddEntriesFrom(input, _repeated_minPaddedSizeRatio_codec); + break; + } + case 74: + case 77: { + maxPaddedSizeRatio_.AddEntriesFrom(input, _repeated_maxPaddedSizeRatio_codec); + break; + } + case 85: { + PadColorR = input.ReadFloat(); + break; + } + case 93: { + PadColorG = input.ReadFloat(); + break; + } + case 101: { + PadColorB = input.ReadFloat(); + break; + } + case 104: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly crops and pads an image according to: + /// Liu et al., SSD: Single shot multibox detector. + /// This preprocessing step defines multiple SSDRandomCropPadOperations. Only one + /// operation (chosen at random) is actually performed on an image. + /// + public sealed partial class SSDRandomCropPad : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropPad()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[28]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPad() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPad(SSDRandomCropPad other) : this() { + operations_ = other.operations_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPad Clone() { + return new SSDRandomCropPad(this); + } + + /// Field number for the "operations" field. + public const int OperationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_operations_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadOperation.Parser); + private readonly pbc::RepeatedField operations_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Operations { + get { return operations_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropPad); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropPad other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!operations_.Equals(other.operations_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= operations_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + operations_.WriteTo(output, _repeated_operations_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += operations_.CalculateSize(_repeated_operations_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropPad other) { + if (other == null) { + return; + } + operations_.Add(other.operations_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + operations_.AddEntriesFrom(input, _repeated_operations_codec); + break; + } + } + } + } + + } + + public sealed partial class SSDRandomCropFixedAspectRatioOperation : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropFixedAspectRatioOperation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[29]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropFixedAspectRatioOperation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropFixedAspectRatioOperation(SSDRandomCropFixedAspectRatioOperation other) : this() { + minObjectCovered_ = other.minObjectCovered_; + minArea_ = other.minArea_; + maxArea_ = other.maxArea_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + randomCoef_ = other.randomCoef_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropFixedAspectRatioOperation Clone() { + return new SSDRandomCropFixedAspectRatioOperation(this); + } + + /// Field number for the "min_object_covered" field. + public const int MinObjectCoveredFieldNumber = 1; + private float minObjectCovered_; + /// + /// Cropped image must cover at least this fraction of one original bounding + /// box. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinObjectCovered { + get { return minObjectCovered_; } + set { + minObjectCovered_ = value; + } + } + + /// Field number for the "min_area" field. + public const int MinAreaFieldNumber = 4; + private float minArea_; + /// + /// The area of the cropped image must be within the range of + /// [min_area, max_area]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinArea { + get { return minArea_; } + set { + minArea_ = value; + } + } + + /// Field number for the "max_area" field. + public const int MaxAreaFieldNumber = 5; + private float maxArea_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxArea { + get { return maxArea_; } + set { + maxArea_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 6; + private float overlapThresh_; + /// + /// Cropped box area ratio must be above this threhold to be kept. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 8; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + /// Field number for the "random_coef" field. + public const int RandomCoefFieldNumber = 7; + private float randomCoef_; + /// + /// Probability a crop operation is skipped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RandomCoef { + get { return randomCoef_; } + set { + randomCoef_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropFixedAspectRatioOperation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropFixedAspectRatioOperation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinObjectCovered, other.MinObjectCovered)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinArea, other.MinArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxArea, other.MaxArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RandomCoef, other.RandomCoef)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinObjectCovered != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinObjectCovered); + if (MinArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinArea); + if (MaxArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxArea); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (RandomCoef != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RandomCoef); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinObjectCovered != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinObjectCovered); + } + if (MinArea != 0F) { + output.WriteRawTag(37); + output.WriteFloat(MinArea); + } + if (MaxArea != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MaxArea); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(53); + output.WriteFloat(OverlapThresh); + } + if (RandomCoef != 0F) { + output.WriteRawTag(61); + output.WriteFloat(RandomCoef); + } + if (ClipBoxes != false) { + output.WriteRawTag(64); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinObjectCovered != 0F) { + size += 1 + 4; + } + if (MinArea != 0F) { + size += 1 + 4; + } + if (MaxArea != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (RandomCoef != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropFixedAspectRatioOperation other) { + if (other == null) { + return; + } + if (other.MinObjectCovered != 0F) { + MinObjectCovered = other.MinObjectCovered; + } + if (other.MinArea != 0F) { + MinArea = other.MinArea; + } + if (other.MaxArea != 0F) { + MaxArea = other.MaxArea; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + if (other.RandomCoef != 0F) { + RandomCoef = other.RandomCoef; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinObjectCovered = input.ReadFloat(); + break; + } + case 37: { + MinArea = input.ReadFloat(); + break; + } + case 45: { + MaxArea = input.ReadFloat(); + break; + } + case 53: { + OverlapThresh = input.ReadFloat(); + break; + } + case 61: { + RandomCoef = input.ReadFloat(); + break; + } + case 64: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly crops a image to a fixed aspect ratio according to: + /// Liu et al., SSD: Single shot multibox detector. + /// Multiple SSDRandomCropFixedAspectRatioOperations are defined by this + /// preprocessing step. Only one operation (chosen at random) is actually + /// performed on an image. + /// + public sealed partial class SSDRandomCropFixedAspectRatio : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropFixedAspectRatio()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[30]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropFixedAspectRatio() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropFixedAspectRatio(SSDRandomCropFixedAspectRatio other) : this() { + operations_ = other.operations_.Clone(); + aspectRatio_ = other.aspectRatio_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropFixedAspectRatio Clone() { + return new SSDRandomCropFixedAspectRatio(this); + } + + /// Field number for the "operations" field. + public const int OperationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_operations_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropFixedAspectRatioOperation.Parser); + private readonly pbc::RepeatedField operations_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Operations { + get { return operations_; } + } + + /// Field number for the "aspect_ratio" field. + public const int AspectRatioFieldNumber = 2; + private float aspectRatio_; + /// + /// Aspect ratio to crop to. This value is used for all crop operations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float AspectRatio { + get { return aspectRatio_; } + set { + aspectRatio_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropFixedAspectRatio); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropFixedAspectRatio other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!operations_.Equals(other.operations_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(AspectRatio, other.AspectRatio)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= operations_.GetHashCode(); + if (AspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AspectRatio); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + operations_.WriteTo(output, _repeated_operations_codec); + if (AspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(AspectRatio); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += operations_.CalculateSize(_repeated_operations_codec); + if (AspectRatio != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropFixedAspectRatio other) { + if (other == null) { + return; + } + operations_.Add(other.operations_); + if (other.AspectRatio != 0F) { + AspectRatio = other.AspectRatio; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + operations_.AddEntriesFrom(input, _repeated_operations_codec); + break; + } + case 21: { + AspectRatio = input.ReadFloat(); + break; + } + } + } + } + + } + + public sealed partial class SSDRandomCropPadFixedAspectRatioOperation : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropPadFixedAspectRatioOperation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[31]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadFixedAspectRatioOperation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadFixedAspectRatioOperation(SSDRandomCropPadFixedAspectRatioOperation other) : this() { + minObjectCovered_ = other.minObjectCovered_; + minAspectRatio_ = other.minAspectRatio_; + maxAspectRatio_ = other.maxAspectRatio_; + minArea_ = other.minArea_; + maxArea_ = other.maxArea_; + overlapThresh_ = other.overlapThresh_; + clipBoxes_ = other.clipBoxes_; + randomCoef_ = other.randomCoef_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadFixedAspectRatioOperation Clone() { + return new SSDRandomCropPadFixedAspectRatioOperation(this); + } + + /// Field number for the "min_object_covered" field. + public const int MinObjectCoveredFieldNumber = 1; + private float minObjectCovered_; + /// + /// Cropped image must cover at least this fraction of one original bounding + /// box. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinObjectCovered { + get { return minObjectCovered_; } + set { + minObjectCovered_ = value; + } + } + + /// Field number for the "min_aspect_ratio" field. + public const int MinAspectRatioFieldNumber = 2; + private float minAspectRatio_; + /// + /// The aspect ratio of the cropped image must be within the range of + /// [min_aspect_ratio, max_aspect_ratio]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinAspectRatio { + get { return minAspectRatio_; } + set { + minAspectRatio_ = value; + } + } + + /// Field number for the "max_aspect_ratio" field. + public const int MaxAspectRatioFieldNumber = 3; + private float maxAspectRatio_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxAspectRatio { + get { return maxAspectRatio_; } + set { + maxAspectRatio_ = value; + } + } + + /// Field number for the "min_area" field. + public const int MinAreaFieldNumber = 4; + private float minArea_; + /// + /// The area of the cropped image must be within the range of + /// [min_area, max_area]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinArea { + get { return minArea_; } + set { + minArea_ = value; + } + } + + /// Field number for the "max_area" field. + public const int MaxAreaFieldNumber = 5; + private float maxArea_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxArea { + get { return maxArea_; } + set { + maxArea_ = value; + } + } + + /// Field number for the "overlap_thresh" field. + public const int OverlapThreshFieldNumber = 6; + private float overlapThresh_; + /// + /// Cropped box area ratio must be above this threhold to be kept. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float OverlapThresh { + get { return overlapThresh_; } + set { + overlapThresh_ = value; + } + } + + /// Field number for the "clip_boxes" field. + public const int ClipBoxesFieldNumber = 8; + private bool clipBoxes_; + /// + /// Whether to clip the boxes to the cropped image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ClipBoxes { + get { return clipBoxes_; } + set { + clipBoxes_ = value; + } + } + + /// Field number for the "random_coef" field. + public const int RandomCoefFieldNumber = 7; + private float randomCoef_; + /// + /// Probability a crop operation is skipped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float RandomCoef { + get { return randomCoef_; } + set { + randomCoef_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropPadFixedAspectRatioOperation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropPadFixedAspectRatioOperation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinObjectCovered, other.MinObjectCovered)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinAspectRatio, other.MinAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxAspectRatio, other.MaxAspectRatio)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinArea, other.MinArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxArea, other.MaxArea)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OverlapThresh, other.OverlapThresh)) return false; + if (ClipBoxes != other.ClipBoxes) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RandomCoef, other.RandomCoef)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinObjectCovered != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinObjectCovered); + if (MinAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinAspectRatio); + if (MaxAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxAspectRatio); + if (MinArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinArea); + if (MaxArea != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxArea); + if (OverlapThresh != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OverlapThresh); + if (ClipBoxes != false) hash ^= ClipBoxes.GetHashCode(); + if (RandomCoef != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RandomCoef); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinObjectCovered != 0F) { + output.WriteRawTag(13); + output.WriteFloat(MinObjectCovered); + } + if (MinAspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MinAspectRatio); + } + if (MaxAspectRatio != 0F) { + output.WriteRawTag(29); + output.WriteFloat(MaxAspectRatio); + } + if (MinArea != 0F) { + output.WriteRawTag(37); + output.WriteFloat(MinArea); + } + if (MaxArea != 0F) { + output.WriteRawTag(45); + output.WriteFloat(MaxArea); + } + if (OverlapThresh != 0F) { + output.WriteRawTag(53); + output.WriteFloat(OverlapThresh); + } + if (RandomCoef != 0F) { + output.WriteRawTag(61); + output.WriteFloat(RandomCoef); + } + if (ClipBoxes != false) { + output.WriteRawTag(64); + output.WriteBool(ClipBoxes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinObjectCovered != 0F) { + size += 1 + 4; + } + if (MinAspectRatio != 0F) { + size += 1 + 4; + } + if (MaxAspectRatio != 0F) { + size += 1 + 4; + } + if (MinArea != 0F) { + size += 1 + 4; + } + if (MaxArea != 0F) { + size += 1 + 4; + } + if (OverlapThresh != 0F) { + size += 1 + 4; + } + if (ClipBoxes != false) { + size += 1 + 1; + } + if (RandomCoef != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropPadFixedAspectRatioOperation other) { + if (other == null) { + return; + } + if (other.MinObjectCovered != 0F) { + MinObjectCovered = other.MinObjectCovered; + } + if (other.MinAspectRatio != 0F) { + MinAspectRatio = other.MinAspectRatio; + } + if (other.MaxAspectRatio != 0F) { + MaxAspectRatio = other.MaxAspectRatio; + } + if (other.MinArea != 0F) { + MinArea = other.MinArea; + } + if (other.MaxArea != 0F) { + MaxArea = other.MaxArea; + } + if (other.OverlapThresh != 0F) { + OverlapThresh = other.OverlapThresh; + } + if (other.ClipBoxes != false) { + ClipBoxes = other.ClipBoxes; + } + if (other.RandomCoef != 0F) { + RandomCoef = other.RandomCoef; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + MinObjectCovered = input.ReadFloat(); + break; + } + case 21: { + MinAspectRatio = input.ReadFloat(); + break; + } + case 29: { + MaxAspectRatio = input.ReadFloat(); + break; + } + case 37: { + MinArea = input.ReadFloat(); + break; + } + case 45: { + MaxArea = input.ReadFloat(); + break; + } + case 53: { + OverlapThresh = input.ReadFloat(); + break; + } + case 61: { + RandomCoef = input.ReadFloat(); + break; + } + case 64: { + ClipBoxes = input.ReadBool(); + break; + } + } + } + } + + } + + /// + /// Randomly crops and pads an image to a fixed aspect ratio according to: + /// Liu et al., SSD: Single shot multibox detector. + /// Multiple SSDRandomCropPadFixedAspectRatioOperations are defined by this + /// preprocessing step. Only one operation (chosen at random) is actually + /// performed on an image. + /// + public sealed partial class SSDRandomCropPadFixedAspectRatio : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SSDRandomCropPadFixedAspectRatio()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[32]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadFixedAspectRatio() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadFixedAspectRatio(SSDRandomCropPadFixedAspectRatio other) : this() { + operations_ = other.operations_.Clone(); + aspectRatio_ = other.aspectRatio_; + minPaddedSizeRatio_ = other.minPaddedSizeRatio_.Clone(); + maxPaddedSizeRatio_ = other.maxPaddedSizeRatio_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SSDRandomCropPadFixedAspectRatio Clone() { + return new SSDRandomCropPadFixedAspectRatio(this); + } + + /// Field number for the "operations" field. + public const int OperationsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_operations_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.SSDRandomCropPadFixedAspectRatioOperation.Parser); + private readonly pbc::RepeatedField operations_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Operations { + get { return operations_; } + } + + /// Field number for the "aspect_ratio" field. + public const int AspectRatioFieldNumber = 2; + private float aspectRatio_; + /// + /// Aspect ratio to pad to. This value is used for all crop and pad operations. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float AspectRatio { + get { return aspectRatio_; } + set { + aspectRatio_ = value; + } + } + + /// Field number for the "min_padded_size_ratio" field. + public const int MinPaddedSizeRatioFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_minPaddedSizeRatio_codec + = pb::FieldCodec.ForFloat(26); + private readonly pbc::RepeatedField minPaddedSizeRatio_ = new pbc::RepeatedField(); + /// + /// Min ratio of padded image height and width to the input image's height and + /// width. Two entries per operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MinPaddedSizeRatio { + get { return minPaddedSizeRatio_; } + } + + /// Field number for the "max_padded_size_ratio" field. + public const int MaxPaddedSizeRatioFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_maxPaddedSizeRatio_codec + = pb::FieldCodec.ForFloat(34); + private readonly pbc::RepeatedField maxPaddedSizeRatio_ = new pbc::RepeatedField(); + /// + /// Max ratio of padded image height and width to the input image's height and + /// width. Two entries per operation. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField MaxPaddedSizeRatio { + get { return maxPaddedSizeRatio_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SSDRandomCropPadFixedAspectRatio); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SSDRandomCropPadFixedAspectRatio other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!operations_.Equals(other.operations_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(AspectRatio, other.AspectRatio)) return false; + if(!minPaddedSizeRatio_.Equals(other.minPaddedSizeRatio_)) return false; + if(!maxPaddedSizeRatio_.Equals(other.maxPaddedSizeRatio_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= operations_.GetHashCode(); + if (AspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(AspectRatio); + hash ^= minPaddedSizeRatio_.GetHashCode(); + hash ^= maxPaddedSizeRatio_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + operations_.WriteTo(output, _repeated_operations_codec); + if (AspectRatio != 0F) { + output.WriteRawTag(21); + output.WriteFloat(AspectRatio); + } + minPaddedSizeRatio_.WriteTo(output, _repeated_minPaddedSizeRatio_codec); + maxPaddedSizeRatio_.WriteTo(output, _repeated_maxPaddedSizeRatio_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += operations_.CalculateSize(_repeated_operations_codec); + if (AspectRatio != 0F) { + size += 1 + 4; + } + size += minPaddedSizeRatio_.CalculateSize(_repeated_minPaddedSizeRatio_codec); + size += maxPaddedSizeRatio_.CalculateSize(_repeated_maxPaddedSizeRatio_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SSDRandomCropPadFixedAspectRatio other) { + if (other == null) { + return; + } + operations_.Add(other.operations_); + if (other.AspectRatio != 0F) { + AspectRatio = other.AspectRatio; + } + minPaddedSizeRatio_.Add(other.minPaddedSizeRatio_); + maxPaddedSizeRatio_.Add(other.maxPaddedSizeRatio_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + operations_.AddEntriesFrom(input, _repeated_operations_codec); + break; + } + case 21: { + AspectRatio = input.ReadFloat(); + break; + } + case 26: + case 29: { + minPaddedSizeRatio_.AddEntriesFrom(input, _repeated_minPaddedSizeRatio_codec); + break; + } + case 34: + case 37: { + maxPaddedSizeRatio_.AddEntriesFrom(input, _repeated_maxPaddedSizeRatio_codec); + break; + } + } + } + } + + } + + /// + /// Converts class logits to softmax optionally scaling the values by temperature + /// first. + /// + public sealed partial class ConvertClassLogitsToSoftmax : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConvertClassLogitsToSoftmax()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[33]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConvertClassLogitsToSoftmax() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConvertClassLogitsToSoftmax(ConvertClassLogitsToSoftmax other) : this() { + temperature_ = other.temperature_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ConvertClassLogitsToSoftmax Clone() { + return new ConvertClassLogitsToSoftmax(this); + } + + /// Field number for the "temperature" field. + public const int TemperatureFieldNumber = 1; + private float temperature_; + /// + /// Scale to use on logits before applying softmax. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float Temperature { + get { return temperature_; } + set { + temperature_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ConvertClassLogitsToSoftmax); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ConvertClassLogitsToSoftmax other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Temperature, other.Temperature)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Temperature != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Temperature); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Temperature != 0F) { + output.WriteRawTag(13); + output.WriteFloat(Temperature); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Temperature != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ConvertClassLogitsToSoftmax other) { + if (other == null) { + return; + } + if (other.Temperature != 0F) { + Temperature = other.Temperature; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + Temperature = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Randomly concatenates the image with itself horizontally and/or vertically. + /// + public sealed partial class RandomSelfConcatImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RandomSelfConcatImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[34]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomSelfConcatImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomSelfConcatImage(RandomSelfConcatImage other) : this() { + concatVerticalProbability_ = other.concatVerticalProbability_; + concatHorizontalProbability_ = other.concatHorizontalProbability_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RandomSelfConcatImage Clone() { + return new RandomSelfConcatImage(this); + } + + /// Field number for the "concat_vertical_probability" field. + public const int ConcatVerticalProbabilityFieldNumber = 1; + private float concatVerticalProbability_; + /// + /// Probability of concatenating the image vertically. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ConcatVerticalProbability { + get { return concatVerticalProbability_; } + set { + concatVerticalProbability_ = value; + } + } + + /// Field number for the "concat_horizontal_probability" field. + public const int ConcatHorizontalProbabilityFieldNumber = 2; + private float concatHorizontalProbability_; + /// + /// Probability of concatenating the image horizontally. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ConcatHorizontalProbability { + get { return concatHorizontalProbability_; } + set { + concatHorizontalProbability_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RandomSelfConcatImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RandomSelfConcatImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ConcatVerticalProbability, other.ConcatVerticalProbability)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ConcatHorizontalProbability, other.ConcatHorizontalProbability)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (ConcatVerticalProbability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ConcatVerticalProbability); + if (ConcatHorizontalProbability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ConcatHorizontalProbability); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (ConcatVerticalProbability != 0F) { + output.WriteRawTag(13); + output.WriteFloat(ConcatVerticalProbability); + } + if (ConcatHorizontalProbability != 0F) { + output.WriteRawTag(21); + output.WriteFloat(ConcatHorizontalProbability); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (ConcatVerticalProbability != 0F) { + size += 1 + 4; + } + if (ConcatHorizontalProbability != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RandomSelfConcatImage other) { + if (other == null) { + return; + } + if (other.ConcatVerticalProbability != 0F) { + ConcatVerticalProbability = other.ConcatVerticalProbability; + } + if (other.ConcatHorizontalProbability != 0F) { + ConcatHorizontalProbability = other.ConcatHorizontalProbability; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + ConcatVerticalProbability = input.ReadFloat(); + break; + } + case 21: { + ConcatHorizontalProbability = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + /// Apply an Autoaugment policy to the image and bounding boxes. + /// + public sealed partial class AutoAugmentImage : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AutoAugmentImage()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[35]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AutoAugmentImage() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AutoAugmentImage(AutoAugmentImage other) : this() { + policyName_ = other.policyName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public AutoAugmentImage Clone() { + return new AutoAugmentImage(this); + } + + /// Field number for the "policy_name" field. + public const int PolicyNameFieldNumber = 1; + private string policyName_ = ""; + /// + /// What AutoAugment policy to apply to the Image + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string PolicyName { + get { return policyName_; } + set { + policyName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as AutoAugmentImage); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(AutoAugmentImage other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (PolicyName != other.PolicyName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (PolicyName.Length != 0) hash ^= PolicyName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (PolicyName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(PolicyName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (PolicyName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PolicyName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(AutoAugmentImage other) { + if (other == null) { + return; + } + if (other.PolicyName.Length != 0) { + PolicyName = other.PolicyName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + PolicyName = input.ReadString(); + break; + } + } + } + } + + } + + /// + /// Randomly drops ground truth boxes for a label with some probability. + /// + public sealed partial class DropLabelProbabilistically : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DropLabelProbabilistically()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[36]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DropLabelProbabilistically() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DropLabelProbabilistically(DropLabelProbabilistically other) : this() { + label_ = other.label_; + dropProbability_ = other.dropProbability_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public DropLabelProbabilistically Clone() { + return new DropLabelProbabilistically(this); + } + + /// Field number for the "label" field. + public const int LabelFieldNumber = 1; + private int label_; + /// + /// The label that should be dropped. This corresponds to one of the entries + /// in the label map. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Label { + get { return label_; } + set { + label_ = value; + } + } + + /// Field number for the "drop_probability" field. + public const int DropProbabilityFieldNumber = 2; + private float dropProbability_; + /// + /// Probability of dropping the label. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DropProbability { + get { return dropProbability_; } + set { + dropProbability_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as DropLabelProbabilistically); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(DropLabelProbabilistically other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Label != other.Label) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DropProbability, other.DropProbability)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Label != 0) hash ^= Label.GetHashCode(); + if (DropProbability != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DropProbability); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Label != 0) { + output.WriteRawTag(8); + output.WriteInt32(Label); + } + if (DropProbability != 0F) { + output.WriteRawTag(21); + output.WriteFloat(DropProbability); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Label != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Label); + } + if (DropProbability != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(DropLabelProbabilistically other) { + if (other == null) { + return; + } + if (other.Label != 0) { + Label = other.Label; + } + if (other.DropProbability != 0F) { + DropProbability = other.DropProbability; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Label = input.ReadInt32(); + break; + } + case 21: { + DropProbability = input.ReadFloat(); + break; + } + } + } + } + + } + + /// + ///Remap a set of labels to a new label. + /// + public sealed partial class RemapLabels : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RemapLabels()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor.MessageTypes[37]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RemapLabels() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RemapLabels(RemapLabels other) : this() { + originalLabels_ = other.originalLabels_.Clone(); + newLabel_ = other.newLabel_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RemapLabels Clone() { + return new RemapLabels(this); + } + + /// Field number for the "original_labels" field. + public const int OriginalLabelsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_originalLabels_codec + = pb::FieldCodec.ForInt32(10); + private readonly pbc::RepeatedField originalLabels_ = new pbc::RepeatedField(); + /// + /// Labels to be remapped. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField OriginalLabels { + get { return originalLabels_; } + } + + /// Field number for the "new_label" field. + public const int NewLabelFieldNumber = 2; + private int newLabel_; + /// + /// Label to map to. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NewLabel { + get { return newLabel_; } + set { + newLabel_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RemapLabels); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RemapLabels other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!originalLabels_.Equals(other.originalLabels_)) return false; + if (NewLabel != other.NewLabel) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= originalLabels_.GetHashCode(); + if (NewLabel != 0) hash ^= NewLabel.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + originalLabels_.WriteTo(output, _repeated_originalLabels_codec); + if (NewLabel != 0) { + output.WriteRawTag(16); + output.WriteInt32(NewLabel); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += originalLabels_.CalculateSize(_repeated_originalLabels_codec); + if (NewLabel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NewLabel); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RemapLabels other) { + if (other == null) { + return; + } + originalLabels_.Add(other.originalLabels_); + if (other.NewLabel != 0) { + NewLabel = other.NewLabel; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + originalLabels_.AddEntriesFrom(input, _repeated_originalLabels_codec); + break; + } + case 16: { + NewLabel = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/RegionSimilarityCalculator.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/RegionSimilarityCalculator.cs new file mode 100644 index 00000000..9b06eebc --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/RegionSimilarityCalculator.cs @@ -0,0 +1,791 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/region_similarity_calculator.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/region_similarity_calculator.proto + public static partial class RegionSimilarityCalculatorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/region_similarity_calculator.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static RegionSimilarityCalculatorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjpvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9yZWdpb25fc2ltaWxhcml0eV9j", + "YWxjdWxhdG9yLnByb3RvEhdvYmplY3RfZGV0ZWN0aW9uLnByb3RvcyLeAgoa", + "UmVnaW9uU2ltaWxhcml0eUNhbGN1bGF0b3ISTgoWbmVnX3NxX2Rpc3Rfc2lt", + "aWxhcml0eRgBIAEoCzIsLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLk5lZ1Nx", + "RGlzdFNpbWlsYXJpdHlIABJACg5pb3Vfc2ltaWxhcml0eRgCIAEoCzImLm9i", + "amVjdF9kZXRlY3Rpb24ucHJvdG9zLklvdVNpbWlsYXJpdHlIABJACg5pb2Ff", + "c2ltaWxhcml0eRgDIAEoCzImLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLklv", + "YVNpbWlsYXJpdHlIABJXChp0aHJlc2hvbGRlZF9pb3Vfc2ltaWxhcml0eRgE", + "IAEoCzIxLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlRocmVzaG9sZGVkSW91", + "U2ltaWxhcml0eUgAQhMKEXJlZ2lvbl9zaW1pbGFyaXR5IhUKE05lZ1NxRGlz", + "dFNpbWlsYXJpdHkiDwoNSW91U2ltaWxhcml0eSIPCg1Jb2FTaW1pbGFyaXR5", + "IjEKGFRocmVzaG9sZGVkSW91U2ltaWxhcml0eRIVCg1pb3VfdGhyZXNob2xk", + "GAEgASgCYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculator), global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculator.Parser, new[]{ "NegSqDistSimilarity", "IouSimilarity", "IoaSimilarity", "ThresholdedIouSimilarity" }, new[]{ "RegionSimilarity" }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity), global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity), global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity), global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity.Parser, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity), global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity.Parser, new[]{ "IouThreshold" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for region similarity calculators. See + /// core/region_similarity_calculator.py for details. + /// + public sealed partial class RegionSimilarityCalculator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegionSimilarityCalculator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculatorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegionSimilarityCalculator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegionSimilarityCalculator(RegionSimilarityCalculator other) : this() { + switch (other.RegionSimilarityCase) { + case RegionSimilarityOneofCase.NegSqDistSimilarity: + NegSqDistSimilarity = other.NegSqDistSimilarity.Clone(); + break; + case RegionSimilarityOneofCase.IouSimilarity: + IouSimilarity = other.IouSimilarity.Clone(); + break; + case RegionSimilarityOneofCase.IoaSimilarity: + IoaSimilarity = other.IoaSimilarity.Clone(); + break; + case RegionSimilarityOneofCase.ThresholdedIouSimilarity: + ThresholdedIouSimilarity = other.ThresholdedIouSimilarity.Clone(); + break; + } + + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegionSimilarityCalculator Clone() { + return new RegionSimilarityCalculator(this); + } + + /// Field number for the "neg_sq_dist_similarity" field. + public const int NegSqDistSimilarityFieldNumber = 1; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity NegSqDistSimilarity { + get { return regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity ? (global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity) regionSimilarity_ : null; } + set { + regionSimilarity_ = value; + regionSimilarityCase_ = value == null ? RegionSimilarityOneofCase.None : RegionSimilarityOneofCase.NegSqDistSimilarity; + } + } + + /// Field number for the "iou_similarity" field. + public const int IouSimilarityFieldNumber = 2; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity IouSimilarity { + get { return regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity ? (global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity) regionSimilarity_ : null; } + set { + regionSimilarity_ = value; + regionSimilarityCase_ = value == null ? RegionSimilarityOneofCase.None : RegionSimilarityOneofCase.IouSimilarity; + } + } + + /// Field number for the "ioa_similarity" field. + public const int IoaSimilarityFieldNumber = 3; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity IoaSimilarity { + get { return regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity ? (global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity) regionSimilarity_ : null; } + set { + regionSimilarity_ = value; + regionSimilarityCase_ = value == null ? RegionSimilarityOneofCase.None : RegionSimilarityOneofCase.IoaSimilarity; + } + } + + /// Field number for the "thresholded_iou_similarity" field. + public const int ThresholdedIouSimilarityFieldNumber = 4; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity ThresholdedIouSimilarity { + get { return regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity ? (global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity) regionSimilarity_ : null; } + set { + regionSimilarity_ = value; + regionSimilarityCase_ = value == null ? RegionSimilarityOneofCase.None : RegionSimilarityOneofCase.ThresholdedIouSimilarity; + } + } + + private object regionSimilarity_; + /// Enum of possible cases for the "region_similarity" oneof. + public enum RegionSimilarityOneofCase { + None = 0, + NegSqDistSimilarity = 1, + IouSimilarity = 2, + IoaSimilarity = 3, + ThresholdedIouSimilarity = 4, + } + private RegionSimilarityOneofCase regionSimilarityCase_ = RegionSimilarityOneofCase.None; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public RegionSimilarityOneofCase RegionSimilarityCase { + get { return regionSimilarityCase_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void ClearRegionSimilarity() { + regionSimilarityCase_ = RegionSimilarityOneofCase.None; + regionSimilarity_ = null; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as RegionSimilarityCalculator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(RegionSimilarityCalculator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(NegSqDistSimilarity, other.NegSqDistSimilarity)) return false; + if (!object.Equals(IouSimilarity, other.IouSimilarity)) return false; + if (!object.Equals(IoaSimilarity, other.IoaSimilarity)) return false; + if (!object.Equals(ThresholdedIouSimilarity, other.ThresholdedIouSimilarity)) return false; + if (RegionSimilarityCase != other.RegionSimilarityCase) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity) hash ^= NegSqDistSimilarity.GetHashCode(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity) hash ^= IouSimilarity.GetHashCode(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity) hash ^= IoaSimilarity.GetHashCode(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity) hash ^= ThresholdedIouSimilarity.GetHashCode(); + hash ^= (int) regionSimilarityCase_; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity) { + output.WriteRawTag(10); + output.WriteMessage(NegSqDistSimilarity); + } + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity) { + output.WriteRawTag(18); + output.WriteMessage(IouSimilarity); + } + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity) { + output.WriteRawTag(26); + output.WriteMessage(IoaSimilarity); + } + if (regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity) { + output.WriteRawTag(34); + output.WriteMessage(ThresholdedIouSimilarity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(NegSqDistSimilarity); + } + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(IouSimilarity); + } + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(IoaSimilarity); + } + if (regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ThresholdedIouSimilarity); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(RegionSimilarityCalculator other) { + if (other == null) { + return; + } + switch (other.RegionSimilarityCase) { + case RegionSimilarityOneofCase.NegSqDistSimilarity: + if (NegSqDistSimilarity == null) { + NegSqDistSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity(); + } + NegSqDistSimilarity.MergeFrom(other.NegSqDistSimilarity); + break; + case RegionSimilarityOneofCase.IouSimilarity: + if (IouSimilarity == null) { + IouSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity(); + } + IouSimilarity.MergeFrom(other.IouSimilarity); + break; + case RegionSimilarityOneofCase.IoaSimilarity: + if (IoaSimilarity == null) { + IoaSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity(); + } + IoaSimilarity.MergeFrom(other.IoaSimilarity); + break; + case RegionSimilarityOneofCase.ThresholdedIouSimilarity: + if (ThresholdedIouSimilarity == null) { + ThresholdedIouSimilarity = new global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity(); + } + ThresholdedIouSimilarity.MergeFrom(other.ThresholdedIouSimilarity); + break; + } + + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.NegSqDistSimilarity(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.NegSqDistSimilarity) { + subBuilder.MergeFrom(NegSqDistSimilarity); + } + input.ReadMessage(subBuilder); + NegSqDistSimilarity = subBuilder; + break; + } + case 18: { + global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.IouSimilarity(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IouSimilarity) { + subBuilder.MergeFrom(IouSimilarity); + } + input.ReadMessage(subBuilder); + IouSimilarity = subBuilder; + break; + } + case 26: { + global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.IoaSimilarity(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.IoaSimilarity) { + subBuilder.MergeFrom(IoaSimilarity); + } + input.ReadMessage(subBuilder); + IoaSimilarity = subBuilder; + break; + } + case 34: { + global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity subBuilder = new global::Tensorflow.Models.ObjectDetection.Protos.ThresholdedIouSimilarity(); + if (regionSimilarityCase_ == RegionSimilarityOneofCase.ThresholdedIouSimilarity) { + subBuilder.MergeFrom(ThresholdedIouSimilarity); + } + input.ReadMessage(subBuilder); + ThresholdedIouSimilarity = subBuilder; + break; + } + } + } + } + + } + + /// + /// Configuration for negative squared distance similarity calculator. + /// + public sealed partial class NegSqDistSimilarity : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NegSqDistSimilarity()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculatorReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NegSqDistSimilarity() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NegSqDistSimilarity(NegSqDistSimilarity other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public NegSqDistSimilarity Clone() { + return new NegSqDistSimilarity(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as NegSqDistSimilarity); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(NegSqDistSimilarity other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(NegSqDistSimilarity other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Configuration for intersection-over-union (IOU) similarity calculator. + /// + public sealed partial class IouSimilarity : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IouSimilarity()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculatorReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IouSimilarity() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IouSimilarity(IouSimilarity other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IouSimilarity Clone() { + return new IouSimilarity(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as IouSimilarity); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(IouSimilarity other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(IouSimilarity other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Configuration for intersection-over-area (IOA) similarity calculator. + /// + public sealed partial class IoaSimilarity : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IoaSimilarity()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculatorReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IoaSimilarity() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IoaSimilarity(IoaSimilarity other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public IoaSimilarity Clone() { + return new IoaSimilarity(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as IoaSimilarity); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(IoaSimilarity other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(IoaSimilarity other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + } + + } + + /// + /// Configuration for thresholded-intersection-over-union similarity calculator. + /// + public sealed partial class ThresholdedIouSimilarity : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThresholdedIouSimilarity()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculatorReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThresholdedIouSimilarity() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThresholdedIouSimilarity(ThresholdedIouSimilarity other) : this() { + iouThreshold_ = other.iouThreshold_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public ThresholdedIouSimilarity Clone() { + return new ThresholdedIouSimilarity(this); + } + + /// Field number for the "iou_threshold" field. + public const int IouThresholdFieldNumber = 1; + private float iouThreshold_; + /// + /// IOU threshold used for filtering scores. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float IouThreshold { + get { return iouThreshold_; } + set { + iouThreshold_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as ThresholdedIouSimilarity); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(ThresholdedIouSimilarity other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(IouThreshold, other.IouThreshold)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (IouThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(IouThreshold); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (IouThreshold != 0F) { + output.WriteRawTag(13); + output.WriteFloat(IouThreshold); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (IouThreshold != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(ThresholdedIouSimilarity other) { + if (other == null) { + return; + } + if (other.IouThreshold != 0F) { + IouThreshold = other.IouThreshold; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + IouThreshold = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/SquareBoxCoder.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/SquareBoxCoder.cs new file mode 100644 index 00000000..a1f3d794 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/SquareBoxCoder.cs @@ -0,0 +1,240 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/square_box_coder.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/square_box_coder.proto + public static partial class SquareBoxCoderReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/square_box_coder.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SquareBoxCoderReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "Ci5vYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9zcXVhcmVfYm94X2NvZGVyLnBy", + "b3RvEhdvYmplY3RfZGV0ZWN0aW9uLnByb3RvcyJICg5TcXVhcmVCb3hDb2Rl", + "chIPCgd5X3NjYWxlGAEgASgCEg8KB3hfc2NhbGUYAiABKAISFAoMbGVuZ3Ro", + "X3NjYWxlGAMgASgCYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder), global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoder.Parser, new[]{ "YScale", "XScale", "LengthScale" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for SquareBoxCoder. See + /// box_coders/square_box_coder.py for details. + /// + public sealed partial class SquareBoxCoder : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SquareBoxCoder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.SquareBoxCoderReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SquareBoxCoder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SquareBoxCoder(SquareBoxCoder other) : this() { + yScale_ = other.yScale_; + xScale_ = other.xScale_; + lengthScale_ = other.lengthScale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SquareBoxCoder Clone() { + return new SquareBoxCoder(this); + } + + /// Field number for the "y_scale" field. + public const int YScaleFieldNumber = 1; + private float yScale_; + /// + /// Scale factor for anchor encoded box center. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float YScale { + get { return yScale_; } + set { + yScale_ = value; + } + } + + /// Field number for the "x_scale" field. + public const int XScaleFieldNumber = 2; + private float xScale_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float XScale { + get { return xScale_; } + set { + xScale_ = value; + } + } + + /// Field number for the "length_scale" field. + public const int LengthScaleFieldNumber = 3; + private float lengthScale_; + /// + /// Scale factor for anchor encoded box length. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float LengthScale { + get { return lengthScale_; } + set { + lengthScale_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SquareBoxCoder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SquareBoxCoder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(YScale, other.YScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(XScale, other.XScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(LengthScale, other.LengthScale)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (YScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(YScale); + if (XScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(XScale); + if (LengthScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(LengthScale); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (YScale != 0F) { + output.WriteRawTag(13); + output.WriteFloat(YScale); + } + if (XScale != 0F) { + output.WriteRawTag(21); + output.WriteFloat(XScale); + } + if (LengthScale != 0F) { + output.WriteRawTag(29); + output.WriteFloat(LengthScale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (YScale != 0F) { + size += 1 + 4; + } + if (XScale != 0F) { + size += 1 + 4; + } + if (LengthScale != 0F) { + size += 1 + 4; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SquareBoxCoder other) { + if (other == null) { + return; + } + if (other.YScale != 0F) { + YScale = other.YScale; + } + if (other.XScale != 0F) { + XScale = other.XScale; + } + if (other.LengthScale != 0F) { + LengthScale = other.LengthScale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 13: { + YScale = input.ReadFloat(); + break; + } + case 21: { + XScale = input.ReadFloat(); + break; + } + case 29: { + LengthScale = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Ssd.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Ssd.cs new file mode 100644 index 00000000..1a43ba6c --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Ssd.cs @@ -0,0 +1,2028 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/ssd.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/ssd.proto + public static partial class SsdReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/ssd.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SsdReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiFvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9zc2QucHJvdG8SF29iamVjdF9k", + "ZXRlY3Rpb24ucHJvdG9zGi5vYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9hbmNo", + "b3JfZ2VuZXJhdG9yLnByb3RvGidvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9i", + "b3hfY29kZXIucHJvdG8aK29iamVjdF9kZXRlY3Rpb24vcHJvdG9zL2JveF9w", + "cmVkaWN0b3IucHJvdG8aKW9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL2h5cGVy", + "cGFyYW1zLnByb3RvGitvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9pbWFnZV9y", + "ZXNpemVyLnByb3RvGiRvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9sb3NzZXMu", + "cHJvdG8aJW9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL21hdGNoZXIucHJvdG8a", + "LW9iamVjdF9kZXRlY3Rpb24vcHJvdG9zL3Bvc3RfcHJvY2Vzc2luZy5wcm90", + "bxo6b2JqZWN0X2RldGVjdGlvbi9wcm90b3MvcmVnaW9uX3NpbWlsYXJpdHlf", + "Y2FsY3VsYXRvci5wcm90byLDCgoDU3NkEhMKC251bV9jbGFzc2VzGAEgASgF", + "EjwKDWltYWdlX3Jlc2l6ZXIYAiABKAsyJS5vYmplY3RfZGV0ZWN0aW9uLnBy", + "b3Rvcy5JbWFnZVJlc2l6ZXISRwoRZmVhdHVyZV9leHRyYWN0b3IYAyABKAsy", + "LC5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5Tc2RGZWF0dXJlRXh0cmFjdG9y", + "EjQKCWJveF9jb2RlchgEIAEoCzIhLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9z", + "LkJveENvZGVyEjEKB21hdGNoZXIYBSABKAsyIC5vYmplY3RfZGV0ZWN0aW9u", + "LnByb3Rvcy5NYXRjaGVyElIKFXNpbWlsYXJpdHlfY2FsY3VsYXRvchgGIAEo", + "CzIzLm9iamVjdF9kZXRlY3Rpb24ucHJvdG9zLlJlZ2lvblNpbWlsYXJpdHlD", + "YWxjdWxhdG9yEiIKGmVuY29kZV9iYWNrZ3JvdW5kX2FzX3plcm9zGAwgASgI", + "Eh0KFW5lZ2F0aXZlX2NsYXNzX3dlaWdodBgNIAEoAhI8Cg1ib3hfcHJlZGlj", + "dG9yGAcgASgLMiUub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuQm94UHJlZGlj", + "dG9yEkIKEGFuY2hvcl9nZW5lcmF0b3IYCCABKAsyKC5vYmplY3RfZGV0ZWN0", + "aW9uLnByb3Rvcy5BbmNob3JHZW5lcmF0b3ISQAoPcG9zdF9wcm9jZXNzaW5n", + "GAkgASgLMicub2JqZWN0X2RldGVjdGlvbi5wcm90b3MuUG9zdFByb2Nlc3Np", + "bmcSJQodbm9ybWFsaXplX2xvc3NfYnlfbnVtX21hdGNoZXMYCiABKAgSJgoe", + "bm9ybWFsaXplX2xvY19sb3NzX2J5X2NvZGVzaXplGA4gASgIEisKBGxvc3MY", + "CyABKAsyHS5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5Mb3NzEhgKEGZyZWV6", + "ZV9iYXRjaG5vcm0YECABKAgSIAoYaW5wbGFjZV9iYXRjaG5vcm1fdXBkYXRl", + "GA8gASgIEhwKFGFkZF9iYWNrZ3JvdW5kX2NsYXNzGBUgASgIEiEKGWV4cGxp", + "Y2l0X2JhY2tncm91bmRfY2xhc3MYGCABKAgSIgoadXNlX2NvbmZpZGVuY2Vz", + "X2FzX3RhcmdldHMYFiABKAgSHwoXaW1wbGljaXRfZXhhbXBsZV93ZWlnaHQY", + "FyABKAISPwoQbWFza19oZWFkX2NvbmZpZxgZIAEoCzIlLm9iamVjdF9kZXRl", + "Y3Rpb24ucHJvdG9zLlNzZC5NYXNrSGVhZBrcAgoITWFza0hlYWQSEwoLbWFz", + "a19oZWlnaHQYASABKAUSEgoKbWFza193aWR0aBgCIAEoBRIgChhtYXNrc19h", + "cmVfY2xhc3NfYWdub3N0aWMYAyABKAgSIgoabWFza19wcmVkaWN0aW9uX2Nv", + "bnZfZGVwdGgYBCABKAUSJwofbWFza19wcmVkaWN0aW9uX251bV9jb252X2xh", + "eWVycxgFIAEoBRIkChxjb252b2x2ZV90aGVuX3Vwc2FtcGxlX21hc2tzGAYg", + "ASgIEhgKEG1hc2tfbG9zc193ZWlnaHQYByABKAISHQoVbWFza19sb3NzX3Nh", + "bXBsZV9zaXplGAggASgFEj4KEGNvbnZfaHlwZXJwYXJhbXMYCSABKAsyJC5v", + "YmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5IeXBlcnBhcmFtcxIZChFpbml0aWFs", + "X2Nyb3Bfc2l6ZRgKIAEoBSKaAwoTU3NkRmVhdHVyZUV4dHJhY3RvchIMCgR0", + "eXBlGAEgASgJEhgKEGRlcHRoX211bHRpcGxpZXIYAiABKAISEQoJbWluX2Rl", + "cHRoGAMgASgFEj4KEGNvbnZfaHlwZXJwYXJhbXMYBCABKAsyJC5vYmplY3Rf", + "ZGV0ZWN0aW9uLnByb3Rvcy5IeXBlcnBhcmFtcxIzCitvdmVycmlkZV9iYXNl", + "X2ZlYXR1cmVfZXh0cmFjdG9yX2h5cGVycGFyYW1zGAkgASgIEhcKD3BhZF90", + "b19tdWx0aXBsZRgFIAEoBRIcChR1c2VfZXhwbGljaXRfcGFkZGluZxgHIAEo", + "CBIVCg11c2VfZGVwdGh3aXNlGAggASgIEjwKA2ZwbhgKIAEoCzIvLm9iamVj", + "dF9kZXRlY3Rpb24ucHJvdG9zLkZlYXR1cmVQeXJhbWlkTmV0d29ya3MSLQol", + "cmVwbGFjZV9wcmVwcm9jZXNzb3Jfd2l0aF9wbGFjZWhvbGRlchgLIAEoCBIS", + "CgpudW1fbGF5ZXJzGAwgASgFSgQIBhAHIl4KFkZlYXR1cmVQeXJhbWlkTmV0", + "d29ya3MSEQoJbWluX2xldmVsGAEgASgFEhEKCW1heF9sZXZlbBgCIAEoBRIe", + "ChZhZGRpdGlvbmFsX2xheWVyX2RlcHRoGAMgASgFYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.AnchorGeneratorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.BoxCoderReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictorReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.HyperparamsReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.ImageResizerReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.LossesReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.MatcherReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.PostProcessingReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculatorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Ssd), global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Parser, new[]{ "NumClasses", "ImageResizer", "FeatureExtractor", "BoxCoder", "Matcher", "SimilarityCalculator", "EncodeBackgroundAsZeros", "NegativeClassWeight", "BoxPredictor", "AnchorGenerator", "PostProcessing", "NormalizeLossByNumMatches", "NormalizeLocLossByCodesize", "Loss", "FreezeBatchnorm", "InplaceBatchnormUpdate", "AddBackgroundClass", "ExplicitBackgroundClass", "UseConfidencesAsTargets", "ImplicitExampleWeight", "MaskHeadConfig" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Types.MaskHead), global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Types.MaskHead.Parser, new[]{ "MaskHeight", "MaskWidth", "MasksAreClassAgnostic", "MaskPredictionConvDepth", "MaskPredictionNumConvLayers", "ConvolveThenUpsampleMasks", "MaskLossWeight", "MaskLossSampleSize", "ConvHyperparams", "InitialCropSize" }, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SsdFeatureExtractor), global::Tensorflow.Models.ObjectDetection.Protos.SsdFeatureExtractor.Parser, new[]{ "Type", "DepthMultiplier", "MinDepth", "ConvHyperparams", "OverrideBaseFeatureExtractorHyperparams", "PadToMultiple", "UseExplicitPadding", "UseDepthwise", "Fpn", "ReplacePreprocessorWithPlaceholder", "NumLayers" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.FeaturePyramidNetworks), global::Tensorflow.Models.ObjectDetection.Protos.FeaturePyramidNetworks.Parser, new[]{ "MinLevel", "MaxLevel", "AdditionalLayerDepth" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration for Single Shot Detection (SSD) models. + /// Next id: 26 + /// + public sealed partial class Ssd : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Ssd()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.SsdReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Ssd() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Ssd(Ssd other) : this() { + numClasses_ = other.numClasses_; + imageResizer_ = other.imageResizer_ != null ? other.imageResizer_.Clone() : null; + featureExtractor_ = other.featureExtractor_ != null ? other.featureExtractor_.Clone() : null; + boxCoder_ = other.boxCoder_ != null ? other.boxCoder_.Clone() : null; + matcher_ = other.matcher_ != null ? other.matcher_.Clone() : null; + similarityCalculator_ = other.similarityCalculator_ != null ? other.similarityCalculator_.Clone() : null; + encodeBackgroundAsZeros_ = other.encodeBackgroundAsZeros_; + negativeClassWeight_ = other.negativeClassWeight_; + boxPredictor_ = other.boxPredictor_ != null ? other.boxPredictor_.Clone() : null; + anchorGenerator_ = other.anchorGenerator_ != null ? other.anchorGenerator_.Clone() : null; + postProcessing_ = other.postProcessing_ != null ? other.postProcessing_.Clone() : null; + normalizeLossByNumMatches_ = other.normalizeLossByNumMatches_; + normalizeLocLossByCodesize_ = other.normalizeLocLossByCodesize_; + loss_ = other.loss_ != null ? other.loss_.Clone() : null; + freezeBatchnorm_ = other.freezeBatchnorm_; + inplaceBatchnormUpdate_ = other.inplaceBatchnormUpdate_; + addBackgroundClass_ = other.addBackgroundClass_; + explicitBackgroundClass_ = other.explicitBackgroundClass_; + useConfidencesAsTargets_ = other.useConfidencesAsTargets_; + implicitExampleWeight_ = other.implicitExampleWeight_; + maskHeadConfig_ = other.maskHeadConfig_ != null ? other.maskHeadConfig_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public Ssd Clone() { + return new Ssd(this); + } + + /// Field number for the "num_classes" field. + public const int NumClassesFieldNumber = 1; + private int numClasses_; + /// + /// Number of classes to predict. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumClasses { + get { return numClasses_; } + set { + numClasses_ = value; + } + } + + /// Field number for the "image_resizer" field. + public const int ImageResizerFieldNumber = 2; + private global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer imageResizer_; + /// + /// Image resizer for preprocessing the input image. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer ImageResizer { + get { return imageResizer_; } + set { + imageResizer_ = value; + } + } + + /// Field number for the "feature_extractor" field. + public const int FeatureExtractorFieldNumber = 3; + private global::Tensorflow.Models.ObjectDetection.Protos.SsdFeatureExtractor featureExtractor_; + /// + /// Feature extractor config. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.SsdFeatureExtractor FeatureExtractor { + get { return featureExtractor_; } + set { + featureExtractor_ = value; + } + } + + /// Field number for the "box_coder" field. + public const int BoxCoderFieldNumber = 4; + private global::Tensorflow.Models.ObjectDetection.Protos.BoxCoder boxCoder_; + /// + /// Box coder to encode the boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BoxCoder BoxCoder { + get { return boxCoder_; } + set { + boxCoder_ = value; + } + } + + /// Field number for the "matcher" field. + public const int MatcherFieldNumber = 5; + private global::Tensorflow.Models.ObjectDetection.Protos.Matcher matcher_; + /// + /// Matcher to match groundtruth with anchors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Matcher Matcher { + get { return matcher_; } + set { + matcher_ = value; + } + } + + /// Field number for the "similarity_calculator" field. + public const int SimilarityCalculatorFieldNumber = 6; + private global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculator similarityCalculator_; + /// + /// Region similarity calculator to compute similarity of boxes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculator SimilarityCalculator { + get { return similarityCalculator_; } + set { + similarityCalculator_ = value; + } + } + + /// Field number for the "encode_background_as_zeros" field. + public const int EncodeBackgroundAsZerosFieldNumber = 12; + private bool encodeBackgroundAsZeros_; + /// + /// Whether background targets are to be encoded as an all + /// zeros vector or a one-hot vector (where background is the 0th class). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool EncodeBackgroundAsZeros { + get { return encodeBackgroundAsZeros_; } + set { + encodeBackgroundAsZeros_ = value; + } + } + + /// Field number for the "negative_class_weight" field. + public const int NegativeClassWeightFieldNumber = 13; + private float negativeClassWeight_; + /// + /// classification weight to be associated to negative + /// anchors (default: 1.0). The weight must be in [0., 1.]. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float NegativeClassWeight { + get { return negativeClassWeight_; } + set { + negativeClassWeight_ = value; + } + } + + /// Field number for the "box_predictor" field. + public const int BoxPredictorFieldNumber = 7; + private global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor boxPredictor_; + /// + /// Box predictor to attach to the features. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor BoxPredictor { + get { return boxPredictor_; } + set { + boxPredictor_ = value; + } + } + + /// Field number for the "anchor_generator" field. + public const int AnchorGeneratorFieldNumber = 8; + private global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator anchorGenerator_; + /// + /// Anchor generator to compute anchors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator AnchorGenerator { + get { return anchorGenerator_; } + set { + anchorGenerator_ = value; + } + } + + /// Field number for the "post_processing" field. + public const int PostProcessingFieldNumber = 9; + private global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing postProcessing_; + /// + /// Post processing to apply on the predictions. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing PostProcessing { + get { return postProcessing_; } + set { + postProcessing_ = value; + } + } + + /// Field number for the "normalize_loss_by_num_matches" field. + public const int NormalizeLossByNumMatchesFieldNumber = 10; + private bool normalizeLossByNumMatches_; + /// + /// Whether to normalize the loss by number of groundtruth boxes that match to + /// the anchors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool NormalizeLossByNumMatches { + get { return normalizeLossByNumMatches_; } + set { + normalizeLossByNumMatches_ = value; + } + } + + /// Field number for the "normalize_loc_loss_by_codesize" field. + public const int NormalizeLocLossByCodesizeFieldNumber = 14; + private bool normalizeLocLossByCodesize_; + /// + /// Whether to normalize the localization loss by the code size of the box + /// encodings. This is applied along with other normalization factors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool NormalizeLocLossByCodesize { + get { return normalizeLocLossByCodesize_; } + set { + normalizeLocLossByCodesize_ = value; + } + } + + /// Field number for the "loss" field. + public const int LossFieldNumber = 11; + private global::Tensorflow.Models.ObjectDetection.Protos.Loss loss_; + /// + /// Loss configuration for training. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Loss Loss { + get { return loss_; } + set { + loss_ = value; + } + } + + /// Field number for the "freeze_batchnorm" field. + public const int FreezeBatchnormFieldNumber = 16; + private bool freezeBatchnorm_; + /// + /// Whether to update batch norm parameters during training or not. + /// When training with a relative small batch size (e.g. 1), it is + /// desirable to disable batch norm update and use pretrained batch norm + /// params. + /// + /// Note: Some feature extractors are used with canned arg_scopes + /// (e.g resnet arg scopes). In these cases training behavior of batch norm + /// variables may depend on both values of `batch_norm_trainable` and + /// `is_training`. + /// + /// When canned arg_scopes are used with feature extractors `conv_hyperparams` + /// will apply only to the additional layers that are added and are outside the + /// canned arg_scope. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool FreezeBatchnorm { + get { return freezeBatchnorm_; } + set { + freezeBatchnorm_ = value; + } + } + + /// Field number for the "inplace_batchnorm_update" field. + public const int InplaceBatchnormUpdateFieldNumber = 15; + private bool inplaceBatchnormUpdate_; + /// + /// Whether to update batch_norm inplace during training. This is required + /// for batch norm to work correctly on TPUs. When this is false, user must add + /// a control dependency on tf.GraphKeys.UPDATE_OPS for train/loss op in order + /// to update the batch norm moving average parameters. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool InplaceBatchnormUpdate { + get { return inplaceBatchnormUpdate_; } + set { + inplaceBatchnormUpdate_ = value; + } + } + + /// Field number for the "add_background_class" field. + public const int AddBackgroundClassFieldNumber = 21; + private bool addBackgroundClass_; + /// + /// Whether to add an implicit background class to one-hot encodings of + /// groundtruth labels. Set to false if training a single + /// class model or using an explicit background class. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AddBackgroundClass { + get { return addBackgroundClass_; } + set { + addBackgroundClass_ = value; + } + } + + /// Field number for the "explicit_background_class" field. + public const int ExplicitBackgroundClassFieldNumber = 24; + private bool explicitBackgroundClass_; + /// + /// Whether to use an explicit background class. Set to true if using + /// groundtruth labels with an explicit background class, as in multiclass + /// scores. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ExplicitBackgroundClass { + get { return explicitBackgroundClass_; } + set { + explicitBackgroundClass_ = value; + } + } + + /// Field number for the "use_confidences_as_targets" field. + public const int UseConfidencesAsTargetsFieldNumber = 22; + private bool useConfidencesAsTargets_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseConfidencesAsTargets { + get { return useConfidencesAsTargets_; } + set { + useConfidencesAsTargets_ = value; + } + } + + /// Field number for the "implicit_example_weight" field. + public const int ImplicitExampleWeightFieldNumber = 23; + private float implicitExampleWeight_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float ImplicitExampleWeight { + get { return implicitExampleWeight_; } + set { + implicitExampleWeight_ = value; + } + } + + /// Field number for the "mask_head_config" field. + public const int MaskHeadConfigFieldNumber = 25; + private global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Types.MaskHead maskHeadConfig_; + /// + /// Configs for mask head. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Types.MaskHead MaskHeadConfig { + get { return maskHeadConfig_; } + set { + maskHeadConfig_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as Ssd); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(Ssd other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NumClasses != other.NumClasses) return false; + if (!object.Equals(ImageResizer, other.ImageResizer)) return false; + if (!object.Equals(FeatureExtractor, other.FeatureExtractor)) return false; + if (!object.Equals(BoxCoder, other.BoxCoder)) return false; + if (!object.Equals(Matcher, other.Matcher)) return false; + if (!object.Equals(SimilarityCalculator, other.SimilarityCalculator)) return false; + if (EncodeBackgroundAsZeros != other.EncodeBackgroundAsZeros) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(NegativeClassWeight, other.NegativeClassWeight)) return false; + if (!object.Equals(BoxPredictor, other.BoxPredictor)) return false; + if (!object.Equals(AnchorGenerator, other.AnchorGenerator)) return false; + if (!object.Equals(PostProcessing, other.PostProcessing)) return false; + if (NormalizeLossByNumMatches != other.NormalizeLossByNumMatches) return false; + if (NormalizeLocLossByCodesize != other.NormalizeLocLossByCodesize) return false; + if (!object.Equals(Loss, other.Loss)) return false; + if (FreezeBatchnorm != other.FreezeBatchnorm) return false; + if (InplaceBatchnormUpdate != other.InplaceBatchnormUpdate) return false; + if (AddBackgroundClass != other.AddBackgroundClass) return false; + if (ExplicitBackgroundClass != other.ExplicitBackgroundClass) return false; + if (UseConfidencesAsTargets != other.UseConfidencesAsTargets) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(ImplicitExampleWeight, other.ImplicitExampleWeight)) return false; + if (!object.Equals(MaskHeadConfig, other.MaskHeadConfig)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NumClasses != 0) hash ^= NumClasses.GetHashCode(); + if (imageResizer_ != null) hash ^= ImageResizer.GetHashCode(); + if (featureExtractor_ != null) hash ^= FeatureExtractor.GetHashCode(); + if (boxCoder_ != null) hash ^= BoxCoder.GetHashCode(); + if (matcher_ != null) hash ^= Matcher.GetHashCode(); + if (similarityCalculator_ != null) hash ^= SimilarityCalculator.GetHashCode(); + if (EncodeBackgroundAsZeros != false) hash ^= EncodeBackgroundAsZeros.GetHashCode(); + if (NegativeClassWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(NegativeClassWeight); + if (boxPredictor_ != null) hash ^= BoxPredictor.GetHashCode(); + if (anchorGenerator_ != null) hash ^= AnchorGenerator.GetHashCode(); + if (postProcessing_ != null) hash ^= PostProcessing.GetHashCode(); + if (NormalizeLossByNumMatches != false) hash ^= NormalizeLossByNumMatches.GetHashCode(); + if (NormalizeLocLossByCodesize != false) hash ^= NormalizeLocLossByCodesize.GetHashCode(); + if (loss_ != null) hash ^= Loss.GetHashCode(); + if (FreezeBatchnorm != false) hash ^= FreezeBatchnorm.GetHashCode(); + if (InplaceBatchnormUpdate != false) hash ^= InplaceBatchnormUpdate.GetHashCode(); + if (AddBackgroundClass != false) hash ^= AddBackgroundClass.GetHashCode(); + if (ExplicitBackgroundClass != false) hash ^= ExplicitBackgroundClass.GetHashCode(); + if (UseConfidencesAsTargets != false) hash ^= UseConfidencesAsTargets.GetHashCode(); + if (ImplicitExampleWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ImplicitExampleWeight); + if (maskHeadConfig_ != null) hash ^= MaskHeadConfig.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NumClasses != 0) { + output.WriteRawTag(8); + output.WriteInt32(NumClasses); + } + if (imageResizer_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ImageResizer); + } + if (featureExtractor_ != null) { + output.WriteRawTag(26); + output.WriteMessage(FeatureExtractor); + } + if (boxCoder_ != null) { + output.WriteRawTag(34); + output.WriteMessage(BoxCoder); + } + if (matcher_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Matcher); + } + if (similarityCalculator_ != null) { + output.WriteRawTag(50); + output.WriteMessage(SimilarityCalculator); + } + if (boxPredictor_ != null) { + output.WriteRawTag(58); + output.WriteMessage(BoxPredictor); + } + if (anchorGenerator_ != null) { + output.WriteRawTag(66); + output.WriteMessage(AnchorGenerator); + } + if (postProcessing_ != null) { + output.WriteRawTag(74); + output.WriteMessage(PostProcessing); + } + if (NormalizeLossByNumMatches != false) { + output.WriteRawTag(80); + output.WriteBool(NormalizeLossByNumMatches); + } + if (loss_ != null) { + output.WriteRawTag(90); + output.WriteMessage(Loss); + } + if (EncodeBackgroundAsZeros != false) { + output.WriteRawTag(96); + output.WriteBool(EncodeBackgroundAsZeros); + } + if (NegativeClassWeight != 0F) { + output.WriteRawTag(109); + output.WriteFloat(NegativeClassWeight); + } + if (NormalizeLocLossByCodesize != false) { + output.WriteRawTag(112); + output.WriteBool(NormalizeLocLossByCodesize); + } + if (InplaceBatchnormUpdate != false) { + output.WriteRawTag(120); + output.WriteBool(InplaceBatchnormUpdate); + } + if (FreezeBatchnorm != false) { + output.WriteRawTag(128, 1); + output.WriteBool(FreezeBatchnorm); + } + if (AddBackgroundClass != false) { + output.WriteRawTag(168, 1); + output.WriteBool(AddBackgroundClass); + } + if (UseConfidencesAsTargets != false) { + output.WriteRawTag(176, 1); + output.WriteBool(UseConfidencesAsTargets); + } + if (ImplicitExampleWeight != 0F) { + output.WriteRawTag(189, 1); + output.WriteFloat(ImplicitExampleWeight); + } + if (ExplicitBackgroundClass != false) { + output.WriteRawTag(192, 1); + output.WriteBool(ExplicitBackgroundClass); + } + if (maskHeadConfig_ != null) { + output.WriteRawTag(202, 1); + output.WriteMessage(MaskHeadConfig); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NumClasses != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumClasses); + } + if (imageResizer_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ImageResizer); + } + if (featureExtractor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(FeatureExtractor); + } + if (boxCoder_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoxCoder); + } + if (matcher_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Matcher); + } + if (similarityCalculator_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SimilarityCalculator); + } + if (EncodeBackgroundAsZeros != false) { + size += 1 + 1; + } + if (NegativeClassWeight != 0F) { + size += 1 + 4; + } + if (boxPredictor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(BoxPredictor); + } + if (anchorGenerator_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AnchorGenerator); + } + if (postProcessing_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PostProcessing); + } + if (NormalizeLossByNumMatches != false) { + size += 1 + 1; + } + if (NormalizeLocLossByCodesize != false) { + size += 1 + 1; + } + if (loss_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Loss); + } + if (FreezeBatchnorm != false) { + size += 2 + 1; + } + if (InplaceBatchnormUpdate != false) { + size += 1 + 1; + } + if (AddBackgroundClass != false) { + size += 2 + 1; + } + if (ExplicitBackgroundClass != false) { + size += 2 + 1; + } + if (UseConfidencesAsTargets != false) { + size += 2 + 1; + } + if (ImplicitExampleWeight != 0F) { + size += 2 + 4; + } + if (maskHeadConfig_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(MaskHeadConfig); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(Ssd other) { + if (other == null) { + return; + } + if (other.NumClasses != 0) { + NumClasses = other.NumClasses; + } + if (other.imageResizer_ != null) { + if (imageResizer_ == null) { + imageResizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer(); + } + ImageResizer.MergeFrom(other.ImageResizer); + } + if (other.featureExtractor_ != null) { + if (featureExtractor_ == null) { + featureExtractor_ = new global::Tensorflow.Models.ObjectDetection.Protos.SsdFeatureExtractor(); + } + FeatureExtractor.MergeFrom(other.FeatureExtractor); + } + if (other.boxCoder_ != null) { + if (boxCoder_ == null) { + boxCoder_ = new global::Tensorflow.Models.ObjectDetection.Protos.BoxCoder(); + } + BoxCoder.MergeFrom(other.BoxCoder); + } + if (other.matcher_ != null) { + if (matcher_ == null) { + matcher_ = new global::Tensorflow.Models.ObjectDetection.Protos.Matcher(); + } + Matcher.MergeFrom(other.Matcher); + } + if (other.similarityCalculator_ != null) { + if (similarityCalculator_ == null) { + similarityCalculator_ = new global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculator(); + } + SimilarityCalculator.MergeFrom(other.SimilarityCalculator); + } + if (other.EncodeBackgroundAsZeros != false) { + EncodeBackgroundAsZeros = other.EncodeBackgroundAsZeros; + } + if (other.NegativeClassWeight != 0F) { + NegativeClassWeight = other.NegativeClassWeight; + } + if (other.boxPredictor_ != null) { + if (boxPredictor_ == null) { + boxPredictor_ = new global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor(); + } + BoxPredictor.MergeFrom(other.BoxPredictor); + } + if (other.anchorGenerator_ != null) { + if (anchorGenerator_ == null) { + anchorGenerator_ = new global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator(); + } + AnchorGenerator.MergeFrom(other.AnchorGenerator); + } + if (other.postProcessing_ != null) { + if (postProcessing_ == null) { + postProcessing_ = new global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing(); + } + PostProcessing.MergeFrom(other.PostProcessing); + } + if (other.NormalizeLossByNumMatches != false) { + NormalizeLossByNumMatches = other.NormalizeLossByNumMatches; + } + if (other.NormalizeLocLossByCodesize != false) { + NormalizeLocLossByCodesize = other.NormalizeLocLossByCodesize; + } + if (other.loss_ != null) { + if (loss_ == null) { + loss_ = new global::Tensorflow.Models.ObjectDetection.Protos.Loss(); + } + Loss.MergeFrom(other.Loss); + } + if (other.FreezeBatchnorm != false) { + FreezeBatchnorm = other.FreezeBatchnorm; + } + if (other.InplaceBatchnormUpdate != false) { + InplaceBatchnormUpdate = other.InplaceBatchnormUpdate; + } + if (other.AddBackgroundClass != false) { + AddBackgroundClass = other.AddBackgroundClass; + } + if (other.ExplicitBackgroundClass != false) { + ExplicitBackgroundClass = other.ExplicitBackgroundClass; + } + if (other.UseConfidencesAsTargets != false) { + UseConfidencesAsTargets = other.UseConfidencesAsTargets; + } + if (other.ImplicitExampleWeight != 0F) { + ImplicitExampleWeight = other.ImplicitExampleWeight; + } + if (other.maskHeadConfig_ != null) { + if (maskHeadConfig_ == null) { + maskHeadConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Types.MaskHead(); + } + MaskHeadConfig.MergeFrom(other.MaskHeadConfig); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NumClasses = input.ReadInt32(); + break; + } + case 18: { + if (imageResizer_ == null) { + imageResizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.ImageResizer(); + } + input.ReadMessage(imageResizer_); + break; + } + case 26: { + if (featureExtractor_ == null) { + featureExtractor_ = new global::Tensorflow.Models.ObjectDetection.Protos.SsdFeatureExtractor(); + } + input.ReadMessage(featureExtractor_); + break; + } + case 34: { + if (boxCoder_ == null) { + boxCoder_ = new global::Tensorflow.Models.ObjectDetection.Protos.BoxCoder(); + } + input.ReadMessage(boxCoder_); + break; + } + case 42: { + if (matcher_ == null) { + matcher_ = new global::Tensorflow.Models.ObjectDetection.Protos.Matcher(); + } + input.ReadMessage(matcher_); + break; + } + case 50: { + if (similarityCalculator_ == null) { + similarityCalculator_ = new global::Tensorflow.Models.ObjectDetection.Protos.RegionSimilarityCalculator(); + } + input.ReadMessage(similarityCalculator_); + break; + } + case 58: { + if (boxPredictor_ == null) { + boxPredictor_ = new global::Tensorflow.Models.ObjectDetection.Protos.BoxPredictor(); + } + input.ReadMessage(boxPredictor_); + break; + } + case 66: { + if (anchorGenerator_ == null) { + anchorGenerator_ = new global::Tensorflow.Models.ObjectDetection.Protos.AnchorGenerator(); + } + input.ReadMessage(anchorGenerator_); + break; + } + case 74: { + if (postProcessing_ == null) { + postProcessing_ = new global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing(); + } + input.ReadMessage(postProcessing_); + break; + } + case 80: { + NormalizeLossByNumMatches = input.ReadBool(); + break; + } + case 90: { + if (loss_ == null) { + loss_ = new global::Tensorflow.Models.ObjectDetection.Protos.Loss(); + } + input.ReadMessage(loss_); + break; + } + case 96: { + EncodeBackgroundAsZeros = input.ReadBool(); + break; + } + case 109: { + NegativeClassWeight = input.ReadFloat(); + break; + } + case 112: { + NormalizeLocLossByCodesize = input.ReadBool(); + break; + } + case 120: { + InplaceBatchnormUpdate = input.ReadBool(); + break; + } + case 128: { + FreezeBatchnorm = input.ReadBool(); + break; + } + case 168: { + AddBackgroundClass = input.ReadBool(); + break; + } + case 176: { + UseConfidencesAsTargets = input.ReadBool(); + break; + } + case 189: { + ImplicitExampleWeight = input.ReadFloat(); + break; + } + case 192: { + ExplicitBackgroundClass = input.ReadBool(); + break; + } + case 202: { + if (maskHeadConfig_ == null) { + maskHeadConfig_ = new global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Types.MaskHead(); + } + input.ReadMessage(maskHeadConfig_); + break; + } + } + } + } + + #region Nested types + /// Container for nested types declared in the Ssd message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static partial class Types { + /// + /// Configuration proto for MaskHead. + /// Next id: 11 + /// + public sealed partial class MaskHead : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MaskHead()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.Ssd.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MaskHead() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MaskHead(MaskHead other) : this() { + maskHeight_ = other.maskHeight_; + maskWidth_ = other.maskWidth_; + masksAreClassAgnostic_ = other.masksAreClassAgnostic_; + maskPredictionConvDepth_ = other.maskPredictionConvDepth_; + maskPredictionNumConvLayers_ = other.maskPredictionNumConvLayers_; + convolveThenUpsampleMasks_ = other.convolveThenUpsampleMasks_; + maskLossWeight_ = other.maskLossWeight_; + maskLossSampleSize_ = other.maskLossSampleSize_; + convHyperparams_ = other.convHyperparams_ != null ? other.convHyperparams_.Clone() : null; + initialCropSize_ = other.initialCropSize_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public MaskHead Clone() { + return new MaskHead(this); + } + + /// Field number for the "mask_height" field. + public const int MaskHeightFieldNumber = 1; + private int maskHeight_; + /// + /// The height and the width of the predicted mask. Only used when + /// predict_instance_masks is true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskHeight { + get { return maskHeight_; } + set { + maskHeight_ = value; + } + } + + /// Field number for the "mask_width" field. + public const int MaskWidthFieldNumber = 2; + private int maskWidth_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskWidth { + get { return maskWidth_; } + set { + maskWidth_ = value; + } + } + + /// Field number for the "masks_are_class_agnostic" field. + public const int MasksAreClassAgnosticFieldNumber = 3; + private bool masksAreClassAgnostic_; + /// + /// Whether to predict class agnostic masks. Only used when + /// predict_instance_masks is true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool MasksAreClassAgnostic { + get { return masksAreClassAgnostic_; } + set { + masksAreClassAgnostic_ = value; + } + } + + /// Field number for the "mask_prediction_conv_depth" field. + public const int MaskPredictionConvDepthFieldNumber = 4; + private int maskPredictionConvDepth_; + /// + /// The depth for the first conv2d_transpose op applied to the + /// image_features in the mask prediction branch. If set to 0, the value + /// will be set automatically based on the number of channels in the image + /// features and the number of classes. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskPredictionConvDepth { + get { return maskPredictionConvDepth_; } + set { + maskPredictionConvDepth_ = value; + } + } + + /// Field number for the "mask_prediction_num_conv_layers" field. + public const int MaskPredictionNumConvLayersFieldNumber = 5; + private int maskPredictionNumConvLayers_; + /// + /// The number of convolutions applied to image_features in the mask + /// prediction branch. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskPredictionNumConvLayers { + get { return maskPredictionNumConvLayers_; } + set { + maskPredictionNumConvLayers_ = value; + } + } + + /// Field number for the "convolve_then_upsample_masks" field. + public const int ConvolveThenUpsampleMasksFieldNumber = 6; + private bool convolveThenUpsampleMasks_; + /// + /// Whether to apply convolutions on mask features before upsampling using + /// nearest neighbor resizing. + /// By default, mask features are resized to [`mask_height`, `mask_width`] + /// before applying convolutions and predicting masks. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ConvolveThenUpsampleMasks { + get { return convolveThenUpsampleMasks_; } + set { + convolveThenUpsampleMasks_ = value; + } + } + + /// Field number for the "mask_loss_weight" field. + public const int MaskLossWeightFieldNumber = 7; + private float maskLossWeight_; + /// + /// Mask loss weight. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaskLossWeight { + get { return maskLossWeight_; } + set { + maskLossWeight_ = value; + } + } + + /// Field number for the "mask_loss_sample_size" field. + public const int MaskLossSampleSizeFieldNumber = 8; + private int maskLossSampleSize_; + /// + /// Number of boxes to be generated at training time for computing mask loss. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaskLossSampleSize { + get { return maskLossSampleSize_; } + set { + maskLossSampleSize_ = value; + } + } + + /// Field number for the "conv_hyperparams" field. + public const int ConvHyperparamsFieldNumber = 9; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams convHyperparams_; + /// + /// Hyperparameters for convolution ops used in the box predictor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams ConvHyperparams { + get { return convHyperparams_; } + set { + convHyperparams_ = value; + } + } + + /// Field number for the "initial_crop_size" field. + public const int InitialCropSizeFieldNumber = 10; + private int initialCropSize_; + /// + /// Output size (width and height are set to be the same) of the initial + /// bilinear interpolation based cropping during ROI pooling. Only used when + /// we have second stage prediction head enabled (e.g. mask head). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int InitialCropSize { + get { return initialCropSize_; } + set { + initialCropSize_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as MaskHead); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(MaskHead other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MaskHeight != other.MaskHeight) return false; + if (MaskWidth != other.MaskWidth) return false; + if (MasksAreClassAgnostic != other.MasksAreClassAgnostic) return false; + if (MaskPredictionConvDepth != other.MaskPredictionConvDepth) return false; + if (MaskPredictionNumConvLayers != other.MaskPredictionNumConvLayers) return false; + if (ConvolveThenUpsampleMasks != other.ConvolveThenUpsampleMasks) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaskLossWeight, other.MaskLossWeight)) return false; + if (MaskLossSampleSize != other.MaskLossSampleSize) return false; + if (!object.Equals(ConvHyperparams, other.ConvHyperparams)) return false; + if (InitialCropSize != other.InitialCropSize) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MaskHeight != 0) hash ^= MaskHeight.GetHashCode(); + if (MaskWidth != 0) hash ^= MaskWidth.GetHashCode(); + if (MasksAreClassAgnostic != false) hash ^= MasksAreClassAgnostic.GetHashCode(); + if (MaskPredictionConvDepth != 0) hash ^= MaskPredictionConvDepth.GetHashCode(); + if (MaskPredictionNumConvLayers != 0) hash ^= MaskPredictionNumConvLayers.GetHashCode(); + if (ConvolveThenUpsampleMasks != false) hash ^= ConvolveThenUpsampleMasks.GetHashCode(); + if (MaskLossWeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaskLossWeight); + if (MaskLossSampleSize != 0) hash ^= MaskLossSampleSize.GetHashCode(); + if (convHyperparams_ != null) hash ^= ConvHyperparams.GetHashCode(); + if (InitialCropSize != 0) hash ^= InitialCropSize.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MaskHeight != 0) { + output.WriteRawTag(8); + output.WriteInt32(MaskHeight); + } + if (MaskWidth != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaskWidth); + } + if (MasksAreClassAgnostic != false) { + output.WriteRawTag(24); + output.WriteBool(MasksAreClassAgnostic); + } + if (MaskPredictionConvDepth != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaskPredictionConvDepth); + } + if (MaskPredictionNumConvLayers != 0) { + output.WriteRawTag(40); + output.WriteInt32(MaskPredictionNumConvLayers); + } + if (ConvolveThenUpsampleMasks != false) { + output.WriteRawTag(48); + output.WriteBool(ConvolveThenUpsampleMasks); + } + if (MaskLossWeight != 0F) { + output.WriteRawTag(61); + output.WriteFloat(MaskLossWeight); + } + if (MaskLossSampleSize != 0) { + output.WriteRawTag(64); + output.WriteInt32(MaskLossSampleSize); + } + if (convHyperparams_ != null) { + output.WriteRawTag(74); + output.WriteMessage(ConvHyperparams); + } + if (InitialCropSize != 0) { + output.WriteRawTag(80); + output.WriteInt32(InitialCropSize); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MaskHeight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskHeight); + } + if (MaskWidth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskWidth); + } + if (MasksAreClassAgnostic != false) { + size += 1 + 1; + } + if (MaskPredictionConvDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskPredictionConvDepth); + } + if (MaskPredictionNumConvLayers != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskPredictionNumConvLayers); + } + if (ConvolveThenUpsampleMasks != false) { + size += 1 + 1; + } + if (MaskLossWeight != 0F) { + size += 1 + 4; + } + if (MaskLossSampleSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaskLossSampleSize); + } + if (convHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvHyperparams); + } + if (InitialCropSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(InitialCropSize); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(MaskHead other) { + if (other == null) { + return; + } + if (other.MaskHeight != 0) { + MaskHeight = other.MaskHeight; + } + if (other.MaskWidth != 0) { + MaskWidth = other.MaskWidth; + } + if (other.MasksAreClassAgnostic != false) { + MasksAreClassAgnostic = other.MasksAreClassAgnostic; + } + if (other.MaskPredictionConvDepth != 0) { + MaskPredictionConvDepth = other.MaskPredictionConvDepth; + } + if (other.MaskPredictionNumConvLayers != 0) { + MaskPredictionNumConvLayers = other.MaskPredictionNumConvLayers; + } + if (other.ConvolveThenUpsampleMasks != false) { + ConvolveThenUpsampleMasks = other.ConvolveThenUpsampleMasks; + } + if (other.MaskLossWeight != 0F) { + MaskLossWeight = other.MaskLossWeight; + } + if (other.MaskLossSampleSize != 0) { + MaskLossSampleSize = other.MaskLossSampleSize; + } + if (other.convHyperparams_ != null) { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + ConvHyperparams.MergeFrom(other.ConvHyperparams); + } + if (other.InitialCropSize != 0) { + InitialCropSize = other.InitialCropSize; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MaskHeight = input.ReadInt32(); + break; + } + case 16: { + MaskWidth = input.ReadInt32(); + break; + } + case 24: { + MasksAreClassAgnostic = input.ReadBool(); + break; + } + case 32: { + MaskPredictionConvDepth = input.ReadInt32(); + break; + } + case 40: { + MaskPredictionNumConvLayers = input.ReadInt32(); + break; + } + case 48: { + ConvolveThenUpsampleMasks = input.ReadBool(); + break; + } + case 61: { + MaskLossWeight = input.ReadFloat(); + break; + } + case 64: { + MaskLossSampleSize = input.ReadInt32(); + break; + } + case 74: { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(convHyperparams_); + break; + } + case 80: { + InitialCropSize = input.ReadInt32(); + break; + } + } + } + } + + } + + } + #endregion + + } + + public sealed partial class SsdFeatureExtractor : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsdFeatureExtractor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.SsdReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SsdFeatureExtractor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SsdFeatureExtractor(SsdFeatureExtractor other) : this() { + type_ = other.type_; + depthMultiplier_ = other.depthMultiplier_; + minDepth_ = other.minDepth_; + convHyperparams_ = other.convHyperparams_ != null ? other.convHyperparams_.Clone() : null; + overrideBaseFeatureExtractorHyperparams_ = other.overrideBaseFeatureExtractorHyperparams_; + padToMultiple_ = other.padToMultiple_; + useExplicitPadding_ = other.useExplicitPadding_; + useDepthwise_ = other.useDepthwise_; + fpn_ = other.fpn_ != null ? other.fpn_.Clone() : null; + replacePreprocessorWithPlaceholder_ = other.replacePreprocessorWithPlaceholder_; + numLayers_ = other.numLayers_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SsdFeatureExtractor Clone() { + return new SsdFeatureExtractor(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private string type_ = ""; + /// + /// Type of ssd feature extractor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "depth_multiplier" field. + public const int DepthMultiplierFieldNumber = 2; + private float depthMultiplier_; + /// + /// The factor to alter the depth of the channels in the feature extractor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float DepthMultiplier { + get { return depthMultiplier_; } + set { + depthMultiplier_ = value; + } + } + + /// Field number for the "min_depth" field. + public const int MinDepthFieldNumber = 3; + private int minDepth_; + /// + /// Minimum number of the channels in the feature extractor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinDepth { + get { return minDepth_; } + set { + minDepth_ = value; + } + } + + /// Field number for the "conv_hyperparams" field. + public const int ConvHyperparamsFieldNumber = 4; + private global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams convHyperparams_; + /// + /// Hyperparameters that affect the layers of feature extractor added on top + /// of the base feature extractor. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams ConvHyperparams { + get { return convHyperparams_; } + set { + convHyperparams_ = value; + } + } + + /// Field number for the "override_base_feature_extractor_hyperparams" field. + public const int OverrideBaseFeatureExtractorHyperparamsFieldNumber = 9; + private bool overrideBaseFeatureExtractorHyperparams_; + /// + /// Normally, SSD feature extractors are constructed by reusing an existing + /// base feature extractor (that has its own hyperparams) and adding new layers + /// on top of it. `conv_hyperparams` above normally applies only to the new + /// layers while base feature extractor uses its own default hyperparams. If + /// this value is set to true, the base feature extractor's hyperparams will be + /// overridden with the `conv_hyperparams`. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool OverrideBaseFeatureExtractorHyperparams { + get { return overrideBaseFeatureExtractorHyperparams_; } + set { + overrideBaseFeatureExtractorHyperparams_ = value; + } + } + + /// Field number for the "pad_to_multiple" field. + public const int PadToMultipleFieldNumber = 5; + private int padToMultiple_; + /// + /// 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. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PadToMultiple { + get { return padToMultiple_; } + set { + padToMultiple_ = value; + } + } + + /// Field number for the "use_explicit_padding" field. + public const int UseExplicitPaddingFieldNumber = 7; + private bool useExplicitPadding_; + /// + /// Whether to use explicit padding when extracting SSD multiresolution + /// features. This will also apply to the base feature extractor if a MobileNet + /// architecture is used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseExplicitPadding { + get { return useExplicitPadding_; } + set { + useExplicitPadding_ = value; + } + } + + /// Field number for the "use_depthwise" field. + public const int UseDepthwiseFieldNumber = 8; + private bool useDepthwise_; + /// + /// Whether to use depthwise separable convolutions for to extract additional + /// feature maps added by SSD. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseDepthwise { + get { return useDepthwise_; } + set { + useDepthwise_ = value; + } + } + + /// Field number for the "fpn" field. + public const int FpnFieldNumber = 10; + private global::Tensorflow.Models.ObjectDetection.Protos.FeaturePyramidNetworks fpn_; + /// + /// Feature Pyramid Networks config. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.FeaturePyramidNetworks Fpn { + get { return fpn_; } + set { + fpn_ = value; + } + } + + /// Field number for the "replace_preprocessor_with_placeholder" field. + public const int ReplacePreprocessorWithPlaceholderFieldNumber = 11; + private bool replacePreprocessorWithPlaceholder_; + /// + /// If true, replace preprocess function of feature extractor with a + /// placeholder. This should only be used if all the image preprocessing steps + /// happen outside the graph. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ReplacePreprocessorWithPlaceholder { + get { return replacePreprocessorWithPlaceholder_; } + set { + replacePreprocessorWithPlaceholder_ = value; + } + } + + /// Field number for the "num_layers" field. + public const int NumLayersFieldNumber = 12; + private int numLayers_; + /// + /// The number of SSD layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumLayers { + get { return numLayers_; } + set { + numLayers_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SsdFeatureExtractor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SsdFeatureExtractor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(DepthMultiplier, other.DepthMultiplier)) return false; + if (MinDepth != other.MinDepth) return false; + if (!object.Equals(ConvHyperparams, other.ConvHyperparams)) return false; + if (OverrideBaseFeatureExtractorHyperparams != other.OverrideBaseFeatureExtractorHyperparams) return false; + if (PadToMultiple != other.PadToMultiple) return false; + if (UseExplicitPadding != other.UseExplicitPadding) return false; + if (UseDepthwise != other.UseDepthwise) return false; + if (!object.Equals(Fpn, other.Fpn)) return false; + if (ReplacePreprocessorWithPlaceholder != other.ReplacePreprocessorWithPlaceholder) return false; + if (NumLayers != other.NumLayers) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (DepthMultiplier != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(DepthMultiplier); + if (MinDepth != 0) hash ^= MinDepth.GetHashCode(); + if (convHyperparams_ != null) hash ^= ConvHyperparams.GetHashCode(); + if (OverrideBaseFeatureExtractorHyperparams != false) hash ^= OverrideBaseFeatureExtractorHyperparams.GetHashCode(); + if (PadToMultiple != 0) hash ^= PadToMultiple.GetHashCode(); + if (UseExplicitPadding != false) hash ^= UseExplicitPadding.GetHashCode(); + if (UseDepthwise != false) hash ^= UseDepthwise.GetHashCode(); + if (fpn_ != null) hash ^= Fpn.GetHashCode(); + if (ReplacePreprocessorWithPlaceholder != false) hash ^= ReplacePreprocessorWithPlaceholder.GetHashCode(); + if (NumLayers != 0) hash ^= NumLayers.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (DepthMultiplier != 0F) { + output.WriteRawTag(21); + output.WriteFloat(DepthMultiplier); + } + if (MinDepth != 0) { + output.WriteRawTag(24); + output.WriteInt32(MinDepth); + } + if (convHyperparams_ != null) { + output.WriteRawTag(34); + output.WriteMessage(ConvHyperparams); + } + if (PadToMultiple != 0) { + output.WriteRawTag(40); + output.WriteInt32(PadToMultiple); + } + if (UseExplicitPadding != false) { + output.WriteRawTag(56); + output.WriteBool(UseExplicitPadding); + } + if (UseDepthwise != false) { + output.WriteRawTag(64); + output.WriteBool(UseDepthwise); + } + if (OverrideBaseFeatureExtractorHyperparams != false) { + output.WriteRawTag(72); + output.WriteBool(OverrideBaseFeatureExtractorHyperparams); + } + if (fpn_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Fpn); + } + if (ReplacePreprocessorWithPlaceholder != false) { + output.WriteRawTag(88); + output.WriteBool(ReplacePreprocessorWithPlaceholder); + } + if (NumLayers != 0) { + output.WriteRawTag(96); + output.WriteInt32(NumLayers); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (DepthMultiplier != 0F) { + size += 1 + 4; + } + if (MinDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinDepth); + } + if (convHyperparams_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ConvHyperparams); + } + if (OverrideBaseFeatureExtractorHyperparams != false) { + size += 1 + 1; + } + if (PadToMultiple != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PadToMultiple); + } + if (UseExplicitPadding != false) { + size += 1 + 1; + } + if (UseDepthwise != false) { + size += 1 + 1; + } + if (fpn_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Fpn); + } + if (ReplacePreprocessorWithPlaceholder != false) { + size += 1 + 1; + } + if (NumLayers != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumLayers); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SsdFeatureExtractor other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.DepthMultiplier != 0F) { + DepthMultiplier = other.DepthMultiplier; + } + if (other.MinDepth != 0) { + MinDepth = other.MinDepth; + } + if (other.convHyperparams_ != null) { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + ConvHyperparams.MergeFrom(other.ConvHyperparams); + } + if (other.OverrideBaseFeatureExtractorHyperparams != false) { + OverrideBaseFeatureExtractorHyperparams = other.OverrideBaseFeatureExtractorHyperparams; + } + if (other.PadToMultiple != 0) { + PadToMultiple = other.PadToMultiple; + } + if (other.UseExplicitPadding != false) { + UseExplicitPadding = other.UseExplicitPadding; + } + if (other.UseDepthwise != false) { + UseDepthwise = other.UseDepthwise; + } + if (other.fpn_ != null) { + if (fpn_ == null) { + fpn_ = new global::Tensorflow.Models.ObjectDetection.Protos.FeaturePyramidNetworks(); + } + Fpn.MergeFrom(other.Fpn); + } + if (other.ReplacePreprocessorWithPlaceholder != false) { + ReplacePreprocessorWithPlaceholder = other.ReplacePreprocessorWithPlaceholder; + } + if (other.NumLayers != 0) { + NumLayers = other.NumLayers; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 21: { + DepthMultiplier = input.ReadFloat(); + break; + } + case 24: { + MinDepth = input.ReadInt32(); + break; + } + case 34: { + if (convHyperparams_ == null) { + convHyperparams_ = new global::Tensorflow.Models.ObjectDetection.Protos.Hyperparams(); + } + input.ReadMessage(convHyperparams_); + break; + } + case 40: { + PadToMultiple = input.ReadInt32(); + break; + } + case 56: { + UseExplicitPadding = input.ReadBool(); + break; + } + case 64: { + UseDepthwise = input.ReadBool(); + break; + } + case 72: { + OverrideBaseFeatureExtractorHyperparams = input.ReadBool(); + break; + } + case 82: { + if (fpn_ == null) { + fpn_ = new global::Tensorflow.Models.ObjectDetection.Protos.FeaturePyramidNetworks(); + } + input.ReadMessage(fpn_); + break; + } + case 88: { + ReplacePreprocessorWithPlaceholder = input.ReadBool(); + break; + } + case 96: { + NumLayers = input.ReadInt32(); + break; + } + } + } + } + + } + + /// + /// Configuration for Feature Pyramid Networks. + /// + public sealed partial class FeaturePyramidNetworks : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FeaturePyramidNetworks()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.SsdReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FeaturePyramidNetworks() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FeaturePyramidNetworks(FeaturePyramidNetworks other) : this() { + minLevel_ = other.minLevel_; + maxLevel_ = other.maxLevel_; + additionalLayerDepth_ = other.additionalLayerDepth_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public FeaturePyramidNetworks Clone() { + return new FeaturePyramidNetworks(this); + } + + /// Field number for the "min_level" field. + public const int MinLevelFieldNumber = 1; + private int minLevel_; + /// + /// minimum level in feature pyramid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MinLevel { + get { return minLevel_; } + set { + minLevel_ = value; + } + } + + /// Field number for the "max_level" field. + public const int MaxLevelFieldNumber = 2; + private int maxLevel_; + /// + /// maximum level in feature pyramid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxLevel { + get { return maxLevel_; } + set { + maxLevel_ = value; + } + } + + /// Field number for the "additional_layer_depth" field. + public const int AdditionalLayerDepthFieldNumber = 3; + private int additionalLayerDepth_; + /// + /// channel depth for additional coarse feature layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int AdditionalLayerDepth { + get { return additionalLayerDepth_; } + set { + additionalLayerDepth_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as FeaturePyramidNetworks); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(FeaturePyramidNetworks other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MinLevel != other.MinLevel) return false; + if (MaxLevel != other.MaxLevel) return false; + if (AdditionalLayerDepth != other.AdditionalLayerDepth) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (MinLevel != 0) hash ^= MinLevel.GetHashCode(); + if (MaxLevel != 0) hash ^= MaxLevel.GetHashCode(); + if (AdditionalLayerDepth != 0) hash ^= AdditionalLayerDepth.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (MinLevel != 0) { + output.WriteRawTag(8); + output.WriteInt32(MinLevel); + } + if (MaxLevel != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxLevel); + } + if (AdditionalLayerDepth != 0) { + output.WriteRawTag(24); + output.WriteInt32(AdditionalLayerDepth); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (MinLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinLevel); + } + if (MaxLevel != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxLevel); + } + if (AdditionalLayerDepth != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AdditionalLayerDepth); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(FeaturePyramidNetworks other) { + if (other == null) { + return; + } + if (other.MinLevel != 0) { + MinLevel = other.MinLevel; + } + if (other.MaxLevel != 0) { + MaxLevel = other.MaxLevel; + } + if (other.AdditionalLayerDepth != 0) { + AdditionalLayerDepth = other.AdditionalLayerDepth; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MinLevel = input.ReadInt32(); + break; + } + case 16: { + MaxLevel = input.ReadInt32(); + break; + } + case 24: { + AdditionalLayerDepth = input.ReadInt32(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/SsdAnchorGenerator.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/SsdAnchorGenerator.cs new file mode 100644 index 00000000..e2a4a457 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/SsdAnchorGenerator.cs @@ -0,0 +1,526 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/ssd_anchor_generator.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/ssd_anchor_generator.proto + public static partial class SsdAnchorGeneratorReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/ssd_anchor_generator.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static SsdAnchorGeneratorReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjJvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9zc2RfYW5jaG9yX2dlbmVyYXRv", + "ci5wcm90bxIXb2JqZWN0X2RldGVjdGlvbi5wcm90b3Mi1QIKElNzZEFuY2hv", + "ckdlbmVyYXRvchISCgpudW1fbGF5ZXJzGAEgASgFEhEKCW1pbl9zY2FsZRgC", + "IAEoAhIRCgltYXhfc2NhbGUYAyABKAISDgoGc2NhbGVzGAwgAygCEhUKDWFz", + "cGVjdF9yYXRpb3MYBCADKAISJwofaW50ZXJwb2xhdGVkX3NjYWxlX2FzcGVj", + "dF9yYXRpbxgNIAEoAhIkChxyZWR1Y2VfYm94ZXNfaW5fbG93ZXN0X2xheWVy", + "GAUgASgIEhoKEmJhc2VfYW5jaG9yX2hlaWdodBgGIAEoAhIZChFiYXNlX2Fu", + "Y2hvcl93aWR0aBgHIAEoAhIVCg1oZWlnaHRfc3RyaWRlGAggAygFEhQKDHdp", + "ZHRoX3N0cmlkZRgJIAMoBRIVCg1oZWlnaHRfb2Zmc2V0GAogAygFEhQKDHdp", + "ZHRoX29mZnNldBgLIAMoBWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator), global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGenerator.Parser, new[]{ "NumLayers", "MinScale", "MaxScale", "Scales", "AspectRatios", "InterpolatedScaleAspectRatio", "ReduceBoxesInLowestLayer", "BaseAnchorHeight", "BaseAnchorWidth", "HeightStride", "WidthStride", "HeightOffset", "WidthOffset" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Configuration proto for SSD anchor generator described in + /// https://arxiv.org/abs/1512.02325. See + /// anchor_generators/multiple_grid_anchor_generator.py for details. + /// + public sealed partial class SsdAnchorGenerator : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsdAnchorGenerator()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.SsdAnchorGeneratorReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SsdAnchorGenerator() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SsdAnchorGenerator(SsdAnchorGenerator other) : this() { + numLayers_ = other.numLayers_; + minScale_ = other.minScale_; + maxScale_ = other.maxScale_; + scales_ = other.scales_.Clone(); + aspectRatios_ = other.aspectRatios_.Clone(); + interpolatedScaleAspectRatio_ = other.interpolatedScaleAspectRatio_; + reduceBoxesInLowestLayer_ = other.reduceBoxesInLowestLayer_; + baseAnchorHeight_ = other.baseAnchorHeight_; + baseAnchorWidth_ = other.baseAnchorWidth_; + heightStride_ = other.heightStride_.Clone(); + widthStride_ = other.widthStride_.Clone(); + heightOffset_ = other.heightOffset_.Clone(); + widthOffset_ = other.widthOffset_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public SsdAnchorGenerator Clone() { + return new SsdAnchorGenerator(this); + } + + /// Field number for the "num_layers" field. + public const int NumLayersFieldNumber = 1; + private int numLayers_; + /// + /// Number of grid layers to create anchors for. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumLayers { + get { return numLayers_; } + set { + numLayers_ = value; + } + } + + /// Field number for the "min_scale" field. + public const int MinScaleFieldNumber = 2; + private float minScale_; + /// + /// Scale of anchors corresponding to finest resolution. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MinScale { + get { return minScale_; } + set { + minScale_ = value; + } + } + + /// Field number for the "max_scale" field. + public const int MaxScaleFieldNumber = 3; + private float maxScale_; + /// + /// Scale of anchors corresponding to coarsest resolution + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float MaxScale { + get { return maxScale_; } + set { + maxScale_ = value; + } + } + + /// Field number for the "scales" field. + public const int ScalesFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_scales_codec + = pb::FieldCodec.ForFloat(98); + private readonly pbc::RepeatedField scales_ = new pbc::RepeatedField(); + /// + /// Can be used to override min_scale->max_scale, with an explicitly defined + /// set of scales. If empty, then min_scale->max_scale is used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Scales { + get { return scales_; } + } + + /// Field number for the "aspect_ratios" field. + public const int AspectRatiosFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_aspectRatios_codec + = pb::FieldCodec.ForFloat(34); + private readonly pbc::RepeatedField aspectRatios_ = new pbc::RepeatedField(); + /// + /// Aspect ratios for anchors at each grid point. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField AspectRatios { + get { return aspectRatios_; } + } + + /// Field number for the "interpolated_scale_aspect_ratio" field. + public const int InterpolatedScaleAspectRatioFieldNumber = 13; + private float interpolatedScaleAspectRatio_; + /// + /// When this aspect ratio is greater than 0, then an additional + /// anchor, with an interpolated scale is added with this aspect ratio. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float InterpolatedScaleAspectRatio { + get { return interpolatedScaleAspectRatio_; } + set { + interpolatedScaleAspectRatio_ = value; + } + } + + /// Field number for the "reduce_boxes_in_lowest_layer" field. + public const int ReduceBoxesInLowestLayerFieldNumber = 5; + private bool reduceBoxesInLowestLayer_; + /// + /// Whether to use the following aspect ratio and scale combination for the + /// layer with the finest resolution : (scale=0.1, aspect_ratio=1.0), + /// (scale=min_scale, aspect_ration=2.0), (scale=min_scale, aspect_ratio=0.5). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool ReduceBoxesInLowestLayer { + get { return reduceBoxesInLowestLayer_; } + set { + reduceBoxesInLowestLayer_ = value; + } + } + + /// Field number for the "base_anchor_height" field. + public const int BaseAnchorHeightFieldNumber = 6; + private float baseAnchorHeight_; + /// + /// The base anchor size in height dimension. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float BaseAnchorHeight { + get { return baseAnchorHeight_; } + set { + baseAnchorHeight_ = value; + } + } + + /// Field number for the "base_anchor_width" field. + public const int BaseAnchorWidthFieldNumber = 7; + private float baseAnchorWidth_; + /// + /// The base anchor size in width dimension. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float BaseAnchorWidth { + get { return baseAnchorWidth_; } + set { + baseAnchorWidth_ = value; + } + } + + /// Field number for the "height_stride" field. + public const int HeightStrideFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_heightStride_codec + = pb::FieldCodec.ForInt32(66); + private readonly pbc::RepeatedField heightStride_ = new pbc::RepeatedField(); + /// + /// Anchor stride in height dimension in pixels for each layer. The length of + /// this field is expected to be equal to the value of num_layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField HeightStride { + get { return heightStride_; } + } + + /// Field number for the "width_stride" field. + public const int WidthStrideFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_widthStride_codec + = pb::FieldCodec.ForInt32(74); + private readonly pbc::RepeatedField widthStride_ = new pbc::RepeatedField(); + /// + /// Anchor stride in width dimension in pixels for each layer. The length of + /// this field is expected to be equal to the value of num_layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField WidthStride { + get { return widthStride_; } + } + + /// Field number for the "height_offset" field. + public const int HeightOffsetFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_heightOffset_codec + = pb::FieldCodec.ForInt32(82); + private readonly pbc::RepeatedField heightOffset_ = new pbc::RepeatedField(); + /// + /// Anchor height offset in pixels for each layer. The length of this field is + /// expected to be equal to the value of num_layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField HeightOffset { + get { return heightOffset_; } + } + + /// Field number for the "width_offset" field. + public const int WidthOffsetFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_widthOffset_codec + = pb::FieldCodec.ForInt32(90); + private readonly pbc::RepeatedField widthOffset_ = new pbc::RepeatedField(); + /// + /// Anchor width offset in pixels for each layer. The length of this field is + /// expected to be equal to the value of num_layers. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField WidthOffset { + get { return widthOffset_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as SsdAnchorGenerator); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(SsdAnchorGenerator other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NumLayers != other.NumLayers) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MinScale, other.MinScale)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxScale, other.MaxScale)) return false; + if(!scales_.Equals(other.scales_)) return false; + if(!aspectRatios_.Equals(other.aspectRatios_)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(InterpolatedScaleAspectRatio, other.InterpolatedScaleAspectRatio)) return false; + if (ReduceBoxesInLowestLayer != other.ReduceBoxesInLowestLayer) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BaseAnchorHeight, other.BaseAnchorHeight)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BaseAnchorWidth, other.BaseAnchorWidth)) return false; + if(!heightStride_.Equals(other.heightStride_)) return false; + if(!widthStride_.Equals(other.widthStride_)) return false; + if(!heightOffset_.Equals(other.heightOffset_)) return false; + if(!widthOffset_.Equals(other.widthOffset_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (NumLayers != 0) hash ^= NumLayers.GetHashCode(); + if (MinScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MinScale); + if (MaxScale != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxScale); + hash ^= scales_.GetHashCode(); + hash ^= aspectRatios_.GetHashCode(); + if (InterpolatedScaleAspectRatio != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(InterpolatedScaleAspectRatio); + if (ReduceBoxesInLowestLayer != false) hash ^= ReduceBoxesInLowestLayer.GetHashCode(); + if (BaseAnchorHeight != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BaseAnchorHeight); + if (BaseAnchorWidth != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BaseAnchorWidth); + hash ^= heightStride_.GetHashCode(); + hash ^= widthStride_.GetHashCode(); + hash ^= heightOffset_.GetHashCode(); + hash ^= widthOffset_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (NumLayers != 0) { + output.WriteRawTag(8); + output.WriteInt32(NumLayers); + } + if (MinScale != 0F) { + output.WriteRawTag(21); + output.WriteFloat(MinScale); + } + if (MaxScale != 0F) { + output.WriteRawTag(29); + output.WriteFloat(MaxScale); + } + aspectRatios_.WriteTo(output, _repeated_aspectRatios_codec); + if (ReduceBoxesInLowestLayer != false) { + output.WriteRawTag(40); + output.WriteBool(ReduceBoxesInLowestLayer); + } + if (BaseAnchorHeight != 0F) { + output.WriteRawTag(53); + output.WriteFloat(BaseAnchorHeight); + } + if (BaseAnchorWidth != 0F) { + output.WriteRawTag(61); + output.WriteFloat(BaseAnchorWidth); + } + heightStride_.WriteTo(output, _repeated_heightStride_codec); + widthStride_.WriteTo(output, _repeated_widthStride_codec); + heightOffset_.WriteTo(output, _repeated_heightOffset_codec); + widthOffset_.WriteTo(output, _repeated_widthOffset_codec); + scales_.WriteTo(output, _repeated_scales_codec); + if (InterpolatedScaleAspectRatio != 0F) { + output.WriteRawTag(109); + output.WriteFloat(InterpolatedScaleAspectRatio); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (NumLayers != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumLayers); + } + if (MinScale != 0F) { + size += 1 + 4; + } + if (MaxScale != 0F) { + size += 1 + 4; + } + size += scales_.CalculateSize(_repeated_scales_codec); + size += aspectRatios_.CalculateSize(_repeated_aspectRatios_codec); + if (InterpolatedScaleAspectRatio != 0F) { + size += 1 + 4; + } + if (ReduceBoxesInLowestLayer != false) { + size += 1 + 1; + } + if (BaseAnchorHeight != 0F) { + size += 1 + 4; + } + if (BaseAnchorWidth != 0F) { + size += 1 + 4; + } + size += heightStride_.CalculateSize(_repeated_heightStride_codec); + size += widthStride_.CalculateSize(_repeated_widthStride_codec); + size += heightOffset_.CalculateSize(_repeated_heightOffset_codec); + size += widthOffset_.CalculateSize(_repeated_widthOffset_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(SsdAnchorGenerator other) { + if (other == null) { + return; + } + if (other.NumLayers != 0) { + NumLayers = other.NumLayers; + } + if (other.MinScale != 0F) { + MinScale = other.MinScale; + } + if (other.MaxScale != 0F) { + MaxScale = other.MaxScale; + } + scales_.Add(other.scales_); + aspectRatios_.Add(other.aspectRatios_); + if (other.InterpolatedScaleAspectRatio != 0F) { + InterpolatedScaleAspectRatio = other.InterpolatedScaleAspectRatio; + } + if (other.ReduceBoxesInLowestLayer != false) { + ReduceBoxesInLowestLayer = other.ReduceBoxesInLowestLayer; + } + if (other.BaseAnchorHeight != 0F) { + BaseAnchorHeight = other.BaseAnchorHeight; + } + if (other.BaseAnchorWidth != 0F) { + BaseAnchorWidth = other.BaseAnchorWidth; + } + heightStride_.Add(other.heightStride_); + widthStride_.Add(other.widthStride_); + heightOffset_.Add(other.heightOffset_); + widthOffset_.Add(other.widthOffset_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NumLayers = input.ReadInt32(); + break; + } + case 21: { + MinScale = input.ReadFloat(); + break; + } + case 29: { + MaxScale = input.ReadFloat(); + break; + } + case 34: + case 37: { + aspectRatios_.AddEntriesFrom(input, _repeated_aspectRatios_codec); + break; + } + case 40: { + ReduceBoxesInLowestLayer = input.ReadBool(); + break; + } + case 53: { + BaseAnchorHeight = input.ReadFloat(); + break; + } + case 61: { + BaseAnchorWidth = input.ReadFloat(); + break; + } + case 66: + case 64: { + heightStride_.AddEntriesFrom(input, _repeated_heightStride_codec); + break; + } + case 74: + case 72: { + widthStride_.AddEntriesFrom(input, _repeated_widthStride_codec); + break; + } + case 82: + case 80: { + heightOffset_.AddEntriesFrom(input, _repeated_heightOffset_codec); + break; + } + case 90: + case 88: { + widthOffset_.AddEntriesFrom(input, _repeated_widthOffset_codec); + break; + } + case 98: + case 101: { + scales_.AddEntriesFrom(input, _repeated_scales_codec); + break; + } + case 109: { + InterpolatedScaleAspectRatio = input.ReadFloat(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/StringIntLabelMap.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/StringIntLabelMap.cs new file mode 100644 index 00000000..dcb2ae8b --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/StringIntLabelMap.cs @@ -0,0 +1,365 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/string_int_label_map.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/string_int_label_map.proto + public static partial class StringIntLabelMapReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/string_int_label_map.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static StringIntLabelMapReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CjJvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9zdHJpbmdfaW50X2xhYmVsX21h", + "cC5wcm90bxIXb2JqZWN0X2RldGVjdGlvbi5wcm90b3MiRwoVU3RyaW5nSW50", + "TGFiZWxNYXBJdGVtEgwKBG5hbWUYASABKAkSCgoCaWQYAiABKAUSFAoMZGlz", + "cGxheV9uYW1lGAMgASgJIlEKEVN0cmluZ0ludExhYmVsTWFwEjwKBGl0ZW0Y", + "ASADKAsyLi5vYmplY3RfZGV0ZWN0aW9uLnByb3Rvcy5TdHJpbmdJbnRMYWJl", + "bE1hcEl0ZW1iBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem), global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem.Parser, new[]{ "Name", "Id", "DisplayName" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMap), global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMap.Parser, new[]{ "Item" }, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class StringIntLabelMapItem : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StringIntLabelMapItem()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StringIntLabelMapItem() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StringIntLabelMapItem(StringIntLabelMapItem other) : this() { + name_ = other.name_; + id_ = other.id_; + displayName_ = other.displayName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StringIntLabelMapItem Clone() { + return new StringIntLabelMapItem(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// String name. The most common practice is to set this to a MID or synsets + /// id. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 2; + private int id_; + /// + /// Integer id that maps to the string name above. Label ids should start from + /// 1. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "display_name" field. + public const int DisplayNameFieldNumber = 3; + private string displayName_ = ""; + /// + /// Human readable string label. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string DisplayName { + get { return displayName_; } + set { + displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StringIntLabelMapItem); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StringIntLabelMapItem other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Id != other.Id) return false; + if (DisplayName != other.DisplayName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Id != 0) hash ^= Id.GetHashCode(); + if (DisplayName.Length != 0) hash ^= DisplayName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Id != 0) { + output.WriteRawTag(16); + output.WriteInt32(Id); + } + if (DisplayName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DisplayName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (DisplayName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StringIntLabelMapItem other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.DisplayName.Length != 0) { + DisplayName = other.DisplayName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Id = input.ReadInt32(); + break; + } + case 26: { + DisplayName = input.ReadString(); + break; + } + } + } + } + + } + + public sealed partial class StringIntLabelMap : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StringIntLabelMap()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StringIntLabelMap() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StringIntLabelMap(StringIntLabelMap other) : this() { + item_ = other.item_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public StringIntLabelMap Clone() { + return new StringIntLabelMap(this); + } + + /// Field number for the "item" field. + public const int ItemFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_item_codec + = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem.Parser); + private readonly pbc::RepeatedField item_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField Item { + get { return item_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as StringIntLabelMap); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(StringIntLabelMap other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!item_.Equals(other.item_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + hash ^= item_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + item_.WriteTo(output, _repeated_item_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + size += item_.CalculateSize(_repeated_item_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(StringIntLabelMap other) { + if (other == null) { + return; + } + item_.Add(other.item_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + item_.AddEntriesFrom(input, _repeated_item_codec); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/ObjectDetection/Protos/Train.cs b/src/TensorFlowNET.Models/ObjectDetection/Protos/Train.cs new file mode 100644 index 00000000..44318fb5 --- /dev/null +++ b/src/TensorFlowNET.Models/ObjectDetection/Protos/Train.cs @@ -0,0 +1,1020 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: object_detection/protos/train.proto +// +#pragma warning disable 1591, 0612, 3021 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tensorflow.Models.ObjectDetection.Protos { + + /// Holder for reflection information generated from object_detection/protos/train.proto + public static partial class TrainReflection { + + #region Descriptor + /// File descriptor for object_detection/protos/train.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static TrainReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy90cmFpbi5wcm90bxIXb2JqZWN0", + "X2RldGVjdGlvbi5wcm90b3MaJ29iamVjdF9kZXRlY3Rpb24vcHJvdG9zL29w", + "dGltaXplci5wcm90bxoqb2JqZWN0X2RldGVjdGlvbi9wcm90b3MvcHJlcHJv", + "Y2Vzc29yLnByb3RvIpoHCgtUcmFpbkNvbmZpZxISCgpiYXRjaF9zaXplGAEg", + "ASgNEk0KGWRhdGFfYXVnbWVudGF0aW9uX29wdGlvbnMYAiADKAsyKi5vYmpl", + "Y3RfZGV0ZWN0aW9uLnByb3Rvcy5QcmVwcm9jZXNzaW5nU3RlcBIVCg1zeW5j", + "X3JlcGxpY2FzGAMgASgIEiUKHWtlZXBfY2hlY2twb2ludF9ldmVyeV9uX2hv", + "dXJzGAQgASgCEjUKCW9wdGltaXplchgFIAEoCzIiLm9iamVjdF9kZXRlY3Rp", + "b24ucHJvdG9zLk9wdGltaXplchIhChlncmFkaWVudF9jbGlwcGluZ19ieV9u", + "b3JtGAYgASgCEhwKFGZpbmVfdHVuZV9jaGVja3BvaW50GAcgASgJEiEKGWZp", + "bmVfdHVuZV9jaGVja3BvaW50X3R5cGUYFiABKAkSIQoZZnJvbV9kZXRlY3Rp", + "b25fY2hlY2twb2ludBgIIAEoCBIqCiJsb2FkX2FsbF9kZXRlY3Rpb25fY2hl", + "Y2twb2ludF92YXJzGBMgASgIEhEKCW51bV9zdGVwcxgJIAEoDRIbChNzdGFy", + "dHVwX2RlbGF5X3N0ZXBzGAogASgCEhwKFGJpYXNfZ3JhZF9tdWx0aXBsaWVy", + "GAsgASgCEiIKGnVwZGF0ZV90cmFpbmFibGVfdmFyaWFibGVzGBkgAygJEhgK", + "EGZyZWV6ZV92YXJpYWJsZXMYDCADKAkSHQoVcmVwbGljYXNfdG9fYWdncmVn", + "YXRlGA0gASgFEhwKFGJhdGNoX3F1ZXVlX2NhcGFjaXR5GA4gASgFEh8KF251", + "bV9iYXRjaF9xdWV1ZV90aHJlYWRzGA8gASgFEh8KF3ByZWZldGNoX3F1ZXVl", + "X2NhcGFjaXR5GBAgASgFEiIKGm1lcmdlX211bHRpcGxlX2xhYmVsX2JveGVz", + "GBEgASgIEh0KFXVzZV9tdWx0aWNsYXNzX3Njb3JlcxgYIAEoCBIfChdhZGRf", + "cmVndWxhcml6YXRpb25fbG9zcxgSIAEoCBIbChNtYXhfbnVtYmVyX29mX2Jv", + "eGVzGBQgASgFEiEKGXVucGFkX2dyb3VuZHRydXRoX3RlbnNvcnMYFSABKAgS", + "HgoWcmV0YWluX29yaWdpbmFsX2ltYWdlcxgXIAEoCBIUCgx1c2VfYmZsb2F0", + "MTYYGiABKAgSGwoTc3VtbWFyaXplX2dyYWRpZW50cxgbIAEoCGIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::Tensorflow.Models.ObjectDetection.Protos.OptimizerReflection.Descriptor, global::Tensorflow.Models.ObjectDetection.Protos.PreprocessorReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.Models.ObjectDetection.Protos.TrainConfig), global::Tensorflow.Models.ObjectDetection.Protos.TrainConfig.Parser, new[]{ "BatchSize", "DataAugmentationOptions", "SyncReplicas", "KeepCheckpointEveryNHours", "Optimizer", "GradientClippingByNorm", "FineTuneCheckpoint", "FineTuneCheckpointType", "FromDetectionCheckpoint", "LoadAllDetectionCheckpointVars", "NumSteps", "StartupDelaySteps", "BiasGradMultiplier", "UpdateTrainableVariables", "FreezeVariables", "ReplicasToAggregate", "BatchQueueCapacity", "NumBatchQueueThreads", "PrefetchQueueCapacity", "MergeMultipleLabelBoxes", "UseMulticlassScores", "AddRegularizationLoss", "MaxNumberOfBoxes", "UnpadGroundtruthTensors", "RetainOriginalImages", "UseBfloat16", "SummarizeGradients" }, null, null, null) + })); + } + #endregion + + } + #region Messages + /// + /// Message for configuring DetectionModel training jobs (train.py). + /// Next id: 28 + /// + public sealed partial class TrainConfig : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TrainConfig()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tensorflow.Models.ObjectDetection.Protos.TrainReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrainConfig() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrainConfig(TrainConfig other) : this() { + batchSize_ = other.batchSize_; + dataAugmentationOptions_ = other.dataAugmentationOptions_.Clone(); + syncReplicas_ = other.syncReplicas_; + keepCheckpointEveryNHours_ = other.keepCheckpointEveryNHours_; + optimizer_ = other.optimizer_ != null ? other.optimizer_.Clone() : null; + gradientClippingByNorm_ = other.gradientClippingByNorm_; + fineTuneCheckpoint_ = other.fineTuneCheckpoint_; + fineTuneCheckpointType_ = other.fineTuneCheckpointType_; + fromDetectionCheckpoint_ = other.fromDetectionCheckpoint_; + loadAllDetectionCheckpointVars_ = other.loadAllDetectionCheckpointVars_; + numSteps_ = other.numSteps_; + startupDelaySteps_ = other.startupDelaySteps_; + biasGradMultiplier_ = other.biasGradMultiplier_; + updateTrainableVariables_ = other.updateTrainableVariables_.Clone(); + freezeVariables_ = other.freezeVariables_.Clone(); + replicasToAggregate_ = other.replicasToAggregate_; + batchQueueCapacity_ = other.batchQueueCapacity_; + numBatchQueueThreads_ = other.numBatchQueueThreads_; + prefetchQueueCapacity_ = other.prefetchQueueCapacity_; + mergeMultipleLabelBoxes_ = other.mergeMultipleLabelBoxes_; + useMulticlassScores_ = other.useMulticlassScores_; + addRegularizationLoss_ = other.addRegularizationLoss_; + maxNumberOfBoxes_ = other.maxNumberOfBoxes_; + unpadGroundtruthTensors_ = other.unpadGroundtruthTensors_; + retainOriginalImages_ = other.retainOriginalImages_; + useBfloat16_ = other.useBfloat16_; + summarizeGradients_ = other.summarizeGradients_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public TrainConfig Clone() { + return new TrainConfig(this); + } + + /// Field number for the "batch_size" field. + public const int BatchSizeFieldNumber = 1; + private uint batchSize_; + /// + /// Effective batch size to use for training. + /// For TPU (or sync SGD jobs), the batch size per core (or GPU) is going to be + /// `batch_size` / number of cores (or `batch_size` / number of GPUs). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint BatchSize { + get { return batchSize_; } + set { + batchSize_ = value; + } + } + + /// Field number for the "data_augmentation_options" field. + public const int DataAugmentationOptionsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_dataAugmentationOptions_codec + = pb::FieldCodec.ForMessage(18, global::Tensorflow.Models.ObjectDetection.Protos.PreprocessingStep.Parser); + private readonly pbc::RepeatedField dataAugmentationOptions_ = new pbc::RepeatedField(); + /// + /// Data augmentation options. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField DataAugmentationOptions { + get { return dataAugmentationOptions_; } + } + + /// Field number for the "sync_replicas" field. + public const int SyncReplicasFieldNumber = 3; + private bool syncReplicas_; + /// + /// Whether to synchronize replicas during training. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SyncReplicas { + get { return syncReplicas_; } + set { + syncReplicas_ = value; + } + } + + /// Field number for the "keep_checkpoint_every_n_hours" field. + public const int KeepCheckpointEveryNHoursFieldNumber = 4; + private float keepCheckpointEveryNHours_; + /// + /// How frequently to keep checkpoints. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float KeepCheckpointEveryNHours { + get { return keepCheckpointEveryNHours_; } + set { + keepCheckpointEveryNHours_ = value; + } + } + + /// Field number for the "optimizer" field. + public const int OptimizerFieldNumber = 5; + private global::Tensorflow.Models.ObjectDetection.Protos.Optimizer optimizer_; + /// + /// Optimizer used to train the DetectionModel. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public global::Tensorflow.Models.ObjectDetection.Protos.Optimizer Optimizer { + get { return optimizer_; } + set { + optimizer_ = value; + } + } + + /// Field number for the "gradient_clipping_by_norm" field. + public const int GradientClippingByNormFieldNumber = 6; + private float gradientClippingByNorm_; + /// + /// If greater than 0, clips gradients by this value. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float GradientClippingByNorm { + get { return gradientClippingByNorm_; } + set { + gradientClippingByNorm_ = value; + } + } + + /// Field number for the "fine_tune_checkpoint" field. + public const int FineTuneCheckpointFieldNumber = 7; + private string fineTuneCheckpoint_ = ""; + /// + /// Checkpoint to restore variables from. Typically used to load feature + /// extractor variables trained outside of object detection. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FineTuneCheckpoint { + get { return fineTuneCheckpoint_; } + set { + fineTuneCheckpoint_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fine_tune_checkpoint_type" field. + public const int FineTuneCheckpointTypeFieldNumber = 22; + private string fineTuneCheckpointType_ = ""; + /// + /// Type of checkpoint to restore variables from, e.g. 'classification' or + /// 'detection'. Provides extensibility to from_detection_checkpoint. + /// Typically used to load feature extractor variables from trained models. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string FineTuneCheckpointType { + get { return fineTuneCheckpointType_; } + set { + fineTuneCheckpointType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "from_detection_checkpoint" field. + public const int FromDetectionCheckpointFieldNumber = 8; + private bool fromDetectionCheckpoint_; + /// + /// [Deprecated]: use fine_tune_checkpoint_type instead. + /// Specifies if the finetune checkpoint is from an object detection model. + /// If from an object detection model, the model being trained should have + /// the same parameters with the exception of the num_classes parameter. + /// If false, it assumes the checkpoint was a object classification model. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool FromDetectionCheckpoint { + get { return fromDetectionCheckpoint_; } + set { + fromDetectionCheckpoint_ = value; + } + } + + /// Field number for the "load_all_detection_checkpoint_vars" field. + public const int LoadAllDetectionCheckpointVarsFieldNumber = 19; + private bool loadAllDetectionCheckpointVars_; + /// + /// Whether to load all checkpoint vars that match model variable names and + /// sizes. This option is only available if `from_detection_checkpoint` is + /// True. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool LoadAllDetectionCheckpointVars { + get { return loadAllDetectionCheckpointVars_; } + set { + loadAllDetectionCheckpointVars_ = value; + } + } + + /// Field number for the "num_steps" field. + public const int NumStepsFieldNumber = 9; + private uint numSteps_; + /// + /// Number of steps to train the DetectionModel for. If 0, will train the model + /// indefinitely. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public uint NumSteps { + get { return numSteps_; } + set { + numSteps_ = value; + } + } + + /// Field number for the "startup_delay_steps" field. + public const int StartupDelayStepsFieldNumber = 10; + private float startupDelaySteps_; + /// + /// Number of training steps between replica startup. + /// This flag must be set to 0 if sync_replicas is set to true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float StartupDelaySteps { + get { return startupDelaySteps_; } + set { + startupDelaySteps_ = value; + } + } + + /// Field number for the "bias_grad_multiplier" field. + public const int BiasGradMultiplierFieldNumber = 11; + private float biasGradMultiplier_; + /// + /// If greater than 0, multiplies the gradient of bias variables by this + /// amount. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public float BiasGradMultiplier { + get { return biasGradMultiplier_; } + set { + biasGradMultiplier_ = value; + } + } + + /// Field number for the "update_trainable_variables" field. + public const int UpdateTrainableVariablesFieldNumber = 25; + private static readonly pb::FieldCodec _repeated_updateTrainableVariables_codec + = pb::FieldCodec.ForString(202); + private readonly pbc::RepeatedField updateTrainableVariables_ = new pbc::RepeatedField(); + /// + /// Variables that should be updated during training. Note that variables which + /// also match the patterns in freeze_variables will be excluded. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField UpdateTrainableVariables { + get { return updateTrainableVariables_; } + } + + /// Field number for the "freeze_variables" field. + public const int FreezeVariablesFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_freezeVariables_codec + = pb::FieldCodec.ForString(98); + private readonly pbc::RepeatedField freezeVariables_ = new pbc::RepeatedField(); + /// + /// Variables that should not be updated during training. If + /// update_trainable_variables is not empty, only eliminates the included + /// variables according to freeze_variables patterns. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public pbc::RepeatedField FreezeVariables { + get { return freezeVariables_; } + } + + /// Field number for the "replicas_to_aggregate" field. + public const int ReplicasToAggregateFieldNumber = 13; + private int replicasToAggregate_; + /// + /// Number of replicas to aggregate before making parameter updates. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int ReplicasToAggregate { + get { return replicasToAggregate_; } + set { + replicasToAggregate_ = value; + } + } + + /// Field number for the "batch_queue_capacity" field. + public const int BatchQueueCapacityFieldNumber = 14; + private int batchQueueCapacity_; + /// + /// Maximum number of elements to store within a queue. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int BatchQueueCapacity { + get { return batchQueueCapacity_; } + set { + batchQueueCapacity_ = value; + } + } + + /// Field number for the "num_batch_queue_threads" field. + public const int NumBatchQueueThreadsFieldNumber = 15; + private int numBatchQueueThreads_; + /// + /// Number of threads to use for batching. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int NumBatchQueueThreads { + get { return numBatchQueueThreads_; } + set { + numBatchQueueThreads_ = value; + } + } + + /// Field number for the "prefetch_queue_capacity" field. + public const int PrefetchQueueCapacityFieldNumber = 16; + private int prefetchQueueCapacity_; + /// + /// Maximum capacity of the queue used to prefetch assembled batches. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int PrefetchQueueCapacity { + get { return prefetchQueueCapacity_; } + set { + prefetchQueueCapacity_ = value; + } + } + + /// Field number for the "merge_multiple_label_boxes" field. + public const int MergeMultipleLabelBoxesFieldNumber = 17; + private bool mergeMultipleLabelBoxes_; + /// + /// If true, boxes with the same coordinates will be merged together. + /// This is useful when each box can have multiple labels. + /// Note that only Sigmoid classification losses should be used. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool MergeMultipleLabelBoxes { + get { return mergeMultipleLabelBoxes_; } + set { + mergeMultipleLabelBoxes_ = value; + } + } + + /// Field number for the "use_multiclass_scores" field. + public const int UseMulticlassScoresFieldNumber = 24; + private bool useMulticlassScores_; + /// + /// If true, will use multiclass scores from object annotations as ground + /// truth. Currently only compatible with annotated image inputs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseMulticlassScores { + get { return useMulticlassScores_; } + set { + useMulticlassScores_ = value; + } + } + + /// Field number for the "add_regularization_loss" field. + public const int AddRegularizationLossFieldNumber = 18; + private bool addRegularizationLoss_; + /// + /// Whether to add regularization loss to `total_loss`. This is true by + /// default and adds all regularization losses defined in the model to + /// `total_loss`. + /// Setting this option to false is very useful while debugging the model and + /// losses. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool AddRegularizationLoss { + get { return addRegularizationLoss_; } + set { + addRegularizationLoss_ = value; + } + } + + /// Field number for the "max_number_of_boxes" field. + public const int MaxNumberOfBoxesFieldNumber = 20; + private int maxNumberOfBoxes_; + /// + /// Maximum number of boxes used during training. + /// Set this to at least the maximum amount of boxes in the input data. + /// Otherwise, it may cause "Data loss: Attempted to pad to a smaller size + /// than the input element" errors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int MaxNumberOfBoxes { + get { return maxNumberOfBoxes_; } + set { + maxNumberOfBoxes_ = value; + } + } + + /// Field number for the "unpad_groundtruth_tensors" field. + public const int UnpadGroundtruthTensorsFieldNumber = 21; + private bool unpadGroundtruthTensors_; + /// + /// Whether to remove padding along `num_boxes` dimension of the groundtruth + /// tensors. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UnpadGroundtruthTensors { + get { return unpadGroundtruthTensors_; } + set { + unpadGroundtruthTensors_ = value; + } + } + + /// Field number for the "retain_original_images" field. + public const int RetainOriginalImagesFieldNumber = 23; + private bool retainOriginalImages_; + /// + /// Whether to retain original images (i.e. not pre-processed) in the tensor + /// dictionary, so that they can be displayed in Tensorboard. Note that this + /// will lead to a larger memory footprint. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool RetainOriginalImages { + get { return retainOriginalImages_; } + set { + retainOriginalImages_ = value; + } + } + + /// Field number for the "use_bfloat16" field. + public const int UseBfloat16FieldNumber = 26; + private bool useBfloat16_; + /// + /// Whether to use bfloat16 for training. This is currently only supported for + /// TPUs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool UseBfloat16 { + get { return useBfloat16_; } + set { + useBfloat16_ = value; + } + } + + /// Field number for the "summarize_gradients" field. + public const int SummarizeGradientsFieldNumber = 27; + private bool summarizeGradients_; + /// + /// Whether to summarize gradients. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool SummarizeGradients { + get { return summarizeGradients_; } + set { + summarizeGradients_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override bool Equals(object other) { + return Equals(other as TrainConfig); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool Equals(TrainConfig other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (BatchSize != other.BatchSize) return false; + if(!dataAugmentationOptions_.Equals(other.dataAugmentationOptions_)) return false; + if (SyncReplicas != other.SyncReplicas) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(KeepCheckpointEveryNHours, other.KeepCheckpointEveryNHours)) return false; + if (!object.Equals(Optimizer, other.Optimizer)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(GradientClippingByNorm, other.GradientClippingByNorm)) return false; + if (FineTuneCheckpoint != other.FineTuneCheckpoint) return false; + if (FineTuneCheckpointType != other.FineTuneCheckpointType) return false; + if (FromDetectionCheckpoint != other.FromDetectionCheckpoint) return false; + if (LoadAllDetectionCheckpointVars != other.LoadAllDetectionCheckpointVars) return false; + if (NumSteps != other.NumSteps) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(StartupDelaySteps, other.StartupDelaySteps)) return false; + if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(BiasGradMultiplier, other.BiasGradMultiplier)) return false; + if(!updateTrainableVariables_.Equals(other.updateTrainableVariables_)) return false; + if(!freezeVariables_.Equals(other.freezeVariables_)) return false; + if (ReplicasToAggregate != other.ReplicasToAggregate) return false; + if (BatchQueueCapacity != other.BatchQueueCapacity) return false; + if (NumBatchQueueThreads != other.NumBatchQueueThreads) return false; + if (PrefetchQueueCapacity != other.PrefetchQueueCapacity) return false; + if (MergeMultipleLabelBoxes != other.MergeMultipleLabelBoxes) return false; + if (UseMulticlassScores != other.UseMulticlassScores) return false; + if (AddRegularizationLoss != other.AddRegularizationLoss) return false; + if (MaxNumberOfBoxes != other.MaxNumberOfBoxes) return false; + if (UnpadGroundtruthTensors != other.UnpadGroundtruthTensors) return false; + if (RetainOriginalImages != other.RetainOriginalImages) return false; + if (UseBfloat16 != other.UseBfloat16) return false; + if (SummarizeGradients != other.SummarizeGradients) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override int GetHashCode() { + int hash = 1; + if (BatchSize != 0) hash ^= BatchSize.GetHashCode(); + hash ^= dataAugmentationOptions_.GetHashCode(); + if (SyncReplicas != false) hash ^= SyncReplicas.GetHashCode(); + if (KeepCheckpointEveryNHours != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(KeepCheckpointEveryNHours); + if (optimizer_ != null) hash ^= Optimizer.GetHashCode(); + if (GradientClippingByNorm != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(GradientClippingByNorm); + if (FineTuneCheckpoint.Length != 0) hash ^= FineTuneCheckpoint.GetHashCode(); + if (FineTuneCheckpointType.Length != 0) hash ^= FineTuneCheckpointType.GetHashCode(); + if (FromDetectionCheckpoint != false) hash ^= FromDetectionCheckpoint.GetHashCode(); + if (LoadAllDetectionCheckpointVars != false) hash ^= LoadAllDetectionCheckpointVars.GetHashCode(); + if (NumSteps != 0) hash ^= NumSteps.GetHashCode(); + if (StartupDelaySteps != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(StartupDelaySteps); + if (BiasGradMultiplier != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(BiasGradMultiplier); + hash ^= updateTrainableVariables_.GetHashCode(); + hash ^= freezeVariables_.GetHashCode(); + if (ReplicasToAggregate != 0) hash ^= ReplicasToAggregate.GetHashCode(); + if (BatchQueueCapacity != 0) hash ^= BatchQueueCapacity.GetHashCode(); + if (NumBatchQueueThreads != 0) hash ^= NumBatchQueueThreads.GetHashCode(); + if (PrefetchQueueCapacity != 0) hash ^= PrefetchQueueCapacity.GetHashCode(); + if (MergeMultipleLabelBoxes != false) hash ^= MergeMultipleLabelBoxes.GetHashCode(); + if (UseMulticlassScores != false) hash ^= UseMulticlassScores.GetHashCode(); + if (AddRegularizationLoss != false) hash ^= AddRegularizationLoss.GetHashCode(); + if (MaxNumberOfBoxes != 0) hash ^= MaxNumberOfBoxes.GetHashCode(); + if (UnpadGroundtruthTensors != false) hash ^= UnpadGroundtruthTensors.GetHashCode(); + if (RetainOriginalImages != false) hash ^= RetainOriginalImages.GetHashCode(); + if (UseBfloat16 != false) hash ^= UseBfloat16.GetHashCode(); + if (SummarizeGradients != false) hash ^= SummarizeGradients.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void WriteTo(pb::CodedOutputStream output) { + if (BatchSize != 0) { + output.WriteRawTag(8); + output.WriteUInt32(BatchSize); + } + dataAugmentationOptions_.WriteTo(output, _repeated_dataAugmentationOptions_codec); + if (SyncReplicas != false) { + output.WriteRawTag(24); + output.WriteBool(SyncReplicas); + } + if (KeepCheckpointEveryNHours != 0F) { + output.WriteRawTag(37); + output.WriteFloat(KeepCheckpointEveryNHours); + } + if (optimizer_ != null) { + output.WriteRawTag(42); + output.WriteMessage(Optimizer); + } + if (GradientClippingByNorm != 0F) { + output.WriteRawTag(53); + output.WriteFloat(GradientClippingByNorm); + } + if (FineTuneCheckpoint.Length != 0) { + output.WriteRawTag(58); + output.WriteString(FineTuneCheckpoint); + } + if (FromDetectionCheckpoint != false) { + output.WriteRawTag(64); + output.WriteBool(FromDetectionCheckpoint); + } + if (NumSteps != 0) { + output.WriteRawTag(72); + output.WriteUInt32(NumSteps); + } + if (StartupDelaySteps != 0F) { + output.WriteRawTag(85); + output.WriteFloat(StartupDelaySteps); + } + if (BiasGradMultiplier != 0F) { + output.WriteRawTag(93); + output.WriteFloat(BiasGradMultiplier); + } + freezeVariables_.WriteTo(output, _repeated_freezeVariables_codec); + if (ReplicasToAggregate != 0) { + output.WriteRawTag(104); + output.WriteInt32(ReplicasToAggregate); + } + if (BatchQueueCapacity != 0) { + output.WriteRawTag(112); + output.WriteInt32(BatchQueueCapacity); + } + if (NumBatchQueueThreads != 0) { + output.WriteRawTag(120); + output.WriteInt32(NumBatchQueueThreads); + } + if (PrefetchQueueCapacity != 0) { + output.WriteRawTag(128, 1); + output.WriteInt32(PrefetchQueueCapacity); + } + if (MergeMultipleLabelBoxes != false) { + output.WriteRawTag(136, 1); + output.WriteBool(MergeMultipleLabelBoxes); + } + if (AddRegularizationLoss != false) { + output.WriteRawTag(144, 1); + output.WriteBool(AddRegularizationLoss); + } + if (LoadAllDetectionCheckpointVars != false) { + output.WriteRawTag(152, 1); + output.WriteBool(LoadAllDetectionCheckpointVars); + } + if (MaxNumberOfBoxes != 0) { + output.WriteRawTag(160, 1); + output.WriteInt32(MaxNumberOfBoxes); + } + if (UnpadGroundtruthTensors != false) { + output.WriteRawTag(168, 1); + output.WriteBool(UnpadGroundtruthTensors); + } + if (FineTuneCheckpointType.Length != 0) { + output.WriteRawTag(178, 1); + output.WriteString(FineTuneCheckpointType); + } + if (RetainOriginalImages != false) { + output.WriteRawTag(184, 1); + output.WriteBool(RetainOriginalImages); + } + if (UseMulticlassScores != false) { + output.WriteRawTag(192, 1); + output.WriteBool(UseMulticlassScores); + } + updateTrainableVariables_.WriteTo(output, _repeated_updateTrainableVariables_codec); + if (UseBfloat16 != false) { + output.WriteRawTag(208, 1); + output.WriteBool(UseBfloat16); + } + if (SummarizeGradients != false) { + output.WriteRawTag(216, 1); + output.WriteBool(SummarizeGradients); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public int CalculateSize() { + int size = 0; + if (BatchSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(BatchSize); + } + size += dataAugmentationOptions_.CalculateSize(_repeated_dataAugmentationOptions_codec); + if (SyncReplicas != false) { + size += 1 + 1; + } + if (KeepCheckpointEveryNHours != 0F) { + size += 1 + 4; + } + if (optimizer_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Optimizer); + } + if (GradientClippingByNorm != 0F) { + size += 1 + 4; + } + if (FineTuneCheckpoint.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FineTuneCheckpoint); + } + if (FineTuneCheckpointType.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(FineTuneCheckpointType); + } + if (FromDetectionCheckpoint != false) { + size += 1 + 1; + } + if (LoadAllDetectionCheckpointVars != false) { + size += 2 + 1; + } + if (NumSteps != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(NumSteps); + } + if (StartupDelaySteps != 0F) { + size += 1 + 4; + } + if (BiasGradMultiplier != 0F) { + size += 1 + 4; + } + size += updateTrainableVariables_.CalculateSize(_repeated_updateTrainableVariables_codec); + size += freezeVariables_.CalculateSize(_repeated_freezeVariables_codec); + if (ReplicasToAggregate != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReplicasToAggregate); + } + if (BatchQueueCapacity != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(BatchQueueCapacity); + } + if (NumBatchQueueThreads != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumBatchQueueThreads); + } + if (PrefetchQueueCapacity != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(PrefetchQueueCapacity); + } + if (MergeMultipleLabelBoxes != false) { + size += 2 + 1; + } + if (UseMulticlassScores != false) { + size += 2 + 1; + } + if (AddRegularizationLoss != false) { + size += 2 + 1; + } + if (MaxNumberOfBoxes != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MaxNumberOfBoxes); + } + if (UnpadGroundtruthTensors != false) { + size += 2 + 1; + } + if (RetainOriginalImages != false) { + size += 2 + 1; + } + if (UseBfloat16 != false) { + size += 2 + 1; + } + if (SummarizeGradients != false) { + size += 2 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(TrainConfig other) { + if (other == null) { + return; + } + if (other.BatchSize != 0) { + BatchSize = other.BatchSize; + } + dataAugmentationOptions_.Add(other.dataAugmentationOptions_); + if (other.SyncReplicas != false) { + SyncReplicas = other.SyncReplicas; + } + if (other.KeepCheckpointEveryNHours != 0F) { + KeepCheckpointEveryNHours = other.KeepCheckpointEveryNHours; + } + if (other.optimizer_ != null) { + if (optimizer_ == null) { + optimizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.Optimizer(); + } + Optimizer.MergeFrom(other.Optimizer); + } + if (other.GradientClippingByNorm != 0F) { + GradientClippingByNorm = other.GradientClippingByNorm; + } + if (other.FineTuneCheckpoint.Length != 0) { + FineTuneCheckpoint = other.FineTuneCheckpoint; + } + if (other.FineTuneCheckpointType.Length != 0) { + FineTuneCheckpointType = other.FineTuneCheckpointType; + } + if (other.FromDetectionCheckpoint != false) { + FromDetectionCheckpoint = other.FromDetectionCheckpoint; + } + if (other.LoadAllDetectionCheckpointVars != false) { + LoadAllDetectionCheckpointVars = other.LoadAllDetectionCheckpointVars; + } + if (other.NumSteps != 0) { + NumSteps = other.NumSteps; + } + if (other.StartupDelaySteps != 0F) { + StartupDelaySteps = other.StartupDelaySteps; + } + if (other.BiasGradMultiplier != 0F) { + BiasGradMultiplier = other.BiasGradMultiplier; + } + updateTrainableVariables_.Add(other.updateTrainableVariables_); + freezeVariables_.Add(other.freezeVariables_); + if (other.ReplicasToAggregate != 0) { + ReplicasToAggregate = other.ReplicasToAggregate; + } + if (other.BatchQueueCapacity != 0) { + BatchQueueCapacity = other.BatchQueueCapacity; + } + if (other.NumBatchQueueThreads != 0) { + NumBatchQueueThreads = other.NumBatchQueueThreads; + } + if (other.PrefetchQueueCapacity != 0) { + PrefetchQueueCapacity = other.PrefetchQueueCapacity; + } + if (other.MergeMultipleLabelBoxes != false) { + MergeMultipleLabelBoxes = other.MergeMultipleLabelBoxes; + } + if (other.UseMulticlassScores != false) { + UseMulticlassScores = other.UseMulticlassScores; + } + if (other.AddRegularizationLoss != false) { + AddRegularizationLoss = other.AddRegularizationLoss; + } + if (other.MaxNumberOfBoxes != 0) { + MaxNumberOfBoxes = other.MaxNumberOfBoxes; + } + if (other.UnpadGroundtruthTensors != false) { + UnpadGroundtruthTensors = other.UnpadGroundtruthTensors; + } + if (other.RetainOriginalImages != false) { + RetainOriginalImages = other.RetainOriginalImages; + } + if (other.UseBfloat16 != false) { + UseBfloat16 = other.UseBfloat16; + } + if (other.SummarizeGradients != false) { + SummarizeGradients = other.SummarizeGradients; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + BatchSize = input.ReadUInt32(); + break; + } + case 18: { + dataAugmentationOptions_.AddEntriesFrom(input, _repeated_dataAugmentationOptions_codec); + break; + } + case 24: { + SyncReplicas = input.ReadBool(); + break; + } + case 37: { + KeepCheckpointEveryNHours = input.ReadFloat(); + break; + } + case 42: { + if (optimizer_ == null) { + optimizer_ = new global::Tensorflow.Models.ObjectDetection.Protos.Optimizer(); + } + input.ReadMessage(optimizer_); + break; + } + case 53: { + GradientClippingByNorm = input.ReadFloat(); + break; + } + case 58: { + FineTuneCheckpoint = input.ReadString(); + break; + } + case 64: { + FromDetectionCheckpoint = input.ReadBool(); + break; + } + case 72: { + NumSteps = input.ReadUInt32(); + break; + } + case 85: { + StartupDelaySteps = input.ReadFloat(); + break; + } + case 93: { + BiasGradMultiplier = input.ReadFloat(); + break; + } + case 98: { + freezeVariables_.AddEntriesFrom(input, _repeated_freezeVariables_codec); + break; + } + case 104: { + ReplicasToAggregate = input.ReadInt32(); + break; + } + case 112: { + BatchQueueCapacity = input.ReadInt32(); + break; + } + case 120: { + NumBatchQueueThreads = input.ReadInt32(); + break; + } + case 128: { + PrefetchQueueCapacity = input.ReadInt32(); + break; + } + case 136: { + MergeMultipleLabelBoxes = input.ReadBool(); + break; + } + case 144: { + AddRegularizationLoss = input.ReadBool(); + break; + } + case 152: { + LoadAllDetectionCheckpointVars = input.ReadBool(); + break; + } + case 160: { + MaxNumberOfBoxes = input.ReadInt32(); + break; + } + case 168: { + UnpadGroundtruthTensors = input.ReadBool(); + break; + } + case 178: { + FineTuneCheckpointType = input.ReadString(); + break; + } + case 184: { + RetainOriginalImages = input.ReadBool(); + break; + } + case 192: { + UseMulticlassScores = input.ReadBool(); + break; + } + case 202: { + updateTrainableVariables_.AddEntriesFrom(input, _repeated_updateTrainableVariables_codec); + break; + } + case 208: { + UseBfloat16 = input.ReadBool(); + break; + } + case 216: { + SummarizeGradients = input.ReadBool(); + break; + } + } + } + } + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/src/TensorFlowNET.Models/TensorFlowNET.Models.csproj b/src/TensorFlowNET.Models/TensorFlowNET.Models.csproj new file mode 100644 index 00000000..e88ea92c --- /dev/null +++ b/src/TensorFlowNET.Models/TensorFlowNET.Models.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp2.2 + TensorFlow.Models + Tensorflow.Models + + + + + + + diff --git a/test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj b/test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj index 652d9bd1..957509d8 100644 --- a/test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj +++ b/test/TensorFlowNET.Examples/TensorFlowNET.Examples.csproj @@ -28,4 +28,8 @@ + + + +