- gather(boxlist: BoxList, indices: ndarray, fields: Optional[List[str]] = None) BoxList #
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.
- a BoxList corresponding to the subset of the input BoxList
specified by indices
- Return type
ValueError – If specified field is not contained in boxlist or if the indices are not of type int.