class_docstr: Generate data for a Pascal VOC dataset.
  
  See http://host.robots.ox.ac.uk/pascal/VOC/ for more information.
class_docstr_tok: ["Generate","data","for","a","Pascal","VOC","dataset",".","See","http",":","\/\/host.robots.ox.ac.uk\/pascal\/VOC\/","for","more","information","."]
docstr: Compute the aspect ratio for an image with image_index.
          
docstr_tok: ["Compute","the","aspect","ratio","for","an","image","with","image_index","."]
code: def image_aspect_ratio(self, image_index):
      """Compute the aspect ratio for an image with image_index."""
      path = os.path.join(
          self.data_dir,
          "JPEGImages",
          self.image_names[image_index] + self.image_extension,
      )
      image = Image.open(path)
      return float(image.width) / float(image.height)
  
imports: from ..preprocessing.generator import Generator
  from ..utils.image import read_image_bgr
  import os
  import numpy
  from six import raise_from
  from PIL import Image
label_desc: Use image node_id 8 for calling the PascalVocGenerator obj's underlying member method code with example usage: obj.image_aspect_ratio(image_index) and returns: unknown