ubc-vision/COTR

retrain

Opened this issue · 1 comments

Hello, I would like to ask how to retrain on the basis of the pre-trained model to enhance the network's resistance to rotation?How to implement?

Hi, in order to obtain the correct correspondences, you need to rotate the camera pose, also the image and depth.
You can check:

def rotate_capture(cap, rot):
if rot == 0:
return copy.deepcopy(cap)
else:
rot_pose = rotate_camera_pose(cap.cam_pose, rot)
rot_cap = copy.deepcopy(cap)
rot_cap.cam_pose = rot_pose
if hasattr(rot_cap, 'captured_image'):
rot_cap.captured_image.rotation = rot
if hasattr(rot_cap, 'captured_depth'):
rot_cap.captured_depth.rotation = rot
return rot_cap

However, this implementation will cause black borders which can be a problem...