Open YangKa opened 2 months ago
if rows_white.nelement() == 0 or cols_white.nelement() == 0: # No white pixels, return zeros return torch.tensor([0, 0, 0, 0])