@@ -422,6 +422,20 @@ message LayerParameter {
422
422
optional ThresholdParameter threshold_param = 128 ;
423
423
optional TileParameter tile_param = 138 ;
424
424
optional WindowDataParameter window_data_param = 129 ;
425
+ optional InterpParameter interp_param = 166 ;
426
+ optional ShuffleChannelParameter shuffle_channel_param = 164 ;
427
+ optional PermuteParameter permute_param = 202 ;
428
+ optional PriorBoxParameter prior_box_param = 203 ;
429
+ optional DetectionOutputParameter detection_output_param = 204 ;
430
+ optional DetectionEvaluateParameter detection_evaluate_param = 205 ;
431
+ optional NormalizeParameter norm_param = 206 ;
432
+ optional AxpyParameter axpy_param = 151 ;
433
+ optional ReLU6Parameter relu6_param = 100000 ;
434
+ }
435
+
436
+
437
+ message ShuffleChannelParameter {
438
+ optional uint32 group = 1 [default = 1 ]; // The number of group
425
439
}
426
440
427
441
// Message that stores parameters used to apply transformation
@@ -1456,3 +1470,207 @@ message PReLUParameter {
1456
1470
// Whether or not slope parameters are shared across channels.
1457
1471
optional bool channel_shared = 2 [default = false ];
1458
1472
}
1473
+
1474
+ message ReLU6Parameter {
1475
+ optional float negative_slope = 1 [default = 0 ];
1476
+ }
1477
+
1478
+ message InterpParameter {
1479
+ optional int32 height = 1 [default = 0 ]; // Height of output
1480
+ optional int32 width = 2 [default = 0 ]; // Width of output
1481
+ optional int32 zoom_factor = 3 [default = 1 ]; // zoom factor
1482
+ optional int32 shrink_factor = 4 [default = 1 ]; // shrink factor
1483
+ optional int32 pad_beg = 5 [default = 0 ]; // padding at begin of input
1484
+ optional int32 pad_end = 6 [default = 0 ]; // padding at end of input
1485
+ }
1486
+
1487
+ message PermuteParameter {
1488
+ // The new orders of the axes of data. Notice it should be with
1489
+ // in the same range as the input data, and it starts from 0.
1490
+ // Do not provide repeated order.
1491
+ repeated uint32 order = 1 ;
1492
+ }
1493
+
1494
+ message PriorBoxParameter {
1495
+ // Encode/decode type.
1496
+ enum CodeType {
1497
+ CORNER = 1 ;
1498
+ CENTER_SIZE = 2 ;
1499
+ CORNER_SIZE = 3 ;
1500
+ }
1501
+ // Minimum box size (in pixels). Required!
1502
+ repeated float min_size = 1 ;//对应论文2.2节中公式(4)中的sk×网络输入层输入图像[data层的输入]大小
1503
+ // Maximum box size (in pixels). Required!
1504
+ repeated float max_size = 2 ;
1505
+ // Various of aspect ratios. Duplicate ratios will be ignored.
1506
+ // If none is provided, we use default ratio 1.
1507
+ repeated float aspect_ratio = 3 ; // 等宽比
1508
+ // If true, will flip each aspect ratio.
1509
+ // For example, if there is aspect ratio "r",
1510
+ // we will generate aspect ratio "1.0/r" as well.
1511
+ optional bool flip = 4 [default = true ]; // 是否反转等宽比
1512
+ // If true, will clip the prior so that it is within [0, 1]
1513
+ optional bool clip = 5 [default = false ]; // 是否进行裁剪,是否保证默认框整个在网络输入层输入图像内)
1514
+ // Variance for adjusting the prior bboxes.
1515
+ repeated float variance = 6 ;
1516
+ // By default, we calculate img_height, img_width, step_x, step_y based on
1517
+ // bottom[0] (feat) and bottom[1] (img). Unless these values are explicitely
1518
+ // provided.
1519
+ // Explicitly provide the img_size.
1520
+ optional uint32 img_size = 7 ;
1521
+ // Either img_size or img_h/img_w should be specified; not both.
1522
+ optional uint32 img_h = 8 ;//网络输入层输入图像的高(或自行设置的高度)
1523
+ optional uint32 img_w = 9 ;//网络输入层输入图像的宽(或自行设置的高度)
1524
+
1525
+ // Explicitly provide the step size.
1526
+ optional float step = 10 ;
1527
+ // Either step or step_h/step_w should be specified; not both.
1528
+ optional float step_h = 11 ;
1529
+ optional float step_w = 12 ;
1530
+
1531
+ // Offset to the top left corner of each cell.
1532
+ optional float offset = 13 [default = 0.5 ];
1533
+ }
1534
+
1535
+ // Message that store parameters used by DetectionOutputLayer
1536
+ message DetectionOutputParameter {
1537
+ // Number of classes to be predicted. Required!
1538
+ optional uint32 num_classes = 1 ;
1539
+ // If true, bounding box are shared among different classes.
1540
+ optional bool share_location = 2 [default = true ];
1541
+ // Background label id. If there is no background class,
1542
+ // set it as -1.
1543
+ optional int32 background_label_id = 3 [default = 0 ];
1544
+ // Parameters used for non maximum suppression.
1545
+ optional NonMaximumSuppressionParameter nms_param = 4 ;
1546
+ // Parameters used for saving detection results.
1547
+ optional SaveOutputParameter save_output_param = 5 ;
1548
+ // Type of coding method for bbox.
1549
+ optional PriorBoxParameter.CodeType code_type = 6 [default = CORNER ];
1550
+ // If true, variance is encoded in target; otherwise we need to adjust the
1551
+ // predicted offset accordingly.
1552
+ optional bool variance_encoded_in_target = 8 [default = false ];
1553
+ // Number of total bboxes to be kept per image after nms step.
1554
+ // -1 means keeping all bboxes after nms step.
1555
+ optional int32 keep_top_k = 7 [default = -1 ];
1556
+ // Only consider detections whose confidences are larger than a threshold.
1557
+ // If not provided, consider all boxes.
1558
+ optional float confidence_threshold = 9 ;
1559
+ // If true, visualize the detection results.
1560
+ optional bool visualize = 10 [default = false ];
1561
+ // The threshold used to visualize the detection results.
1562
+ optional float visualize_threshold = 11 ;
1563
+ // If provided, save outputs to video file.
1564
+ optional string save_file = 12 ;
1565
+ }
1566
+
1567
+ // Message that store parameters used by DetectionEvaluateLayer
1568
+ message DetectionEvaluateParameter {
1569
+ // Number of classes that are actually predicted. Required!
1570
+ optional uint32 num_classes = 1 ;
1571
+ // Label id for background class. Needed for sanity check so that
1572
+ // background class is neither in the ground truth nor the detections.
1573
+ optional uint32 background_label_id = 2 [default = 0 ];
1574
+ // Threshold for deciding true/false positive.
1575
+ optional float overlap_threshold = 3 [default = 0.5 ];
1576
+ // If true, also consider difficult ground truth for evaluation.
1577
+ optional bool evaluate_difficult_gt = 4 [default = true ];
1578
+ // A file which contains a list of names and sizes with same order
1579
+ // of the input DB. The file is in the following format:
1580
+ // name height width
1581
+ // ...
1582
+ // If provided, we will scale the prediction and ground truth NormalizedBBox
1583
+ // for evaluation.
1584
+ optional string name_size_file = 5 ;
1585
+ // The resize parameter used in converting NormalizedBBox to original image.
1586
+ optional ResizeParameter resize_param = 6 ;
1587
+ }
1588
+
1589
+ message ResizeParameter {
1590
+ //Probability of using this resize policy
1591
+ optional float prob = 1 [default = 1 ];
1592
+
1593
+ enum Resize_mode {
1594
+ WARP = 1 ;
1595
+ FIT_SMALL_SIZE = 2 ;
1596
+ FIT_LARGE_SIZE_AND_PAD = 3 ;
1597
+ }
1598
+ optional Resize_mode resize_mode = 2 [default = WARP ];
1599
+ optional uint32 height = 3 [default = 0 ];
1600
+ optional uint32 width = 4 [default = 0 ];
1601
+ // A parameter used to update bbox in FIT_SMALL_SIZE mode.
1602
+ optional uint32 height_scale = 8 [default = 0 ];
1603
+ optional uint32 width_scale = 9 [default = 0 ];
1604
+
1605
+ enum Pad_mode {
1606
+ CONSTANT = 1 ;
1607
+ MIRRORED = 2 ;
1608
+ REPEAT_NEAREST = 3 ;
1609
+ }
1610
+ // Padding mode for BE_SMALL_SIZE_AND_PAD mode and object centering
1611
+ optional Pad_mode pad_mode = 5 [default = CONSTANT ];
1612
+ // if specified can be repeated once (would fill all the channels)
1613
+ // or can be repeated the same number of times as channels
1614
+ // (would use it them to the corresponding channel)
1615
+ repeated float pad_value = 6 ;
1616
+
1617
+ enum Interp_mode { //Same as in OpenCV
1618
+ LINEAR = 1 ;
1619
+ AREA = 2 ;
1620
+ NEAREST = 3 ;
1621
+ CUBIC = 4 ;
1622
+ LANCZOS4 = 5 ;
1623
+ }
1624
+ //interpolation for for resizing
1625
+ repeated Interp_mode interp_mode = 7 ;
1626
+ }
1627
+
1628
+ message NonMaximumSuppressionParameter {
1629
+ // Threshold to be used in nms.
1630
+ optional float nms_threshold = 1 [default = 0.3 ];
1631
+ // Maximum number of results to be kept.
1632
+ optional int32 top_k = 2 ;
1633
+ // Parameter for adaptive nms.
1634
+ optional float eta = 3 [default = 1.0 ];
1635
+ }
1636
+
1637
+ message SaveOutputParameter {
1638
+ // Output directory. If not empty, we will save the results.
1639
+ optional string output_directory = 1 ;
1640
+ // Output name prefix.
1641
+ optional string output_name_prefix = 2 ;
1642
+ // Output format.
1643
+ // VOC - PASCAL VOC output format.
1644
+ // COCO - MS COCO output format.
1645
+ optional string output_format = 3 ;
1646
+ // If you want to output results, must also provide the following two files.
1647
+ // Otherwise, we will ignore saving results.
1648
+ // label map file.
1649
+ optional string label_map_file = 4 ;
1650
+ // A file which contains a list of names and sizes with same order
1651
+ // of the input DB. The file is in the following format:
1652
+ // name height width
1653
+ // ...
1654
+ optional string name_size_file = 5 ;
1655
+ // Number of test images. It can be less than the lines specified in
1656
+ // name_size_file. For example, when we only want to evaluate on part
1657
+ // of the test images.
1658
+ optional uint32 num_test_image = 6 ;
1659
+ // The resize parameter used in saving the data.
1660
+ optional ResizeParameter resize_param = 7 ;
1661
+ }
1662
+
1663
+ message AxpyParameter {
1664
+
1665
+ }
1666
+
1667
+ // Message that stores parameters used by NormalizeLayer
1668
+ message NormalizeParameter {
1669
+ optional bool across_spatial = 1 [default = true ];
1670
+ // Initial value of scale. Default is 1.0 for all
1671
+ optional FillerParameter scale_filler = 2 ;
1672
+ // Whether or not scale parameters are shared across channels.
1673
+ optional bool channel_shared = 3 [default = true ];
1674
+ // Epsilon for not dividing by zero while normalizing variance
1675
+ optional float eps = 4 [default = 1e-10 ];
1676
+ }
0 commit comments