(self, image_id)
return image
Generate an image from the specs of the given image ID.
        Typically this function loads the image from a file, but
        in this case it generates the image on the fly from the
        specs in image_info.
Generate an image from the specs of the given image ID.
        Typically this function loads the image from a file, but
        in this case it generates the image on the fly from the
        specs in image_info.
Generate an image from the specs of the given image ID . Typically this function loads the image from a file but in this case it generates the image on the fly from the specs in image_info .
def load_image(self, image_id):
        """Generate an image from the specs of the given image ID.
        Typically this function loads the image from a file, but
        in this case it generates the image on the fly from the
        specs in image_info.
        """
        info = self.image_info[image_id]
        bg_color = np.array(info['bg_color']).reshape([1, 1, 3])
        image = np.ones([info['height'], info['width'], 3], dtype=np.uint8)
        image = image * bg_color.astype(np.uint8)
        for shape, color, dims in info['shapes']:
            image = self.draw_shape(image, shape, dims, color)
        return image
def load_image ( self , image_id ) : info = self . image_info [ image_id ] bg_color = np . array ( info [ 'bg_color' ] ) . reshape ( [ 1 , 1 , 3 ] ) image = np . ones ( [ info [ 'height' ] , info [ 'width' ] , 3 ] , dtype = np . uint8 ) image = image * bg_color . astype ( np . uint8 ) for shape , color , dims in info [ 'shapes' ] : image = self . draw_shape ( image , shape , dims , color ) return image