Skip to content

[Fix] Deprecating np.bool Type Alias #396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions mmyolo/datasets/transforms/mix_img_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class Mosaic(BaseMixImageTransform):
- img
- gt_bboxes (BaseBoxes[torch.float32]) (optional)
- gt_bboxes_labels (np.int64) (optional)
- gt_ignore_flags (np.bool) (optional)
- gt_ignore_flags (bool) (optional)
- mix_results (List[dict])

Modified Keys:
Expand Down Expand Up @@ -504,7 +504,7 @@ class Mosaic9(BaseMixImageTransform):
- img
- gt_bboxes (BaseBoxes[torch.float32]) (optional)
- gt_bboxes_labels (np.int64) (optional)
- gt_ignore_flags (np.bool) (optional)
- gt_ignore_flags (bool) (optional)
- mix_results (List[dict])

Modified Keys:
Expand Down Expand Up @@ -776,7 +776,7 @@ class YOLOv5MixUp(BaseMixImageTransform):
- img
- gt_bboxes (BaseBoxes[torch.float32]) (optional)
- gt_bboxes_labels (np.int64) (optional)
- gt_ignore_flags (np.bool) (optional)
- gt_ignore_flags (bool) (optional)
- mix_results (List[dict])


Expand Down Expand Up @@ -917,7 +917,7 @@ class YOLOXMixUp(BaseMixImageTransform):
- img
- gt_bboxes (BaseBoxes[torch.float32]) (optional)
- gt_bboxes_labels (np.int64) (optional)
- gt_ignore_flags (np.bool) (optional)
- gt_ignore_flags (bool) (optional)
- mix_results (List[dict])


Expand Down
2 changes: 1 addition & 1 deletion mmyolo/datasets/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class YOLOv5RandomAffine(BaseTransform):
- img
- gt_bboxes (BaseBoxes[torch.float32]) (optional)
- gt_bboxes_labels (np.int64) (optional)
- gt_ignore_flags (np.bool) (optional)
- gt_ignore_flags (bool) (optional)

Modified Keys:

Expand Down
2 changes: 1 addition & 1 deletion tools/analysis_tools/browse_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def main():
gt_masks = gt_instances.get('masks', None)
if gt_masks is not None:
masks = mask2ndarray(gt_masks)
gt_instances.masks = masks.astype(np.bool)
gt_instances.masks = masks.astype(bool)
datasample.gt_instances = gt_instances
# get filename from dataset or just use index as filename
visualizer.add_datasample(
Expand Down