zju3dv / rnin-vio

Apache License 2.0
132 stars 23 forks source link

Pretrained model #2

Closed RoseWillow closed 2 years ago

RoseWillow commented 2 years ago

Dear author, thanks for your excellent work,could you provide a pretrained model? I try to train the network on the rtx2060 device, It took me a long time to iterate 150 times, but the performance on the test set was not good enough.

1

Thanks!

danpeng2 commented 2 years ago

Hello, thank you for your interest in our work. We will provide pre-trained models soon. From the provided log, the performance is really poor. Which dataset did you use to train and test?

RoseWillow commented 2 years ago

I just use the dataset you provided in the baidu pan, I downloaded it and tried to train the dataset by default python main_net.py --yaml ./config/default.yaml

I will wait for your pre-trained models, thank you!

danpeng2 commented 2 years ago

Can you provide the files of test out_dir? We try to find some problems with your training?

RoseWillow commented 2 years ago

Can you provide the files of test out_dir? We try to find some problems with your training? https://pan.baidu.com/s/1x6DbSuF7JpuvGCqlobSCuA password: 8jsl I upload my out_dir to baidu pan, to reduce the file size, I delete history training results under checkpoints and best_train folder, only the latest training results are retained.

danpeng2 commented 2 years ago

These files do not seem to contain test results, and epoch_loss cannot correspond to the number of epochs on the log.

RoseWillow commented 2 years ago

Because the computer was powered off during the training, the last result was used in the retraining, but I don't know why the test folder is empty. Could you share your pre-trained models?

SeokHoChang commented 2 years ago

can you share the pre-trained model by google-drive?

danpeng2 commented 2 years ago

Because the computer was powered off during the training, the last result was used in the retraining, but I don't know why the test folder is empty. Could you share your pre-trained models?

We tested with the model you trained and found that the accuracy is normal. avg_ate: 1.582,avg_t_rte: 1.567,avg_d_ret: 0.1349. The accuracy of our pre-trained model is avg_ate: 1.555,avg_t_rte: 1.465,avg_d_ret: 0.1321

danpeng2 commented 2 years ago

you can get our pre-trained model trained on our dataset from any of the following addresses: 1、https://pan.baidu.com/s/1ya3hzBHaDBLwrvkP8L6glw (password: d8mm) 2、https://drive.google.com/file/d/1BsnJCL1alqCT6HHoBKZ3sx6zSMd_MgDE/view?usp=sharing

RoseWillow commented 2 years ago

Thank you, I download the file. But the suffix of the pre-trained model is 44, which means that you get the result in 44 epochs? By the way, as your paper said "We found that if the NLL loss is directly used for training, the network will be difficult to converge and the accuracy will be poor. So we first use MSE loss to train until convergence, and then switch to NLL loss training until convergence." but the default file set start_cov_epochs: 2000 , did you swith to NL loss when you get the pre-trained model?

danpeng2 commented 2 years ago

We first use MSE loss to train and found it is convergence in 40 epochs. Then we switch to NLL loss training. We set a large threshold to adapt to convergence in various situations.

RoseWillow commented 2 years ago

Q1: I test the pre-trained model by my demo code, test_pre_trained_model.zip but the result I got is much different from the ground-truth value, I try to transform the ground-truth displacement by (Rγ)T as formula (14) in the paper, the pred result is different from the ground-truth as well. Here are my test result without_rot without rotate by yaw angle

with_rot

rotate by yaw angle

Should I transform by the yaw angle?

Q2: If the frequency of my data set is 200Hz, is this pre_trained model still applicable?

danpeng2 commented 2 years ago

1, If the ground truth represents the position of the IMU in the inertial world coordinate system, you don't need to transform the yaw angle.

I suggest that you run the entire sequence to generate trajectories in TUM or EUROC format. Then use EVO to align the trajectories, so it's easy to show if it's a yaw problem.

2, Our pre-trained model only supports 100hz input, so you need to interpolate 200hz data to 100hz.

RoseWillow commented 2 years ago

If the ground truth represents the position of the IMU in the inertial world coordinate system, you don't need to transform the yaw angle.

For Q1: 1 as your paper said: the W p I i , W p I j are the corresponding positions in the world frame at time t i , t j. Is there any difference between inertial world coordinate system and world frame , why we need to transform the yaw angle in the inertial world coordinate system?

danpeng2 commented 2 years ago

If the ground truth represents the position of the IMU in the inertial world coordinate system, you don't need to transform the yaw angle.

For Q1: 1 as your paper said: the W p I i , W p I j are the corresponding positions in the world frame at time t i , t j. Is there any difference between inertial world coordinate system and world frame , why we need to transform the yaw angle in the inertial world coordinate system?

1, The inertial world system coordinate requires the z-axis to be aligned with the direction of gravity. For the VIO system, the inertial coordinate system and the world coordinate system are equivalent.

2, The learned movement pattern is yaw angle quivariant, that is, the predicted dij changes with the change of the yaw angle. The simple understanding is that no matter if you are walking towards the east or the west, the raw IMU data is unchanged, the input IMU of the network only changes with the yaw angle you provide.

RoseWillow commented 2 years ago

image Q1: Dose the inertial world system coordinate is tansformed from body frame as above figure?

Q2: “If the ground truth represents the position of the IMU in the inertial world coordinate system, you don't need to transform the yaw angle.” . I read the dataset code, and I found that you didn't transform the yaw angle, dose the ground-truth is expressed in the inertial world coordinate system? If I want to apply this network in my VIO system, and I can get the position of the IMU in world frame, I need to transform the yaw angle as formula (14)?

danpeng2 commented 2 years ago

1, Yes, as your diagram shows. 2, Our ground truth comes from the visual-inertial odometry, which is expressed in the inertial world coordinate system. If this network is used in VIO, you only need to ensure that the yaw of the relative displacement is consistent with the yaw of the current window IMU data input to the network.

RoseWillow commented 2 years ago

Thank you a lot, I will have a try in my VIO system.