Comments (5)
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.
Hi! Thanks for the feedback.
- 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
andmono_dataset.py
? Since your results are already very close, I assume that your training is converging to a local minimum. - Monodepth2 also uses
shuffle=True
, see their code here. This may improve the robustness of the training. - 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.
- 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 thedrop_path
rate to 0.3 if the training has an overfitting issue. Since Monodepth2 usesnn.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.
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.
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.
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)
- Hi,I've got some new questions HOT 9
- Some question about the result HOT 4
- The edges of the image are foggy and blurry during the training process HOT 4
- Inexplicable "No such file or directory: 'Lite-Mono-main\\kitti_data\\\2011_09_26/2011_09_26_drive_0002_sync\\\image_02/data\\- 000000001.png'" HOT 2
- the CPU utilization has been very high, but the GPU utilization has been very low HOT 2
- training with Nuscenes dataset HOT 39
- About indicator sq_rel HOT 6
- Test outputs is black HOT 8
- I read your paper “For models trained from scratch an initial learning rate of 5e−4 with a cosine learning rate schedule [26] is adopted” But how should I implement it in the code? HOT 4
- How the reproduction of the results of the model achieves the results in the paper HOT 6
- 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.
- model reproduction HOT 11
- Hello, I have some questions regarding the model training with the KITTI dataset HOT 4
- Pre-training Weights HOT 1
- about pretrain acc HOT 1
- the results of training are black pictures HOT 5
- test code for pose HOT 2
- Subsequent issues with gt_depths.npz HOT 4
- sorry to bothering you HOT 1
- Output resolution problem HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lite-mono.