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.

GridAnchorGenerator.cs 13 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: object_detection/protos/grid_anchor_generator.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/grid_anchor_generator.proto</summary>
  13. public static partial class GridAnchorGeneratorReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for object_detection/protos/grid_anchor_generator.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static GridAnchorGeneratorReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "CjNvYmplY3RfZGV0ZWN0aW9uL3Byb3Rvcy9ncmlkX2FuY2hvcl9nZW5lcmF0",
  24. "b3IucHJvdG8SF29iamVjdF9kZXRlY3Rpb24ucHJvdG9zIrUBChNHcmlkQW5j",
  25. "aG9yR2VuZXJhdG9yEg4KBmhlaWdodBgBIAEoBRINCgV3aWR0aBgCIAEoBRIV",
  26. "Cg1oZWlnaHRfc3RyaWRlGAMgASgFEhQKDHdpZHRoX3N0cmlkZRgEIAEoBRIV",
  27. "Cg1oZWlnaHRfb2Zmc2V0GAUgASgFEhQKDHdpZHRoX29mZnNldBgGIAEoBRIO",
  28. "CgZzY2FsZXMYByADKAISFQoNYXNwZWN0X3JhdGlvcxgIIAMoAmIGcHJvdG8z"));
  29. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  30. new pbr::FileDescriptor[] { },
  31. new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
  32. 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)
  33. }));
  34. }
  35. #endregion
  36. }
  37. #region Messages
  38. /// <summary>
  39. /// Configuration proto for GridAnchorGenerator. See
  40. /// anchor_generators/grid_anchor_generator.py for details.
  41. /// </summary>
  42. public sealed partial class GridAnchorGenerator : pb::IMessage<GridAnchorGenerator> {
  43. private static readonly pb::MessageParser<GridAnchorGenerator> _parser = new pb::MessageParser<GridAnchorGenerator>(() => new GridAnchorGenerator());
  44. private pb::UnknownFieldSet _unknownFields;
  45. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  46. public static pb::MessageParser<GridAnchorGenerator> Parser { get { return _parser; } }
  47. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  48. public static pbr::MessageDescriptor Descriptor {
  49. get { return global::Tensorflow.Models.ObjectDetection.Protos.GridAnchorGeneratorReflection.Descriptor.MessageTypes[0]; }
  50. }
  51. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  52. pbr::MessageDescriptor pb::IMessage.Descriptor {
  53. get { return Descriptor; }
  54. }
  55. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  56. public GridAnchorGenerator() {
  57. OnConstruction();
  58. }
  59. partial void OnConstruction();
  60. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  61. public GridAnchorGenerator(GridAnchorGenerator other) : this() {
  62. height_ = other.height_;
  63. width_ = other.width_;
  64. heightStride_ = other.heightStride_;
  65. widthStride_ = other.widthStride_;
  66. heightOffset_ = other.heightOffset_;
  67. widthOffset_ = other.widthOffset_;
  68. scales_ = other.scales_.Clone();
  69. aspectRatios_ = other.aspectRatios_.Clone();
  70. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  71. }
  72. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  73. public GridAnchorGenerator Clone() {
  74. return new GridAnchorGenerator(this);
  75. }
  76. /// <summary>Field number for the "height" field.</summary>
  77. public const int HeightFieldNumber = 1;
  78. private int height_;
  79. /// <summary>
  80. /// Anchor height in pixels.
  81. /// </summary>
  82. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  83. public int Height {
  84. get { return height_; }
  85. set {
  86. height_ = value;
  87. }
  88. }
  89. /// <summary>Field number for the "width" field.</summary>
  90. public const int WidthFieldNumber = 2;
  91. private int width_;
  92. /// <summary>
  93. /// Anchor width in pixels.
  94. /// </summary>
  95. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  96. public int Width {
  97. get { return width_; }
  98. set {
  99. width_ = value;
  100. }
  101. }
  102. /// <summary>Field number for the "height_stride" field.</summary>
  103. public const int HeightStrideFieldNumber = 3;
  104. private int heightStride_;
  105. /// <summary>
  106. /// Anchor stride in height dimension in pixels.
  107. /// </summary>
  108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  109. public int HeightStride {
  110. get { return heightStride_; }
  111. set {
  112. heightStride_ = value;
  113. }
  114. }
  115. /// <summary>Field number for the "width_stride" field.</summary>
  116. public const int WidthStrideFieldNumber = 4;
  117. private int widthStride_;
  118. /// <summary>
  119. /// Anchor stride in width dimension in pixels.
  120. /// </summary>
  121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  122. public int WidthStride {
  123. get { return widthStride_; }
  124. set {
  125. widthStride_ = value;
  126. }
  127. }
  128. /// <summary>Field number for the "height_offset" field.</summary>
  129. public const int HeightOffsetFieldNumber = 5;
  130. private int heightOffset_;
  131. /// <summary>
  132. /// Anchor height offset in pixels.
  133. /// </summary>
  134. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  135. public int HeightOffset {
  136. get { return heightOffset_; }
  137. set {
  138. heightOffset_ = value;
  139. }
  140. }
  141. /// <summary>Field number for the "width_offset" field.</summary>
  142. public const int WidthOffsetFieldNumber = 6;
  143. private int widthOffset_;
  144. /// <summary>
  145. /// Anchor width offset in pixels.
  146. /// </summary>
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  148. public int WidthOffset {
  149. get { return widthOffset_; }
  150. set {
  151. widthOffset_ = value;
  152. }
  153. }
  154. /// <summary>Field number for the "scales" field.</summary>
  155. public const int ScalesFieldNumber = 7;
  156. private static readonly pb::FieldCodec<float> _repeated_scales_codec
  157. = pb::FieldCodec.ForFloat(58);
  158. private readonly pbc::RepeatedField<float> scales_ = new pbc::RepeatedField<float>();
  159. /// <summary>
  160. /// List of scales for the anchors.
  161. /// </summary>
  162. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  163. public pbc::RepeatedField<float> Scales {
  164. get { return scales_; }
  165. }
  166. /// <summary>Field number for the "aspect_ratios" field.</summary>
  167. public const int AspectRatiosFieldNumber = 8;
  168. private static readonly pb::FieldCodec<float> _repeated_aspectRatios_codec
  169. = pb::FieldCodec.ForFloat(66);
  170. private readonly pbc::RepeatedField<float> aspectRatios_ = new pbc::RepeatedField<float>();
  171. /// <summary>
  172. /// List of aspect ratios for the anchors.
  173. /// </summary>
  174. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  175. public pbc::RepeatedField<float> AspectRatios {
  176. get { return aspectRatios_; }
  177. }
  178. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  179. public override bool Equals(object other) {
  180. return Equals(other as GridAnchorGenerator);
  181. }
  182. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  183. public bool Equals(GridAnchorGenerator other) {
  184. if (ReferenceEquals(other, null)) {
  185. return false;
  186. }
  187. if (ReferenceEquals(other, this)) {
  188. return true;
  189. }
  190. if (Height != other.Height) return false;
  191. if (Width != other.Width) return false;
  192. if (HeightStride != other.HeightStride) return false;
  193. if (WidthStride != other.WidthStride) return false;
  194. if (HeightOffset != other.HeightOffset) return false;
  195. if (WidthOffset != other.WidthOffset) return false;
  196. if(!scales_.Equals(other.scales_)) return false;
  197. if(!aspectRatios_.Equals(other.aspectRatios_)) return false;
  198. return Equals(_unknownFields, other._unknownFields);
  199. }
  200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  201. public override int GetHashCode() {
  202. int hash = 1;
  203. if (Height != 0) hash ^= Height.GetHashCode();
  204. if (Width != 0) hash ^= Width.GetHashCode();
  205. if (HeightStride != 0) hash ^= HeightStride.GetHashCode();
  206. if (WidthStride != 0) hash ^= WidthStride.GetHashCode();
  207. if (HeightOffset != 0) hash ^= HeightOffset.GetHashCode();
  208. if (WidthOffset != 0) hash ^= WidthOffset.GetHashCode();
  209. hash ^= scales_.GetHashCode();
  210. hash ^= aspectRatios_.GetHashCode();
  211. if (_unknownFields != null) {
  212. hash ^= _unknownFields.GetHashCode();
  213. }
  214. return hash;
  215. }
  216. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  217. public override string ToString() {
  218. return pb::JsonFormatter.ToDiagnosticString(this);
  219. }
  220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  221. public void WriteTo(pb::CodedOutputStream output) {
  222. if (Height != 0) {
  223. output.WriteRawTag(8);
  224. output.WriteInt32(Height);
  225. }
  226. if (Width != 0) {
  227. output.WriteRawTag(16);
  228. output.WriteInt32(Width);
  229. }
  230. if (HeightStride != 0) {
  231. output.WriteRawTag(24);
  232. output.WriteInt32(HeightStride);
  233. }
  234. if (WidthStride != 0) {
  235. output.WriteRawTag(32);
  236. output.WriteInt32(WidthStride);
  237. }
  238. if (HeightOffset != 0) {
  239. output.WriteRawTag(40);
  240. output.WriteInt32(HeightOffset);
  241. }
  242. if (WidthOffset != 0) {
  243. output.WriteRawTag(48);
  244. output.WriteInt32(WidthOffset);
  245. }
  246. scales_.WriteTo(output, _repeated_scales_codec);
  247. aspectRatios_.WriteTo(output, _repeated_aspectRatios_codec);
  248. if (_unknownFields != null) {
  249. _unknownFields.WriteTo(output);
  250. }
  251. }
  252. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  253. public int CalculateSize() {
  254. int size = 0;
  255. if (Height != 0) {
  256. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Height);
  257. }
  258. if (Width != 0) {
  259. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Width);
  260. }
  261. if (HeightStride != 0) {
  262. size += 1 + pb::CodedOutputStream.ComputeInt32Size(HeightStride);
  263. }
  264. if (WidthStride != 0) {
  265. size += 1 + pb::CodedOutputStream.ComputeInt32Size(WidthStride);
  266. }
  267. if (HeightOffset != 0) {
  268. size += 1 + pb::CodedOutputStream.ComputeInt32Size(HeightOffset);
  269. }
  270. if (WidthOffset != 0) {
  271. size += 1 + pb::CodedOutputStream.ComputeInt32Size(WidthOffset);
  272. }
  273. size += scales_.CalculateSize(_repeated_scales_codec);
  274. size += aspectRatios_.CalculateSize(_repeated_aspectRatios_codec);
  275. if (_unknownFields != null) {
  276. size += _unknownFields.CalculateSize();
  277. }
  278. return size;
  279. }
  280. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  281. public void MergeFrom(GridAnchorGenerator other) {
  282. if (other == null) {
  283. return;
  284. }
  285. if (other.Height != 0) {
  286. Height = other.Height;
  287. }
  288. if (other.Width != 0) {
  289. Width = other.Width;
  290. }
  291. if (other.HeightStride != 0) {
  292. HeightStride = other.HeightStride;
  293. }
  294. if (other.WidthStride != 0) {
  295. WidthStride = other.WidthStride;
  296. }
  297. if (other.HeightOffset != 0) {
  298. HeightOffset = other.HeightOffset;
  299. }
  300. if (other.WidthOffset != 0) {
  301. WidthOffset = other.WidthOffset;
  302. }
  303. scales_.Add(other.scales_);
  304. aspectRatios_.Add(other.aspectRatios_);
  305. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  306. }
  307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  308. public void MergeFrom(pb::CodedInputStream input) {
  309. uint tag;
  310. while ((tag = input.ReadTag()) != 0) {
  311. switch(tag) {
  312. default:
  313. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  314. break;
  315. case 8: {
  316. Height = input.ReadInt32();
  317. break;
  318. }
  319. case 16: {
  320. Width = input.ReadInt32();
  321. break;
  322. }
  323. case 24: {
  324. HeightStride = input.ReadInt32();
  325. break;
  326. }
  327. case 32: {
  328. WidthStride = input.ReadInt32();
  329. break;
  330. }
  331. case 40: {
  332. HeightOffset = input.ReadInt32();
  333. break;
  334. }
  335. case 48: {
  336. WidthOffset = input.ReadInt32();
  337. break;
  338. }
  339. case 58:
  340. case 61: {
  341. scales_.AddEntriesFrom(input, _repeated_scales_codec);
  342. break;
  343. }
  344. case 66:
  345. case 69: {
  346. aspectRatios_.AddEntriesFrom(input, _repeated_aspectRatios_codec);
  347. break;
  348. }
  349. }
  350. }
  351. }
  352. }
  353. #endregion
  354. }
  355. #endregion Designer generated code