class_docstr: A bounding box in VOC detection format.
  
  Args:
      xmin: the top-left x coordinate
      ymin: the top-left y coordinate
      xmax: the bottom-right x coordinate
      ymax: the bottom-right y coordinate
class_docstr_tok: ["A","bounding","box","in","VOC","detection","format",".","Args",":","xmin",":","the","top-left","x","coordinate","ymin",":","the","top-left","y","coordinate","xmax",":","the","bottom-right","x","coordinate","ymax",":","the","bottom-right","y","coordinate"]
docstr: Creates a :class:`VOCBoundingBox` from a bounding box stored in
  :class:`fiftyone.core.labels.Detection` format.
  
  Args:
      bounding_box: ``[x-top-left, y-top-left, width, height]``
      frame_size: the ``(width, height)`` of the image
  
  Returns:
      a :class:`VOCBoundingBox`
docstr_tok: ["Creates","a",":","class",":","`","VOCBoundingBox","`","from","a","bounding","box","stored","in",":","class",":","`","fiftyone.core.labels.Detection","`","format",".","Args",":","bounding_box",":","``","[","x-top-left",",","y-top-left",",","width",",","height","]","``","frame_size",":","the","``","(","width",",","height",")","``","of","the","image","Returns",":","a",":","class",":","`","VOCBoundingBox","`"]
code: def from_detection_format(cls, bounding_box, frame_size):
      """Creates a :class:`VOCBoundingBox` from a bounding box stored in
      :class:`fiftyone.core.labels.Detection` format.
  
      Args:
          bounding_box: ``[x-top-left, y-top-left, width, height]``
          frame_size: the ``(width, height)`` of the image
  
      Returns:
          a :class:`VOCBoundingBox`
      """
      x, y, w, h = bounding_box
      width, height = frame_size
      return cls(
          int(width * x),
          int(height * y),
          int(width * (x + w)),
          int(height * (y + h)),
      )
  
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 VOCBoundingBox obj's underlying member method code with example usage: obj.from_detection_format(cls, bounding_box, frame_size) and returns: cls