You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArgmaxMatcher.cs 13 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: object_detection/protos/argmax_matcher.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow.Models.ObjectDetection.Protos {
  12. /// <summary>Holder for reflection information generated from object_detection/protos/argmax_matcher.proto</summary>
  13. public static partial class ArgmaxMatcherReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for object_detection/protos/argmax_matcher.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static ArgmaxMatcherReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CixvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9hcmdtYXhfbWF0Y2hlci5wcm90",
  24. "bxIXb2JqZWN0X2RldGVjdGlvbi5wcm90b3MixwEKDUFyZ01heE1hdGNoZXIS",
  25. "GQoRbWF0Y2hlZF90aHJlc2hvbGQYASABKAISGwoTdW5tYXRjaGVkX3RocmVz",
  26. "aG9sZBgCIAEoAhIZChFpZ25vcmVfdGhyZXNob2xkcxgDIAEoCBImCh5uZWdh",
  27. "dGl2ZXNfbG93ZXJfdGhhbl91bm1hdGNoZWQYBCABKAgSIAoYZm9yY2VfbWF0",
  28. "Y2hfZm9yX2VhY2hfcm93GAUgASgIEhkKEXVzZV9tYXRtdWxfZ2F0aGVyGAYg",
  29. "ASgIYgZwcm90bzM="));
  30. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  31. new pbr::FileDescriptor[] { },
  32. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  33. 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)
  34. }));
  35. }
  36. #endregion
  37. }
  38. #region Messages
  39. /// <summary>
  40. /// Configuration proto for ArgMaxMatcher. See
  41. /// matchers/argmax_matcher.py for details.
  42. /// </summary>
  43. public sealed partial class ArgMaxMatcher : pb::IMessage<ArgMaxMatcher> {
  44. private static readonly pb::MessageParser<ArgMaxMatcher> _parser = new pb::MessageParser<ArgMaxMatcher>(() => new ArgMaxMatcher());
  45. private pb::UnknownFieldSet _unknownFields;
  46. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  47. public static pb::MessageParser<ArgMaxMatcher> Parser { get { return _parser; } }
  48. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  49. public static pbr::MessageDescriptor Descriptor {
  50. get { return global::Tensorflow.Models.ObjectDetection.Protos.ArgmaxMatcherReflection.Descriptor.MessageTypes[0]; }
  51. }
  52. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  53. pbr::MessageDescriptor pb::IMessage.Descriptor {
  54. get { return Descriptor; }
  55. }
  56. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  57. public ArgMaxMatcher() {
  58. OnConstruction();
  59. }
  60. partial void OnConstruction();
  61. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  62. public ArgMaxMatcher(ArgMaxMatcher other) : this() {
  63. matchedThreshold_ = other.matchedThreshold_;
  64. unmatchedThreshold_ = other.unmatchedThreshold_;
  65. ignoreThresholds_ = other.ignoreThresholds_;
  66. negativesLowerThanUnmatched_ = other.negativesLowerThanUnmatched_;
  67. forceMatchForEachRow_ = other.forceMatchForEachRow_;
  68. useMatmulGather_ = other.useMatmulGather_;
  69. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  70. }
  71. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  72. public ArgMaxMatcher Clone() {
  73. return new ArgMaxMatcher(this);
  74. }
  75. /// <summary>Field number for the "matched_threshold" field.</summary>
  76. public const int MatchedThresholdFieldNumber = 1;
  77. private float matchedThreshold_;
  78. /// <summary>
  79. /// Threshold for positive matches.
  80. /// </summary>
  81. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  82. public float MatchedThreshold {
  83. get { return matchedThreshold_; }
  84. set {
  85. matchedThreshold_ = value;
  86. }
  87. }
  88. /// <summary>Field number for the "unmatched_threshold" field.</summary>
  89. public const int UnmatchedThresholdFieldNumber = 2;
  90. private float unmatchedThreshold_;
  91. /// <summary>
  92. /// Threshold for negative matches.
  93. /// </summary>
  94. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  95. public float UnmatchedThreshold {
  96. get { return unmatchedThreshold_; }
  97. set {
  98. unmatchedThreshold_ = value;
  99. }
  100. }
  101. /// <summary>Field number for the "ignore_thresholds" field.</summary>
  102. public const int IgnoreThresholdsFieldNumber = 3;
  103. private bool ignoreThresholds_;
  104. /// <summary>
  105. /// Whether to construct ArgMaxMatcher without thresholds.
  106. /// </summary>
  107. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  108. public bool IgnoreThresholds {
  109. get { return ignoreThresholds_; }
  110. set {
  111. ignoreThresholds_ = value;
  112. }
  113. }
  114. /// <summary>Field number for the "negatives_lower_than_unmatched" field.</summary>
  115. public const int NegativesLowerThanUnmatchedFieldNumber = 4;
  116. private bool negativesLowerThanUnmatched_;
  117. /// <summary>
  118. /// If True then negative matches are the ones below the unmatched_threshold,
  119. /// whereas ignored matches are in between the matched and umatched
  120. /// threshold. If False, then negative matches are in between the matched
  121. /// and unmatched threshold, and everything lower than unmatched is ignored.
  122. /// </summary>
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. public bool NegativesLowerThanUnmatched {
  125. get { return negativesLowerThanUnmatched_; }
  126. set {
  127. negativesLowerThanUnmatched_ = value;
  128. }
  129. }
  130. /// <summary>Field number for the "force_match_for_each_row" field.</summary>
  131. public const int ForceMatchForEachRowFieldNumber = 5;
  132. private bool forceMatchForEachRow_;
  133. /// <summary>
  134. /// Whether to ensure each row is matched to at least one column.
  135. /// </summary>
  136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  137. public bool ForceMatchForEachRow {
  138. get { return forceMatchForEachRow_; }
  139. set {
  140. forceMatchForEachRow_ = value;
  141. }
  142. }
  143. /// <summary>Field number for the "use_matmul_gather" field.</summary>
  144. public const int UseMatmulGatherFieldNumber = 6;
  145. private bool useMatmulGather_;
  146. /// <summary>
  147. /// Force constructed match objects to use matrix multiplication based gather
  148. /// instead of standard tf.gather
  149. /// </summary>
  150. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  151. public bool UseMatmulGather {
  152. get { return useMatmulGather_; }
  153. set {
  154. useMatmulGather_ = value;
  155. }
  156. }
  157. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  158. public override bool Equals(object other) {
  159. return Equals(other as ArgMaxMatcher);
  160. }
  161. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  162. public bool Equals(ArgMaxMatcher other) {
  163. if (ReferenceEquals(other, null)) {
  164. return false;
  165. }
  166. if (ReferenceEquals(other, this)) {
  167. return true;
  168. }
  169. if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(MatchedThreshold, other.MatchedThreshold)) return false;
  170. if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(UnmatchedThreshold, other.UnmatchedThreshold)) return false;
  171. if (IgnoreThresholds != other.IgnoreThresholds) return false;
  172. if (NegativesLowerThanUnmatched != other.NegativesLowerThanUnmatched) return false;
  173. if (ForceMatchForEachRow != other.ForceMatchForEachRow) return false;
  174. if (UseMatmulGather != other.UseMatmulGather) return false;
  175. return Equals(_unknownFields, other._unknownFields);
  176. }
  177. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  178. public override int GetHashCode() {
  179. int hash = 1;
  180. if (MatchedThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(MatchedThreshold);
  181. if (UnmatchedThreshold != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(UnmatchedThreshold);
  182. if (IgnoreThresholds != false) hash ^= IgnoreThresholds.GetHashCode();
  183. if (NegativesLowerThanUnmatched != false) hash ^= NegativesLowerThanUnmatched.GetHashCode();
  184. if (ForceMatchForEachRow != false) hash ^= ForceMatchForEachRow.GetHashCode();
  185. if (UseMatmulGather != false) hash ^= UseMatmulGather.GetHashCode();
  186. if (_unknownFields != null) {
  187. hash ^= _unknownFields.GetHashCode();
  188. }
  189. return hash;
  190. }
  191. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  192. public override string ToString() {
  193. return pb::JsonFormatter.ToDiagnosticString(this);
  194. }
  195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  196. public void WriteTo(pb::CodedOutputStream output) {
  197. if (MatchedThreshold != 0F) {
  198. output.WriteRawTag(13);
  199. output.WriteFloat(MatchedThreshold);
  200. }
  201. if (UnmatchedThreshold != 0F) {
  202. output.WriteRawTag(21);
  203. output.WriteFloat(UnmatchedThreshold);
  204. }
  205. if (IgnoreThresholds != false) {
  206. output.WriteRawTag(24);
  207. output.WriteBool(IgnoreThresholds);
  208. }
  209. if (NegativesLowerThanUnmatched != false) {
  210. output.WriteRawTag(32);
  211. output.WriteBool(NegativesLowerThanUnmatched);
  212. }
  213. if (ForceMatchForEachRow != false) {
  214. output.WriteRawTag(40);
  215. output.WriteBool(ForceMatchForEachRow);
  216. }
  217. if (UseMatmulGather != false) {
  218. output.WriteRawTag(48);
  219. output.WriteBool(UseMatmulGather);
  220. }
  221. if (_unknownFields != null) {
  222. _unknownFields.WriteTo(output);
  223. }
  224. }
  225. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  226. public int CalculateSize() {
  227. int size = 0;
  228. if (MatchedThreshold != 0F) {
  229. size += 1 + 4;
  230. }
  231. if (UnmatchedThreshold != 0F) {
  232. size += 1 + 4;
  233. }
  234. if (IgnoreThresholds != false) {
  235. size += 1 + 1;
  236. }
  237. if (NegativesLowerThanUnmatched != false) {
  238. size += 1 + 1;
  239. }
  240. if (ForceMatchForEachRow != false) {
  241. size += 1 + 1;
  242. }
  243. if (UseMatmulGather != false) {
  244. size += 1 + 1;
  245. }
  246. if (_unknownFields != null) {
  247. size += _unknownFields.CalculateSize();
  248. }
  249. return size;
  250. }
  251. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  252. public void MergeFrom(ArgMaxMatcher other) {
  253. if (other == null) {
  254. return;
  255. }
  256. if (other.MatchedThreshold != 0F) {
  257. MatchedThreshold = other.MatchedThreshold;
  258. }
  259. if (other.UnmatchedThreshold != 0F) {
  260. UnmatchedThreshold = other.UnmatchedThreshold;
  261. }
  262. if (other.IgnoreThresholds != false) {
  263. IgnoreThresholds = other.IgnoreThresholds;
  264. }
  265. if (other.NegativesLowerThanUnmatched != false) {
  266. NegativesLowerThanUnmatched = other.NegativesLowerThanUnmatched;
  267. }
  268. if (other.ForceMatchForEachRow != false) {
  269. ForceMatchForEachRow = other.ForceMatchForEachRow;
  270. }
  271. if (other.UseMatmulGather != false) {
  272. UseMatmulGather = other.UseMatmulGather;
  273. }
  274. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  275. }
  276. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  277. public void MergeFrom(pb::CodedInputStream input) {
  278. uint tag;
  279. while ((tag = input.ReadTag()) != 0) {
  280. switch(tag) {
  281. default:
  282. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  283. break;
  284. case 13: {
  285. MatchedThreshold = input.ReadFloat();
  286. break;
  287. }
  288. case 21: {
  289. UnmatchedThreshold = input.ReadFloat();
  290. break;
  291. }
  292. case 24: {
  293. IgnoreThresholds = input.ReadBool();
  294. break;
  295. }
  296. case 32: {
  297. NegativesLowerThanUnmatched = input.ReadBool();
  298. break;
  299. }
  300. case 40: {
  301. ForceMatchForEachRow = input.ReadBool();
  302. break;
  303. }
  304. case 48: {
  305. UseMatmulGather = input.ReadBool();
  306. break;
  307. }
  308. }
  309. }
  310. }
  311. }
  312. #endregion
  313. }
  314. #endregion Designer generated code