(self, bbox_xywh, ori_img)
| 283 | return t, l, w, h |
| 284 | |
| 285 | def _get_features(self, bbox_xywh, ori_img): |
| 286 | im_crops = [] |
| 287 | for box in bbox_xywh: |
| 288 | x1, y1, x2, y2 = self._tlwh_to_xyxy(box) |
| 289 | im = ori_img[y1:y2, x1:x2] |
| 290 | im_crops.append(im) |
| 291 | if im_crops: |
| 292 | features = self.extractor(im_crops) |
| 293 | else: |
| 294 | features = np.array([]) |
| 295 | return features |