(self, index)
return image_path
Construct an image path from the image's "index" identifier.
Construct an image path from the image's "index" identifier.
Construct an image path from the image s index identifier .
def image_path_from_index(self, index):
        """
        Construct an image path from the image's "index" identifier.
        """
        # Example image path for index=119993:
        #   images/train2014/COCO_train2014_000000119993.jpg
        file_name = ('COCO_' + self._data_name_path + '_' +
                     str(index).zfill(12) + '.jpg')
        image_path = osp.join(self._data_path, 'images',
                              self._data_name_path, file_name)
        assert osp.exists(image_path), \
                'Path does not exist: {}'.format(image_path)
        return image_path
def image_path_from_index ( self , index ) : # Example image path for index=119993: #   images/train2014/COCO_train2014_000000119993.jpg file_name = ( 'COCO_' + self . _data_name_path + '_' + str ( index ) . zfill ( 12 ) + '.jpg' ) image_path = osp . join ( self . _data_path , 'images' , self . _data_name_path , file_name ) assert osp . exists ( image_path ) , 'Path does not exist: {}' . format ( image_path ) return image_path