class_docstr: An object in VOC detection format.
  
  Args:
      name: the object label
      bndbox: a :class:`VOCBoundingBox`
      **attributes: additional custom attributes
class_docstr_tok: ["An","object","in","VOC","detection","format",".","Args",":","name",":","the","object","label","bndbox",":","a",":","class",":","`","VOCBoundingBox","`","*","*","attributes",":","additional","custom","attributes"]
docstr: Creates a :class:`VOCObject` from a
  :class:`fiftyone.core.labels.Detection`.
  
  Args:
      detection: a :class:`fiftyone.core.labels.Detection`
      metadata: a :class:`fiftyone.core.metadata.ImageMetadata` instance
          for the image
      extra_attrs (True): whether to include extra object attributes.
          Supported values are:
  
          -   ``True``: include all extra attributes found
          -   ``False``: do not include extra attributes
          -   a name or list of names of specific attributes to include
  
  Returns:
      a :class:`VOCObject`
docstr_tok: ["Creates","a",":","class",":","`","VOCObject","`","from","a",":","class",":","`","fiftyone.core.labels.Detection","`",".","Args",":","detection",":","a",":","class",":","`","fiftyone.core.labels.Detection","`","metadata",":","a",":","class",":","`","fiftyone.core.metadata.ImageMetadata","`","instance","for","the","image","extra_attrs","(","True",")",":","whether","to","include","extra","object","attributes",".","Supported","values","are",":","-","``","True","``",":","include","all","extra","attributes","found","-","``","False","``",":","do","not","include","extra","attributes","-","a","name","or","list","of","names","of","specific","attributes","to","include","Returns",":","a",":","class",":","`","VOCObject","`"]
code: def from_detection(cls, detection, metadata, extra_attrs=True):
      """Creates a :class:`VOCObject` from a
      :class:`fiftyone.core.labels.Detection`.
  
      Args:
          detection: a :class:`fiftyone.core.labels.Detection`
          metadata: a :class:`fiftyone.core.metadata.ImageMetadata` instance
              for the image
          extra_attrs (True): whether to include extra object attributes.
              Supported values are:
  
              -   ``True``: include all extra attributes found
              -   ``False``: do not include extra attributes
              -   a name or list of names of specific attributes to include
  
      Returns:
          a :class:`VOCObject`
      """
      name = detection.label
  
      frame_size = (metadata.width, metadata.height)
      bndbox = VOCBoundingBox.from_detection_format(
          detection.bounding_box, frame_size
      )
  
      attributes = _get_attributes(detection, extra_attrs)
  
      return cls(name, bndbox, **attributes)
  
imports: import logging
  import os
  import jinja2
  import eta.core.utils
  import fiftyone.constants
  import fiftyone.core.labels
  import fiftyone.core.metadata
  import fiftyone.core.storage
  import fiftyone.core.utils
  import fiftyone.utils.data
label_desc: Use image node_id 3 for calling the VOCObject obj's underlying member method code with example usage: obj.from_detection(cls, detection, metadata, extra_attrs) and returns: cls