Skip to content

Commit 60fd488

Browse files
sstsai-adlfacebook-github-bot
authored andcommitted
allow for multiple datasets for test data loader creation
Summary: Use all training dataset for export instead of just first. This is to support use cases where there is only a small amount of images per jsons but a number of jsons. Since calibration uses the first dataset, it is limited by the number of images in a single dataset. Reviewed By: ppwwyyxx Differential Revision: D28902673 fbshipit-source-id: f80146b02d2d1bc04703fbb21ef410f5e26ba64c
1 parent 6ba6206 commit 60fd488

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

detectron2/data/build.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,11 @@ def _test_loader_from_config(cfg, dataset_name, mapper=None):
397397
Uses the given `dataset_name` argument (instead of the names in cfg), because the
398398
standard practice is to evaluate each test set individually (not combining them).
399399
"""
400+
if isinstance(dataset_name, str):
401+
dataset_name = [dataset_name]
402+
400403
dataset = get_detection_dataset_dicts(
401-
[dataset_name],
404+
dataset_name,
402405
filter_empty=False,
403406
proposal_files=[
404407
cfg.DATASETS.PROPOSAL_FILES_TEST[list(cfg.DATASETS.TEST).index(dataset_name)]

0 commit comments

Comments
 (0)