Commit 772069f2 authored by gongtao.vendor's avatar gongtao.vendor Committed by zhouzaida
Browse files

Update loading.py

parent 96fff55c
...@@ -195,7 +195,8 @@ class LoadAnnotations(BaseTransform): ...@@ -195,7 +195,8 @@ class LoadAnnotations(BaseTransform):
gt_bboxes = [] gt_bboxes = []
for instance in results['instances']: for instance in results['instances']:
gt_bboxes.append(instance['bbox']) gt_bboxes.append(instance['bbox'])
results['gt_bboxes'] = np.array(gt_bboxes, dtype=np.float32) results['gt_bboxes'] = np.array(
gt_bboxes, dtype=np.float32).reshape(-1, 4)
def _load_labels(self, results: dict) -> None: def _load_labels(self, results: dict) -> None:
"""Private function to load label annotations. """Private function to load label annotations.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment