Skip to content

Commit

Permalink
allow for multiple datasets for test data loader creation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sstsai-adl authored and facebook-github-bot committed Jun 9, 2021
1 parent 6ba6206 commit 60fd488
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion detectron2/data/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,11 @@ def _test_loader_from_config(cfg, dataset_name, mapper=None):
Uses the given `dataset_name` argument (instead of the names in cfg), because the
standard practice is to evaluate each test set individually (not combining them).
"""
if isinstance(dataset_name, str):
dataset_name = [dataset_name]

dataset = get_detection_dataset_dicts(
[dataset_name],
dataset_name,
filter_empty=False,
proposal_files=[
cfg.DATASETS.PROPOSAL_FILES_TEST[list(cfg.DATASETS.TEST).index(dataset_name)]
Expand Down

0 comments on commit 60fd488

Please sign in to comment.