NVlabs / CenterPose

Single-Stage Keypoint-based Category-level Object Pose Estimation from an RGB Image (ICRA 2022)
Other
285 stars 34 forks source link

Question about obj_scale_loss #13

Open comvee opened 2 years ago

comvee commented 2 years ago

Hello, thank you for the nice work! I have a question about obj_scale_loss. Why do you use different forms of the scale loss in training and validation phase? Specifically, in the training phase: https://github.com/NVlabs/CenterPose/blob/6c89d420b33bd01c14c13f509af08bfe3d8b2fe7/src/lib/trains/object_pose.py#L116-L117 https://github.com/NVlabs/CenterPose/blob/6c89d420b33bd01c14c13f509af08bfe3d8b2fe7/src/lib/models/losses.py#L167 and in the validation phase: https://github.com/NVlabs/CenterPose/blob/6c89d420b33bd01c14c13f509af08bfe3d8b2fe7/src/lib/trains/object_pose.py#L126-L128 https://github.com/NVlabs/CenterPose/blob/6c89d420b33bd01c14c13f509af08bfe3d8b2fe7/src/lib/models/losses.py#L174-L176

torch.abs(target * mask - pred * mask) and torch.abs((1 * mask - pred * mask) / target_rmzero) does not produce same values. I want to know the meaning of the "relative loss" in the validation phase and why it is only used in the validation phase.