DeepVO-pytorch icon indicating copy to clipboard operation
DeepVO-pytorch copied to clipboard

Need too much time

Open Ironbrotherstyle opened this issue 5 years ago • 20 comments

I am a noob and had trouble training the net beause of limited resouce. Could some one offer me a trained model to test the result? that would be very nice, THX.

Ironbrotherstyle avatar Jan 25 '19 13:01 Ironbrotherstyle

@Ironbrotherstyle you can find the links to the trained model in the readme

alexart13 avatar Jan 28 '19 09:01 alexart13

Thank you

Ironbrotherstyle avatar Feb 18 '19 12:02 Ironbrotherstyle

route_04_gradient route_09_gradient I used the trained model offered by the author and got results on video 04, 05, 07, 09, 10. Only to find that the results on these videos were terrible except for on video04, as shown in the figures. The MSEs also showd the same trend. I am puzzled about this and don not know the reason. @alexart13 @ChiWeiHsiao @daiyk

Ironbrotherstyle avatar Feb 18 '19 13:02 Ironbrotherstyle

@Ironbrotherstyle , did you use the model mentioned in https://github.com/ChiWeiHsiao/DeepVO-pytorch#download-trained-model section?

alexart13 avatar Feb 18 '19 14:02 alexart13

@Ironbrotherstyle , did you use the model mentioned in https://github.com/ChiWeiHsiao/DeepVO-pytorch#download-trained-model section?

yes, the file names 't000102050809_v04060710_im184x608_s5x7_b8_rnn1000_optAdagrad_lr0.0005.model.train' , I just noticed that you had uploaed four .py files. Could you please tell me the improvement by these changes like adding to 15 instead of 6 GT poses.

Ironbrotherstyle avatar Feb 18 '19 14:02 Ironbrotherstyle

@Ironbrotherstyle you can find description of the changes at https://github.com/ChiWeiHsiao/DeepVO-pytorch/issues/4 Regarding GT file, I also included rotation matrix 'as is' from KITTI data. It is used in ImageSequenceDataset class to align every sequence.

alexart13 avatar Feb 19 '19 07:02 alexart13

@Ironbrotherstyle I have just tried to reproduce the experiment using the code from this repo. It works as expected. I only updated the following parameters in params.py. self.img_means = (0.19007764876619865, 0.15170388157131237, 0.10659445665650864) self.img_stds = (0.2610784009469139, 0.25729316928935814, 0.25163823815039915)

route_07_gradient

alexart13 avatar Feb 19 '19 09:02 alexart13

@Ironbrotherstyle I have just tried to reproduce the experiment using the code from this repo. It works as expected. I only updated the following parameters in params.py. self.img_means = (0.19007764876619865, 0.15170388157131237, 0.10659445665650864) self.img_stds = (0.2610784009469139, 0.25729316928935814, 0.25163823815039915)

route_07_gradient

I just used the trained model by yourself in 'https://drive.google.com/uc?id=1l0s3rYWgN8bL0Fyofee8IhN-0knxJF22&export=download' and got results like these pictures below. And i will change the' self.img_means' as you mentioned to see the results later. Thank you! route_04_gradient route_05_gradient

Ironbrotherstyle avatar Feb 19 '19 09:02 Ironbrotherstyle

@Ironbrotherstyle setting img_means and img_stds should help. I overlooked to update them in the repo. I created a pull request https://github.com/ChiWeiHsiao/DeepVO-pytorch/pull/9 to fix that.

alexart13 avatar Feb 19 '19 09:02 alexart13

@Ironbrotherstyle the key idea of the transformation is to let the model 'thinks' that every sequence starts at 0 point and has 0 Euler angles initially. So we need to rotate the whole sequence in the opposite direction of the first point rotation matrix R.

alexart13 avatar Feb 21 '19 09:02 alexart13

