diff --git a/tests/test_data/test_dataset.py b/tests/test_data/test_dataset.py index 3935ecef..210c1aec 100644 --- a/tests/test_data/test_dataset.py +++ b/tests/test_data/test_dataset.py @@ -572,3 +572,26 @@ def generator(): assert "array" in labels assert labels["label"][0].tolist() == [["dog"], ["cat"]] assert np.allclose(labels["array"][0], arr) + + +def test_no_labels(): + dataset = LuxonisDataset("__no_labels", delete_existing=True) + + def generator(): + for i in range(10): + img = make_image(i) + yield { + "file": img, + } + + dataset.add(generator()) + dataset.make_splits() + + loader = LuxonisLoader(dataset) + for _, labels in loader: + assert labels == {} + + augments = Augmentations([512, 512], [{"name": "Flip", "params": {}}]) + loader = LuxonisLoader(dataset, augmentations=augments) + for _, labels in loader: + assert labels == {}