def image_aspect_ratio(self, image_index):
        """ Compute the aspect ratio for an image with image_index.
        """
        image = self.coco.loadImgs(self.image_ids[image_index])[0]
        return float(image['width']) / float(image['height'])
 Compute the aspect ratio for an image with image_index.
        
keras_retinanet/preprocessing/coco.py