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))
评论列表
文章目录