@Ironbrotherstyle , As you know, in KITTI dataset every track starts with camera looking along Z axis. X axis is oriented to the right. Imagine that the car made a 90 degrees right turn and moved along X axis as the result. You take a point from this track after the turn is made. Theta angles will look like 0,-90,0 equal to rotation matrix R. Imagine you want to make this point on the track the new starting point for the rest of the track. You need to make the following calculation:

  1. t_n_new = t_n - t_0, where t_0 are the coordinates of the new starting point
  2. rotate the tail of the track 90 degrees backward to align the starting point camera view along Z axis. For that you need transposed R matrix. t_n_new_rotated = R_transposed_0 * t_n_new
  3. In general case we should also recalculate R and theta for the rest of the track points. But we don't have to do that in our case, because we operate with angle deltas between the two consecutive points on the track: # get relative pose w.r.t. previous frame groundtruth_sequence[2:] = groundtruth_sequence[2:] - groundtruth_sequence[1:-1]

I hope this helps.

alexart13 avatar Feb 21 '19 11:02 alexart13

@Ironbrotherstyle I used the parameters as they were specified in the repository. It is difficult to say what might be wrong in your case without knowing all the details.

alexart13 avatar Feb 25 '19 06:02 alexart13

Hi,I had a question when i visualize my results, i got this curve. Why ur result curves are so smooth? Did i ignore something? seq_09

chenmy17 avatar Mar 01 '19 06:03 chenmy17

I only used the visualize.py in the repo. Make sure that your code is the same as that in the repo.

chenmingyue [email protected] 于2019年3月1日周五 下午2:52写道:

Hi,I had a question when i visualize my results, i got this curve. Why ur result curves are so smooth? Did i ignore something? [image: seq_09] https://user-images.githubusercontent.com/33723872/53621494-aa50d900-3c31-11e9-91b9-71267af541b0.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ChiWeiHsiao/DeepVO-pytorch/issues/6#issuecomment-468563379, or mute the thread https://github.com/notifications/unsubscribe-auth/AbKmrtpp162C_ujWXH-4QxToPWcAKSGGks5vSM5EgaJpZM4aS32T .

Ironbrotherstyle avatar Mar 01 '19 07:03 Ironbrotherstyle

@Ironbrotherstyle setting img_means and img_stds should help. I overlooked to update them in the repo. I created a pull request #9 to fix that.

Hi, I could not understand the calculation of img_means and img_std, your values are not the same as the results got from function "calculate_rgd_mean_std" in preprocess.py which all have negative img_means. So could you please tell me the way to get your img_means and img_stds ?

Ironbrotherstyle avatar Mar 17 '19 12:03 Ironbrotherstyle

@Ironbrotherstyle, I dont' remember exactly. I might have used a subset of the dataset to calculate the values to save time. That is why I think you get different results.

alexart13 avatar Mar 18 '19 07:03 alexart13

@Ironbrotherstyle, I dont' remember exactly. I might have used a subset of the dataset to calculate the values to save time. That is why I think you get different results. The img_means and img_std seem to be important, and the performance by using your values are much better than these negative values. Is your program the same as the repository on calculating means and stds and did you use the "minus_point_5=True" ? Thank you for your reply. Hope you have a nice day.

Ironbrotherstyle avatar Mar 18 '19 07:03 Ironbrotherstyle

@Ironbrotherstyle The performance is better because the model was trained using these particular img_means and img_std. If you retrain the model using your values, you should get good results too.

I used the method to calculate the values as it is in the repository. minus_point_5 was set to True. But as I mentioned, I might have removed some tracks from the calculation.

alexart13 avatar Mar 18 '19 07:03 alexart13

@Ironbrotherstyle The performance is better because the model was trained using these particular img_means and img_std. If you retrain the model using your values, you should get good results too.

I used the method to calculate the values as it is in the repository. minus_point_5 was set to True. But as I mentioned, I might have removed some tracks from the calculation.

Very nice of you, thanks.

Ironbrotherstyle avatar Mar 18 '19 07:03 Ironbrotherstyle

@Ironbrotherstyle My results are the same as before. Do you know where the problem is now?

ujgygy656565 avatar May 13 '19 03:05 ujgygy656565