pytorch_datasets.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:single_shot_multibox_detector 作者: oarriaga 项目源码 文件源码
def pull_image(self, index):
        '''Returns the original image object at index in PIL form

        Note: not using self.__getitem__(), as any transformations passed in
        could mess up this functionality.

        Argument:
            index (int): index of img to show
        Return:
            PIL img
        '''
        img_id = self.ids[index]
        img = cv2.imread(self._imgpath % img_id, cv2.IMREAD_COLOR)
        img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
        return img
        # return imread(self._imgpath % img_id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号