lib/datasets/metadata_coco.py
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
        if self._year == '2017':
            file_name = str(index).zfill(12) + '.jpg'
        elif self._year == '2014':
            file_name = ('COCO_' + self._data_name + '_' + str(index).zfill(12) + '.jpg')
        image_path = osp.join(self._data_path, 'images', self._data_name, file_name)
        assert osp.exists(image_path), 'Path does not exist: {}'.format(image_path)
        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):
        if self._year == '2017':
            file_name = str(index).zfill(12) + '.jpg'
        elif self._year == '2014':
            file_name = ('COCO_' + self._data_name + '_' + str(index).zfill(12) + '.jpg')
        image_path = osp.join(self._data_path, 'images', self._data_name, file_name)
        assert osp.exists(image_path), 'Path does not exist: {}'.format(image_path)
        return image_path
def image_path_from_index ( self , index ) : if self . _year == '2017' : file_name = str ( index ) . zfill ( 12 ) + '.jpg' elif self . _year == '2014' : file_name = ( 'COCO_' + self . _data_name + '_' + str ( index ) . zfill ( 12 ) + '.jpg' ) image_path = osp . join ( self . _data_path , 'images' , self . _data_name , file_name ) assert osp . exists ( image_path ) , 'Path does not exist: {}' . format ( image_path ) 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.
        """ # Example image path for index=119993: #   images/train2014/COCO_train2014_000000119993.jpg
self
index