Closed b03505036 closed 3 years ago
To be more specific, with or without using the center sampling, the number of positive and negative are the same. But, I can't figure out why it cause 'nan' when using no center sampling.
Defined in get_ground_truth if self.center_sampling_radius > 0: centers = gt_boxes.get_centers() is_in_boxes = [] for stride, shifts_i in zip(self.fpn_strides, shifts_per_image): radius = stride * self.center_sampling_radius center_boxes = torch.cat(( torch.max(centers - radius, gt_boxes.tensor[:, :2]), torch.min(centers + radius, gt_boxes.tensor[:, 2:]), ), dim=-1) center_deltas = self.shift2box_transform.get_deltas( shifts_i, center_boxes.unsqueeze(1)) is_in_boxes.append(center_deltas.min(dim=-1).values > 0) is_in_boxes = torch.cat(is_in_boxes, dim=1) else:
**is_in_boxes = deltas.min(dim=-1).values > 0**
Already solved on the other platform. Close it.
It quite easy appears "nan" in the box_delta when not using center sampling. Is it an normal state? or something what I miss? Thank for your great work