Skip to content

Commit

Permalink
Remove n=10 comment in the dummy dataset fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Oct 28, 2024
1 parent 206934f commit 65d1084
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_unit/test_datamodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def create_dummy_dataset():
"""

def _create_dummy_dataset(n_images):
# n_images = 10 # needs to be > 5 to avoid floating point errors in dataset split
"""Create a dataset with N images and random bounding boxes per image.
The number of images in the dataset needs to be > 5 to avoid floating point errors
in the dataset split.
"""
img_size = 256
fixed_width_height = 10

Expand All @@ -123,7 +127,8 @@ def _create_dummy_dataset(n_images):
n_bboxes = random.randint(1, 5)
boxes = []
for _ in range(n_bboxes):
# Randomise the location of the top left corner of the bounding box
# Randomise the location of the top left corner of the
# bounding box
x_min = random.randint(0, img_size - fixed_width_height)
y_min = random.randint(0, img_size - fixed_width_height)

Expand Down

0 comments on commit 65d1084

Please sign in to comment.