Giter VIP home page Giter VIP logo

Comments (5)

413090531 avatar 413090531 commented on August 31, 2024 4

After I changed cuda and pytorch version,I have trained a model with similar results to the paper.Thanks again for your thoughtful answer, I'm going to close the issue.

from lite-mono.

noahzn avatar noahzn commented on August 31, 2024 1

Hi! Thanks for the feedback.

  1. It is difficult to say where the discrepancy comes from. Different PyTorch or CUDA versions could be one of the reasons, see this link. I have tried training on the TITAN Xp (CUDA11.0, PyTorch 1.7.1) and NVIDIA A40 (CUDA 11.8, PyTorch 1.12.1), and I can get similar or even better results than those reported in the paper. What changes did you make to kitti_dataset.py and mono_dataset.py? Since your results are already very close, I assume that your training is converging to a local minimum.
  2. Monodepth2 also uses shuffle=True, see their code here. This may improve the robustness of the training.
  3. I initialized the networks for training without pre-trained weights. This might improve the performance of the training. However, if you load the pre-trained weights, the initialized weights in the encoder will be overwritten by the ImageNet weights.
  4. You can use tensorboard to inspect if the training goes well. Please use this command tensorboard --logdir ./tmp/your_saved_model_folder. If your training converges to a local minimum, you can just train it again. Or, you may increase the drop_path rate to 0.3 if the training has an overfitting issue. Since Monodepth2 uses nn.ReflectionPad2d (see this link), which is not a deterministic operation, we cannot get exactly the same results every time, even if we fix random seeds. And, I noticed that the training can converge fast and the best result might be achieved at epoch 16 or 17. So, please check all the epochs.

from lite-mono.

413090531 avatar 413090531 commented on August 31, 2024 1

Hi!Thanks for your detailed reply!

1.I found out that the problem is in the mono_dataset.py,
color_aug = transforms.ColorJitter(
self.brightness, self.contrast, self.saturation, self.hue)

color_aug = transforms.ColorJitter.get_params(
self.brightness, self.contrast, self.saturation, self.hue)
You are using the first one in your code and I need to use the second one.When I use other computers, I found that loading
data in the same way as your code can work. I found that this is because the code in the forward() part of transforms.py is
different, so my computer needs to add .get_params() to work.Will adding .get_params() affect the experimental results?

2.2 and 3 understand.

3.I will pay attention to the details you said and try training again.

I'll let you know when I train with similar results.Thanks again!

from lite-mono.

lonelysheeep avatar lonelysheeep commented on August 31, 2024

Hello, thanks for great code.I got the pretrained model and I ran the train.py to reproduce the lite-mono, but I got different results.

paper abs_rel | sq_rel | rmse | rmse_log | a1 | a2 | a3 | 0.107 0.765 4.561 0.183 0.886 0.963 0.983

own abs_rel | sq_rel | rmse | rmse_log | a1 | a2 | a3 | 0.107 0.804 4.633 0.185 0.885 0.962 0.982

Among them, the second and third indicators are quite different from those in the paper.I did not make changes in trainer.py, options.py, depth_encoder.py and depth_decoder.py.Due to an unknown computer error,I change the kitti_dataset.py and mono_dataset.py.The new kitti_dataset.py and mono_dataset.py are from monodepth2. 1.I want to know why my result is not good.Because of kitti_dataset.py and mono_dataset.py? 2.Why the shuffle in the DataLoader is True? self.train_loader = DataLoader( train_dataset, self.opt.batch_size, shuffle=True, num_workers=self.opt.num_workers, pin_memory=True, drop_last=True) 3.Why use the def _init_weights(self, m) in the encoder and decoder? 4.In addition to the settings in options.py and trainer.py, what details do I need to pay attention to in order to reproduce the result of the lite-mono model? Looking forward to your reply, thank you.

Hello, my reproduction code has not been working well, can you send me your reproduction code and instructions, please?

from lite-mono.

413090531 avatar 413090531 commented on August 31, 2024

Hello, my reproduction code is exactly the same as the code uploaded by the author of the paper, CUDA11.0, PyTorch 1.7.1. Please check your code and replace your CUDA and pytorch version.

from lite-mono.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.