// // Generated by the protocol buffer compiler. DO NOT EDIT! // source: mediapipe/util/tracking/box_detector.proto // #pragma warning disable 1591, 0612, 3021 #region Designer generated code using pb = global::Google.Protobuf; using pbc = global::Google.Protobuf.Collections; using pbr = global::Google.Protobuf.Reflection; using scg = global::System.Collections.Generic; namespace Mediapipe { /// Holder for reflection information generated from mediapipe/util/tracking/box_detector.proto public static partial class BoxDetectorReflection { #region Descriptor /// File descriptor for mediapipe/util/tracking/box_detector.proto public static pbr::FileDescriptor Descriptor { get { return descriptor; } } private static pbr::FileDescriptor descriptor; static BoxDetectorReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CiptZWRpYXBpcGUvdXRpbC90cmFja2luZy9ib3hfZGV0ZWN0b3IucHJvdG8S", "CW1lZGlhcGlwZRopbWVkaWFwaXBlL3V0aWwvdHJhY2tpbmcvYm94X3RyYWNr", "ZXIucHJvdG8aKW1lZGlhcGlwZS91dGlsL3RyYWNraW5nL3JlZ2lvbl9mbG93", "LnByb3RvIuwEChJCb3hEZXRlY3Rvck9wdGlvbnMSRgoKaW5kZXhfdHlwZRgB", "IAEoDjInLm1lZGlhcGlwZS5Cb3hEZXRlY3Rvck9wdGlvbnMuSW5kZXhUeXBl", "OglPUEVOQ1ZfQkYSHwoUZGV0ZWN0X2V2ZXJ5X25fZnJhbWUYAiABKAU6ATAS", "IAoRZGV0ZWN0X291dF9vZl9mb3YYBCABKAg6BWZhbHNlEk4KFGltYWdlX3F1", "ZXJ5X3NldHRpbmdzGAMgASgLMjAubWVkaWFwaXBlLkJveERldGVjdG9yT3B0", "aW9ucy5JbWFnZVF1ZXJ5U2V0dGluZ3MSGwoPZGVzY3JpcHRvcl9kaW1zGAUg", "ASgFOgI0MBIhChZtaW5fbnVtX2NvcnJlc3BvbmRlbmNlGAYgASgFOgE1EiwK", "HXJhbnNhY19yZXByb2plY3Rpb25fdGhyZXNob2xkGAcgASgCOgUwLjAwNRIf", "ChJtYXhfbWF0Y2hfZGlzdGFuY2UYCCABKAI6AzAuORIjChZtYXhfcGVyc3Bl", "Y3RpdmVfZmFjdG9yGAkgASgCOgMwLjEakwEKEkltYWdlUXVlcnlTZXR0aW5n", "cxIgChNweXJhbWlkX2JvdHRvbV9zaXplGAEgASgFOgM2NDASIQoUcHlyYW1p", "ZF9zY2FsZV9mYWN0b3IYAiABKAI6AzEuMhIdChJtYXhfcHlyYW1pZF9sZXZl", "bHMYAyABKAU6ATQSGQoMbWF4X2ZlYXR1cmVzGAQgASgFOgM1MDAiMQoJSW5k", "ZXhUeXBlEhUKEUlOREVYX1VOU1BFQ0lGSUVEEAASDQoJT1BFTkNWX0JGEAEi", "nwIKEEJveERldGVjdG9ySW5kZXgSNwoJYm94X2VudHJ5GAEgAygLMiQubWVk", "aWFwaXBlLkJveERldGVjdG9ySW5kZXguQm94RW50cnka0QEKCEJveEVudHJ5", "EkQKC2ZyYW1lX2VudHJ5GAEgAygLMi8ubWVkaWFwaXBlLkJveERldGVjdG9y", "SW5kZXguQm94RW50cnkuRnJhbWVFbnRyeRp/CgpGcmFtZUVudHJ5EiUKA2Jv", "eBgBIAEoCzIYLm1lZGlhcGlwZS5UaW1lZEJveFByb3RvEhEKCWtleXBvaW50", "cxgCIAMoAhI3CgtkZXNjcmlwdG9ycxgDIAMoCzIiLm1lZGlhcGlwZS5CaW5h", "cnlGZWF0dXJlRGVzY3JpcHRvckIxCh1jb20uZ29vZ2xlLm1lZGlhcGlwZS50", "cmFja2luZ0IQQm94RGV0ZWN0b3JQcm90bw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Mediapipe.BoxTrackerReflection.Descriptor, global::Mediapipe.RegionFlowReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.BoxDetectorOptions), global::Mediapipe.BoxDetectorOptions.Parser, new[]{ "IndexType", "DetectEveryNFrame", "DetectOutOfFov", "ImageQuerySettings", "DescriptorDims", "MinNumCorrespondence", "RansacReprojectionThreshold", "MaxMatchDistance", "MaxPerspectiveFactor" }, null, new[]{ typeof(global::Mediapipe.BoxDetectorOptions.Types.IndexType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings), global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings.Parser, new[]{ "PyramidBottomSize", "PyramidScaleFactor", "MaxPyramidLevels", "MaxFeatures" }, null, null, null, null)}), new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.BoxDetectorIndex), global::Mediapipe.BoxDetectorIndex.Parser, new[]{ "BoxEntry" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.BoxDetectorIndex.Types.BoxEntry), global::Mediapipe.BoxDetectorIndex.Types.BoxEntry.Parser, new[]{ "FrameEntry" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.BoxDetectorIndex.Types.BoxEntry.Types.FrameEntry), global::Mediapipe.BoxDetectorIndex.Types.BoxEntry.Types.FrameEntry.Parser, new[]{ "Box", "Keypoints", "Descriptors" }, null, null, null, null)})}) })); } #endregion } #region Messages public sealed partial class BoxDetectorOptions : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxDetectorOptions()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Mediapipe.BoxDetectorReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxDetectorOptions() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxDetectorOptions(BoxDetectorOptions other) : this() { _hasBits0 = other._hasBits0; indexType_ = other.indexType_; detectEveryNFrame_ = other.detectEveryNFrame_; detectOutOfFov_ = other.detectOutOfFov_; imageQuerySettings_ = other.imageQuerySettings_ != null ? other.imageQuerySettings_.Clone() : null; descriptorDims_ = other.descriptorDims_; minNumCorrespondence_ = other.minNumCorrespondence_; ransacReprojectionThreshold_ = other.ransacReprojectionThreshold_; maxMatchDistance_ = other.maxMatchDistance_; maxPerspectiveFactor_ = other.maxPerspectiveFactor_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxDetectorOptions Clone() { return new BoxDetectorOptions(this); } /// Field number for the "index_type" field. public const int IndexTypeFieldNumber = 1; private readonly static global::Mediapipe.BoxDetectorOptions.Types.IndexType IndexTypeDefaultValue = global::Mediapipe.BoxDetectorOptions.Types.IndexType.OpencvBf; private global::Mediapipe.BoxDetectorOptions.Types.IndexType indexType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Mediapipe.BoxDetectorOptions.Types.IndexType IndexType { get { if ((_hasBits0 & 1) != 0) { return indexType_; } else { return IndexTypeDefaultValue; } } set { _hasBits0 |= 1; indexType_ = value; } } /// Gets whether the "index_type" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasIndexType { get { return (_hasBits0 & 1) != 0; } } /// Clears the value of the "index_type" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearIndexType() { _hasBits0 &= ~1; } /// Field number for the "detect_every_n_frame" field. public const int DetectEveryNFrameFieldNumber = 2; private readonly static int DetectEveryNFrameDefaultValue = 0; private int detectEveryNFrame_; /// /// Decide whether we force detector run every N frame. /// 0 means detection will never be called. /// 1 means detect every frame. 2 means detect every other frame. etc.. /// Currently only applied to image query mode. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int DetectEveryNFrame { get { if ((_hasBits0 & 2) != 0) { return detectEveryNFrame_; } else { return DetectEveryNFrameDefaultValue; } } set { _hasBits0 |= 2; detectEveryNFrame_ = value; } } /// Gets whether the "detect_every_n_frame" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasDetectEveryNFrame { get { return (_hasBits0 & 2) != 0; } } /// Clears the value of the "detect_every_n_frame" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearDetectEveryNFrame() { _hasBits0 &= ~2; } /// Field number for the "detect_out_of_fov" field. public const int DetectOutOfFovFieldNumber = 4; private readonly static bool DetectOutOfFovDefaultValue = false; private bool detectOutOfFov_; /// /// Enable box detection when tracked boxes is out of FOV. Detection will be /// ceased after the detector successfully re-acquire the box. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool DetectOutOfFov { get { if ((_hasBits0 & 4) != 0) { return detectOutOfFov_; } else { return DetectOutOfFovDefaultValue; } } set { _hasBits0 |= 4; detectOutOfFov_ = value; } } /// Gets whether the "detect_out_of_fov" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasDetectOutOfFov { get { return (_hasBits0 & 4) != 0; } } /// Clears the value of the "detect_out_of_fov" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearDetectOutOfFov() { _hasBits0 &= ~4; } /// Field number for the "image_query_settings" field. public const int ImageQuerySettingsFieldNumber = 3; private global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings imageQuerySettings_; /// /// Options for detection function with image query. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings ImageQuerySettings { get { return imageQuerySettings_; } set { imageQuerySettings_ = value; } } /// Field number for the "descriptor_dims" field. public const int DescriptorDimsFieldNumber = 5; private readonly static int DescriptorDimsDefaultValue = 40; private int descriptorDims_; /// /// Dimensions (number of elements) for feature descriptor. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int DescriptorDims { get { if ((_hasBits0 & 8) != 0) { return descriptorDims_; } else { return DescriptorDimsDefaultValue; } } set { _hasBits0 |= 8; descriptorDims_ = value; } } /// Gets whether the "descriptor_dims" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasDescriptorDims { get { return (_hasBits0 & 8) != 0; } } /// Clears the value of the "descriptor_dims" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearDescriptorDims() { _hasBits0 &= ~8; } /// Field number for the "min_num_correspondence" field. public const int MinNumCorrespondenceFieldNumber = 6; private readonly static int MinNumCorrespondenceDefaultValue = 5; private int minNumCorrespondence_; /// /// Minimum number of correspondence to go through RANSAC. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int MinNumCorrespondence { get { if ((_hasBits0 & 16) != 0) { return minNumCorrespondence_; } else { return MinNumCorrespondenceDefaultValue; } } set { _hasBits0 |= 16; minNumCorrespondence_ = value; } } /// Gets whether the "min_num_correspondence" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasMinNumCorrespondence { get { return (_hasBits0 & 16) != 0; } } /// Clears the value of the "min_num_correspondence" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearMinNumCorrespondence() { _hasBits0 &= ~16; } /// Field number for the "ransac_reprojection_threshold" field. public const int RansacReprojectionThresholdFieldNumber = 7; private readonly static float RansacReprojectionThresholdDefaultValue = 0.005F; private float ransacReprojectionThreshold_; /// /// Reprojection threshold for RANSAC to find inliers. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public float RansacReprojectionThreshold { get { if ((_hasBits0 & 32) != 0) { return ransacReprojectionThreshold_; } else { return RansacReprojectionThresholdDefaultValue; } } set { _hasBits0 |= 32; ransacReprojectionThreshold_ = value; } } /// Gets whether the "ransac_reprojection_threshold" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasRansacReprojectionThreshold { get { return (_hasBits0 & 32) != 0; } } /// Clears the value of the "ransac_reprojection_threshold" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearRansacReprojectionThreshold() { _hasBits0 &= ~32; } /// Field number for the "max_match_distance" field. public const int MaxMatchDistanceFieldNumber = 8; private readonly static float MaxMatchDistanceDefaultValue = 0.9F; private float maxMatchDistance_; /// /// Max distance to match 2 NIMBY features. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public float MaxMatchDistance { get { if ((_hasBits0 & 64) != 0) { return maxMatchDistance_; } else { return MaxMatchDistanceDefaultValue; } } set { _hasBits0 |= 64; maxMatchDistance_ = value; } } /// Gets whether the "max_match_distance" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasMaxMatchDistance { get { return (_hasBits0 & 64) != 0; } } /// Clears the value of the "max_match_distance" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearMaxMatchDistance() { _hasBits0 &= ~64; } /// Field number for the "max_perspective_factor" field. public const int MaxPerspectiveFactorFieldNumber = 9; private readonly static float MaxPerspectiveFactorDefaultValue = 0.1F; private float maxPerspectiveFactor_; /// /// Max persepective change factor. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public float MaxPerspectiveFactor { get { if ((_hasBits0 & 128) != 0) { return maxPerspectiveFactor_; } else { return MaxPerspectiveFactorDefaultValue; } } set { _hasBits0 |= 128; maxPerspectiveFactor_ = value; } } /// Gets whether the "max_perspective_factor" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasMaxPerspectiveFactor { get { return (_hasBits0 & 128) != 0; } } /// Clears the value of the "max_perspective_factor" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearMaxPerspectiveFactor() { _hasBits0 &= ~128; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BoxDetectorOptions); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BoxDetectorOptions other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (IndexType != other.IndexType) return false; if (DetectEveryNFrame != other.DetectEveryNFrame) return false; if (DetectOutOfFov != other.DetectOutOfFov) return false; if (!object.Equals(ImageQuerySettings, other.ImageQuerySettings)) return false; if (DescriptorDims != other.DescriptorDims) return false; if (MinNumCorrespondence != other.MinNumCorrespondence) return false; if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(RansacReprojectionThreshold, other.RansacReprojectionThreshold)) return false; if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxMatchDistance, other.MaxMatchDistance)) return false; if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MaxPerspectiveFactor, other.MaxPerspectiveFactor)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (HasIndexType) hash ^= IndexType.GetHashCode(); if (HasDetectEveryNFrame) hash ^= DetectEveryNFrame.GetHashCode(); if (HasDetectOutOfFov) hash ^= DetectOutOfFov.GetHashCode(); if (imageQuerySettings_ != null) hash ^= ImageQuerySettings.GetHashCode(); if (HasDescriptorDims) hash ^= DescriptorDims.GetHashCode(); if (HasMinNumCorrespondence) hash ^= MinNumCorrespondence.GetHashCode(); if (HasRansacReprojectionThreshold) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(RansacReprojectionThreshold); if (HasMaxMatchDistance) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxMatchDistance); if (HasMaxPerspectiveFactor) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MaxPerspectiveFactor); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else if (HasIndexType) { output.WriteRawTag(8); output.WriteEnum((int) IndexType); } if (HasDetectEveryNFrame) { output.WriteRawTag(16); output.WriteInt32(DetectEveryNFrame); } if (imageQuerySettings_ != null) { output.WriteRawTag(26); output.WriteMessage(ImageQuerySettings); } if (HasDetectOutOfFov) { output.WriteRawTag(32); output.WriteBool(DetectOutOfFov); } if (HasDescriptorDims) { output.WriteRawTag(40); output.WriteInt32(DescriptorDims); } if (HasMinNumCorrespondence) { output.WriteRawTag(48); output.WriteInt32(MinNumCorrespondence); } if (HasRansacReprojectionThreshold) { output.WriteRawTag(61); output.WriteFloat(RansacReprojectionThreshold); } if (HasMaxMatchDistance) { output.WriteRawTag(69); output.WriteFloat(MaxMatchDistance); } if (HasMaxPerspectiveFactor) { output.WriteRawTag(77); output.WriteFloat(MaxPerspectiveFactor); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (HasIndexType) { output.WriteRawTag(8); output.WriteEnum((int) IndexType); } if (HasDetectEveryNFrame) { output.WriteRawTag(16); output.WriteInt32(DetectEveryNFrame); } if (imageQuerySettings_ != null) { output.WriteRawTag(26); output.WriteMessage(ImageQuerySettings); } if (HasDetectOutOfFov) { output.WriteRawTag(32); output.WriteBool(DetectOutOfFov); } if (HasDescriptorDims) { output.WriteRawTag(40); output.WriteInt32(DescriptorDims); } if (HasMinNumCorrespondence) { output.WriteRawTag(48); output.WriteInt32(MinNumCorrespondence); } if (HasRansacReprojectionThreshold) { output.WriteRawTag(61); output.WriteFloat(RansacReprojectionThreshold); } if (HasMaxMatchDistance) { output.WriteRawTag(69); output.WriteFloat(MaxMatchDistance); } if (HasMaxPerspectiveFactor) { output.WriteRawTag(77); output.WriteFloat(MaxPerspectiveFactor); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } } #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (HasIndexType) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) IndexType); } if (HasDetectEveryNFrame) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(DetectEveryNFrame); } if (HasDetectOutOfFov) { size += 1 + 1; } if (imageQuerySettings_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(ImageQuerySettings); } if (HasDescriptorDims) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(DescriptorDims); } if (HasMinNumCorrespondence) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinNumCorrespondence); } if (HasRansacReprojectionThreshold) { size += 1 + 4; } if (HasMaxMatchDistance) { size += 1 + 4; } if (HasMaxPerspectiveFactor) { size += 1 + 4; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BoxDetectorOptions other) { if (other == null) { return; } if (other.HasIndexType) { IndexType = other.IndexType; } if (other.HasDetectEveryNFrame) { DetectEveryNFrame = other.DetectEveryNFrame; } if (other.HasDetectOutOfFov) { DetectOutOfFov = other.DetectOutOfFov; } if (other.imageQuerySettings_ != null) { if (imageQuerySettings_ == null) { ImageQuerySettings = new global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings(); } ImageQuerySettings.MergeFrom(other.ImageQuerySettings); } if (other.HasDescriptorDims) { DescriptorDims = other.DescriptorDims; } if (other.HasMinNumCorrespondence) { MinNumCorrespondence = other.MinNumCorrespondence; } if (other.HasRansacReprojectionThreshold) { RansacReprojectionThreshold = other.RansacReprojectionThreshold; } if (other.HasMaxMatchDistance) { MaxMatchDistance = other.MaxMatchDistance; } if (other.HasMaxPerspectiveFactor) { MaxPerspectiveFactor = other.MaxPerspectiveFactor; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { IndexType = (global::Mediapipe.BoxDetectorOptions.Types.IndexType) input.ReadEnum(); break; } case 16: { DetectEveryNFrame = input.ReadInt32(); break; } case 26: { if (imageQuerySettings_ == null) { ImageQuerySettings = new global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings(); } input.ReadMessage(ImageQuerySettings); break; } case 32: { DetectOutOfFov = input.ReadBool(); break; } case 40: { DescriptorDims = input.ReadInt32(); break; } case 48: { MinNumCorrespondence = input.ReadInt32(); break; } case 61: { RansacReprojectionThreshold = input.ReadFloat(); break; } case 69: { MaxMatchDistance = input.ReadFloat(); break; } case 77: { MaxPerspectiveFactor = input.ReadFloat(); break; } } } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { IndexType = (global::Mediapipe.BoxDetectorOptions.Types.IndexType) input.ReadEnum(); break; } case 16: { DetectEveryNFrame = input.ReadInt32(); break; } case 26: { if (imageQuerySettings_ == null) { ImageQuerySettings = new global::Mediapipe.BoxDetectorOptions.Types.ImageQuerySettings(); } input.ReadMessage(ImageQuerySettings); break; } case 32: { DetectOutOfFov = input.ReadBool(); break; } case 40: { DescriptorDims = input.ReadInt32(); break; } case 48: { MinNumCorrespondence = input.ReadInt32(); break; } case 61: { RansacReprojectionThreshold = input.ReadFloat(); break; } case 69: { MaxMatchDistance = input.ReadFloat(); break; } case 77: { MaxPerspectiveFactor = input.ReadFloat(); break; } } } } #endif #region Nested types /// Container for nested types declared in the BoxDetectorOptions message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { /// /// Available types of detector's index and search structure. /// public enum IndexType { [pbr::OriginalName("INDEX_UNSPECIFIED")] IndexUnspecified = 0, /// /// BFMatcher from OpenCV /// [pbr::OriginalName("OPENCV_BF")] OpencvBf = 1, } /// /// Options only for detection from image queries. /// public sealed partial class ImageQuerySettings : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ImageQuerySettings()); private pb::UnknownFieldSet _unknownFields; private int _hasBits0; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Mediapipe.BoxDetectorOptions.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImageQuerySettings() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImageQuerySettings(ImageQuerySettings other) : this() { _hasBits0 = other._hasBits0; pyramidBottomSize_ = other.pyramidBottomSize_; pyramidScaleFactor_ = other.pyramidScaleFactor_; maxPyramidLevels_ = other.maxPyramidLevels_; maxFeatures_ = other.maxFeatures_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImageQuerySettings Clone() { return new ImageQuerySettings(this); } /// Field number for the "pyramid_bottom_size" field. public const int PyramidBottomSizeFieldNumber = 1; private readonly static int PyramidBottomSizeDefaultValue = 640; private int pyramidBottomSize_; /// /// Resize the input image's longer edge to this size. Skip resizing if the /// input size is already smaller than this size. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int PyramidBottomSize { get { if ((_hasBits0 & 1) != 0) { return pyramidBottomSize_; } else { return PyramidBottomSizeDefaultValue; } } set { _hasBits0 |= 1; pyramidBottomSize_ = value; } } /// Gets whether the "pyramid_bottom_size" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasPyramidBottomSize { get { return (_hasBits0 & 1) != 0; } } /// Clears the value of the "pyramid_bottom_size" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearPyramidBottomSize() { _hasBits0 &= ~1; } /// Field number for the "pyramid_scale_factor" field. public const int PyramidScaleFactorFieldNumber = 2; private readonly static float PyramidScaleFactorDefaultValue = 1.2F; private float pyramidScaleFactor_; /// /// Scale factor between adjacent pyramid levels. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public float PyramidScaleFactor { get { if ((_hasBits0 & 2) != 0) { return pyramidScaleFactor_; } else { return PyramidScaleFactorDefaultValue; } } set { _hasBits0 |= 2; pyramidScaleFactor_ = value; } } /// Gets whether the "pyramid_scale_factor" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasPyramidScaleFactor { get { return (_hasBits0 & 2) != 0; } } /// Clears the value of the "pyramid_scale_factor" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearPyramidScaleFactor() { _hasBits0 &= ~2; } /// Field number for the "max_pyramid_levels" field. public const int MaxPyramidLevelsFieldNumber = 3; private readonly static int MaxPyramidLevelsDefaultValue = 4; private int maxPyramidLevels_; /// /// Maximum number of pyramid levels. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int MaxPyramidLevels { get { if ((_hasBits0 & 4) != 0) { return maxPyramidLevels_; } else { return MaxPyramidLevelsDefaultValue; } } set { _hasBits0 |= 4; maxPyramidLevels_ = value; } } /// Gets whether the "max_pyramid_levels" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasMaxPyramidLevels { get { return (_hasBits0 & 4) != 0; } } /// Clears the value of the "max_pyramid_levels" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearMaxPyramidLevels() { _hasBits0 &= ~4; } /// Field number for the "max_features" field. public const int MaxFeaturesFieldNumber = 4; private readonly static int MaxFeaturesDefaultValue = 500; private int maxFeatures_; /// /// Max number of features the detector uses. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int MaxFeatures { get { if ((_hasBits0 & 8) != 0) { return maxFeatures_; } else { return MaxFeaturesDefaultValue; } } set { _hasBits0 |= 8; maxFeatures_ = value; } } /// Gets whether the "max_features" field is set [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasMaxFeatures { get { return (_hasBits0 & 8) != 0; } } /// Clears the value of the "max_features" field [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void ClearMaxFeatures() { _hasBits0 &= ~8; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ImageQuerySettings); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ImageQuerySettings other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (PyramidBottomSize != other.PyramidBottomSize) return false; if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(PyramidScaleFactor, other.PyramidScaleFactor)) return false; if (MaxPyramidLevels != other.MaxPyramidLevels) return false; if (MaxFeatures != other.MaxFeatures) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (HasPyramidBottomSize) hash ^= PyramidBottomSize.GetHashCode(); if (HasPyramidScaleFactor) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(PyramidScaleFactor); if (HasMaxPyramidLevels) hash ^= MaxPyramidLevels.GetHashCode(); if (HasMaxFeatures) hash ^= MaxFeatures.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else if (HasPyramidBottomSize) { output.WriteRawTag(8); output.WriteInt32(PyramidBottomSize); } if (HasPyramidScaleFactor) { output.WriteRawTag(21); output.WriteFloat(PyramidScaleFactor); } if (HasMaxPyramidLevels) { output.WriteRawTag(24); output.WriteInt32(MaxPyramidLevels); } if (HasMaxFeatures) { output.WriteRawTag(32); output.WriteInt32(MaxFeatures); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (HasPyramidBottomSize) { output.WriteRawTag(8); output.WriteInt32(PyramidBottomSize); } if (HasPyramidScaleFactor) { output.WriteRawTag(21); output.WriteFloat(PyramidScaleFactor); } if (HasMaxPyramidLevels) { output.WriteRawTag(24); output.WriteInt32(MaxPyramidLevels); } if (HasMaxFeatures) { output.WriteRawTag(32); output.WriteInt32(MaxFeatures); } if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } } #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (HasPyramidBottomSize) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(PyramidBottomSize); } if (HasPyramidScaleFactor) { size += 1 + 4; } if (HasMaxPyramidLevels) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxPyramidLevels); } if (HasMaxFeatures) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxFeatures); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ImageQuerySettings other) { if (other == null) { return; } if (other.HasPyramidBottomSize) { PyramidBottomSize = other.PyramidBottomSize; } if (other.HasPyramidScaleFactor) { PyramidScaleFactor = other.PyramidScaleFactor; } if (other.HasMaxPyramidLevels) { MaxPyramidLevels = other.MaxPyramidLevels; } if (other.HasMaxFeatures) { MaxFeatures = other.MaxFeatures; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { PyramidBottomSize = input.ReadInt32(); break; } case 21: { PyramidScaleFactor = input.ReadFloat(); break; } case 24: { MaxPyramidLevels = input.ReadInt32(); break; } case 32: { MaxFeatures = input.ReadInt32(); break; } } } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { PyramidBottomSize = input.ReadInt32(); break; } case 21: { PyramidScaleFactor = input.ReadFloat(); break; } case 24: { MaxPyramidLevels = input.ReadInt32(); break; } case 32: { MaxFeatures = input.ReadInt32(); break; } } } } #endif } } #endregion } /// /// Proto to hold BoxDetector's internal search index. /// public sealed partial class BoxDetectorIndex : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxDetectorIndex()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Mediapipe.BoxDetectorReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxDetectorIndex() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxDetectorIndex(BoxDetectorIndex other) : this() { boxEntry_ = other.boxEntry_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxDetectorIndex Clone() { return new BoxDetectorIndex(this); } /// Field number for the "box_entry" field. public const int BoxEntryFieldNumber = 1; private static readonly pb::FieldCodec _repeated_boxEntry_codec = pb::FieldCodec.ForMessage(10, global::Mediapipe.BoxDetectorIndex.Types.BoxEntry.Parser); private readonly pbc::RepeatedField boxEntry_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField BoxEntry { get { return boxEntry_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BoxDetectorIndex); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BoxDetectorIndex other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if(!boxEntry_.Equals(other.boxEntry_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= boxEntry_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else boxEntry_.WriteTo(output, _repeated_boxEntry_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { boxEntry_.WriteTo(ref output, _repeated_boxEntry_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } } #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += boxEntry_.CalculateSize(_repeated_boxEntry_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BoxDetectorIndex other) { if (other == null) { return; } boxEntry_.Add(other.boxEntry_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { boxEntry_.AddEntriesFrom(input, _repeated_boxEntry_codec); break; } } } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { boxEntry_.AddEntriesFrom(ref input, _repeated_boxEntry_codec); break; } } } } #endif #region Nested types /// Container for nested types declared in the BoxDetectorIndex message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { /// /// Message to hold keypoints and descriptors for each box. /// public sealed partial class BoxEntry : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoxEntry()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Mediapipe.BoxDetectorIndex.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxEntry() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxEntry(BoxEntry other) : this() { frameEntry_ = other.frameEntry_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BoxEntry Clone() { return new BoxEntry(this); } /// Field number for the "frame_entry" field. public const int FrameEntryFieldNumber = 1; private static readonly pb::FieldCodec _repeated_frameEntry_codec = pb::FieldCodec.ForMessage(10, global::Mediapipe.BoxDetectorIndex.Types.BoxEntry.Types.FrameEntry.Parser); private readonly pbc::RepeatedField frameEntry_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField FrameEntry { get { return frameEntry_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BoxEntry); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BoxEntry other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if(!frameEntry_.Equals(other.frameEntry_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= frameEntry_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else frameEntry_.WriteTo(output, _repeated_frameEntry_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { frameEntry_.WriteTo(ref output, _repeated_frameEntry_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } } #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += frameEntry_.CalculateSize(_repeated_frameEntry_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BoxEntry other) { if (other == null) { return; } frameEntry_.Add(other.frameEntry_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { frameEntry_.AddEntriesFrom(input, _repeated_frameEntry_codec); break; } } } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { frameEntry_.AddEntriesFrom(ref input, _repeated_frameEntry_codec); break; } } } } #endif #region Nested types /// Container for nested types declared in the BoxEntry message type. [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static partial class Types { /// /// Message to hold keypoints and descriptors for each appearance. One box /// could have multiple appearances to account for shape and perspective /// change, etc.. /// public sealed partial class FrameEntry : pb::IMessage #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE , pb::IBufferMessage #endif { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FrameEntry()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Mediapipe.BoxDetectorIndex.Types.BoxEntry.Descriptor.NestedTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FrameEntry() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FrameEntry(FrameEntry other) : this() { box_ = other.box_ != null ? other.box_.Clone() : null; keypoints_ = other.keypoints_.Clone(); descriptors_ = other.descriptors_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FrameEntry Clone() { return new FrameEntry(this); } /// Field number for the "box" field. public const int BoxFieldNumber = 1; private global::Mediapipe.TimedBoxProto box_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Mediapipe.TimedBoxProto Box { get { return box_; } set { box_ = value; } } /// Field number for the "keypoints" field. public const int KeypointsFieldNumber = 2; private static readonly pb::FieldCodec _repeated_keypoints_codec = pb::FieldCodec.ForFloat(21); private readonly pbc::RepeatedField keypoints_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Keypoints { get { return keypoints_; } } /// Field number for the "descriptors" field. public const int DescriptorsFieldNumber = 3; private static readonly pb::FieldCodec _repeated_descriptors_codec = pb::FieldCodec.ForMessage(26, global::Mediapipe.BinaryFeatureDescriptor.Parser); private readonly pbc::RepeatedField descriptors_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Descriptors { get { return descriptors_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FrameEntry); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FrameEntry other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } if (!object.Equals(Box, other.Box)) return false; if(!keypoints_.Equals(other.keypoints_)) return false; if(!descriptors_.Equals(other.descriptors_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (box_ != null) hash ^= Box.GetHashCode(); hash ^= keypoints_.GetHashCode(); hash ^= descriptors_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else if (box_ != null) { output.WriteRawTag(10); output.WriteMessage(Box); } keypoints_.WriteTo(output, _repeated_keypoints_codec); descriptors_.WriteTo(output, _repeated_descriptors_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (box_ != null) { output.WriteRawTag(10); output.WriteMessage(Box); } keypoints_.WriteTo(ref output, _repeated_keypoints_codec); descriptors_.WriteTo(ref output, _repeated_descriptors_codec); if (_unknownFields != null) { _unknownFields.WriteTo(ref output); } } #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (box_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Box); } size += keypoints_.CalculateSize(_repeated_keypoints_codec); size += descriptors_.CalculateSize(_repeated_descriptors_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(FrameEntry other) { if (other == null) { return; } if (other.box_ != null) { if (box_ == null) { Box = new global::Mediapipe.TimedBoxProto(); } Box.MergeFrom(other.Box); } keypoints_.Add(other.keypoints_); descriptors_.Add(other.descriptors_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { if (box_ == null) { Box = new global::Mediapipe.TimedBoxProto(); } input.ReadMessage(Box); break; } case 18: case 21: { keypoints_.AddEntriesFrom(input, _repeated_keypoints_codec); break; } case 26: { descriptors_.AddEntriesFrom(input, _repeated_descriptors_codec); break; } } } #endif } #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { if (box_ == null) { Box = new global::Mediapipe.TimedBoxProto(); } input.ReadMessage(Box); break; } case 18: case 21: { keypoints_.AddEntriesFrom(ref input, _repeated_keypoints_codec); break; } case 26: { descriptors_.AddEntriesFrom(ref input, _repeated_descriptors_codec); break; } } } } #endif } } #endregion } } #endregion } #endregion } #endregion Designer generated code