class_docstr: Base class of Single Shot Multibox Detector.
  
  This is a base class of Single Shot Multibox Detector [#]_.
  
  .. [#] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy,
     Scott Reed, Cheng-Yang Fu, Alexander C. Berg.
     SSD: Single Shot MultiBox Detector. ECCV 2016.
  
  Args:
      extractor: A link which extracts feature maps.
          This link must have :obj:`insize`, :obj:`grids` and
          :meth:`forward`.
  
          * :obj:`insize`: An integer which indicates             the size of input images. Images are resized to this size before             feature extraction.
          * :obj:`grids`: An iterable of integer. Each integer indicates             the size of feature map. This value is used by             :class:`~chainercv.links.model.ssd.MultiBboxCoder`.
          * :meth:`__call_`: A method which computes feature maps.             It must take a batched images and return batched feature maps.
      multibox: A link which computes :obj:`mb_locs` and :obj:`mb_confs`
          from feature maps.
          This link must have :obj:`n_class`, :obj:`aspect_ratios` and
          :meth:`forward`.
  
          * :obj:`n_class`: An integer which indicates the number of             classes.             This value should include the background class.
          * :obj:`aspect_ratios`: An iterable of tuple of integer.             Each tuple indicates the aspect ratios of default bounding boxes             at each feature maps. This value is used by             :class:`~chainercv.links.model.ssd.MultiboxCoder`.
          * :meth:`forward`: A method which computes             :obj:`mb_locs` and :obj:`mb_confs`.             It must take a batched feature maps and             return :obj:`mb_locs` and :obj:`mb_confs`.
      steps (iterable of float): The step size for each feature map.
          This value is used by
          :class:`~chainercv.links.model.ssd.MultiboxCoder`.
      sizes (iterable of float): The base size of default bounding boxes
          for each feature map. This value is used by
          :class:`~chainercv.links.model.ssd.MultiboxCoder`.
      variance (tuple of floats): Two coefficients for decoding
          the locations of bounding boxes.
          This value is used by
          :class:`~chainercv.links.model.ssd.MultiboxCoder`.
          The default value is :obj:`(0.1, 0.2)`.
  
  Parameters:
      nms_thresh (float): The threshold value
          for :func:`~chainercv.utils.non_maximum_suppression`.
          The default value is :obj:`0.45`.
          This value can be changed directly or by using :meth:`use_preset`.
      score_thresh (float): The threshold value for confidence score.
          If a bounding box whose confidence score is lower than this value,
          the bounding box will be suppressed.
          The default value is :obj:`0.6`.
          This value can be changed directly or by using :meth:`use_preset`.
docstr: Compute localization and classification from a batch of images.
  
  This method computes two variables, :obj:`mb_locs` and :obj:`mb_confs`.
  :func:`self.coder.decode` converts these variables to bounding box
  coordinates and confidence scores.
  These variables are also used in training SSD.
  
  Args:
      x (chainer.Variable): A variable holding a batch of images.
          The images are preprocessed by :meth:`_prepare`.
  
  Returns:
      tuple of chainer.Variable:
      This method returns two variables, :obj:`mb_locs` and
      :obj:`mb_confs`.
  
      * **mb_locs**: A variable of float arrays of shape                 :math:`(B, K, 4)`,                 where :math:`B` is the number of samples in the batch and                 :math:`K` is the number of default bounding boxes.
      * **mb_confs**: A variable of float arrays of shape                 :math:`(B, K, n\_fg\_class + 1)`.
docstr_tok: ["Compute","localization","and","classification","from","a","batch","of","images",".","This","method","computes","two","variables",",",":","obj",":","`","mb_locs","`","and",":","obj",":","`","mb_confs","`",".",":","func",":","`","self.coder.decode","`","converts","these","variables","to","bounding","box","coordinates","and","confidence","scores",".","These","variables","are","also","used","in","training","SSD",".","Args",":","x","(","chainer.Variable",")",":","A","variable","holding","a","batch","of","images",".","The","images","are","preprocessed","by",":","meth",":","`","_prepare","`",".","Returns",":","tuple","of","chainer.Variable",":","This","method","returns","two","variables",",",":","obj",":","`","mb_locs","`","and",":","obj",":","`","mb_confs","`",".","*","*","*","mb_locs","*","*",":","A","variable","of","float","arrays","of","shape",":","math",":","`","(","B",",","K",",","4",")","`",",","where",":","math",":","`","B","`","is","the","number","of","samples","in","the","batch","and",":","math",":","`","K","`","is","the","number","of","default","bounding","boxes",".","*","*","*","mb_confs","*","*",":","A","variable","of","float","arrays","of","shape",":","math",":","`","(","B",",","K",",","n\\_fg\\_class","+","1",")","`","."]
code: def forward(self, x):
      """Compute localization and classification from a batch of images.
  
          This method computes two variables, :obj:`mb_locs` and :obj:`mb_confs`.
          :func:`self.coder.decode` converts these variables to bounding box
          coordinates and confidence scores.
          These variables are also used in training SSD.
  
          Args:
              x (chainer.Variable): A variable holding a batch of images.
                  The images are preprocessed by :meth:`_prepare`.
  
          Returns:
              tuple of chainer.Variable:
              This method returns two variables, :obj:`mb_locs` and
              :obj:`mb_confs`.
  
              * **mb_locs**: A variable of float arrays of shape \
                  :math:`(B, K, 4)`, \
                  where :math:`B` is the number of samples in the batch and \
                  :math:`K` is the number of default bounding boxes.
              * **mb_confs**: A variable of float arrays of shape \
                  :math:`(B, K, n\_fg\_class + 1)`.
          """
  
      return self.multibox(self.extractor(x))
  
file_path: chainercv/chainercv/links/model/ssd/ssd.py
imports: from __future__ import division
  import numpy
  import chainer
  from chainercv.links.model.ssd import MultiboxCoder
  from chainercv import transforms
label_desc: Use image node_id 6 for calling the SSD obj's underlying member method code with example usage: obj.forward(x) and returns: self