CASIA.py 文件源码

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

项目:PyCasia 作者: lucaskjaero 项目源码 文件源码
def load_dataset(self, dataset, verbose=True):
        """
        Load a directory of gnt files. Yields the image and label in tuples.
        :param dataset: The directory to load.
        :return:  Yields (Pillow.Image.Image, label) pairs.
        """
        assert self.get_dataset(dataset) is True, "Datasets aren't properly downloaded, " \
                                                  "rerun to try again or download datasets manually."

        if verbose:
            print("Loading %s" % dataset)

        dataset_path = self.base_dataset_path + dataset
        for path in tqdm(glob.glob(dataset_path + "/*.gnt")):
            for image, label in self.load_gnt_file(path):
                yield image, label
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号