Apollo 11.0
自动驾驶开放平台
rt.proto
浏览该文件的文档.
1syntax = "proto2";
2
3package apollo.perception.inference;
4
5// Specifies the shape (dimensions) of a Blob.
6message BlobShape {
7 repeated int64 dim = 1 [packed = true];
8}
9
10message BlobProto {
11 optional BlobShape shape = 7;
12 repeated float data = 5 [packed = true];
13 repeated float diff = 6 [packed = true];
14 repeated double double_data = 8 [packed = true];
15 repeated double double_diff = 9 [packed = true];
16
17 // 4D dimensions -- deprecated. Use "shape" instead.
18 optional int32 num = 1 [default = 0];
19 optional int32 channels = 2 [default = 0];
20 optional int32 height = 3 [default = 0];
21 optional int32 width = 4 [default = 0];
22}
23
24message Datum {
25 optional int32 channels = 1;
26 optional int32 height = 2;
27 optional int32 width = 3;
28 // the actual image data, in bytes
29 optional bytes data = 4;
30 optional int32 label = 5;
31 // Optionally, the datum could also hold float data.
32 repeated float float_data = 6;
33 // If true data contains an encoded image that need to be decoded
34 optional bool encoded = 7 [default = false];
35}
36
37// The label (display) name and label id.
38message LabelMapItem {
39 // Both name and label are required.
40 optional string name = 1;
41 optional int32 label = 2;
42 // display_name is optional.
43 optional string display_name = 3;
44}
45
46message LabelMap {
47 repeated LabelMapItem item = 1;
48}
49
50// Sample a bbox in the normalized space [0, 1] with provided constraints.
51message Sampler {
52 // Minimum scale of the sampled bbox.
53 optional float min_scale = 1 [default = 1.];
54 // Maximum scale of the sampled bbox.
55 optional float max_scale = 2 [default = 1.];
56
57 // Minimum aspect ratio of the sampled bbox.
58 optional float min_aspect_ratio = 3 [default = 1.];
59 // Maximum aspect ratio of the sampled bbox.
60 optional float max_aspect_ratio = 4 [default = 1.];
61}
62
63// Constraints for selecting sampled bbox.
65 // Minimum Jaccard overlap between sampled bbox and all bboxes in
66 // AnnotationGroup.
67 optional float min_jaccard_overlap = 1;
68 // Maximum Jaccard overlap between sampled bbox and all bboxes in
69 // AnnotationGroup.
70 optional float max_jaccard_overlap = 2;
71
72 // Minimum coverage of sampled bbox by all bboxes in AnnotationGroup.
73 optional float min_sample_coverage = 3;
74 // Maximum coverage of sampled bbox by all bboxes in AnnotationGroup.
75 optional float max_sample_coverage = 4;
76
77 // Minimum coverage of all bboxes in AnnotationGroup by sampled bbox.
78 optional float min_object_coverage = 5;
79 // Maximum coverage of all bboxes in AnnotationGroup by sampled bbox.
80 optional float max_object_coverage = 6;
81 repeated int32 balance_type = 7;
82}
83
84// Sample a batch of bboxes with provided constraints.
85message BatchSampler {
86 // Use original image as the source for sampling.
87 optional bool use_original_image = 1 [default = true];
88
89 // Constraints for sampling bbox.
90 optional Sampler sampler = 2;
91
92 // Constraints for determining if a sampled bbox is positive or negative.
93 optional SampleConstraint sample_constraint = 3;
94
95 // If provided, break when found certain number of samples satisfing the
96 // sample_constraint.
97 optional uint32 max_sample = 4;
98
99 // Maximum number of trials for sampling to avoid infinite loop.
100 optional uint32 max_trials = 5 [default = 100];
101}
102
103// Condition for emitting annotations.
105 enum EmitType {
106 CENTER = 0;
107 MIN_OVERLAP = 1;
108 }
109 optional EmitType emit_type = 1 [default = CENTER];
110 // If emit_type is MIN_OVERLAP, provide the emit_overlap.
111 optional float emit_overlap = 2;
112}
113
114// The normalized bounding box [0, 1] w.r.t. the input image size.
116 optional float xmin = 1;
117 optional float ymin = 2;
118 optional float xmax = 3;
119 optional float ymax = 4;
120 optional int32 label = 5;
121 optional bool difficult = 6;
122 optional float score = 7;
123 optional float size = 8;
124}
125
126// The normalized bounding box [0, 1] w.r.t. the input image size.
127message BBox3D {
128 optional float h = 1 [default = 0];
129 optional float w = 2 [default = 0];
130 optional float l = 3 [default = 0];
131 optional float x = 4 [default = 0];
132 optional float y = 5 [default = 0];
133 optional float z = 6 [default = 0];
134 optional float alpha = 7 [default = 0];
135}
136
137// Annotation for each object instance.
138message Annotation {
139 optional int32 instance_id = 1 [default = 0];
140 optional NormalizedBBox bbox = 2;
141 optional BBox3D bbox3d = 3;
142 optional NormalizedBBox front_bbox = 4;
143 optional NormalizedBBox rear_bbox = 5;
144}
145
146// Group of annotations for a particular label.
148 optional int32 group_label = 1;
149 repeated Annotation annotation = 2;
150}
151
152// An extension of Datum which contains "rich" annotations.
155 BBOX = 0; // normal 2D bbox
156 BBOX3D = 1; // BBOX with 3D info
157 BBOX3DFR = 2; // BBOX3D with front & rear 2D bbox
158 }
159 optional Datum datum = 1;
160 // If there are "rich" annotations, specify the type of annotation.
161 // Currently it only supports bounding box.
162 // If there are no "rich" annotations, use label in datum instead.
163 optional AnnotationType type = 2;
164 // Each group contains annotation for a particular class.
165 repeated AnnotationGroup annotation_group = 3;
166}
167
169 // The filler type.
170 optional string type = 1 [default = 'constant'];
171 optional float value = 2 [default = 0]; // the value in constant filler
172 optional float min = 3 [default = 0]; // the min value in uniform filler
173 optional float max = 4 [default = 1]; // the max value in uniform filler
174 optional float mean = 5 [default = 0]; // the mean value in Gaussian filler
175 optional float std = 6 [default = 1]; // the std value in Gaussian filler
176 // The expected number of non-zero output weights for a given input in
177 // Gaussian filler -- the default -1 means don't perform sparsification.
178 optional int32 sparse = 7 [default = -1];
179 // Normalize the filler variance by fan_in, fan_out, or their average.
180 // Applies to 'xavier' and 'msra' fillers.
182 FAN_IN = 0;
183 FAN_OUT = 1;
184 AVERAGE = 2;
185 }
186 optional VarianceNorm variance_norm = 8 [default = FAN_IN];
187}
188
190 optional string name = 1; // consider giving the network a name
191 // DEPRECATED. See InputParameter. The input blobs to the network.
192 repeated string input = 3;
193 // DEPRECATED. See InputParameter. The shape of the input blobs.
194 repeated BlobShape input_shape = 8;
195
196 // 4D input dimensions -- deprecated. Use "input_shape" instead.
197 // If specified, for each input blob there should be four
198 // values specifying the num, channels, height and width of the input blob.
199 // Thus, there should be a total of (4 * #input) numbers.
200 repeated int32 input_dim = 4;
201
202 // Whether the network will force every layer to carry out backward operation.
203 // If set False, then whether to carry out backward is determined
204 // automatically according to the net structure and learning rates.
205 optional bool force_backward = 5 [default = false];
206 // The current "state" of the network, including the phase, level, and stage.
207 // Some layers may be included/excluded depending on this state and the states
208 // specified in the layers' include and exclude fields.
209 optional NetState state = 6;
210
211 // Print debugging information about results while running Net::Forward,
212 // Net::Backward, and Net::Update.
213 optional bool debug_info = 7 [default = false];
214
215 // The layers that make up the net. Each of their configurations, including
216 // connectivity and behavior, is specified as a LayerParameter.
217 repeated LayerParameter layer = 100; // ID 100 so layers are printed last.
218
219 // DEPRECATED: use 'layer' instead.
220 repeated V1LayerParameter layers = 2;
221}
222
223enum Phase {
224 TRAIN = 0;
225 TEST = 1;
226}
227
228message NetState {
229 optional Phase phase = 1 [default = TEST];
230 optional int32 level = 2 [default = 0];
231 repeated string stage = 3;
232}
233
235 // Set phase to require the NetState have a particular phase (TRAIN or TEST)
236 // to meet this rule.
237 optional Phase phase = 1;
238
239 // Set the minimum and/or maximum levels in which the layer should be used.
240 // Leave undefined to meet the rule regardless of level.
241 optional int32 min_level = 2;
242 optional int32 max_level = 3;
243
244 // Customizable sets of stages to include or exclude.
245 // The net must have ALL of the specified stages and NONE of the specified
246 // "not_stage"s to meet the rule.
247 // (Use multiple NetStateRules to specify conjunctions of stages.)
248 repeated string stage = 4;
249 repeated string not_stage = 5;
250}
251
252// Specifies training parameters (multipliers on global learning constants,
253// and the name and other settings used for weight sharing).
254message ParamSpec {
255 // The names of the parameter blobs -- useful for sharing parameters among
256 // layers, but never required otherwise. To share a parameter between two
257 // layers, give it a (non-empty) name.
258 optional string name = 1;
259
260 // Whether to require shared weights to have the same shape, or just the same
261 // count -- defaults to STRICT if unspecified.
262 optional DimCheckMode share_mode = 2;
264 // STRICT (default) requires that num, channels, height, width each match.
265 STRICT = 0;
266 // PERMISSIVE requires only the count (num*channels*height*width) to match.
267 PERMISSIVE = 1;
268 }
269
270 // The multiplier on the global learning rate for this parameter.
271 optional float lr_mult = 3 [default = 1.0];
272
273 // The multiplier on the global weight decay for this parameter.
274 optional float decay_mult = 4 [default = 1.0];
275}
276
277// NOTE
278// Update the next available ID when you add a new LayerParameter field.
279//
280// LayerParameter next available layer-specific ID: 147 (last added:
281// recurrent_param)
283 optional string name = 1; // the layer name
284 optional string type = 2; // the layer type
285 repeated string bottom = 3; // the name of each bottom blob
286 repeated string top = 4; // the name of each top blob
287
288 // The train / test phase for computation.
289 optional Phase phase = 10;
290
291 // The amount of weight to assign each top blob in the objective.
292 // Each layer assigns a default value, usually of either 0 or 1,
293 // to each top blob.
294 repeated float loss_weight = 5;
295
296 // Specifies training parameters (multipliers on global learning constants,
297 // and the name and other settings used for weight sharing).
298 repeated ParamSpec param = 6;
299
300 // The blobs containing the numeric parameters of the layer.
301 repeated BlobProto blobs = 7;
302
303 // Specifies whether to backpropagate to each bottom. If unspecified,
304 // Caffe will automatically infer whether each input needs backpropagation
305 // to compute parameter gradients. If set to true for some inputs,
306 // backpropagation to those inputs is forced; if set false for some inputs,
307 // backpropagation to those inputs is skipped.
308 //
309 // The size must be either 0 or equal to the number of bottoms.
310 repeated bool propagate_down = 11;
311
312 // Rules controlling whether and when a layer is included in the network,
313 // based on the current NetState. You may specify a non-zero number of rules
314 // to include OR exclude, but not both. If no include or exclude rules are
315 // specified, the layer is always included. If the current NetState meets
316 // ANY (i.e., one or more) of the specified rules, the layer is
317 // included/excluded.
318 repeated NetStateRule include = 8;
319 repeated NetStateRule exclude = 9;
320
321 // Parameters for data pre-processing.
322 optional TransformationParameter transform_param = 100;
323
324 // Parameters shared by loss layers.
325 optional LossParameter loss_param = 101;
326
327 // Layer type-specific parameters.
328 //
329 // Note: certain layers may have more than one computational engine
330 // for their implementation. These layers include an Engine type and
331 // engine parameter for selecting the implementation.
332 // The default for the engine is set by the ENGINE switch at compile-time.
333 optional AccuracyParameter accuracy_param = 102;
334 optional AnnotatedDataParameter annotated_data_param = 200;
335 optional ArgMaxParameter argmax_param = 103;
336 optional BatchNormParameter batch_norm_param = 139;
337 optional BBoxRegParameter bbox_reg_param = 209;
338 optional BiasParameter bias_param = 141;
339 optional ConcatParameter concat_param = 104;
340 optional ContrastiveLossParameter contrastive_loss_param = 105;
341 optional ConvolutionParameter convolution_param = 106;
342 optional CropParameter crop_param = 144;
343 optional DataParameter data_param = 107;
344 optional DetectionEvaluateParameter detection_evaluate_param = 205;
345 optional DetectionOutputParameter detection_output_param = 204;
346 optional DetectionOutputSSDParameter detection_output_ssd_param = 210;
347 optional DFMBPSROIAlignParameter dfmb_psroi_pooling_param = 208;
348 optional DropoutParameter dropout_param = 108;
349 optional DummyDataParameter dummy_data_param = 109;
350 optional EltwiseParameter eltwise_param = 110;
351 optional ELUParameter elu_param = 140;
352 optional EmbedParameter embed_param = 137;
353 optional ExpParameter exp_param = 111;
354 optional FlattenParameter flatten_param = 135;
355 optional HDF5DataParameter hdf5_data_param = 112;
356 optional HDF5OutputParameter hdf5_output_param = 113;
357 optional HingeLossParameter hinge_loss_param = 114;
358 optional ImageDataParameter image_data_param = 115;
359 repeated ImageDataParameter yolo_data_param = 1707111;
360 repeated float data_prob_param = 1707112;
361 optional InfogainLossParameter infogain_loss_param = 116;
362 optional InnerProductParameter inner_product_param = 117;
363 optional InputParameter input_param = 143;
364 optional LogParameter log_param = 134;
365 optional LRNParameter lrn_param = 118;
366 optional MemoryDataParameter memory_data_param = 119;
367 optional MultiBoxLossParameter multibox_loss_param = 201;
368 optional RegionParameter region_param = 300;
369 optional RegionOutputParameter region_output_param = 310;
370 optional RegionProposalParameter region_proposal_param = 320;
371 optional YoloTargetParameter yolo_target_param = 204801;
372 optional YoloAnchorsParameter yolo_anchors_param = 204802;
373 optional YoloLossParameter yolo_loss_param = 204803;
374 optional YoloDumpParameter yolo_dump_param = 204804;
375 optional PaddingParameter padding_param = 1001;
376
377 optional ReorgParameter reorg_param = 301;
378 optional MVNParameter mvn_param = 120;
379 optional NormalizeParameter norm_param = 206;
380 optional ParameterParameter parameter_param = 145;
381 optional PermuteParameter permute_param = 202;
382 optional PoolingParameter pooling_param = 121;
383 optional PowerParameter power_param = 122;
384 optional PReLUParameter prelu_param = 131;
385 optional PriorBoxParameter prior_box_param = 203;
386 optional PythonParameter python_param = 130;
387 optional RecurrentParameter recurrent_param = 146;
388 optional ReductionParameter reduction_param = 136;
389 optional ReLUParameter relu_param = 123;
390 optional ReshapeParameter reshape_param = 133;
391 optional ROIPoolingParameter roi_pooling_param = 8266711;
392 optional ScaleParameter scale_param = 142;
393 optional SigmoidParameter sigmoid_param = 124;
394 optional SoftmaxParameter softmax_param = 125;
395 optional SPPParameter spp_param = 132;
396 optional SliceParameter slice_param = 126;
397 optional TanHParameter tanh_param = 127;
398 optional ThresholdParameter threshold_param = 128;
399 optional TileParameter tile_param = 138;
400 optional VideoDataParameter video_data_param = 207;
401 optional WindowDataParameter window_data_param = 129;
402}
403
404// Message that stores parameters used to apply transformation
405// to the data layer's data
407 // For data pre-processing, we can do simple scaling and subtracting the
408 // data mean, if provided. Note that the mean subtraction is always carried
409 // out before scaling.
410 optional float scale = 1 [default = 1];
411 // Specify if we want to randomly mirror data.
412 optional bool mirror = 2 [default = false];
413 // Specify if we would like to randomly crop an image.
414 optional uint32 crop_size = 3 [default = 0];
415 optional uint32 crop_h = 11 [default = 0];
416 optional uint32 crop_w = 12 [default = 0];
417
418 // mean_file and mean_value cannot be specified at the same time
419 optional string mean_file = 4;
420 // if specified can be repeated once (would substract it from all the
421 // channels) or can be repeated the same number of times as channels (would
422 // subtract them from the corresponding channel)
423 repeated float mean_value = 5;
424 // Force the decoded image to have 3 color channels.
425 optional bool force_color = 6 [default = false];
426 // Force the decoded image to have 1 color channels.
427 optional bool force_gray = 7 [default = false];
428 // Resize policy
429 optional ResizeParameter resize_param = 8;
430 // Noise policy
431 optional NoiseParameter noise_param = 9;
432 // Distortion policy
433 optional DistortionParameter distort_param = 13;
434 // Expand policy
435 optional ExpansionParameter expand_param = 14;
436 // Crop policy
437 optional float jitter = 15;
438 // Constraint for emitting the annotation after transformation.
439 optional EmitConstraint emit_constraint = 10;
440}
441
442// Message that stores parameters used by data transformer for resize policy
444 // Probability of using this resize policy
445 optional float prob = 1 [default = 1];
446
448 WARP = 1;
449 FIT_SMALL_SIZE = 2;
450 FIT_LARGE_SIZE_AND_PAD = 3;
451 }
452 optional Resize_mode resize_mode = 2 [default = WARP];
453 optional uint32 height = 3 [default = 0];
454 optional uint32 width = 4 [default = 0];
455 // A parameter used to update bbox in FIT_SMALL_SIZE mode.
456 optional uint32 height_scale = 8 [default = 0];
457 optional uint32 width_scale = 9 [default = 0];
458
459 enum Pad_mode {
460 CONSTANT = 1;
461 MIRRORED = 2;
462 REPEAT_NEAREST = 3;
463 }
464 // Padding mode for BE_SMALL_SIZE_AND_PAD mode and object centering
465 optional Pad_mode pad_mode = 5 [default = CONSTANT];
466 // if specified can be repeated once (would fill all the channels)
467 // or can be repeated the same number of times as channels
468 // (would use it them to the corresponding channel)
469 repeated float pad_value = 6;
470
471 enum Interp_mode { // Same as in OpenCV
472 LINEAR = 1;
473 AREA = 2;
474 NEAREST = 3;
475 CUBIC = 4;
476 LANCZOS4 = 5;
477 }
478 // interpolation for for resizing
479 repeated Interp_mode interp_mode = 7;
480}
481
483 // Percentage of pixels
484 optional float fraction = 1 [default = 0];
485 repeated float value = 2;
486}
487
488// Message that stores parameters used by data transformer for transformation
489// policy
491 // Probability of using this resize policy
492 optional float prob = 1 [default = 0];
493 // Histogram equalized
494 optional bool hist_eq = 2 [default = false];
495 // Color inversion
496 optional bool inverse = 3 [default = false];
497 // Grayscale
498 optional bool decolorize = 4 [default = false];
499 // Gaussian blur
500 optional bool gauss_blur = 5 [default = false];
501
502 // JPEG compression quality (-1 = no compression)
503 optional float jpeg = 6 [default = -1];
504
505 // Posterization
506 optional bool posterize = 7 [default = false];
507
508 // Erosion
509 optional bool erode = 8 [default = false];
510
511 // Salt-and-pepper noise
512 optional bool saltpepper = 9 [default = false];
513
514 optional SaltPepperParameter saltpepper_param = 10;
515
516 // Local histogram equalization
517 optional bool clahe = 11 [default = false];
518
519 // Color space conversion
520 optional bool convert_to_hsv = 12 [default = false];
521
522 // Color space conversion
523 optional bool convert_to_lab = 13 [default = false];
524}
525
526// Message that stores parameters used by data transformer for distortion policy
528 // The probability of adjusting brightness.
529 optional float brightness_prob = 1 [default = 0.0];
530 // Amount to add to the pixel values within [-delta, delta].
531 // The possible value is within [0, 255]. Recommend 32.
532 optional float brightness_delta = 2 [default = 0.0];
533
534 // The probability of adjusting contrast.
535 optional float contrast_prob = 3 [default = 0.0];
536 // Lower bound for random contrast factor. Recommend 0.5.
537 optional float contrast_lower = 4 [default = 0.0];
538 // Upper bound for random contrast factor. Recommend 1.5.
539 optional float contrast_upper = 5 [default = 0.0];
540
541 // The probability of adjusting hue.
542 optional float hue_prob = 6 [default = 0.0];
543 // Amount to add to the hue channel within [-delta, delta].
544 // The possible value is within [0, 180]. Recommend 36.
545 optional float hue_delta = 7 [default = 0.0];
546
547 // The probability of adjusting saturation.
548 optional float saturation_prob = 8 [default = 0.0];
549 // Lower bound for the random saturation factor. Recommend 0.5.
550 optional float saturation_lower = 9 [default = 0.0];
551 // Upper bound for the random saturation factor. Recommend 1.5.
552 optional float saturation_upper = 10 [default = 0.0];
553
554 // The probability of randomly order the image channels.
555 optional float random_order_prob = 11 [default = 0.0];
556}
557
558// Message that stores parameters used by data transformer for expansion policy
560 // Probability of using this expansion policy
561 optional float prob = 1 [default = 1];
562
563 // The ratio to expand the image.
564 optional float max_expand_ratio = 2 [default = 1.];
565}
566
567// Message that stores parameters shared by loss layers
569 // If specified, ignore instances with the given label.
570 optional int32 ignore_label = 1;
571 // How to normalize the loss for loss layers that aggregate across batches,
572 // spatial dimensions, or other dimensions. Currently only implemented in
573 // SoftmaxWithLoss and SigmoidCrossEntropyLoss layers.
575 // Divide by the number of examples in the batch times spatial dimensions.
576 // Outputs that receive the ignore label will NOT be ignored in computing
577 // the normalization factor.
578 FULL = 0;
579 // Divide by the total number of output locations that do not take the
580 // ignore_label. If ignore_label is not set, this behaves like FULL.
581 VALID = 1;
582 // Divide by the batch size.
583 BATCH_SIZE = 2;
584 // Do not normalize the loss.
585 NONE = 3;
586 }
587 // For historical reasons, the default normalization for
588 // SigmoidCrossEntropyLoss is BATCH_SIZE and *not* VALID.
589 optional NormalizationMode normalization = 3 [default = VALID];
590 // Deprecated. Ignored if normalization is specified. If normalization
591 // is not specified, then setting this to false will be equivalent to
592 // normalization = BATCH_SIZE to be consistent with previous behavior.
593 optional bool normalize = 2;
594}
595
596// Messages that store parameters used by individual layer types follow, in
597// alphabetical order.
598
600 // When computing accuracy, count as correct by comparing the true label to
601 // the top k scoring classes. By default, only compare to the top scoring
602 // class (i.e. argmax).
603 optional uint32 top_k = 1 [default = 1];
604
605 // The "label" axis of the prediction blob, whose argmax corresponds to the
606 // predicted label -- may be negative to index from the end (e.g., -1 for the
607 // last axis). For example, if axis == 1 and the predictions are
608 // (N x C x H x W), the label blob is expected to contain N*H*W ground truth
609 // labels with integer values in {0, 1, ..., C-1}.
610 optional int32 axis = 2 [default = 1];
611
612 // If specified, ignore instances with the given label.
613 optional int32 ignore_label = 3;
614}
615
617 // Define the sampler.
618 repeated BatchSampler batch_sampler = 1;
619 // Store label name and label id in LabelMap format.
620 optional string label_map_file = 2;
621 // If provided, it will replace the AnnotationType stored in each
622 // AnnotatedDatum.
623 optional AnnotatedDatum.AnnotationType anno_type = 3 [default = BBOX];
624 // Number of classes.
625 optional int32 num_classes = 10 [default = 3];
626}
627
629 // If true produce pairs (argmax, maxval)
630 optional bool out_max_val = 1 [default = false];
631 optional uint32 top_k = 2 [default = 1];
632 // The axis along which to maximise -- may be negative to index from the
633 // end (e.g., -1 for the last axis).
634 // By default ArgMaxLayer maximizes over the flattened trailing dimensions
635 // for each index of the first / num dimension.
636 optional int32 axis = 3;
637}
638
640 // The axis along which to concatenate -- may be negative to index from the
641 // end (e.g., -1 for the last axis). Other axes must have the
642 // same dimension for all the bottom blobs.
643 // By default, ConcatLayer concatenates blobs along the "channels" axis (1).
644 optional int32 axis = 2 [default = 1];
645
646 // DEPRECATED: alias for "axis" -- does not support negative indexing.
647 optional uint32 concat_dim = 1 [default = 1];
648}
649
651 // If false, accumulate global mean/variance values via a moving average. If
652 // true, use those accumulated values instead of computing mean/variance
653 // across the batch.
654 optional bool use_global_stats = 1;
655 // How much does the moving average decay each iteration?
656 optional float moving_average_fraction = 2 [default = .999];
657 // Small value to add to the variance estimate so that we don't divide by
658 // zero.
659 optional float eps = 3 [default = 1e-5];
660}
661
663 // The first axis of bottom[0] (the first input Blob) along which to apply
664 // bottom[1] (the second input Blob). May be negative to index from the end
665 // (e.g., -1 for the last axis).
666 //
667 // For example, if bottom[0] is 4D with shape 100x3x40x60, the output
668 // top[0] will have the same shape, and bottom[1] may have any of the
669 // following shapes (for the given value of axis):
670 // (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
671 // (axis == 1 == -3) 3; 3x40; 3x40x60
672 // (axis == 2 == -2) 40; 40x60
673 // (axis == 3 == -1) 60
674 // Furthermore, bottom[1] may have the empty shape (regardless of the value of
675 // "axis") -- a scalar bias.
676 optional int32 axis = 1 [default = 1];
677
678 // (num_axes is ignored unless just one bottom is given and the bias is
679 // a learned parameter of the layer. Otherwise, num_axes is determined by the
680 // number of axes by the second bottom.)
681 // The number of axes of the input (bottom[0]) covered by the bias
682 // parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
683 // Set num_axes := 0, to add a zero-axis Blob: a scalar.
684 optional int32 num_axes = 2 [default = 1];
685
686 // (filler is ignored unless just one bottom is given and the bias is
687 // a learned parameter of the layer.)
688 // The initialization for the learned bias parameter.
689 // Default is the zero (0) initialization, resulting in the BiasLayer
690 // initially performing the identity operation.
691 optional FillerParameter filler = 3;
692}
693
695 // margin for dissimilar pair
696 optional float margin = 1 [default = 1.0];
697 // The first implementation of this cost did not exactly match the cost of
698 // Hadsell et al 2006 -- using (margin - d^2) instead of (margin - d)^2.
699 // legacy_version = false (the default) uses (margin - d)^2 as proposed in the
700 // Hadsell paper. New models should probably use this version.
701 // legacy_version = true uses (margin - d^2). This is kept to support /
702 // reproduce existing models and results
703 optional bool legacy_version = 2 [default = false];
704}
705
707 optional uint32 num_output = 1; // The number of outputs for the layer
708 optional bool bias_term = 2 [default = true]; // whether to have bias terms
709
710 // Pad, kernel size, and stride are all given as a single value for equal
711 // dimensions in all spatial dimensions, or once per spatial dimension.
712 repeated uint32 pad = 3; // The padding size; defaults to 0
713 repeated uint32 kernel_size = 4; // The kernel size
714 repeated uint32 stride = 6; // The stride; defaults to 1
715 // Factor used to dilate the kernel, (implicitly) zero-filling the resulting
716 // holes. (Kernel dilation is sometimes referred to by its use in the
717 // algorithme a trous from Holschneider et al. 1987.)
718 repeated uint32 dilation = 18; // The dilation; defaults to 1
719
720 // For 2D convolution only, the *_h and *_w versions may also be used to
721 // specify both spatial dimensions.
722 optional uint32 pad_h = 9 [default = 0]; // The padding height (2D only)
723 optional uint32 pad_w = 10 [default = 0]; // The padding width (2D only)
724 optional uint32 kernel_h = 11; // The kernel height (2D only)
725 optional uint32 kernel_w = 12; // The kernel width (2D only)
726 optional uint32 stride_h = 13; // The stride height (2D only)
727 optional uint32 stride_w = 14; // The stride width (2D only)
728
729 optional uint32 group = 5 [default = 1]; // The group size for group conv
730
731 optional FillerParameter weight_filler = 7; // The filler for the weight
732 optional FillerParameter bias_filler = 8; // The filler for the bias
733 enum Engine {
734 DEFAULT = 0;
735 CAFFE = 1;
736 CUDNN = 2;
737 }
738 optional Engine engine = 15 [default = DEFAULT];
739
740 // The axis to interpret as "channels" when performing convolution.
741 // Preceding dimensions are treated as independent inputs;
742 // succeeding dimensions are treated as "spatial".
743 // With (N, C, H, W) inputs, and axis == 1 (the default), we perform
744 // N independent 2D convolutions, sliding C-channel (or (C/g)-channels, for
745 // groups g>1) filters across the spatial axes (H, W) of the input.
746 // With (N, C, D, H, W) inputs, and axis == 1, we perform
747 // N independent 3D convolutions, sliding (C/g)-channels
748 // filters across the spatial axes (D, H, W) of the input.
749 optional int32 axis = 16 [default = 1];
750
751 // Whether to force use of the general ND convolution, even if a specific
752 // implementation for blobs of the appropriate number of spatial dimensions
753 // is available. (Currently, there is only a 2D-specific convolution
754 // implementation; for input blobs with num_axes != 2, this option is
755 // ignored and the ND implementation will be used.)
756 optional bool force_nd_im2col = 17 [default = false];
757}
758
760 // To crop, elements of the first bottom are selected to fit the dimensions
761 // of the second, reference bottom. The crop is configured by
762 // - the crop `axis` to pick the dimensions for cropping
763 // - the crop `offset` to set the shift for all/each dimension
764 // to align the cropped bottom with the reference bottom.
765 // All dimensions up to but excluding `axis` are preserved, while
766 // the dimensions including and trailing `axis` are cropped.
767 // If only one `offset` is set, then all dimensions are offset by this amount.
768 // Otherwise, the number of offsets must equal the number of cropped axes to
769 // shift the crop in each dimension accordingly.
770 // Note: standard dimensions are N,C,H,W so the default is a spatial crop,
771 // and `axis` may be negative to index from the end (e.g., -1 for the last
772 // axis).
773 optional int32 axis = 1 [default = 2];
774 repeated uint32 offset = 2;
775}
776
778 enum DB {
779 LEVELDB = 0;
780 LMDB = 1;
781 }
782 // Specify the data source.
783 optional string source = 1;
784 // Specify the batch size.
785 optional uint32 batch_size = 4;
786 // The rand_skip variable is for the data layer to skip a few data points
787 // to avoid all asynchronous sgd clients to start at the same point. The skip
788 // point would be set as rand_skip * rand(0,1). Note that rand_skip should not
789 // be larger than the number of keys in the database.
790 // DEPRECATED. Each solver accesses a different subset of the database.
791 optional uint32 rand_skip = 7 [default = 0];
792 optional DB backend = 8 [default = LEVELDB];
793 // DEPRECATED. See TransformationParameter. For data pre-processing, we can do
794 // simple scaling and subtracting the data mean, if provided. Note that the
795 // mean subtraction is always carried out before scaling.
796 optional float scale = 2 [default = 1];
797 optional string mean_file = 3;
798 // DEPRECATED. See TransformationParameter. Specify if we would like to
799 // randomly crop an image.
800 optional uint32 crop_size = 5 [default = 0];
801 // DEPRECATED. See TransformationParameter. Specify if we want to randomly
802 // mirror data.
803 optional bool mirror = 6 [default = false];
804 // Force the encoded image to have 3 color channels
805 optional bool force_encoded_color = 9 [default = false];
806 // Prefetch queue (Number of batches to prefetch to host memory, increase if
807 // data access bandwidth varies).
808 optional uint32 prefetch = 10 [default = 4];
809}
810
811// Message that store parameters used by DetectionEvaluateLayer
813 // Number of classes that are actually predicted. Required!
814 optional uint32 num_classes = 1;
815 // Label id for background class. Needed for sanity check so that
816 // background class is neither in the ground truth nor the detections.
817 optional uint32 background_label_id = 2 [default = 0];
818 // Threshold for deciding true/false positive.
819 optional float overlap_threshold = 3 [default = 0.5];
820 // If true, also consider difficult ground truth for evaluation.
821 optional bool evaluate_difficult_gt = 4 [default = true];
822 // A file which contains a list of names and sizes with same order
823 // of the input DB. The file is in the following format:
824 // name height width
825 // ...
826 // If provided, we will scale the prediction and ground truth NormalizedBBox
827 // for evaluation.
828 optional string name_size_file = 5;
829 // The resize parameter used in converting NormalizedBBox to original image.
830 optional ResizeParameter resize_param = 6;
831}
832
834 // Threshold to be used in nms.
835 optional float nms_threshold = 1 [default = 0.3];
836 // Maximum number of results to be kept.
837 optional int32 top_k = 2;
838 // Parameter for adaptive nms.
839 optional float eta = 3 [default = 1.0];
840}
841
843 // Output directory. If not empty, we will save the results.
844 optional string output_directory = 1;
845 // Output name prefix.
846 optional string output_name_prefix = 2;
847 // Output format.
848 // VOC - PASCAL VOC output format.
849 // COCO - MS COCO output format.
850 optional string output_format = 3;
851 // If you want to output results, must also provide the following two files.
852 // Otherwise, we will ignore saving results.
853 // label map file.
854 optional string label_map_file = 4;
855 // A file which contains a list of names and sizes with same order
856 // of the input DB. The file is in the following format:
857 // name height width
858 // ...
859 optional string name_size_file = 5;
860 // Number of test images. It can be less than the lines specified in
861 // name_size_file. For example, when we only want to evaluate on part
862 // of the test images.
863 optional uint32 num_test_image = 6;
864 // The resize parameter used in saving the data.
865 optional ResizeParameter resize_param = 7;
866}
867
868// Message that store parameters used by DetectionOutputLayer
870 // Number of classes to be predicted. Required!
871 optional uint32 num_classes = 1;
872 // If true, bounding box are shared among different classes.
873 optional bool share_location = 2 [default = true];
874 // Background label id. If there is no background class,
875 // set it as -1.
876 optional int32 background_label_id = 3 [default = 0];
877 // Parameters used for non maximum suppression.
878 optional NonMaximumSuppressionParameter nms_param = 4;
879 // Parameters used for saving detection results.
880 optional SaveOutputParameter save_output_param = 5;
881 // Type of coding method for bbox.
882 optional PriorBoxParameter.CodeType code_type = 6 [default = CORNER];
883 // If true, variance is encoded in target; otherwise we need to adjust the
884 // predicted offset accordingly.
885 optional bool variance_encoded_in_target = 8 [default = false];
886 // Number of total bboxes to be kept per image after nms step.
887 // -1 means keeping all bboxes after nms step.
888 optional int32 keep_top_k = 7 [default = -1];
889 // Only consider detections whose confidences are larger than a threshold.
890 // If not provided, consider all boxes.
891 optional float confidence_threshold = 9;
892 // If true, visualize the detection results.
893 optional bool visualize = 10 [default = false];
894 // The threshold used to visualize the detection results.
895 optional float visualize_threshold = 11;
896 // If provided, save outputs to video file.
897 optional string save_file = 12;
898}
899// Message that store parameters used by DetectionOutputLayer
901 // Number of classes to be predicted. Required!
902 optional uint32 num_classes = 1;
903 optional NonMaximumSuppressionParameter nms_param = 2;
904 optional int32 keep_top_k = 3 [default = -1];
905 optional float confidence_threshold = 4;
906 repeated AnchorBox anchorbox = 5;
907 optional int32 nms_type = 6;
908 optional float nms_sigma = 7;
909 optional bool is_rpn = 8 [default = false];
910}
911
913 optional float dropout_ratio = 1 [default = 0.5]; // dropout ratio
914}
915
916// DummyDataLayer fills any number of arbitrarily shaped blobs with random
917// (or constant) data generated by "Fillers" (see "message FillerParameter").
919 // This layer produces N >= 1 top blobs. DummyDataParameter must specify 1 or
920 // N shape fields, and 0, 1 or N data_fillers.
921 //
922 // If 0 data_fillers are specified, ConstantFiller with a value of 0 is used.
923 // If 1 data_filler is specified, it is applied to all top blobs. If N are
924 // specified, the ith is applied to the ith top blob.
925 repeated FillerParameter data_filler = 1;
926 repeated BlobShape shape = 6;
927
928 // 4D dimensions -- deprecated. Use "shape" instead.
929 repeated uint32 num = 2;
930 repeated uint32 channels = 3;
931 repeated uint32 height = 4;
932 repeated uint32 width = 5;
933}
934
937 PROD = 0;
938 SUM = 1;
939 MAX = 2;
940 }
941 optional EltwiseOp operation = 1 [default = SUM]; // element-wise operation
942 repeated float coeff = 2; // blob-wise coefficient for SUM operation
943
944 // Whether to use an asymptotically slower (for >2 inputs) but stabler method
945 // of computing the gradient for the PROD operation. (No effect for SUM op.)
946 optional bool stable_prod_grad = 3 [default = true];
947}
948
949// Message that stores parameters used by ELULayer
951 // Described in:
952 // Clevert, D.-A., Unterthiner, T., & Hochreiter, S. (2015). Fast and Accurate
953 // Deep Network Learning by Exponential Linear Units (ELUs). arXiv
954 optional float alpha = 1 [default = 1];
955}
956
957// Message that stores parameters used by EmbedLayer
959 optional uint32 num_output = 1; // The number of outputs for the layer
960 // The input is given as integers to be interpreted as one-hot
961 // vector indices with dimension num_input. Hence num_input should be
962 // 1 greater than the maximum possible input value.
963 optional uint32 input_dim = 2;
964
965 optional bool bias_term = 3 [default = true]; // Whether to use a bias term
966 optional FillerParameter weight_filler = 4; // The filler for the weight
967 optional FillerParameter bias_filler = 5; // The filler for the bias
968}
969
970// Message that stores parameters used by ExpLayer
972 // ExpLayer computes outputs y = base ^ (shift + scale * x), for base > 0.
973 // Or if base is set to the default (-1), base is set to e,
974 // so y = exp(shift + scale * x).
975 optional float base = 1 [default = -1.0];
976 optional float scale = 2 [default = 1.0];
977 optional float shift = 3 [default = 0.0];
978}
979
982 // The first axis to flatten: all preceding axes are retained in the output.
983 // May be negative to index from the end (e.g., -1 for the last axis).
984 optional int32 axis = 1 [default = 1];
985
986 // The last axis to flatten: all following axes are retained in the output.
987 // May be negative to index from the end (e.g., the default -1 for the last
988 // axis).
989 optional int32 end_axis = 2 [default = -1];
990}
991
992// Message that stores parameters used by HDF5DataLayer
994 // Specify the data source.
995 optional string source = 1;
996 // Specify the batch size.
997 optional uint32 batch_size = 2;
998
999 // Specify whether to shuffle the data.
1000 // If shuffle == true, the ordering of the HDF5 files is shuffled,
1001 // and the ordering of data within any given HDF5 file is shuffled,
1002 // but data between different files are not interleaved; all of a file's
1003 // data are output (in a random order) before moving onto another file.
1004 optional bool shuffle = 3 [default = false];
1005}
1006
1008 optional string file_name = 1;
1009}
1010
1012 enum Norm {
1013 L1 = 1;
1014 L2 = 2;
1015 }
1016 // Specify the Norm to use L1 or L2
1017 optional Norm norm = 1 [default = L1];
1018}
1019
1021 optional string list_path = 1;
1022 optional uint32 num_repeat = 2 [default = 1];
1023}
1024
1026 // type of dataset
1028 LIST = 1; // list of paired image and label paths
1029 BLOCK = 2; // list of paired image and label block paths
1030 }
1031 optional string source = 1;
1032 optional string root_folder = 2;
1033 optional float weight = 3 [default = 1.0];
1034 optional DatasetType type = 4 [default = LIST];
1035 optional bool shuffle = 5 [default = true];
1036 repeated RepeatedList repeated_list = 6;
1037}
1038
1040 // Specify the data source.
1041 optional string source = 1;
1042 // Specify the batch size.
1043 optional uint32 batch_size = 4 [default = 1];
1044 // The rand_skip variable is for the data layer to skip a few data points
1045 // to avoid all asynchronous sgd clients to start at the same point. The skip
1046 // point would be set as rand_skip * rand(0,1). Note that rand_skip should not
1047 // be larger than the number of keys in the database.
1048 optional uint32 rand_skip = 7 [default = 0];
1049 // Whether or not ImageLayer should shuffle the list of files at every epoch.
1050 optional bool shuffle = 8 [default = false];
1051 // It will also resize images if new_height or new_width are not zero.
1052 optional uint32 new_height = 9 [default = 0];
1053 optional uint32 new_width = 10 [default = 0];
1054 // Specify if the images are color or gray
1055 optional bool is_color = 11 [default = true];
1056 // DEPRECATED. See TransformationParameter. For data pre-processing, we can do
1057 // simple scaling and subtracting the data mean, if provided. Note that the
1058 // mean subtraction is always carried out before scaling.
1059 optional float scale = 2 [default = 1];
1060 optional string mean_file = 3;
1061 // DEPRECATED. See TransformationParameter. Specify if we would like to
1062 // randomly crop an image.
1063 optional uint32 crop_size = 5 [default = 0];
1064 // DEPRECATED. See TransformationParameter. Specify if we want to randomly
1065 // mirror data.
1066 optional bool mirror = 6 [default = false];
1067 optional string root_folder = 12 [default = ""];
1068 // Prefetch queue (Number of batches to prefetch to host memory, increase if
1069 // data access bandwidth varies).
1070 optional uint32 prefetch = 20 [default = 4];
1071 repeated DatasetParameter image_set = 100;
1072}
1073
1075 // Specify the infogain matrix source.
1076 optional string source = 1;
1077}
1078
1080 optional uint32 num_output = 1; // The number of outputs for the layer
1081 optional bool bias_term = 2 [default = true]; // whether to have bias terms
1082 optional FillerParameter weight_filler = 3; // The filler for the weight
1083 optional FillerParameter bias_filler = 4; // The filler for the bias
1084
1085 // The first axis to be lumped into a single inner product computation;
1086 // all preceding axes are retained in the output.
1087 // May be negative to index from the end (e.g., -1 for the last axis).
1088 optional int32 axis = 5 [default = 1];
1089 // Specify whether to transpose the weight matrix or not.
1090 // If transpose == true, any operations will be performed on the transpose
1091 // of the weight matrix. The weight matrix itself is not going to be
1092 // transposed but rather the transfer flag of operations will be toggled
1093 // accordingly.
1094 optional bool transpose = 6 [default = false];
1095}
1096
1098 // This layer produces N >= 1 top blob(s) to be assigned manually.
1099 // Define N shapes to set a shape for each top.
1100 // Define 1 shape to set the same shape for every top.
1101 // Define no shape to defer to reshaping manually.
1102 repeated BlobShape shape = 1;
1103}
1104
1105// Message that stores parameters used by LogLayer
1107 // LogLayer computes outputs y = log_base(shift + scale * x), for base > 0.
1108 // Or if base is set to the default (-1), base is set to e,
1109 // so y = ln(shift + scale * x) = log_e(shift + scale * x)
1110 optional float base = 1 [default = -1.0];
1111 optional float scale = 2 [default = 1.0];
1112 optional float shift = 3 [default = 0.0];
1113}
1114
1115// Message that stores parameters used by LRNLayer
1117 optional uint32 local_size = 1 [default = 5];
1118 optional float alpha = 2 [default = 1.];
1119 optional float beta = 3 [default = 0.75];
1121 ACROSS_CHANNELS = 0;
1122 WITHIN_CHANNEL = 1;
1123 }
1124 optional NormRegion norm_region = 4 [default = ACROSS_CHANNELS];
1125 optional float k = 5 [default = 1.];
1126 enum Engine {
1127 DEFAULT = 0;
1128 CAFFE = 1;
1129 CUDNN = 2;
1130 }
1131 optional Engine engine = 6 [default = DEFAULT];
1132}
1133
1135 optional uint32 batch_size = 1;
1136 optional uint32 channels = 2;
1137 optional uint32 height = 3;
1138 optional uint32 width = 4;
1139}
1140
1141// Message that store parameters used by MultiBoxLossLayer
1143 // Localization loss type.
1145 L2 = 0;
1146 SMOOTH_L1 = 1;
1147 }
1148 optional LocLossType loc_loss_type = 1 [default = SMOOTH_L1];
1149 // Confidence loss type.
1151 SOFTMAX = 0;
1152 LOGISTIC = 1;
1153 }
1154 optional ConfLossType conf_loss_type = 2 [default = SOFTMAX];
1155 // Weight for localization loss.
1156 optional float loc_weight = 3 [default = 1.0];
1157 // Number of classes to be predicted. Required!
1158 optional uint32 num_classes = 4;
1159 // If true, bounding box are shared among different classes.
1160 optional bool share_location = 5 [default = true];
1161 // Matching method during training.
1163 BIPARTITE = 0;
1164 PER_PREDICTION = 1;
1165 }
1166 optional MatchType match_type = 6 [default = PER_PREDICTION];
1167 // If match_type is PER_PREDICTION, use overlap_threshold to
1168 // determine the extra matching bboxes.
1169 optional float overlap_threshold = 7 [default = 0.5];
1170 // Use prior for matching.
1171 optional bool use_prior_for_matching = 8 [default = true];
1172 // Background label id.
1173 optional uint32 background_label_id = 9 [default = 0];
1174 // If true, also consider difficult ground truth.
1175 optional bool use_difficult_gt = 10 [default = true];
1176 // If true, perform negative mining.
1177 // DEPRECATED: use mining_type instead.
1178 optional bool do_neg_mining = 11;
1179 // The negative/positive ratio.
1180 optional float neg_pos_ratio = 12 [default = 3.0];
1181 // The negative overlap upperbound for the unmatched predictions.
1182 optional float neg_overlap = 13 [default = 0.5];
1183 // Type of coding method for bbox.
1184 optional PriorBoxParameter.CodeType code_type = 14 [default = CORNER];
1185 // If true, encode the variance of prior box in the loc loss target instead of
1186 // in bbox.
1187 optional bool encode_variance_in_target = 16 [default = false];
1188 // If true, map all object classes to agnostic class. It is useful for
1189 // learning objectness detector.
1190 optional bool map_object_to_agnostic = 17 [default = false];
1191 // If true, ignore cross boundary bbox during matching.
1192 // Cross boundary bbox is a bbox who is outside of the image region.
1193 optional bool ignore_cross_boundary_bbox = 18 [default = false];
1194 // If true, only backpropagate on corners which are inside of the image
1195 // region when encode_type is CORNER or CORNER_SIZE.
1196 optional bool bp_inside = 19 [default = false];
1197 // Mining type during training.
1198 // NONE : use all negatives.
1199 // MAX_NEGATIVE : select negatives based on the score.
1200 // HARD_EXAMPLE : select hard examples based on "Training Region-based
1201 // Object Detectors with Online Hard Example Mining", Shrivastava et.al.
1203 NONE = 0;
1204 MAX_NEGATIVE = 1;
1205 HARD_EXAMPLE = 2;
1206 }
1207 optional MiningType mining_type = 20 [default = MAX_NEGATIVE];
1208 // Parameters used for non maximum suppression durig hard example mining.
1209 optional NonMaximumSuppressionParameter nms_param = 21;
1210 optional int32 sample_size = 22 [default = 64];
1211 optional bool use_prior_for_nms = 23 [default = false];
1212}
1213
1215 // This parameter can be set to false to normalize mean only
1216 optional bool normalize_variance = 1 [default = true];
1217
1218 // This parameter can be set to true to perform DNN-like MVN
1219 optional bool across_channels = 2 [default = false];
1220
1221 // Epsilon for not dividing by zero while normalizing variance
1222 optional float eps = 3 [default = 1e-9];
1223}
1224
1225// Message that stores parameters used by NormalizeLayer
1227 optional bool across_spatial = 1 [default = true];
1228 // Initial value of scale. Default is 1.0 for all
1229 optional FillerParameter scale_filler = 2;
1230 // Whether or not scale parameters are shared across channels.
1231 optional bool channel_shared = 3 [default = true];
1232 // Epsilon for not dividing by zero while normalizing variance
1233 optional float eps = 4 [default = 1e-10];
1234}
1235
1237 optional BlobShape shape = 1;
1238}
1239
1241 // The new orders of the axes of data. Notice it should be with
1242 // in the same range as the input data, and it starts from 0.
1243 // Do not provide repeated order.
1244 repeated uint32 order = 1;
1245}
1246
1249 MAX = 0;
1250 AVE = 1;
1251 STOCHASTIC = 2;
1252 }
1253 optional PoolMethod pool = 1 [default = MAX]; // The pooling method
1254 // Pad, kernel size, and stride are all given as a single value for equal
1255 // dimensions in height and width or as Y, X pairs.
1256 optional uint32 pad = 4 [default = 0]; // The padding size (equal in Y, X)
1257 optional uint32 pad_h = 9 [default = 0]; // The padding height
1258 optional uint32 pad_w = 10 [default = 0]; // The padding width
1259 optional uint32 kernel_size = 2; // The kernel size (square)
1260 optional uint32 kernel_h = 5; // The kernel height
1261 optional uint32 kernel_w = 6; // The kernel width
1262 optional uint32 stride = 3 [default = 1]; // The stride (equal in Y, X)
1263 optional uint32 stride_h = 7; // The stride height
1264 optional uint32 stride_w = 8; // The stride width
1265 enum Engine {
1266 DEFAULT = 0;
1267 CAFFE = 1;
1268 CUDNN = 2;
1269 }
1270 optional Engine engine = 11 [default = DEFAULT];
1271 // If global_pooling then it will pool over the size of the bottom by doing
1272 // kernel_h = bottom->height and kernel_w = bottom->width
1273 optional bool global_pooling = 12 [default = false];
1274 // How to calculate the output size - using ceil (default) or floor rounding.
1276 CEIL = 0;
1277 FLOOR = 1;
1278 }
1279 optional RoundMode round_mode = 13 [default = CEIL];
1280}
1281
1283 // PowerLayer computes outputs y = (shift + scale * x) ^ power.
1284 optional float power = 1 [default = 1.0];
1285 optional float scale = 2 [default = 1.0];
1286 optional float shift = 3 [default = 0.0];
1287}
1288
1289// Message that store parameters used by PriorBoxLayer
1291 // Encode/decode type.
1293 CORNER = 1;
1294 CENTER_SIZE = 2;
1295 CORNER_SIZE = 3;
1296 }
1297 // Minimum box size (in pixels). Required!
1298 repeated float min_size = 1;
1299 // Maximum box size (in pixels). Required!
1300 repeated float max_size = 2;
1301 // Various of aspect ratios. Duplicate ratios will be ignored.
1302 // If none is provided, we use default ratio 1.
1303 repeated float aspect_ratio = 3;
1304 // If true, will flip each aspect ratio.
1305 // For example, if there is aspect ratio "r",
1306 // we will generate aspect ratio "1.0/r" as well.
1307 optional bool flip = 4 [default = true];
1308 // If true, will clip the prior so that it is within [0, 1]
1309 optional bool clip = 5 [default = false];
1310 // Variance for adjusting the prior bboxes.
1311 repeated float variance = 6;
1312 // By default, we calculate img_height, img_width, step_x, step_y based on
1313 // bottom[0] (feat) and bottom[1] (img). Unless these values are explicitely
1314 // provided.
1315 // Explicitly provide the img_size.
1316 optional uint32 img_size = 7;
1317 // Either img_size or img_h/img_w should be specified; not both.
1318 optional uint32 img_h = 8;
1319 optional uint32 img_w = 9;
1320
1321 // Explicitly provide the step size.
1322 optional float step = 10;
1323 // Either step or step_h/step_w should be specified; not both.
1324 optional float step_h = 11;
1325 optional float step_w = 12;
1326
1327 // Offset to the top left corner of each cell.
1328 optional float offset = 13 [default = 0.5];
1329}
1330
1332 optional string module = 1;
1333 optional string layer = 2;
1334 // This value is set to the attribute `param_str` of the `PythonLayer` object
1335 // in Python before calling the `setup()` method. This could be a number,
1336 // string, dictionary in Python dict format, JSON, etc. You may parse this
1337 // string in `setup` method and use it in `forward` and `backward`.
1338 optional string param_str = 3 [default = ''];
1339 // Whether this PythonLayer is shared among worker solvers during data
1340 // parallelism. If true, each worker solver sequentially run forward from this
1341 // layer. This value should be set true if you are using it as a data layer.
1342 optional bool share_in_parallel = 4 [default = false];
1343}
1344
1345// Message that stores parameters used by RecurrentLayer
1347 // The dimension of the output (and usually hidden state) representation --
1348 // must be explicitly set to non-zero.
1349 optional uint32 num_output = 1 [default = 0];
1350
1351 optional FillerParameter weight_filler = 2; // The filler for the weight
1352 optional FillerParameter bias_filler = 3; // The filler for the bias
1353
1354 // Whether to enable displaying debug_info in the unrolled recurrent net.
1355 optional bool debug_info = 4 [default = false];
1356
1357 // Whether to add as additional inputs (bottoms) the initial hidden state
1358 // blobs, and add as additional outputs (tops) the final timestep hidden state
1359 // blobs. The number of additional bottom/top blobs required depends on the
1360 // recurrent architecture -- e.g., 1 for RNNs, 2 for LSTMs.
1361 optional bool expose_hidden = 5 [default = false];
1362}
1363
1364// Message that stores parameters used by ReductionLayer
1367 SUM = 1;
1368 ASUM = 2;
1369 SUMSQ = 3;
1370 MEAN = 4;
1371 }
1372
1373 optional ReductionOp operation = 1 [default = SUM]; // reduction operation
1374
1375 // The first axis to reduce to a scalar -- may be negative to index from the
1376 // end (e.g., -1 for the last axis).
1377 // (Currently, only reduction along ALL "tail" axes is supported; reduction
1378 // of axis M through N, where N < num_axes - 1, is unsupported.)
1379 // Suppose we have an n-axis bottom Blob with shape:
1380 // (d0, d1, d2, ..., d(m-1), dm, d(m+1), ..., d(n-1)).
1381 // If axis == m, the output Blob will have shape
1382 // (d0, d1, d2, ..., d(m-1)),
1383 // and the ReductionOp operation is performed (d0 * d1 * d2 * ... * d(m-1))
1384 // times, each including (dm * d(m+1) * ... * d(n-1)) individual data.
1385 // If axis == 0 (the default), the output Blob always has the empty shape
1386 // (count 1), performing reduction across the entire input --
1387 // often useful for creating new loss functions.
1388 optional int32 axis = 2 [default = 0];
1389
1390 optional float coeff = 3 [default = 1.0]; // coefficient for output
1391}
1392
1393// Message that stores parameters used by ReLULayer
1395 // Allow non-zero slope for negative inputs to speed up optimization
1396 // Described in:
1397 // Maas, A. L., Hannun, A. Y., & Ng, A. Y. (2013). Rectifier nonlinearities
1398 // improve neural network acoustic models. In ICML Workshop on Deep Learning
1399 // for Audio, Speech, and Language Processing.
1400 optional float negative_slope = 1 [default = 0];
1401 enum Engine {
1402 DEFAULT = 0;
1403 CAFFE = 1;
1404 CUDNN = 2;
1405 }
1406 optional Engine engine = 2 [default = DEFAULT];
1407}
1408
1410 // Specify the output dimensions. If some of the dimensions are set to 0,
1411 // the corresponding dimension from the bottom layer is used (unchanged).
1412 // Exactly one dimension may be set to -1, in which case its value is
1413 // inferred from the count of the bottom blob and the remaining dimensions.
1414 // For example, suppose we want to reshape a 2D blob "input" with shape 2 x 8:
1415 //
1416 // layer {
1417 // type: "Reshape" bottom: "input" top: "output"
1418 // reshape_param { ... }
1419 // }
1420 //
1421 // If "input" is 2D with shape 2 x 8, then the following reshape_param
1422 // specifications are all equivalent, producing a 3D blob "output" with shape
1423 // 2 x 2 x 4:
1424 //
1425 // reshape_param { shape { dim: 2 dim: 2 dim: 4 } }
1426 // reshape_param { shape { dim: 0 dim: 2 dim: 4 } }
1427 // reshape_param { shape { dim: 0 dim: 2 dim: -1 } }
1428 // reshape_param { shape { dim: 0 dim:-1 dim: 4 } }
1429 //
1430 optional BlobShape shape = 1;
1431
1432 // axis and num_axes control the portion of the bottom blob's shape that are
1433 // replaced by (included in) the reshape. By default (axis == 0 and
1434 // num_axes == -1), the entire bottom blob shape is included in the reshape,
1435 // and hence the shape field must specify the entire output shape.
1436 //
1437 // axis may be non-zero to retain some portion of the beginning of the input
1438 // shape (and may be negative to index from the end; e.g., -1 to begin the
1439 // reshape after the last axis, including nothing in the reshape,
1440 // -2 to include only the last axis, etc.).
1441 //
1442 // For example, suppose "input" is a 2D blob with shape 2 x 8.
1443 // Then the following ReshapeLayer specifications are all equivalent,
1444 // producing a blob "output" with shape 2 x 2 x 4:
1445 //
1446 // reshape_param { shape { dim: 2 dim: 2 dim: 4 } }
1447 // reshape_param { shape { dim: 2 dim: 4 } axis: 1 }
1448 // reshape_param { shape { dim: 2 dim: 4 } axis: -3 }
1449 //
1450 // num_axes specifies the extent of the reshape.
1451 // If num_axes >= 0 (and axis >= 0), the reshape will be performed only on
1452 // input axes in the range [axis, axis+num_axes].
1453 // num_axes may also be -1, the default, to include all remaining axes
1454 // (starting from axis).
1455 //
1456 // For example, suppose "input" is a 2D blob with shape 2 x 8.
1457 // Then the following ReshapeLayer specifications are equivalent,
1458 // producing a blob "output" with shape 1 x 2 x 8.
1459 //
1460 // reshape_param { shape { dim: 1 dim: 2 dim: 8 } }
1461 // reshape_param { shape { dim: 1 dim: 2 } num_axes: 1 }
1462 // reshape_param { shape { dim: 1 } num_axes: 0 }
1463 //
1464 // On the other hand, these would produce output blob shape 2 x 1 x 8:
1465 //
1466 // reshape_param { shape { dim: 2 dim: 1 dim: 8 } }
1467 // reshape_param { shape { dim: 1 } axis: 1 num_axes: 0 }
1468 //
1469 optional int32 axis = 2 [default = 0];
1470 optional int32 num_axes = 3 [default = -1];
1471}
1472
1473// Message that stores parameters used by ROIPoolingLayer
1475 // Pad, kernel size, and stride are all given as a single value for equal
1476 // dimensions in height and width or as Y, X pairs.
1477 optional uint32 pooled_h = 1 [default = 0]; // The pooled output height
1478 optional uint32 pooled_w = 2 [default = 0]; // The pooled output width
1479 // Multiplicative spatial scale factor to translate ROI coords from their
1480 // input scale to the scale used when pooling
1481 optional float spatial_scale = 3 [default = 1];
1482 // add by wanji - begin
1483 optional bool use_floor = 10 [default = false];
1484 // add by wanji - end
1485}
1486
1488 // The first axis of bottom[0] (the first input Blob) along which to apply
1489 // bottom[1] (the second input Blob). May be negative to index from the end
1490 // (e.g., -1 for the last axis).
1491 //
1492 // For example, if bottom[0] is 4D with shape 100x3x40x60, the output
1493 // top[0] will have the same shape, and bottom[1] may have any of the
1494 // following shapes (for the given value of axis):
1495 // (axis == 0 == -4) 100; 100x3; 100x3x40; 100x3x40x60
1496 // (axis == 1 == -3) 3; 3x40; 3x40x60
1497 // (axis == 2 == -2) 40; 40x60
1498 // (axis == 3 == -1) 60
1499 // Furthermore, bottom[1] may have the empty shape (regardless of the value of
1500 // "axis") -- a scalar multiplier.
1501 optional int32 axis = 1 [default = 1];
1502
1503 // (num_axes is ignored unless just one bottom is given and the scale is
1504 // a learned parameter of the layer. Otherwise, num_axes is determined by the
1505 // number of axes by the second bottom.)
1506 // The number of axes of the input (bottom[0]) covered by the scale
1507 // parameter, or -1 to cover all axes of bottom[0] starting from `axis`.
1508 // Set num_axes := 0, to multiply with a zero-axis Blob: a scalar.
1509 optional int32 num_axes = 2 [default = 1];
1510
1511 // (filler is ignored unless just one bottom is given and the scale is
1512 // a learned parameter of the layer.)
1513 // The initialization for the learned scale parameter.
1514 // Default is the unit (1) initialization, resulting in the ScaleLayer
1515 // initially performing the identity operation.
1516 optional FillerParameter filler = 3;
1517
1518 // Whether to also learn a bias (equivalent to a ScaleLayer+BiasLayer, but
1519 // may be more efficient). Initialized with bias_filler (defaults to 0).
1520 optional bool bias_term = 4 [default = false];
1521 optional FillerParameter bias_filler = 5;
1522}
1523
1525 enum Engine {
1526 DEFAULT = 0;
1527 CAFFE = 1;
1528 CUDNN = 2;
1529 }
1530 optional Engine engine = 1 [default = DEFAULT];
1531}
1532
1534 // The axis along which to slice -- may be negative to index from the end
1535 // (e.g., -1 for the last axis).
1536 // By default, SliceLayer concatenates blobs along the "channels" axis (1).
1537 optional int32 axis = 3 [default = 1];
1538 repeated uint32 slice_point = 2;
1539
1540 // DEPRECATED: alias for "axis" -- does not support negative indexing.
1541 optional uint32 slice_dim = 1 [default = 1];
1542}
1543
1544// Message that stores parameters used by SoftmaxLayer, SoftmaxWithLossLayer
1546 enum Engine {
1547 DEFAULT = 0;
1548 CAFFE = 1;
1549 CUDNN = 2;
1550 }
1551 optional Engine engine = 1 [default = DEFAULT];
1552
1553 // The axis along which to perform the softmax -- may be negative to index
1554 // from the end (e.g., -1 for the last axis).
1555 // Any other axes will be evaluated as independent softmaxes.
1556 optional int32 axis = 2 [default = 1];
1557}
1558
1560 enum Engine {
1561 DEFAULT = 0;
1562 CAFFE = 1;
1563 CUDNN = 2;
1564 }
1565 optional Engine engine = 1 [default = DEFAULT];
1566}
1567
1568// Message that stores parameters used by TileLayer
1570 // The index of the axis to tile.
1571 optional int32 axis = 1 [default = 1];
1572
1573 // The number of copies (tiles) of the blob to output.
1574 optional int32 tiles = 2;
1575}
1576
1577// Message that stores parameters used by ThresholdLayer
1579 optional float threshold = 1 [default = 0]; // Strictly positive values
1580}
1581
1584 WEBCAM = 0;
1585 VIDEO = 1;
1586 }
1587 optional VideoType video_type = 1 [default = WEBCAM];
1588 optional int32 device_id = 2 [default = 0];
1589 optional string video_file = 3;
1590 // Number of frames to be skipped before processing a frame.
1591 optional uint32 skip_frames = 4 [default = 0];
1592}
1593
1595 // Specify the data source.
1596 optional string source = 1;
1597 // For data pre-processing, we can do simple scaling and subtracting the
1598 // data mean, if provided. Note that the mean subtraction is always carried
1599 // out before scaling.
1600 optional float scale = 2 [default = 1];
1601 optional string mean_file = 3;
1602 // Specify the batch size.
1603 optional uint32 batch_size = 4;
1604 // Specify if we would like to randomly crop an image.
1605 optional uint32 crop_size = 5 [default = 0];
1606 // Specify if we want to randomly mirror data.
1607 optional bool mirror = 6 [default = false];
1608 // Foreground (object) overlap threshold
1609 optional float fg_threshold = 7 [default = 0.5];
1610 // Background (non-object) overlap threshold
1611 optional float bg_threshold = 8 [default = 0.5];
1612 // Fraction of batch that should be foreground objects
1613 optional float fg_fraction = 9 [default = 0.25];
1614 // Amount of contextual padding to add around a window
1615 // (used only by the window_data_layer)
1616 optional uint32 context_pad = 10 [default = 0];
1617 // Mode for cropping out a detection window
1618 // warp: cropped window is warped to a fixed size and aspect ratio
1619 // square: the tightest square around the window is cropped
1620 optional string crop_mode = 11 [default = "warp"];
1621 // cache_images: will load all images in memory for faster access
1622 optional bool cache_images = 12 [default = false];
1623 // append root_folder to locate images
1624 optional string root_folder = 13 [default = ""];
1625}
1626
1629 MAX = 0;
1630 AVE = 1;
1631 STOCHASTIC = 2;
1632 }
1633 optional uint32 pyramid_height = 1;
1634 optional PoolMethod pool = 2 [default = MAX]; // The pooling method
1635 enum Engine {
1636 DEFAULT = 0;
1637 CAFFE = 1;
1638 CUDNN = 2;
1639 }
1640 optional Engine engine = 6 [default = DEFAULT];
1641}
1642
1643// DEPRECATED: use LayerParameter.
1645 repeated string bottom = 2;
1646 repeated string top = 3;
1647 optional string name = 4;
1648 repeated NetStateRule include = 32;
1649 repeated NetStateRule exclude = 33;
1651 NONE = 0;
1652 ABSVAL = 35;
1653 ACCURACY = 1;
1654 ARGMAX = 30;
1655 BNLL = 2;
1656 CONCAT = 3;
1657 CONTRASTIVE_LOSS = 37;
1658 CONVOLUTION = 4;
1659 DATA = 5;
1660 DECONVOLUTION = 39;
1661 DROPOUT = 6;
1662 DUMMY_DATA = 32;
1663 EUCLIDEAN_LOSS = 7;
1664 ELTWISE = 25;
1665 EXP = 38;
1666 FLATTEN = 8;
1667 HDF5_DATA = 9;
1668 HDF5_OUTPUT = 10;
1669 HINGE_LOSS = 28;
1670 IM2COL = 11;
1671 IMAGE_DATA = 12;
1672 INFOGAIN_LOSS = 13;
1673 INNER_PRODUCT = 14;
1674 LRN = 15;
1675 MEMORY_DATA = 29;
1676 MULTINOMIAL_LOGISTIC_LOSS = 16;
1677 MVN = 34;
1678 POOLING = 17;
1679 POWER = 26;
1680 RELU = 18;
1681 SIGMOID = 19;
1682 SIGMOID_CROSS_ENTROPY_LOSS = 27;
1683 SILENCE = 36;
1684 SOFTMAX = 20;
1685 SOFTMAX_LOSS = 21;
1686 SPLIT = 22;
1687 SLICE = 33;
1688 TANH = 23;
1689 WINDOW_DATA = 24;
1691 }
1692 optional LayerType type = 5;
1693 repeated BlobProto blobs = 6;
1694 repeated string param = 1001;
1695 repeated DimCheckMode blob_share_mode = 1002;
1697 STRICT = 0;
1698 PERMISSIVE = 1;
1699 }
1700 repeated float blobs_lr = 7;
1701 repeated float weight_decay = 8;
1702 repeated float loss_weight = 35;
1703 optional AccuracyParameter accuracy_param = 27;
1704 optional ArgMaxParameter argmax_param = 23;
1705 optional ConcatParameter concat_param = 9;
1706 optional ContrastiveLossParameter contrastive_loss_param = 40;
1707 optional ConvolutionParameter convolution_param = 10;
1708 optional DataParameter data_param = 11;
1709 optional DropoutParameter dropout_param = 12;
1710 optional DummyDataParameter dummy_data_param = 26;
1711 optional EltwiseParameter eltwise_param = 24;
1712 optional ExpParameter exp_param = 41;
1713 optional HDF5DataParameter hdf5_data_param = 13;
1714 optional HDF5OutputParameter hdf5_output_param = 14;
1715 optional HingeLossParameter hinge_loss_param = 29;
1716 optional ImageDataParameter image_data_param = 15;
1717 optional InfogainLossParameter infogain_loss_param = 16;
1718 optional InnerProductParameter inner_product_param = 17;
1719 optional LRNParameter lrn_param = 18;
1720 optional MemoryDataParameter memory_data_param = 22;
1721 optional MVNParameter mvn_param = 34;
1722 optional PoolingParameter pooling_param = 19;
1723 optional PowerParameter power_param = 21;
1724 optional ReLUParameter relu_param = 30;
1725 optional SigmoidParameter sigmoid_param = 38;
1726 optional SoftmaxParameter softmax_param = 39;
1727 optional SliceParameter slice_param = 31;
1728 optional TanHParameter tanh_param = 37;
1729 optional ThresholdParameter threshold_param = 25;
1730 optional WindowDataParameter window_data_param = 20;
1731 optional TransformationParameter transform_param = 36;
1732 optional LossParameter loss_param = 42;
1733 optional V0LayerParameter layer = 1;
1734}
1735
1736// DEPRECATED: V0LayerParameter is the old way of specifying layer parameters
1737// in Caffe. We keep this message type around for legacy support.
1739 optional string name = 1; // the layer name
1740 optional string type = 2; // the string to specify the layer type
1741
1742 // Parameters to specify layers with inner products.
1743 optional uint32 num_output = 3; // The number of outputs for the layer
1744 optional bool biasterm = 4 [default = true]; // whether to have bias terms
1745 optional FillerParameter weight_filler = 5; // The filler for the weight
1746 optional FillerParameter bias_filler = 6; // The filler for the bias
1747
1748 optional uint32 pad = 7 [default = 0]; // The padding size
1749 optional uint32 kernelsize = 8; // The kernel size
1750 optional uint32 group = 9 [default = 1]; // The group size for group conv
1751 optional uint32 stride = 10 [default = 1]; // The stride
1753 MAX = 0;
1754 AVE = 1;
1755 STOCHASTIC = 2;
1756 }
1757 optional PoolMethod pool = 11 [default = MAX]; // The pooling method
1758 optional float dropout_ratio = 12 [default = 0.5]; // dropout ratio
1759
1760 optional uint32 local_size = 13 [default = 5]; // for local response norm
1761 optional float alpha = 14 [default = 1.]; // for local response norm
1762 optional float beta = 15 [default = 0.75]; // for local response norm
1763 optional float k = 22 [default = 1.];
1764
1765 // For data layers, specify the data source
1766 optional string source = 16;
1767 // For data pre-processing, we can do simple scaling and subtracting the
1768 // data mean, if provided. Note that the mean subtraction is always carried
1769 // out before scaling.
1770 optional float scale = 17 [default = 1];
1771 optional string meanfile = 18;
1772 // For data layers, specify the batch size.
1773 optional uint32 batchsize = 19;
1774 // For data layers, specify if we would like to randomly crop an image.
1775 optional uint32 cropsize = 20 [default = 0];
1776 // For data layers, specify if we want to randomly mirror data.
1777 optional bool mirror = 21 [default = false];
1778
1779 // The blobs containing the numeric parameters of the layer
1780 repeated BlobProto blobs = 50;
1781 // The ratio that is multiplied on the global learning rate. If you want to
1782 // set the learning ratio for one blob, you need to set it for all blobs.
1783 repeated float blobs_lr = 51;
1784 // The weight decay that is multiplied on the global weight decay.
1785 repeated float weight_decay = 52;
1786
1787 // The rand_skip variable is for the data layer to skip a few data points
1788 // to avoid all asynchronous sgd clients to start at the same point. The skip
1789 // point would be set as rand_skip * rand(0,1). Note that rand_skip should not
1790 // be larger than the number of keys in the database.
1791 optional uint32 rand_skip = 53 [default = 0];
1792
1793 // Fields related to detection (det_*)
1794 // foreground (object) overlap threshold
1795 optional float det_fg_threshold = 54 [default = 0.5];
1796 // background (non-object) overlap threshold
1797 optional float det_bg_threshold = 55 [default = 0.5];
1798 // Fraction of batch that should be foreground objects
1799 optional float det_fg_fraction = 56 [default = 0.25];
1800
1801 // optional bool OBSOLETE_can_clobber = 57 [default = true];
1802
1803 // Amount of contextual padding to add around a window
1804 // (used only by the window_data_layer)
1805 optional uint32 det_context_pad = 58 [default = 0];
1806
1807 // Mode for cropping out a detection window
1808 // warp: cropped window is warped to a fixed size and aspect ratio
1809 // square: the tightest square around the window is cropped
1810 optional string det_crop_mode = 59 [default = "warp"];
1811
1812 // For ReshapeLayer, one needs to specify the new dimensions.
1813 optional int32 new_num = 60 [default = 0];
1814 optional int32 new_channels = 61 [default = 0];
1815 optional int32 new_height = 62 [default = 0];
1816 optional int32 new_width = 63 [default = 0];
1817
1818 // Whether or not ImageLayer should shuffle the list of files at every epoch.
1819 // It will also resize images if new_height or new_width are not zero.
1820 optional bool shuffle_images = 64 [default = false];
1821
1822 // For ConcatLayer, one needs to specify the dimension for concatenation, and
1823 // the other dimensions must be the same for all the bottom blobs.
1824 // By default it will concatenate blobs along the channels dimension.
1825 optional uint32 concat_dim = 65 [default = 1];
1826
1827 optional HDF5OutputParameter hdf5_output_param = 1001;
1828}
1829
1831 // Parametric ReLU described in K. He et al, Delving Deep into Rectifiers:
1832 // Surpassing Human-Level Performance on ImageNet Classification, 2015.
1833
1834 // Initial value of a_i. Default is a_i=0.25 for all i.
1835 optional FillerParameter filler = 1;
1836 // Whether or not slope paramters are shared across channels.
1837 optional bool channel_shared = 2 [default = false];
1838}
1840 optional uint32 pad_t = 1 [default = 0];
1841 optional uint32 pad_b = 2 [default = 0];
1842 optional uint32 pad_l = 3 [default = 0];
1843 optional uint32 pad_r = 4 [default = 0];
1844 optional float val = 5 [default = 0.0];
1845}
1848 L2 = 0;
1849 L1 = 1;
1850 SMOOTH_L1 = 2;
1851 }
1852 optional RegLossType reg_loss_type = 1 [default = SMOOTH_L1];
1853 optional int32 target_axis = 2 [default = -1];
1854}
1855
1857 optional string dump_dir = 1;
1858}
1859
1861 optional string anchors_file = 1;
1862 optional int32 ref_w = 2 [default = 1];
1863 optional int32 ref_h = 3 [default = 1];
1864}
1865
1867 optional float mean_h = 1 [default = 0.0];
1868 optional float mean_w = 2 [default = 0.0];
1869 optional float mean_l = 3 [default = 0.0];
1870 optional float std_h = 4 [default = 1.0];
1871 optional float std_w = 5 [default = 1.0];
1872 optional float std_l = 6 [default = 1.0];
1873}
1874
1876 optional float neg_rois_ratio = 1 [default = 1.0];
1877 optional float ign_threshold = 2 [default = 0.6]; // ignore iou threshold
1878 optional float neg_threshold = 3 [default = 0.1]; // negative iou threshold
1879 optional float min_height = 4 [default = 0.05]; // min height for neg roi
1880 optional bool bias_match = 5 [default = true];
1881 optional bool rescore = 6 [default = true];
1882 optional int32 ori_cyc = 7 [default = 1];
1883 optional float obj_weight = 8 [default = 10.0];
1884 optional float noobj_weight = 9 [default = 1.0];
1885 optional int32 num_classes = 10 [default = 0];
1886 repeated DimensionStatistics dimension_statistics = 11;
1887}
1888
1890 repeated AnchorBox anchorbox = 1;
1891 repeated float thresholds = 2;
1892 optional float orientation_scale = 14 [default = 0.0];
1893 optional uint32 object_scale = 3;
1894 optional uint32 noobject_scale = 4;
1895 optional uint32 class_scale = 5;
1896 optional uint32 coord_scale = 6;
1897 optional float jitter = 7;
1898 optional float bias = 8;
1899 optional bool rescore = 9;
1900 optional uint32 num_classes = 10;
1901 optional bool bias_match = 11;
1902 optional float threshold = 12;
1903 optional uint32 tricky_iter = 13 [default = 400];
1904 optional NonMaximumSuppressionParameter nms_param = 15;
1905 optional int32 keep_top_k = 16 [default = -1];
1906 optional float pos_threshold = 17;
1907 optional float neg_threshold = 18;
1908 optional int32 neg_ratio = 19 [default = 3];
1909}
1911 repeated AnchorBox anchorbox = 1;
1912 repeated float thresholds = 2;
1913 optional float orientation_scale = 14 [default = 0.0];
1914 optional float dimension_scale = 15 [default = 0.0];
1915 optional float front_scale = 19 [default = 0.0];
1916 optional float rear_scale = 20 [default = 0.0];
1917 optional uint32 object_scale = 3;
1918 optional uint32 noobject_scale = 4;
1919 optional float class_scale = 5;
1920 optional uint32 coord_scale = 6;
1921 optional float jitter = 7;
1922 optional float bias = 8;
1923 optional bool rescore = 9;
1924 optional uint32 num_classes = 10;
1925 optional bool bias_match = 11;
1926 optional float threshold = 12;
1927 optional uint32 tricky_iter = 13 [default = 400];
1928 optional bool use_l1_loss = 16 [default = false];
1929 optional bool use_twice_softmax = 17 [default = false];
1930 optional bool is_anchor_normalized = 18 [default = false];
1931 repeated bool ori_enable = 21;
1932 optional string anchorfile = 22 [default = "anchor.txt"];
1933 optional bool use_side_box_v2 = 23 [default = false];
1934 optional bool use_side_box_v3 = 24 [default = false];
1935 optional int32 ori_cycle = 25 [default = 1];
1936}
1937message AnchorBox {
1938 optional float w = 1;
1939 optional float h = 2;
1940}
1942 optional uint32 stride = 1;
1943}
1944
1946 // Normalization value for box's mean.
1947 repeated float bbox_mean = 1;
1948 // Normalization value for box's std.
1949 repeated float bbox_std = 2;
1950}
1952 // Parameters for DeForMaBle Position Sensitive ROI Align.
1953 optional float heat_map_a = 1;
1954 optional int32 output_dim = 2;
1955 optional int32 group_height = 3;
1956 optional int32 group_width = 4;
1957 optional int32 pooled_height = 5;
1958 optional int32 pooled_width = 6;
1959 optional float pad_ratio = 7;
1960 optional int32 sample_per_part = 8;
1961
1962 optional float trans_std = 9 [default = 0];
1963 optional int32 part_height = 10 [default = 0];
1964 optional int32 part_width = 11 [default = 0];
1965 optional float heat_map_b = 12 [default = 0];
1966}
1968 // Feature map stride for generating anchors.
1969 optional float heat_map_a = 1;
1970 // Minimum height size for filtering boxes.
1971 optional float min_size_h = 2 [default = 2.0];
1972 // Minimum weight size for filtering boxes.
1973 optional float min_size_w = 3 [default = 2.0];
1974 // Based on which size to filtering boxes.
1976 HEIGHT_AND_WIDTH = 0;
1977 HEIGHT_OR_WIDTH = 1;
1978 }
1979 optional MIN_SIZE_MODE min_size_mode = 4 [default = HEIGHT_AND_WIDTH];
1980 // Threshold for objectness.
1981 optional float threshold_objectness = 5 [default = 0.0];
1982 optional GenAnchorParameter gen_anchor_param = 6;
1983 // Whether to refine boxes that are out of feature map.
1984 optional bool refine_out_of_map_bbox = 7 [default = false];
1985 optional NMSSSDParameter nms_param = 8;
1986 // Number of object classes.
1987 optional uint32 num_class = 9 [default = 1];
1988 // Whether to output scores of rpn proposals.
1989 optional bool rpn_proposal_output_score = 10 [default = false];
1990 // Whether to regress agnostic proposals.
1991 optional bool regress_agnostic = 11;
1992 // Threshold of each class.
1993 repeated float threshold = 12;
1994}
1996 optional bool need_nms = 1 [default = true];
1997 repeated float overlap_ratio = 2 ;
1998 repeated uint32 top_n = 3 ;
1999 optional bool add_score = 4 [default = false];
2000 repeated int32 max_candidate_n = 5;
2001 repeated bool use_soft_nms = 6;
2002 optional bool nms_among_classes = 7 [default = false];
2003 repeated bool voting = 8;
2004 repeated float vote_iou = 9;
2005 // Thresholds for learning nms.
2006 optional float force_identity_iou_thr = 10 [default = 1.0];
2007 optional float force_imparity_iou_thr = 11 [default = 0.0];
2008 optional int32 nms_gpu_max_n_per_time = 12 [default = -1];
2009}
2011 // Widths and heights for generating anchors.
2012 repeated float anchor_width = 1;
2013 repeated float anchor_height = 2;
2014}
Definition future.h:29
syntax
Definition rt.proto:1
#define THRESHOLD(size, c)
Message that stores parameters used by FlattenLayer
Definition rt.proto:981