@@ -603,7 +603,7 @@ def prior_box(input,
603
603
offset = 0.5 ,
604
604
name = None ):
605
605
"""
606
- **Prior box operator **
606
+ **Prior Box Operator **
607
607
608
608
Generate prior boxes for SSD(Single Shot MultiBox Detector) algorithm.
609
609
Each position of the input produce N prior boxes, N is determined by
@@ -632,26 +632,30 @@ def prior_box(input,
632
632
name(str): Name of the prior box op. Default: None.
633
633
634
634
Returns:
635
- boxes(Variable): the output prior boxes of PriorBox.
636
- The layout is [H, W, num_priors, 4].
637
- H is the height of input, W is the width of input,
638
- num_priors is the total
639
- box count of each position of input.
640
- Variances(Variable): the expanded variances of PriorBox.
641
- The layout is [H, W, num_priors, 4].
642
- H is the height of input, W is the width of input
643
- num_priors is the total
644
- box count of each position of input
635
+ tuple: A tuple with two Variable (boxes, variances)
636
+
637
+ boxes: the output prior boxes of PriorBox.
638
+ The layout is [H, W, num_priors, 4].
639
+ H is the height of input, W is the width of input,
640
+ num_priors is the total
641
+ box count of each position of input.
642
+
643
+ variances: the expanded variances of PriorBox.
644
+ The layout is [H, W, num_priors, 4].
645
+ H is the height of input, W is the width of input
646
+ num_priors is the total
647
+ box count of each position of input
645
648
646
649
647
650
Examples:
648
651
.. code-block:: python
649
- box, var = prior_box(
650
- input=conv1,
651
- image=images,
652
- min_sizes=[100.],
653
- flip=True,
654
- clip=True)
652
+
653
+ box, var = fluid.layers.prior_box(
654
+ input=conv1,
655
+ image=images,
656
+ min_sizes=[100.],
657
+ flip=True,
658
+ clip=True)
655
659
"""
656
660
helper = LayerHelper ("prior_box" , ** locals ())
657
661
dtype = helper .input_dtype ()
@@ -721,11 +725,9 @@ def multi_box_head(inputs,
721
725
stride = 1 ,
722
726
name = None ):
723
727
"""
724
- **Prior_boxes**
725
-
726
728
Generate prior boxes for SSD(Single Shot MultiBox Detector)
727
729
algorithm. The details of this algorithm, please refer the
728
- section 2.2 of SSD paper ( SSD: Single Shot MultiBox Detector)
730
+ section 2.2 of SSD paper ` SSD: Single Shot MultiBox Detector
729
731
<https://arxiv.org/abs/1512.02325>`_ .
730
732
731
733
Args:
@@ -766,24 +768,27 @@ def multi_box_head(inputs,
766
768
name(str): Name of the prior box layer. Default: None.
767
769
768
770
Returns:
769
- mbox_loc(Variable): The predicted boxes' location of the inputs.
770
- The layout is [N, H*W*Priors, 4]. where Priors
771
- is the number of predicted boxes each position of each input.
772
- mbox_conf(Variable): The predicted boxes' confidence of the inputs.
773
- The layout is [N, H*W*Priors, C]. where Priors
774
- is the number of predicted boxes each position of each input
775
- and C is the number of Classes.
776
- boxes(Variable): the output prior boxes of PriorBox.
777
- The layout is [num_priors, 4]. num_priors is the total
778
- box count of each position of inputs.
779
- Variances(Variable): the expanded variances of PriorBox.
780
- The layout is [num_priors, 4]. num_priors is the total
781
- box count of each position of inputs
771
+ tuple: A tuple with four Variables. (mbox_loc, mbox_conf, boxes, variances)
772
+
773
+ mbox_loc: The predicted boxes' location of the inputs. The layout
774
+ is [N, H*W*Priors, 4]. where Priors is the number of predicted
775
+ boxes each position of each input.
776
+
777
+ mbox_conf: The predicted boxes' confidence of the inputs. The layout
778
+ is [N, H*W*Priors, C]. where Priors is the number of predicted boxes
779
+ each position of each input and C is the number of Classes.
780
+
781
+ boxes: the output prior boxes of PriorBox. The layout is [num_priors, 4].
782
+ num_priors is the total box count of each position of inputs.
783
+
784
+ variances: the expanded variances of PriorBox. The layout is
785
+ [num_priors, 4]. num_priors is the total box count of each position of inputs
782
786
783
787
784
788
Examples:
785
789
.. code-block:: python
786
- mbox_locs, mbox_confs, box, var = layers.multi_box_head(
790
+
791
+ mbox_locs, mbox_confs, box, var = fluid.layers.multi_box_head(
787
792
inputs=[conv1, conv2, conv3, conv4, conv5, conv5],
788
793
image=images,
789
794
num_classes=21,
0 commit comments