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: Creates a :class:`VOCAnnotation` instance from a JSON dict
  representation.
  
  Args:
      d: a JSON dict
  
  Returns:
      a :class:`VOCAnnotation`
docstr_tok: ["Creates","a",":","class",":","`","VOCAnnotation","`","instance","from","a","JSON","dict","representation",".","Args",":","d",":","a","JSON","dict","Returns",":","a",":","class",":","`","VOCAnnotation","`"]
code: def from_dict(cls, d):
      """Creates a :class:`VOCAnnotation` instance from a JSON dict
      representation.
  
      Args:
          d: a JSON dict
  
      Returns:
          a :class:`VOCAnnotation`
      """
      annotation = d["annotation"]
  
      path = annotation.get("path", None)
      folder = annotation.get("folder", None)
      filename = annotation.get("filename", None)
      segmented = annotation.get("segmented", None)
  
      if "size" in annotation:
          size = annotation["size"]
          width = size.get("width", None)
          height = size.get("height", None)
          depth = size.get("depth", None)
  
          metadata = fom.ImageMetadata(
              width=int(width) if width else None,
              height=int(height) if height else None,
              num_channels=int(depth) if depth else None,
          )
      else:
          metadata = None
  
      _objects = _ensure_list(annotation.get("object", []))
      objects = [VOCObject.from_annotation_dict(do) for do in _objects]
  
      return cls(
          path=path,
          folder=folder,
          filename=filename,
          segmented=segmented,
          metadata=metadata,
          objects=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 5 for calling the VOCAnnotation obj's underlying member method code with example usage: obj.from_dict(cls, d) and returns: cls