class_docstr: Class representing a VOC annotations file.
  
  Args:
      path (None): the path to the image
      folder (None): the name of the folder containing the image
      filename (None): the image filename
      segmented (None): whether the objects are segmented
      metadata (None): a :class:`fiftyone.core.metadata.ImageMetadata`
          instance
      objects (None): a list of :class:`VOCObject` instances
class_docstr_tok: ["Class","representing","a","VOC","annotations","file",".","Args",":","path","(","None",")",":","the","path","to","the","image","folder","(","None",")",":","the","name","of","the","folder","containing","the","image","filename","(","None",")",":","the","image","filename","segmented","(","None",")",":","whether","the","objects","are","segmented","metadata","(","None",")",":","a",":","class",":","`","fiftyone.core.metadata.ImageMetadata","`","instance","objects","(","None",")",":","a","list","of",":","class",":","`","VOCObject","`","instances"]
docstr: Returns a :class:`fiftyone.core.labels.Detections` representation of
  the objects in the annotation.
  
  Args:
      extra_attrs (True): whether to load extra annotation attributes
          onto the imported labels. Supported values are:
  
          -   ``True``: load all extra attributes found
          -   ``False``: do not load extra attributes
          -   a name or list of names of specific attributes to load
  
  Returns:
      a :class:`fiftyone.core.labels.Detections`
docstr_tok: ["Returns","a",":","class",":","`","fiftyone.core.labels.Detections","`","representation","of","the","objects","in","the","annotation",".","Args",":","extra_attrs","(","True",")",":","whether","to","load","extra","annotation","attributes","onto","the","imported","labels",".","Supported","values","are",":","-","``","True","``",":","load","all","extra","attributes","found","-","``","False","``",":","do","not","load","extra","attributes","-","a","name","or","list","of","names","of","specific","attributes","to","load","Returns",":","a",":","class",":","`","fiftyone.core.labels.Detections","`"]
code: def to_detections(self, extra_attrs=True):
      """Returns a :class:`fiftyone.core.labels.Detections` representation of
      the objects in the annotation.
  
      Args:
          extra_attrs (True): whether to load extra annotation attributes
              onto the imported labels. Supported values are:
  
              -   ``True``: load all extra attributes found
              -   ``False``: do not load extra attributes
              -   a name or list of names of specific attributes to load
  
      Returns:
          a :class:`fiftyone.core.labels.Detections`
      """
      if self.metadata is None:
          raise ValueError(
              "Must have metadata in order to convert to `Detections` format"
          )
  
      frame_size = (self.metadata.width, self.metadata.height)
      return fol.Detections(
          detections=[
              obj.to_detection(frame_size, extra_attrs=extra_attrs)
              for obj in self.objects
          ]
      )
  
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 2 for calling the VOCAnnotation obj's underlying member method code with example usage: obj.to_detections(extra_attrs) and returns: fol