gather#
- gather(boxlist: NpBoxList, indices: ndarray, fields: Optional[List[str]] = None) NpBoxList [source]#
Gather boxes from BoxList according to indices and return new BoxList.
By default, gather returns boxes corresponding to the input index list, as well as all additional fields stored in the boxlist (indexing into the first dimension). However one can optionally only gather from a subset of fields.
- Parameters
- Returns
A BoxList corresponding to the subset of the input BoxList specified by indices.
- Raises
ValueError – If specified field is not contained in boxlist or if the indices are not of type int.
- Return type