Skip to content
Snippets Groups Projects
Commit dcfedf54 authored by Cao Yuhang's avatar Cao Yuhang Committed by Kai Chen
Browse files

Add Crop seg to RandomCrop (#1880)

* add crop seg to RandomCrop trans

* minor fix comment
parent 16a6f7da
No related branches found
No related tags found
No related merge requests found
......@@ -378,6 +378,10 @@ class RandomCrop(object):
bboxes[:, 1::2] = np.clip(bboxes[:, 1::2], 0, img_shape[0] - 1)
results[key] = bboxes
# crop semantic seg
for key in results.get('seg_fields', []):
results[key] = results[key][crop_y1:crop_y2, crop_x1:crop_x2]
# filter out the gt bboxes that are completely cropped
if 'gt_bboxes' in results:
gt_bboxes = results['gt_bboxes']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment