castacks / tartanvo

TartanVO: A Generalizable Learning-based VO
BSD 3-Clause "New" or "Revised" License
244 stars 57 forks source link

Output scale factor #4

Open thohemp opened 3 years ago

thohemp commented 3 years ago

There is a scale factor used to scale the outputs back for gt comparison:

self.pose_std = np.array([0.13, 0.13, 0.13, 0.013, 0.013, 0.013], dtype=np.float32)

Can you tell what these numbers are and why are they used?

aartykov commented 2 years ago

@thohemp could you figure out the aim of these numbers?

Amigoshan commented 2 years ago

Those are just approximate std values of the GT motion. We used these values to normalize the motion output during training. So we need to normalize the values in the same way when testing.

aartykov commented 2 years ago

@Amigoshan So do we need to change these numbers according to our dataset? For example, I am trying to test the trained model with Euroc_V102_Medium, do I need to calculate these numbers for Euroc?

Amigoshan commented 2 years ago

@artykov1511 Yes, we do. It's like the mean std values people use to normalize the image data from the ImageNet. Once the network is trained, all input and output values need to be normalized using the same value, no matter what dataset the data is from.

Zilong-L commented 2 months ago

Normalizing data is helpful for training a network. It helps with numeric stability. These numbers are different if datasets are different.