Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion data/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ class COCODetection(data.Dataset):
"""

def __init__(self, root, image_set='trainval35k', transform=None,
target_transform=COCOAnnotationTransform(), dataset_name='MS COCO'):
target_transform=None, dataset_name='MS COCO'):

if target_transform is None:
target_transform = COCOAnnotationTransform()

sys.path.append(osp.join(root, COCO_API))
from pycocotools.coco import COCO
self.root = osp.join(root, IMAGES, image_set)
Expand Down
6 changes: 5 additions & 1 deletion data/voc0712.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ class VOCDetection(data.Dataset):

def __init__(self, root,
image_sets=[('2007', 'trainval'), ('2012', 'trainval')],
transform=None, target_transform=VOCAnnotationTransform(),
transform=None, target_transform=None,
dataset_name='VOC0712'):

if target_transform is None:
target_transform = VOCAnnotationTransform()

self.root = root
self.image_set = image_sets
self.transform = transform
Expand Down