mscoco.py 文件源码

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

项目:dataset_loaders 作者: fvisin 项目源码 文件源码
def __init__(self,
                 which_set='train',
                 warn_grayscale=False,
                 *args,
                 **kwargs):
        sys.path.append(os.path.join(os.path.dirname(
            os.path.abspath(__file__)), 'coco', 'PythonAPI'))
        self.which_set = 'val' if which_set == 'valid' else which_set
        self.warn_grayscale = warn_grayscale

        # constructing the ThreadedDataset
        # it also creates/copies the dataset in self.path if not already there
        super(MSCocoDataset, self).__init__(*args, **kwargs)

        self.set_has_GT = self.which_set != 'test'

        if self.seq_length != 1 or self.seq_per_subset != 0:
            raise NotImplementedError('Images in COCO are not sequential. '
                                      'It does not make sense to request a '
                                      'sequence. seq_length {} '
                                      'seq_per_subset {}'.format(
                                          self.seq_length,
                                          self.seq_per_subset))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号