| @@ -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 | |||
| @@ -0,0 +1,343 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/anchor_generator.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/anchor_generator.proto</summary> | |||
| public static partial class AnchorGeneratorReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/anchor_generator.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for the anchor generator to use in the object detection | |||
| /// pipeline. See core/anchor_generator.py for details. | |||
| /// </summary> | |||
| public sealed partial class AnchorGenerator : pb::IMessage<AnchorGenerator> { | |||
| private static readonly pb::MessageParser<AnchorGenerator> _parser = new pb::MessageParser<AnchorGenerator>(() => new AnchorGenerator()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<AnchorGenerator> 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); | |||
| } | |||
| /// <summary>Field number for the "grid_anchor_generator" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "ssd_anchor_generator" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "multiscale_anchor_generator" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "flexible_grid_anchor_generator" field.</summary> | |||
| 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_; | |||
| /// <summary>Enum of possible cases for the "anchor_generator_oneof" oneof.</summary> | |||
| 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 | |||
| @@ -0,0 +1,343 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/argmax_matcher.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/argmax_matcher.proto</summary> | |||
| public static partial class ArgmaxMatcherReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/argmax_matcher.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for ArgMaxMatcher. See | |||
| /// matchers/argmax_matcher.py for details. | |||
| /// </summary> | |||
| public sealed partial class ArgMaxMatcher : pb::IMessage<ArgMaxMatcher> { | |||
| private static readonly pb::MessageParser<ArgMaxMatcher> _parser = new pb::MessageParser<ArgMaxMatcher>(() => new ArgMaxMatcher()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<ArgMaxMatcher> 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); | |||
| } | |||
| /// <summary>Field number for the "matched_threshold" field.</summary> | |||
| public const int MatchedThresholdFieldNumber = 1; | |||
| private float matchedThreshold_; | |||
| /// <summary> | |||
| /// Threshold for positive matches. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float MatchedThreshold { | |||
| get { return matchedThreshold_; } | |||
| set { | |||
| matchedThreshold_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "unmatched_threshold" field.</summary> | |||
| public const int UnmatchedThresholdFieldNumber = 2; | |||
| private float unmatchedThreshold_; | |||
| /// <summary> | |||
| /// Threshold for negative matches. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float UnmatchedThreshold { | |||
| get { return unmatchedThreshold_; } | |||
| set { | |||
| unmatchedThreshold_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "ignore_thresholds" field.</summary> | |||
| public const int IgnoreThresholdsFieldNumber = 3; | |||
| private bool ignoreThresholds_; | |||
| /// <summary> | |||
| /// Whether to construct ArgMaxMatcher without thresholds. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool IgnoreThresholds { | |||
| get { return ignoreThresholds_; } | |||
| set { | |||
| ignoreThresholds_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "negatives_lower_than_unmatched" field.</summary> | |||
| public const int NegativesLowerThanUnmatchedFieldNumber = 4; | |||
| private bool negativesLowerThanUnmatched_; | |||
| /// <summary> | |||
| /// 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. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool NegativesLowerThanUnmatched { | |||
| get { return negativesLowerThanUnmatched_; } | |||
| set { | |||
| negativesLowerThanUnmatched_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "force_match_for_each_row" field.</summary> | |||
| public const int ForceMatchForEachRowFieldNumber = 5; | |||
| private bool forceMatchForEachRow_; | |||
| /// <summary> | |||
| /// Whether to ensure each row is matched to at least one column. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool ForceMatchForEachRow { | |||
| get { return forceMatchForEachRow_; } | |||
| set { | |||
| forceMatchForEachRow_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "use_matmul_gather" field.</summary> | |||
| public const int UseMatmulGatherFieldNumber = 6; | |||
| private bool useMatmulGather_; | |||
| /// <summary> | |||
| /// Force constructed match objects to use matrix multiplication based gather | |||
| /// instead of standard tf.gather | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,181 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/bipartite_matcher.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/bipartite_matcher.proto</summary> | |||
| public static partial class BipartiteMatcherReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/bipartite_matcher.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for bipartite matcher. See | |||
| /// matchers/bipartite_matcher.py for details. | |||
| /// </summary> | |||
| public sealed partial class BipartiteMatcher : pb::IMessage<BipartiteMatcher> { | |||
| private static readonly pb::MessageParser<BipartiteMatcher> _parser = new pb::MessageParser<BipartiteMatcher>(() => new BipartiteMatcher()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<BipartiteMatcher> 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); | |||
| } | |||
| /// <summary>Field number for the "use_matmul_gather" field.</summary> | |||
| public const int UseMatmulGatherFieldNumber = 6; | |||
| private bool useMatmulGather_; | |||
| /// <summary> | |||
| /// Force constructed match objects to use matrix multiplication based gather | |||
| /// instead of standard tf.gather | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,341 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/box_coder.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/box_coder.proto</summary> | |||
| public static partial class BoxCoderReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/box_coder.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for the box coder to be used in the object detection | |||
| /// pipeline. See core/box_coder.py for details. | |||
| /// </summary> | |||
| public sealed partial class BoxCoder : pb::IMessage<BoxCoder> { | |||
| private static readonly pb::MessageParser<BoxCoder> _parser = new pb::MessageParser<BoxCoder>(() => new BoxCoder()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<BoxCoder> 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); | |||
| } | |||
| /// <summary>Field number for the "faster_rcnn_box_coder" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "mean_stddev_box_coder" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "square_box_coder" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "keypoint_box_coder" field.</summary> | |||
| 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_; | |||
| /// <summary>Enum of possible cases for the "box_coder_oneof" oneof.</summary> | |||
| 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 | |||
| @@ -0,0 +1,901 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/eval.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/eval.proto</summary> | |||
| public static partial class EvalReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/eval.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Message for configuring DetectionModel evaluation jobs (eval.py). | |||
| /// </summary> | |||
| public sealed partial class EvalConfig : pb::IMessage<EvalConfig> { | |||
| private static readonly pb::MessageParser<EvalConfig> _parser = new pb::MessageParser<EvalConfig>(() => new EvalConfig()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<EvalConfig> 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); | |||
| } | |||
| /// <summary>Field number for the "batch_size" field.</summary> | |||
| public const int BatchSizeFieldNumber = 25; | |||
| private uint batchSize_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint BatchSize { | |||
| get { return batchSize_; } | |||
| set { | |||
| batchSize_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "num_visualizations" field.</summary> | |||
| public const int NumVisualizationsFieldNumber = 1; | |||
| private uint numVisualizations_; | |||
| /// <summary> | |||
| /// Number of visualization images to generate. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint NumVisualizations { | |||
| get { return numVisualizations_; } | |||
| set { | |||
| numVisualizations_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "num_examples" field.</summary> | |||
| public const int NumExamplesFieldNumber = 2; | |||
| private uint numExamples_; | |||
| /// <summary> | |||
| /// Number of examples to process of evaluation. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint NumExamples { | |||
| get { return numExamples_; } | |||
| set { | |||
| numExamples_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "eval_interval_secs" field.</summary> | |||
| public const int EvalIntervalSecsFieldNumber = 3; | |||
| private uint evalIntervalSecs_; | |||
| /// <summary> | |||
| /// How often to run evaluation. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint EvalIntervalSecs { | |||
| get { return evalIntervalSecs_; } | |||
| set { | |||
| evalIntervalSecs_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_evals" field.</summary> | |||
| public const int MaxEvalsFieldNumber = 4; | |||
| private uint maxEvals_; | |||
| /// <summary> | |||
| /// Maximum number of times to run evaluation. If set to 0, will run forever. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint MaxEvals { | |||
| get { return maxEvals_; } | |||
| set { | |||
| maxEvals_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "save_graph" field.</summary> | |||
| public const int SaveGraphFieldNumber = 5; | |||
| private bool saveGraph_; | |||
| /// <summary> | |||
| /// Whether the TensorFlow graph used for evaluation should be saved to disk. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool SaveGraph { | |||
| get { return saveGraph_; } | |||
| set { | |||
| saveGraph_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "visualization_export_dir" field.</summary> | |||
| public const int VisualizationExportDirFieldNumber = 6; | |||
| private string visualizationExportDir_ = ""; | |||
| /// <summary> | |||
| /// Path to directory to store visualizations in. If empty, visualization | |||
| /// images are not exported (only shown on Tensorboard). | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public string VisualizationExportDir { | |||
| get { return visualizationExportDir_; } | |||
| set { | |||
| visualizationExportDir_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |||
| } | |||
| } | |||
| /// <summary>Field number for the "eval_master" field.</summary> | |||
| public const int EvalMasterFieldNumber = 7; | |||
| private string evalMaster_ = ""; | |||
| /// <summary> | |||
| /// BNS name of the TensorFlow master. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public string EvalMaster { | |||
| get { return evalMaster_; } | |||
| set { | |||
| evalMaster_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |||
| } | |||
| } | |||
| /// <summary>Field number for the "metrics_set" field.</summary> | |||
| public const int MetricsSetFieldNumber = 8; | |||
| private static readonly pb::FieldCodec<string> _repeated_metricsSet_codec | |||
| = pb::FieldCodec.ForString(66); | |||
| private readonly pbc::RepeatedField<string> metricsSet_ = new pbc::RepeatedField<string>(); | |||
| /// <summary> | |||
| /// Type of metrics to use for evaluation. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<string> MetricsSet { | |||
| get { return metricsSet_; } | |||
| } | |||
| /// <summary>Field number for the "export_path" field.</summary> | |||
| public const int ExportPathFieldNumber = 9; | |||
| private string exportPath_ = ""; | |||
| /// <summary> | |||
| /// Path to export detections to COCO compatible JSON format. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public string ExportPath { | |||
| get { return exportPath_; } | |||
| set { | |||
| exportPath_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |||
| } | |||
| } | |||
| /// <summary>Field number for the "ignore_groundtruth" field.</summary> | |||
| public const int IgnoreGroundtruthFieldNumber = 10; | |||
| private bool ignoreGroundtruth_; | |||
| /// <summary> | |||
| /// Option to not read groundtruth labels and only export detections to | |||
| /// COCO-compatible JSON file. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool IgnoreGroundtruth { | |||
| get { return ignoreGroundtruth_; } | |||
| set { | |||
| ignoreGroundtruth_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "use_moving_averages" field.</summary> | |||
| public const int UseMovingAveragesFieldNumber = 11; | |||
| private bool useMovingAverages_; | |||
| /// <summary> | |||
| /// 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. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool UseMovingAverages { | |||
| get { return useMovingAverages_; } | |||
| set { | |||
| useMovingAverages_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "eval_instance_masks" field.</summary> | |||
| public const int EvalInstanceMasksFieldNumber = 12; | |||
| private bool evalInstanceMasks_; | |||
| /// <summary> | |||
| /// Whether to evaluate instance masks. | |||
| /// Note that since there is no evaluation code currently for instance | |||
| /// segmenation this option is unused. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool EvalInstanceMasks { | |||
| get { return evalInstanceMasks_; } | |||
| set { | |||
| evalInstanceMasks_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "min_score_threshold" field.</summary> | |||
| public const int MinScoreThresholdFieldNumber = 13; | |||
| private float minScoreThreshold_; | |||
| /// <summary> | |||
| /// Minimum score threshold for a detected object box to be visualized | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float MinScoreThreshold { | |||
| get { return minScoreThreshold_; } | |||
| set { | |||
| minScoreThreshold_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_num_boxes_to_visualize" field.</summary> | |||
| public const int MaxNumBoxesToVisualizeFieldNumber = 14; | |||
| private int maxNumBoxesToVisualize_; | |||
| /// <summary> | |||
| /// Maximum number of detections to visualize | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int MaxNumBoxesToVisualize { | |||
| get { return maxNumBoxesToVisualize_; } | |||
| set { | |||
| maxNumBoxesToVisualize_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "skip_scores" field.</summary> | |||
| public const int SkipScoresFieldNumber = 15; | |||
| private bool skipScores_; | |||
| /// <summary> | |||
| /// 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: | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool SkipScores { | |||
| get { return skipScores_; } | |||
| set { | |||
| skipScores_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "skip_labels" field.</summary> | |||
| public const int SkipLabelsFieldNumber = 16; | |||
| private bool skipLabels_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool SkipLabels { | |||
| get { return skipLabels_; } | |||
| set { | |||
| skipLabels_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "visualize_groundtruth_boxes" field.</summary> | |||
| public const int VisualizeGroundtruthBoxesFieldNumber = 17; | |||
| private bool visualizeGroundtruthBoxes_; | |||
| /// <summary> | |||
| /// Whether to show groundtruth boxes in addition to detected boxes in | |||
| /// visualizations. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool VisualizeGroundtruthBoxes { | |||
| get { return visualizeGroundtruthBoxes_; } | |||
| set { | |||
| visualizeGroundtruthBoxes_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "groundtruth_box_visualization_color" field.</summary> | |||
| public const int GroundtruthBoxVisualizationColorFieldNumber = 18; | |||
| private string groundtruthBoxVisualizationColor_ = ""; | |||
| /// <summary> | |||
| /// Box color for visualizing groundtruth boxes. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public string GroundtruthBoxVisualizationColor { | |||
| get { return groundtruthBoxVisualizationColor_; } | |||
| set { | |||
| groundtruthBoxVisualizationColor_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |||
| } | |||
| } | |||
| /// <summary>Field number for the "keep_image_id_for_visualization_export" field.</summary> | |||
| public const int KeepImageIdForVisualizationExportFieldNumber = 19; | |||
| private bool keepImageIdForVisualizationExport_; | |||
| /// <summary> | |||
| /// Whether to keep image identifier in filename when exported to | |||
| /// visualization_export_dir. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool KeepImageIdForVisualizationExport { | |||
| get { return keepImageIdForVisualizationExport_; } | |||
| set { | |||
| keepImageIdForVisualizationExport_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "retain_original_images" field.</summary> | |||
| public const int RetainOriginalImagesFieldNumber = 23; | |||
| private bool retainOriginalImages_; | |||
| /// <summary> | |||
| /// Whether to retain original images (i.e. not pre-processed) in the tensor | |||
| /// dictionary, so that they can be displayed in Tensorboard. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool RetainOriginalImages { | |||
| get { return retainOriginalImages_; } | |||
| set { | |||
| retainOriginalImages_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "include_metrics_per_category" field.</summary> | |||
| public const int IncludeMetricsPerCategoryFieldNumber = 24; | |||
| private bool includeMetricsPerCategory_; | |||
| /// <summary> | |||
| /// If True, additionally include per-category metrics. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool IncludeMetricsPerCategory { | |||
| get { return includeMetricsPerCategory_; } | |||
| set { | |||
| includeMetricsPerCategory_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "recall_lower_bound" field.</summary> | |||
| public const int RecallLowerBoundFieldNumber = 26; | |||
| private float recallLowerBound_; | |||
| /// <summary> | |||
| /// Recall range within which precision should be computed. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float RecallLowerBound { | |||
| get { return recallLowerBound_; } | |||
| set { | |||
| recallLowerBound_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "recall_upper_bound" field.</summary> | |||
| 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 | |||
| @@ -0,0 +1,272 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/faster_rcnn_box_coder.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/faster_rcnn_box_coder.proto</summary> | |||
| public static partial class FasterRcnnBoxCoderReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/faster_rcnn_box_coder.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for FasterRCNNBoxCoder. See | |||
| /// box_coders/faster_rcnn_box_coder.py for details. | |||
| /// </summary> | |||
| public sealed partial class FasterRcnnBoxCoder : pb::IMessage<FasterRcnnBoxCoder> { | |||
| private static readonly pb::MessageParser<FasterRcnnBoxCoder> _parser = new pb::MessageParser<FasterRcnnBoxCoder>(() => new FasterRcnnBoxCoder()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<FasterRcnnBoxCoder> 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); | |||
| } | |||
| /// <summary>Field number for the "y_scale" field.</summary> | |||
| public const int YScaleFieldNumber = 1; | |||
| private float yScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box center. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float YScale { | |||
| get { return yScale_; } | |||
| set { | |||
| yScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "x_scale" field.</summary> | |||
| public const int XScaleFieldNumber = 2; | |||
| private float xScale_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float XScale { | |||
| get { return xScale_; } | |||
| set { | |||
| xScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "height_scale" field.</summary> | |||
| public const int HeightScaleFieldNumber = 3; | |||
| private float heightScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box height. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float HeightScale { | |||
| get { return heightScale_; } | |||
| set { | |||
| heightScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width_scale" field.</summary> | |||
| public const int WidthScaleFieldNumber = 4; | |||
| private float widthScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box width. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,476 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/flexible_grid_anchor_generator.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/flexible_grid_anchor_generator.proto</summary> | |||
| public static partial class FlexibleGridAnchorGeneratorReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/flexible_grid_anchor_generator.proto</summary> | |||
| 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<FlexibleGridAnchorGenerator> { | |||
| private static readonly pb::MessageParser<FlexibleGridAnchorGenerator> _parser = new pb::MessageParser<FlexibleGridAnchorGenerator>(() => new FlexibleGridAnchorGenerator()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<FlexibleGridAnchorGenerator> 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); | |||
| } | |||
| /// <summary>Field number for the "anchor_grid" field.</summary> | |||
| public const int AnchorGridFieldNumber = 1; | |||
| private static readonly pb::FieldCodec<global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid> _repeated_anchorGrid_codec | |||
| = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid.Parser); | |||
| private readonly pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid> anchorGrid_ = new pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid>(); | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.AnchorGrid> AnchorGrid { | |||
| get { return anchorGrid_; } | |||
| } | |||
| /// <summary>Field number for the "normalize_coordinates" field.</summary> | |||
| public const int NormalizeCoordinatesFieldNumber = 2; | |||
| private bool normalizeCoordinates_; | |||
| /// <summary> | |||
| /// Whether to produce anchors in normalized coordinates. | |||
| /// </summary> | |||
| [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<AnchorGrid> { | |||
| private static readonly pb::MessageParser<AnchorGrid> _parser = new pb::MessageParser<AnchorGrid>(() => new AnchorGrid()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<AnchorGrid> 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); | |||
| } | |||
| /// <summary>Field number for the "base_sizes" field.</summary> | |||
| public const int BaseSizesFieldNumber = 1; | |||
| private static readonly pb::FieldCodec<float> _repeated_baseSizes_codec | |||
| = pb::FieldCodec.ForFloat(10); | |||
| private readonly pbc::RepeatedField<float> baseSizes_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// The base sizes in pixels for each anchor in this anchor layer. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> BaseSizes { | |||
| get { return baseSizes_; } | |||
| } | |||
| /// <summary>Field number for the "aspect_ratios" field.</summary> | |||
| public const int AspectRatiosFieldNumber = 2; | |||
| private static readonly pb::FieldCodec<float> _repeated_aspectRatios_codec | |||
| = pb::FieldCodec.ForFloat(18); | |||
| private readonly pbc::RepeatedField<float> aspectRatios_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// The aspect ratios for each anchor in this anchor layer. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> AspectRatios { | |||
| get { return aspectRatios_; } | |||
| } | |||
| /// <summary>Field number for the "height_stride" field.</summary> | |||
| public const int HeightStrideFieldNumber = 3; | |||
| private uint heightStride_; | |||
| /// <summary> | |||
| /// The anchor height stride in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint HeightStride { | |||
| get { return heightStride_; } | |||
| set { | |||
| heightStride_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width_stride" field.</summary> | |||
| public const int WidthStrideFieldNumber = 4; | |||
| private uint widthStride_; | |||
| /// <summary> | |||
| /// The anchor width stride in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint WidthStride { | |||
| get { return widthStride_; } | |||
| set { | |||
| widthStride_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "height_offset" field.</summary> | |||
| public const int HeightOffsetFieldNumber = 5; | |||
| private uint heightOffset_; | |||
| /// <summary> | |||
| /// The anchor height offset in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public uint HeightOffset { | |||
| get { return heightOffset_; } | |||
| set { | |||
| heightOffset_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width_offset" field.</summary> | |||
| public const int WidthOffsetFieldNumber = 6; | |||
| private uint widthOffset_; | |||
| /// <summary> | |||
| /// The anchor width offset in pixels. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,417 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/graph_rewriter.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/graph_rewriter.proto</summary> | |||
| public static partial class GraphRewriterReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/graph_rewriter.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Message to configure graph rewriter for the tf graph. | |||
| /// </summary> | |||
| public sealed partial class GraphRewriter : pb::IMessage<GraphRewriter> { | |||
| private static readonly pb::MessageParser<GraphRewriter> _parser = new pb::MessageParser<GraphRewriter>(() => new GraphRewriter()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<GraphRewriter> 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); | |||
| } | |||
| /// <summary>Field number for the "quantization" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// Message for quantization options. See | |||
| /// tensorflow/contrib/quantize/python/quantize.py for details. | |||
| /// </summary> | |||
| public sealed partial class Quantization : pb::IMessage<Quantization> { | |||
| private static readonly pb::MessageParser<Quantization> _parser = new pb::MessageParser<Quantization>(() => new Quantization()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<Quantization> 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); | |||
| } | |||
| /// <summary>Field number for the "delay" field.</summary> | |||
| public const int DelayFieldNumber = 1; | |||
| private int delay_; | |||
| /// <summary> | |||
| /// Number of steps to delay before quantization takes effect during training. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int Delay { | |||
| get { return delay_; } | |||
| set { | |||
| delay_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "weight_bits" field.</summary> | |||
| public const int WeightBitsFieldNumber = 2; | |||
| private int weightBits_; | |||
| /// <summary> | |||
| /// Number of bits to use for quantizing weights. | |||
| /// Only 8 bit is supported for now. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int WeightBits { | |||
| get { return weightBits_; } | |||
| set { | |||
| weightBits_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "activation_bits" field.</summary> | |||
| public const int ActivationBitsFieldNumber = 3; | |||
| private int activationBits_; | |||
| /// <summary> | |||
| /// Number of bits to use for quantizing activations. | |||
| /// Only 8 bit is supported for now. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int ActivationBits { | |||
| get { return activationBits_; } | |||
| set { | |||
| activationBits_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "symmetric" field.</summary> | |||
| public const int SymmetricFieldNumber = 4; | |||
| private bool symmetric_; | |||
| /// <summary> | |||
| /// Whether to use symmetric weight quantization. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,386 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/grid_anchor_generator.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/grid_anchor_generator.proto</summary> | |||
| public static partial class GridAnchorGeneratorReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/grid_anchor_generator.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for GridAnchorGenerator. See | |||
| /// anchor_generators/grid_anchor_generator.py for details. | |||
| /// </summary> | |||
| public sealed partial class GridAnchorGenerator : pb::IMessage<GridAnchorGenerator> { | |||
| private static readonly pb::MessageParser<GridAnchorGenerator> _parser = new pb::MessageParser<GridAnchorGenerator>(() => new GridAnchorGenerator()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<GridAnchorGenerator> 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); | |||
| } | |||
| /// <summary>Field number for the "height" field.</summary> | |||
| public const int HeightFieldNumber = 1; | |||
| private int height_; | |||
| /// <summary> | |||
| /// Anchor height in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int Height { | |||
| get { return height_; } | |||
| set { | |||
| height_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width" field.</summary> | |||
| public const int WidthFieldNumber = 2; | |||
| private int width_; | |||
| /// <summary> | |||
| /// Anchor width in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int Width { | |||
| get { return width_; } | |||
| set { | |||
| width_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "height_stride" field.</summary> | |||
| public const int HeightStrideFieldNumber = 3; | |||
| private int heightStride_; | |||
| /// <summary> | |||
| /// Anchor stride in height dimension in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int HeightStride { | |||
| get { return heightStride_; } | |||
| set { | |||
| heightStride_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width_stride" field.</summary> | |||
| public const int WidthStrideFieldNumber = 4; | |||
| private int widthStride_; | |||
| /// <summary> | |||
| /// Anchor stride in width dimension in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int WidthStride { | |||
| get { return widthStride_; } | |||
| set { | |||
| widthStride_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "height_offset" field.</summary> | |||
| public const int HeightOffsetFieldNumber = 5; | |||
| private int heightOffset_; | |||
| /// <summary> | |||
| /// Anchor height offset in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int HeightOffset { | |||
| get { return heightOffset_; } | |||
| set { | |||
| heightOffset_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width_offset" field.</summary> | |||
| public const int WidthOffsetFieldNumber = 6; | |||
| private int widthOffset_; | |||
| /// <summary> | |||
| /// Anchor width offset in pixels. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int WidthOffset { | |||
| get { return widthOffset_; } | |||
| set { | |||
| widthOffset_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "scales" field.</summary> | |||
| public const int ScalesFieldNumber = 7; | |||
| private static readonly pb::FieldCodec<float> _repeated_scales_codec | |||
| = pb::FieldCodec.ForFloat(58); | |||
| private readonly pbc::RepeatedField<float> scales_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// List of scales for the anchors. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> Scales { | |||
| get { return scales_; } | |||
| } | |||
| /// <summary>Field number for the "aspect_ratios" field.</summary> | |||
| public const int AspectRatiosFieldNumber = 8; | |||
| private static readonly pb::FieldCodec<float> _repeated_aspectRatios_codec | |||
| = pb::FieldCodec.ForFloat(66); | |||
| private readonly pbc::RepeatedField<float> aspectRatios_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// List of aspect ratios for the anchors. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> 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 | |||
| @@ -0,0 +1,300 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/keypoint_box_coder.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/keypoint_box_coder.proto</summary> | |||
| public static partial class KeypointBoxCoderReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/keypoint_box_coder.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for KeypointBoxCoder. See | |||
| /// box_coders/keypoint_box_coder.py for details. | |||
| /// </summary> | |||
| public sealed partial class KeypointBoxCoder : pb::IMessage<KeypointBoxCoder> { | |||
| private static readonly pb::MessageParser<KeypointBoxCoder> _parser = new pb::MessageParser<KeypointBoxCoder>(() => new KeypointBoxCoder()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<KeypointBoxCoder> 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); | |||
| } | |||
| /// <summary>Field number for the "num_keypoints" field.</summary> | |||
| public const int NumKeypointsFieldNumber = 1; | |||
| private int numKeypoints_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int NumKeypoints { | |||
| get { return numKeypoints_; } | |||
| set { | |||
| numKeypoints_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "y_scale" field.</summary> | |||
| public const int YScaleFieldNumber = 2; | |||
| private float yScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box center and keypoints. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float YScale { | |||
| get { return yScale_; } | |||
| set { | |||
| yScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "x_scale" field.</summary> | |||
| public const int XScaleFieldNumber = 3; | |||
| private float xScale_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float XScale { | |||
| get { return xScale_; } | |||
| set { | |||
| xScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "height_scale" field.</summary> | |||
| public const int HeightScaleFieldNumber = 4; | |||
| private float heightScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box height. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float HeightScale { | |||
| get { return heightScale_; } | |||
| set { | |||
| heightScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "width_scale" field.</summary> | |||
| public const int WidthScaleFieldNumber = 5; | |||
| private float widthScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box width. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,257 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/matcher.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/matcher.proto</summary> | |||
| public static partial class MatcherReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/matcher.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for the matcher to be used in the object detection | |||
| /// pipeline. See core/matcher.py for details. | |||
| /// </summary> | |||
| public sealed partial class Matcher : pb::IMessage<Matcher> { | |||
| private static readonly pb::MessageParser<Matcher> _parser = new pb::MessageParser<Matcher>(() => new Matcher()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<Matcher> 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); | |||
| } | |||
| /// <summary>Field number for the "argmax_matcher" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "bipartite_matcher" field.</summary> | |||
| 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_; | |||
| /// <summary>Enum of possible cases for the "matcher_oneof" oneof.</summary> | |||
| 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 | |||
| @@ -0,0 +1,180 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/mean_stddev_box_coder.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/mean_stddev_box_coder.proto</summary> | |||
| public static partial class MeanStddevBoxCoderReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/mean_stddev_box_coder.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for MeanStddevBoxCoder. See | |||
| /// box_coders/mean_stddev_box_coder.py for details. | |||
| /// </summary> | |||
| public sealed partial class MeanStddevBoxCoder : pb::IMessage<MeanStddevBoxCoder> { | |||
| private static readonly pb::MessageParser<MeanStddevBoxCoder> _parser = new pb::MessageParser<MeanStddevBoxCoder>(() => new MeanStddevBoxCoder()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<MeanStddevBoxCoder> 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); | |||
| } | |||
| /// <summary>Field number for the "stddev" field.</summary> | |||
| public const int StddevFieldNumber = 1; | |||
| private float stddev_; | |||
| /// <summary> | |||
| /// The standard deviation used to encode and decode boxes. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,255 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/model.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/model.proto</summary> | |||
| public static partial class ModelReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/model.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Top level configuration for DetectionModels. | |||
| /// </summary> | |||
| public sealed partial class DetectionModel : pb::IMessage<DetectionModel> { | |||
| private static readonly pb::MessageParser<DetectionModel> _parser = new pb::MessageParser<DetectionModel>(() => new DetectionModel()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<DetectionModel> 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); | |||
| } | |||
| /// <summary>Field number for the "faster_rcnn" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "ssd" field.</summary> | |||
| 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_; | |||
| /// <summary>Enum of possible cases for the "model" oneof.</summary> | |||
| 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 | |||
| @@ -0,0 +1,332 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/multiscale_anchor_generator.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/multiscale_anchor_generator.proto</summary> | |||
| public static partial class MultiscaleAnchorGeneratorReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/multiscale_anchor_generator.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for RetinaNet anchor generator described in | |||
| /// https://arxiv.org/abs/1708.02002. See | |||
| /// anchor_generators/multiscale_grid_anchor_generator.py for details. | |||
| /// </summary> | |||
| public sealed partial class MultiscaleAnchorGenerator : pb::IMessage<MultiscaleAnchorGenerator> { | |||
| private static readonly pb::MessageParser<MultiscaleAnchorGenerator> _parser = new pb::MessageParser<MultiscaleAnchorGenerator>(() => new MultiscaleAnchorGenerator()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<MultiscaleAnchorGenerator> 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); | |||
| } | |||
| /// <summary>Field number for the "min_level" field.</summary> | |||
| public const int MinLevelFieldNumber = 1; | |||
| private int minLevel_; | |||
| /// <summary> | |||
| /// minimum level in feature pyramid | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int MinLevel { | |||
| get { return minLevel_; } | |||
| set { | |||
| minLevel_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_level" field.</summary> | |||
| public const int MaxLevelFieldNumber = 2; | |||
| private int maxLevel_; | |||
| /// <summary> | |||
| /// maximum level in feature pyramid | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int MaxLevel { | |||
| get { return maxLevel_; } | |||
| set { | |||
| maxLevel_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "anchor_scale" field.</summary> | |||
| public const int AnchorScaleFieldNumber = 3; | |||
| private float anchorScale_; | |||
| /// <summary> | |||
| /// Scale of anchor to feature stride | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float AnchorScale { | |||
| get { return anchorScale_; } | |||
| set { | |||
| anchorScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "aspect_ratios" field.</summary> | |||
| public const int AspectRatiosFieldNumber = 4; | |||
| private static readonly pb::FieldCodec<float> _repeated_aspectRatios_codec | |||
| = pb::FieldCodec.ForFloat(34); | |||
| private readonly pbc::RepeatedField<float> aspectRatios_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// Aspect ratios for anchors at each grid point. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> AspectRatios { | |||
| get { return aspectRatios_; } | |||
| } | |||
| /// <summary>Field number for the "scales_per_octave" field.</summary> | |||
| public const int ScalesPerOctaveFieldNumber = 5; | |||
| private int scalesPerOctave_; | |||
| /// <summary> | |||
| /// Number of intermediate scale each scale octave | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int ScalesPerOctave { | |||
| get { return scalesPerOctave_; } | |||
| set { | |||
| scalesPerOctave_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "normalize_coordinates" field.</summary> | |||
| public const int NormalizeCoordinatesFieldNumber = 6; | |||
| private bool normalizeCoordinates_; | |||
| /// <summary> | |||
| /// Whether to produce anchors in normalized coordinates. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,352 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/pipeline.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/pipeline.proto</summary> | |||
| public static partial class PipelineReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/pipeline.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Convenience message for configuring a training and eval pipeline. Allows all | |||
| /// of the pipeline parameters to be configured from one file. | |||
| /// Next id: 7 | |||
| /// </summary> | |||
| public sealed partial class TrainEvalPipelineConfig : pb::IMessage<TrainEvalPipelineConfig> { | |||
| private static readonly pb::MessageParser<TrainEvalPipelineConfig> _parser = new pb::MessageParser<TrainEvalPipelineConfig>(() => new TrainEvalPipelineConfig()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<TrainEvalPipelineConfig> 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); | |||
| } | |||
| /// <summary>Field number for the "model" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "train_config" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "train_input_reader" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "eval_config" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "eval_input_reader" field.</summary> | |||
| public const int EvalInputReaderFieldNumber = 5; | |||
| private static readonly pb::FieldCodec<global::Tensorflow.Models.ObjectDetection.Protos.InputReader> _repeated_evalInputReader_codec | |||
| = pb::FieldCodec.ForMessage(42, global::Tensorflow.Models.ObjectDetection.Protos.InputReader.Parser); | |||
| private readonly pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.InputReader> evalInputReader_ = new pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.InputReader>(); | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.InputReader> EvalInputReader { | |||
| get { return evalInputReader_; } | |||
| } | |||
| /// <summary>Field number for the "graph_rewriter" field.</summary> | |||
| 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 | |||
| @@ -0,0 +1,685 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/post_processing.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/post_processing.proto</summary> | |||
| public static partial class PostProcessingReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/post_processing.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for non-max-suppression operation on a batch of | |||
| /// detections. | |||
| /// </summary> | |||
| public sealed partial class BatchNonMaxSuppression : pb::IMessage<BatchNonMaxSuppression> { | |||
| private static readonly pb::MessageParser<BatchNonMaxSuppression> _parser = new pb::MessageParser<BatchNonMaxSuppression>(() => new BatchNonMaxSuppression()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<BatchNonMaxSuppression> 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); | |||
| } | |||
| /// <summary>Field number for the "score_threshold" field.</summary> | |||
| public const int ScoreThresholdFieldNumber = 1; | |||
| private float scoreThreshold_; | |||
| /// <summary> | |||
| /// Scalar threshold for score (low scoring boxes are removed). | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float ScoreThreshold { | |||
| get { return scoreThreshold_; } | |||
| set { | |||
| scoreThreshold_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "iou_threshold" field.</summary> | |||
| public const int IouThresholdFieldNumber = 2; | |||
| private float iouThreshold_; | |||
| /// <summary> | |||
| /// Scalar threshold for IOU (boxes that have high IOU overlap | |||
| /// with previously selected boxes are removed). | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float IouThreshold { | |||
| get { return iouThreshold_; } | |||
| set { | |||
| iouThreshold_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_detections_per_class" field.</summary> | |||
| public const int MaxDetectionsPerClassFieldNumber = 3; | |||
| private int maxDetectionsPerClass_; | |||
| /// <summary> | |||
| /// Maximum number of detections to retain per class. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int MaxDetectionsPerClass { | |||
| get { return maxDetectionsPerClass_; } | |||
| set { | |||
| maxDetectionsPerClass_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_total_detections" field.</summary> | |||
| public const int MaxTotalDetectionsFieldNumber = 5; | |||
| private int maxTotalDetections_; | |||
| /// <summary> | |||
| /// Maximum number of detections to retain across all classes. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int MaxTotalDetections { | |||
| get { return maxTotalDetections_; } | |||
| set { | |||
| maxTotalDetections_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "use_static_shapes" field.</summary> | |||
| public const int UseStaticShapesFieldNumber = 6; | |||
| private bool useStaticShapes_; | |||
| /// <summary> | |||
| /// Whether to use the implementation of NMS that guarantees static shapes. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool UseStaticShapes { | |||
| get { return useStaticShapes_; } | |||
| set { | |||
| useStaticShapes_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "use_class_agnostic_nms" field.</summary> | |||
| public const int UseClassAgnosticNmsFieldNumber = 7; | |||
| private bool useClassAgnosticNms_; | |||
| /// <summary> | |||
| /// 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. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool UseClassAgnosticNms { | |||
| get { return useClassAgnosticNms_; } | |||
| set { | |||
| useClassAgnosticNms_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_classes_per_detection" field.</summary> | |||
| public const int MaxClassesPerDetectionFieldNumber = 8; | |||
| private int maxClassesPerDetection_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int MaxClassesPerDetection { | |||
| get { return maxClassesPerDetection_; } | |||
| set { | |||
| maxClassesPerDetection_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "soft_nms_sigma" field.</summary> | |||
| public const int SoftNmsSigmaFieldNumber = 9; | |||
| private float softNmsSigma_; | |||
| /// <summary> | |||
| /// Soft NMS sigma parameter; Bodla et al, https://arxiv.org/abs/1704.04503) | |||
| /// </summary> | |||
| [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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// Configuration proto for post-processing predicted boxes and | |||
| /// scores. | |||
| /// </summary> | |||
| public sealed partial class PostProcessing : pb::IMessage<PostProcessing> { | |||
| private static readonly pb::MessageParser<PostProcessing> _parser = new pb::MessageParser<PostProcessing>(() => new PostProcessing()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<PostProcessing> 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); | |||
| } | |||
| /// <summary>Field number for the "batch_non_max_suppression" field.</summary> | |||
| public const int BatchNonMaxSuppressionFieldNumber = 1; | |||
| private global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression batchNonMaxSuppression_; | |||
| /// <summary> | |||
| /// Non max suppression parameters. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public global::Tensorflow.Models.ObjectDetection.Protos.BatchNonMaxSuppression BatchNonMaxSuppression { | |||
| get { return batchNonMaxSuppression_; } | |||
| set { | |||
| batchNonMaxSuppression_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "score_converter" field.</summary> | |||
| public const int ScoreConverterFieldNumber = 2; | |||
| private global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Types.ScoreConverter scoreConverter_ = 0; | |||
| /// <summary> | |||
| /// Score converter to use. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public global::Tensorflow.Models.ObjectDetection.Protos.PostProcessing.Types.ScoreConverter ScoreConverter { | |||
| get { return scoreConverter_; } | |||
| set { | |||
| scoreConverter_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "logit_scale" field.</summary> | |||
| public const int LogitScaleFieldNumber = 3; | |||
| private float logitScale_; | |||
| /// <summary> | |||
| /// Scale logit (input) value before conversion in post-processing step. | |||
| /// Typically used for softmax distillation, though can be used to scale for | |||
| /// other reasons. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float LogitScale { | |||
| get { return logitScale_; } | |||
| set { | |||
| logitScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "calibration_config" field.</summary> | |||
| public const int CalibrationConfigFieldNumber = 4; | |||
| private global::Tensorflow.Models.ObjectDetection.Protos.CalibrationConfig calibrationConfig_; | |||
| /// <summary> | |||
| /// Calibrate score outputs. Calibration is applied after score converter | |||
| /// and before non max suppression. | |||
| /// </summary> | |||
| [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 | |||
| /// <summary>Container for nested types declared in the PostProcessing message type.</summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static partial class Types { | |||
| /// <summary> | |||
| /// Enum to specify how to convert the detection scores. | |||
| /// </summary> | |||
| public enum ScoreConverter { | |||
| /// <summary> | |||
| /// Input scores equals output scores. | |||
| /// </summary> | |||
| [pbr::OriginalName("IDENTITY")] Identity = 0, | |||
| /// <summary> | |||
| /// Applies a sigmoid on input scores. | |||
| /// </summary> | |||
| [pbr::OriginalName("SIGMOID")] Sigmoid = 1, | |||
| /// <summary> | |||
| /// Applies a softmax on input scores | |||
| /// </summary> | |||
| [pbr::OriginalName("SOFTMAX")] Softmax = 2, | |||
| } | |||
| } | |||
| #endregion | |||
| } | |||
| #endregion | |||
| } | |||
| #endregion Designer generated code | |||
| @@ -0,0 +1,791 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/region_similarity_calculator.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/region_similarity_calculator.proto</summary> | |||
| public static partial class RegionSimilarityCalculatorReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/region_similarity_calculator.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for region similarity calculators. See | |||
| /// core/region_similarity_calculator.py for details. | |||
| /// </summary> | |||
| public sealed partial class RegionSimilarityCalculator : pb::IMessage<RegionSimilarityCalculator> { | |||
| private static readonly pb::MessageParser<RegionSimilarityCalculator> _parser = new pb::MessageParser<RegionSimilarityCalculator>(() => new RegionSimilarityCalculator()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<RegionSimilarityCalculator> 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); | |||
| } | |||
| /// <summary>Field number for the "neg_sq_dist_similarity" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "iou_similarity" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "ioa_similarity" field.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "thresholded_iou_similarity" field.</summary> | |||
| 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_; | |||
| /// <summary>Enum of possible cases for the "region_similarity" oneof.</summary> | |||
| 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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// Configuration for negative squared distance similarity calculator. | |||
| /// </summary> | |||
| public sealed partial class NegSqDistSimilarity : pb::IMessage<NegSqDistSimilarity> { | |||
| private static readonly pb::MessageParser<NegSqDistSimilarity> _parser = new pb::MessageParser<NegSqDistSimilarity>(() => new NegSqDistSimilarity()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<NegSqDistSimilarity> 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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// Configuration for intersection-over-union (IOU) similarity calculator. | |||
| /// </summary> | |||
| public sealed partial class IouSimilarity : pb::IMessage<IouSimilarity> { | |||
| private static readonly pb::MessageParser<IouSimilarity> _parser = new pb::MessageParser<IouSimilarity>(() => new IouSimilarity()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<IouSimilarity> 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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// Configuration for intersection-over-area (IOA) similarity calculator. | |||
| /// </summary> | |||
| public sealed partial class IoaSimilarity : pb::IMessage<IoaSimilarity> { | |||
| private static readonly pb::MessageParser<IoaSimilarity> _parser = new pb::MessageParser<IoaSimilarity>(() => new IoaSimilarity()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<IoaSimilarity> 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; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| /// <summary> | |||
| /// Configuration for thresholded-intersection-over-union similarity calculator. | |||
| /// </summary> | |||
| public sealed partial class ThresholdedIouSimilarity : pb::IMessage<ThresholdedIouSimilarity> { | |||
| private static readonly pb::MessageParser<ThresholdedIouSimilarity> _parser = new pb::MessageParser<ThresholdedIouSimilarity>(() => new ThresholdedIouSimilarity()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<ThresholdedIouSimilarity> 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); | |||
| } | |||
| /// <summary>Field number for the "iou_threshold" field.</summary> | |||
| public const int IouThresholdFieldNumber = 1; | |||
| private float iouThreshold_; | |||
| /// <summary> | |||
| /// IOU threshold used for filtering scores. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,240 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/square_box_coder.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/square_box_coder.proto</summary> | |||
| public static partial class SquareBoxCoderReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/square_box_coder.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for SquareBoxCoder. See | |||
| /// box_coders/square_box_coder.py for details. | |||
| /// </summary> | |||
| public sealed partial class SquareBoxCoder : pb::IMessage<SquareBoxCoder> { | |||
| private static readonly pb::MessageParser<SquareBoxCoder> _parser = new pb::MessageParser<SquareBoxCoder>(() => new SquareBoxCoder()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<SquareBoxCoder> 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); | |||
| } | |||
| /// <summary>Field number for the "y_scale" field.</summary> | |||
| public const int YScaleFieldNumber = 1; | |||
| private float yScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box center. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float YScale { | |||
| get { return yScale_; } | |||
| set { | |||
| yScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "x_scale" field.</summary> | |||
| public const int XScaleFieldNumber = 2; | |||
| private float xScale_; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float XScale { | |||
| get { return xScale_; } | |||
| set { | |||
| xScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "length_scale" field.</summary> | |||
| public const int LengthScaleFieldNumber = 3; | |||
| private float lengthScale_; | |||
| /// <summary> | |||
| /// Scale factor for anchor encoded box length. | |||
| /// </summary> | |||
| [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 | |||
| @@ -0,0 +1,526 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/ssd_anchor_generator.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/ssd_anchor_generator.proto</summary> | |||
| public static partial class SsdAnchorGeneratorReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/ssd_anchor_generator.proto</summary> | |||
| 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 | |||
| /// <summary> | |||
| /// Configuration proto for SSD anchor generator described in | |||
| /// https://arxiv.org/abs/1512.02325. See | |||
| /// anchor_generators/multiple_grid_anchor_generator.py for details. | |||
| /// </summary> | |||
| public sealed partial class SsdAnchorGenerator : pb::IMessage<SsdAnchorGenerator> { | |||
| private static readonly pb::MessageParser<SsdAnchorGenerator> _parser = new pb::MessageParser<SsdAnchorGenerator>(() => new SsdAnchorGenerator()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<SsdAnchorGenerator> 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); | |||
| } | |||
| /// <summary>Field number for the "num_layers" field.</summary> | |||
| public const int NumLayersFieldNumber = 1; | |||
| private int numLayers_; | |||
| /// <summary> | |||
| /// Number of grid layers to create anchors for. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int NumLayers { | |||
| get { return numLayers_; } | |||
| set { | |||
| numLayers_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "min_scale" field.</summary> | |||
| public const int MinScaleFieldNumber = 2; | |||
| private float minScale_; | |||
| /// <summary> | |||
| /// Scale of anchors corresponding to finest resolution. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float MinScale { | |||
| get { return minScale_; } | |||
| set { | |||
| minScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "max_scale" field.</summary> | |||
| public const int MaxScaleFieldNumber = 3; | |||
| private float maxScale_; | |||
| /// <summary> | |||
| /// Scale of anchors corresponding to coarsest resolution | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float MaxScale { | |||
| get { return maxScale_; } | |||
| set { | |||
| maxScale_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "scales" field.</summary> | |||
| public const int ScalesFieldNumber = 12; | |||
| private static readonly pb::FieldCodec<float> _repeated_scales_codec | |||
| = pb::FieldCodec.ForFloat(98); | |||
| private readonly pbc::RepeatedField<float> scales_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// 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. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> Scales { | |||
| get { return scales_; } | |||
| } | |||
| /// <summary>Field number for the "aspect_ratios" field.</summary> | |||
| public const int AspectRatiosFieldNumber = 4; | |||
| private static readonly pb::FieldCodec<float> _repeated_aspectRatios_codec | |||
| = pb::FieldCodec.ForFloat(34); | |||
| private readonly pbc::RepeatedField<float> aspectRatios_ = new pbc::RepeatedField<float>(); | |||
| /// <summary> | |||
| /// Aspect ratios for anchors at each grid point. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<float> AspectRatios { | |||
| get { return aspectRatios_; } | |||
| } | |||
| /// <summary>Field number for the "interpolated_scale_aspect_ratio" field.</summary> | |||
| public const int InterpolatedScaleAspectRatioFieldNumber = 13; | |||
| private float interpolatedScaleAspectRatio_; | |||
| /// <summary> | |||
| /// When this aspect ratio is greater than 0, then an additional | |||
| /// anchor, with an interpolated scale is added with this aspect ratio. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float InterpolatedScaleAspectRatio { | |||
| get { return interpolatedScaleAspectRatio_; } | |||
| set { | |||
| interpolatedScaleAspectRatio_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "reduce_boxes_in_lowest_layer" field.</summary> | |||
| public const int ReduceBoxesInLowestLayerFieldNumber = 5; | |||
| private bool reduceBoxesInLowestLayer_; | |||
| /// <summary> | |||
| /// 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). | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public bool ReduceBoxesInLowestLayer { | |||
| get { return reduceBoxesInLowestLayer_; } | |||
| set { | |||
| reduceBoxesInLowestLayer_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "base_anchor_height" field.</summary> | |||
| public const int BaseAnchorHeightFieldNumber = 6; | |||
| private float baseAnchorHeight_; | |||
| /// <summary> | |||
| /// The base anchor size in height dimension. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float BaseAnchorHeight { | |||
| get { return baseAnchorHeight_; } | |||
| set { | |||
| baseAnchorHeight_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "base_anchor_width" field.</summary> | |||
| public const int BaseAnchorWidthFieldNumber = 7; | |||
| private float baseAnchorWidth_; | |||
| /// <summary> | |||
| /// The base anchor size in width dimension. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public float BaseAnchorWidth { | |||
| get { return baseAnchorWidth_; } | |||
| set { | |||
| baseAnchorWidth_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "height_stride" field.</summary> | |||
| public const int HeightStrideFieldNumber = 8; | |||
| private static readonly pb::FieldCodec<int> _repeated_heightStride_codec | |||
| = pb::FieldCodec.ForInt32(66); | |||
| private readonly pbc::RepeatedField<int> heightStride_ = new pbc::RepeatedField<int>(); | |||
| /// <summary> | |||
| /// 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. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<int> HeightStride { | |||
| get { return heightStride_; } | |||
| } | |||
| /// <summary>Field number for the "width_stride" field.</summary> | |||
| public const int WidthStrideFieldNumber = 9; | |||
| private static readonly pb::FieldCodec<int> _repeated_widthStride_codec | |||
| = pb::FieldCodec.ForInt32(74); | |||
| private readonly pbc::RepeatedField<int> widthStride_ = new pbc::RepeatedField<int>(); | |||
| /// <summary> | |||
| /// 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. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<int> WidthStride { | |||
| get { return widthStride_; } | |||
| } | |||
| /// <summary>Field number for the "height_offset" field.</summary> | |||
| public const int HeightOffsetFieldNumber = 10; | |||
| private static readonly pb::FieldCodec<int> _repeated_heightOffset_codec | |||
| = pb::FieldCodec.ForInt32(82); | |||
| private readonly pbc::RepeatedField<int> heightOffset_ = new pbc::RepeatedField<int>(); | |||
| /// <summary> | |||
| /// Anchor height offset in pixels for each layer. The length of this field is | |||
| /// expected to be equal to the value of num_layers. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<int> HeightOffset { | |||
| get { return heightOffset_; } | |||
| } | |||
| /// <summary>Field number for the "width_offset" field.</summary> | |||
| public const int WidthOffsetFieldNumber = 11; | |||
| private static readonly pb::FieldCodec<int> _repeated_widthOffset_codec | |||
| = pb::FieldCodec.ForInt32(90); | |||
| private readonly pbc::RepeatedField<int> widthOffset_ = new pbc::RepeatedField<int>(); | |||
| /// <summary> | |||
| /// Anchor width offset in pixels for each layer. The length of this field is | |||
| /// expected to be equal to the value of num_layers. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<int> 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 | |||
| @@ -0,0 +1,365 @@ | |||
| // <auto-generated> | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: object_detection/protos/string_int_label_map.proto | |||
| // </auto-generated> | |||
| #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 { | |||
| /// <summary>Holder for reflection information generated from object_detection/protos/string_int_label_map.proto</summary> | |||
| public static partial class StringIntLabelMapReflection { | |||
| #region Descriptor | |||
| /// <summary>File descriptor for object_detection/protos/string_int_label_map.proto</summary> | |||
| 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<StringIntLabelMapItem> { | |||
| private static readonly pb::MessageParser<StringIntLabelMapItem> _parser = new pb::MessageParser<StringIntLabelMapItem>(() => new StringIntLabelMapItem()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<StringIntLabelMapItem> 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); | |||
| } | |||
| /// <summary>Field number for the "name" field.</summary> | |||
| public const int NameFieldNumber = 1; | |||
| private string name_ = ""; | |||
| /// <summary> | |||
| /// String name. The most common practice is to set this to a MID or synsets | |||
| /// id. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public string Name { | |||
| get { return name_; } | |||
| set { | |||
| name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); | |||
| } | |||
| } | |||
| /// <summary>Field number for the "id" field.</summary> | |||
| public const int IdFieldNumber = 2; | |||
| private int id_; | |||
| /// <summary> | |||
| /// Integer id that maps to the string name above. Label ids should start from | |||
| /// 1. | |||
| /// </summary> | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public int Id { | |||
| get { return id_; } | |||
| set { | |||
| id_ = value; | |||
| } | |||
| } | |||
| /// <summary>Field number for the "display_name" field.</summary> | |||
| public const int DisplayNameFieldNumber = 3; | |||
| private string displayName_ = ""; | |||
| /// <summary> | |||
| /// Human readable string label. | |||
| /// </summary> | |||
| [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<StringIntLabelMap> { | |||
| private static readonly pb::MessageParser<StringIntLabelMap> _parser = new pb::MessageParser<StringIntLabelMap>(() => new StringIntLabelMap()); | |||
| private pb::UnknownFieldSet _unknownFields; | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public static pb::MessageParser<StringIntLabelMap> 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); | |||
| } | |||
| /// <summary>Field number for the "item" field.</summary> | |||
| public const int ItemFieldNumber = 1; | |||
| private static readonly pb::FieldCodec<global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem> _repeated_item_codec | |||
| = pb::FieldCodec.ForMessage(10, global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem.Parser); | |||
| private readonly pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem> item_ = new pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem>(); | |||
| [global::System.Diagnostics.DebuggerNonUserCodeAttribute] | |||
| public pbc::RepeatedField<global::Tensorflow.Models.ObjectDetection.Protos.StringIntLabelMapItem> 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 | |||
| @@ -0,0 +1,13 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <PropertyGroup> | |||
| <TargetFramework>netcoreapp2.2</TargetFramework> | |||
| <AssemblyName>TensorFlow.Models</AssemblyName> | |||
| <RootNamespace>Tensorflow.Models</RootNamespace> | |||
| </PropertyGroup> | |||
| <ItemGroup> | |||
| <ProjectReference Include="..\TensorFlowNET.Core\TensorFlowNET.Core.csproj" /> | |||
| </ItemGroup> | |||
| </Project> | |||
| @@ -28,4 +28,8 @@ | |||
| <ProjectReference Include="..\..\src\TensorFlowText\TensorFlowText.csproj" /> | |||
| <ProjectReference Include="..\..\src\TensorFlowHub\TensorFlowHub.csproj" /> | |||
| </ItemGroup> | |||
| <ItemGroup> | |||
| <Folder Include="ImageProcessing\ObjectDetection\" /> | |||
| </ItemGroup> | |||
| </Project> | |||