Skip to content

Commit dc75e61

Browse files
committed
added type
1 parent 6e6d779 commit dc75e61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

luxonis_ml/data/loaders/luxonis_loader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def __init__(
8484
for view in self.view:
8585
self.instances.extend(splits[view])
8686

87-
self.idx_to_df_row = []
87+
self.idx_to_df_row: list[list[int]] = []
8888
for uuid in self.instances:
8989
boolean_mask = df["uuid"] == uuid
9090
row_indexes = boolean_mask.arg_true().to_list()
@@ -139,7 +139,9 @@ def __getitem__(self, idx: int) -> LuxonisLoaderOutput:
139139
else:
140140
picked_indices = set()
141141
max_val = len(self)
142-
while len(picked_indices) < self.augmentations.aug_batch_size - 1:
142+
while (
143+
len(picked_indices) < self.augmentations.aug_batch_size - 1
144+
):
143145
rand_idx = random.randint(0, max_val - 1)
144146
if rand_idx != idx and rand_idx not in picked_indices:
145147
picked_indices.add(rand_idx)

0 commit comments

Comments
 (0)