dgs.utils.state.collate_list_of_history¶
- dgs.utils.state.collate_list_of_history(batch: State | list[State] | list[list[State]]) list[State] [source]¶
Collate function used to combine the data returned in the format of a class:ImageHistoryDataset.
With
N
detections, a batch of data containsN
lists, each withL+1
States. This functions collates thei
-th State of each of theN
lists into a single list of States of lengthL+1
.- Parameters:
batch – Either a single list with
L+1
States
or a list containingN
list, each containingL+1
States
. A single State is also supported, even though, this shouldn’t really be feasible.- Returns:
A list of States. Because there can be a different number of detections, every State can still have a different number of items.