Skip to content

Question about GT rasterization agreement percentage #2

@zyuanbing

Description

@zyuanbing

Excellent work! Thanks for the release.
When I ran the test file after compiling the diff ras, I found the GT rasterization agreement percentage is around 60, while the masks produced by Pytorch version and CUDA version are almost same. And the whole training process works fine.

GT Rasterization agreement: 0.594480990116706
Rasterized agreement (tau = 1.0): 0.9998779296875
Gradient agreement (tau = 1.0): 1.0

segmentations = [ann["segmentation"] for ann in annotations]
ground_truth_masks = torch.stack([rasterize_polygons_within_box([np.array(segmentation[0])], xyxy, RESOLUTION) for xyxy, segmentation in zip(xyxys, segmentations)]).float().to(DEVICE)
ground_truth_rasterized = rasterize_instances(HARD_CUDA_RASTERIZER, segmentations, RESOLUTION)
agreement_percentage = torch.count_nonzero(ground_truth_masks == ground_truth_rasterized) / float(ground_truth_masks.numel())
agreement_percentages.append(agreement_percentage.item())
print("GT Rasterization agreement: {0}".format(np.mean(agreement_percentages)))

Does this implicates there is a gap between the mask produced by HARD_CUDA_RASTERIZER and the gt mask ? And what causes this gap?
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions