The problem of offset
def get_center_and_offset_bev(self, lrtlist_cam, seg_bev): ...... ...... offset = torch.stack([offset[:,0], offset[:,2]], dim=1) min_offset = torch.min(offset, dim=3)[0] max_offset = torch.max(offset, dim=3)[0] offset = min_offset + max_offset
The meaning expressed by the sum of min_offset and max_offset? What is the role of MIN_offset and max_offset?
This is a shortcut to obtaining the nonzero values along the Y dimension, to get a BEV offset map. There are zeros above and below the car regions, and inside the car regions we have vectors with positive and negative numbers. With these lines we eliminate the Y dimension while retaining the right values within the car regions.