fangget / tf-monodepth2 Goto Github PK
View Code? Open in Web Editor NEWTensorflow implementation(unofficial) of "Digging into Self-Supervised Monocular Depth Prediction"
License: MIT License
Tensorflow implementation(unofficial) of "Digging into Self-Supervised Monocular Depth Prediction"
License: MIT License
when i run the command :
python train_monodepth2.py train config/monodepth2_kitti.yml ./model/pretrained_model/model.latest
i am getting the error :
_Traceback (most recent call last):
File "train_monodepth2.py", line 51, in
_cli_test(config, output_dir, args)
File "train_monodepth2.py", line 25, in cli_test
monodepth2_learner.test(output_dir)
File "C:\Users\essys\Desktop\project_1\depth_estimation\tf-monodepth2-master\tf-monodepth2-master\model\monodepth2_learner.py", line 371, in test
self.saver.restore(sess, latest_ckpt)
File "C:\Users\essys\Anaconda3\envs\tf_gpu\lib\site-packages\tensorflow\python\training\saver.py", line 1274, in restore
raise ValueError("Can't load save_path when it is None.")
ValueError: Can't load save_path when it is None.
How to train my own dataset?
tf-monodepth2/model/monodepth2_learner.py
Line 26 in 533b735
Hi, thanks for you contribution for the tf implementation. I want to know why did you do this normalization.
I am writing my own version of monodepth2 too. But it seems there's something wrong. The loss can converge, but the test result can only achieve abs rel 0.152. Can you provide some suggestion about my situation?
The link mono_640x192_pt(ours)
actually points to a file named with ...nopt
, and the other file is ...pt
.
Is this just a wrong name or the file is wrong? And I wonder what is the difference between nopt
and pt
model?
Hi,
Thanks for your brilliant work! Could you tell me how to test my own image for a generalization task? I mean how to preprocess my own picture. Do I just need resize the shape to (640,192) and use your test code?
And I still feel puzzled about these three line code in the model/ monodepth2_learner.py
, do these two matrices circled by the red have the same size? I try to run the test code and find there is a bug when concatenating the two matrices.
Thanks in advance for your reply.
i got the same problem could you give me some advice
my preprocess img is 1248 *128 is correct then i dont change the size image_height: 192
image_width: 640 in the yaml
Originally posted by @xuchen-dev in #11 (comment)
Do you plan to upload the code for stereo training ?
Traceback (most recent call last):
File "monodepth2.py", line 63, in
args.func(config, output_dir, args)
File "monodepth2.py", line 17, in _cli_train
monodepth2_learner.train(output_dir)
File "/home/jiatian/project/depth/tf-monodepth2/model/monodepth2_learner.py", line 404, in train
self.save(sess, ckpt_dir, 'latest')
File "/usr/lib/python3.6/contextlib.py", line 88, in exit
next(self.gen)
File "/home/jiatian/venv/lib/python3.6/site-packages/tensorflow_core/python/training/supervisor.py", line 1014, in managed_session
self.stop(close_summary_writer=close_summary_writer)
File "/home/jiatian/venv/lib/python3.6/site-packages/tensorflow_core/python/training/supervisor.py", line 839, in stop
ignore_live_threads=ignore_live_threads)
File "/home/jiatian/venv/lib/python3.6/site-packages/tensorflow_core/python/training/coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "/home/jiatian/venv/lib/python3.6/site-packages/six.py", line 696, in reraise
raise value
File "/home/jiatian/venv/lib/python3.6/site-packages/tensorflow_core/python/training/queue_runner_impl.py", line 257, in _run
enqueue_callable()
File "/home/jiatian/venv/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1287, in _single_operation_run
self._call_tf_sessionrun(None, {}, [], target_list, None)
File "/home/jiatian/venv/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: Expected size[1] in [0, 608], but got 640
[[{{node data_loading/Slice}}]]
[[data_loading/Slice_4/_1053]]
(1) Invalid argument: Expected size[1] in [0, 608], but got 640
[[{{node data_loading/Slice}}]]
0 successful operations.
0 derived errors ignored.
Hi, do you know why does this error happens? Thanks
How would you obtain the depth to all points in the image using the output of the model?
Does it involve using the camera intrinsics, or is there a way to directly obtain depth?
Hi all,
Conda env details -
cudatoolkit 9.0
cudnn 7.1.2
tensorflow-gpu 1.6.0
Data Preprocessing -
Followed the same command what was mentioned in the repo
While training facing an error - not able to find why is it caused
Or Am i missing something else @FangGet ?
Attaching the error below
Traceback (most recent call last):
File "monodepth2.py", line 63, in
args.func(config, output_dir, args)
File "monodepth2.py", line 17, in _cli_train
monodepth2_learner.train(output_dir)
File "/home/DEPTH_MODEL/tf-monodepth2/model/monodepth2_learner.py", line 405, in train
self.save(sess, ckpt_dir, 'latest')
File "/home/anaconda3/envs/tf_mono/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/tensorflow/python/training/supervisor.py", line 1000, in managed_session
self.stop(close_summary_writer=close_summary_writer)
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/tensorflow/python/training/supervisor.py", line 828, in stop
ignore_live_threads=ignore_live_threads)
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/tensorflow/python/training/coordinator.py", line 389, in join
six.reraise(*self._exc_info_to_raise)
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/tensorflow/python/training/queue_runner_impl.py", line 252, in _run
enqueue_callable()
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1259, in _single_operation_run
None)
File "/home/anaconda3/envs/tf_mono/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 516, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected size[1] in [0, 608], but got 640
[[Node: data_loading/Slice = Slice[Index=DT_INT32, T=DT_UINT8, _device="/job:localhost/replica:0/task:0/device:CPU:0"](data_loading/DecodeJpeg, data_loading/Slice_4/begin, data_loading/Slice_3/size)]]
NotFoundError (see above for traceback): Key monodepth2_model/pose_decoder/res18_tc/biases not found in checkpoint
[[Node: save/RestoreV2 = RestoreV2[dtypes=[DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, ..., DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT, DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2/tensor_names, save/RestoreV2/shape_and_slices)]
I ran into such error when trying to test. Should the checkpoint be updated?
Hi, great work! Do you plan to upload some trained models for evaluation? Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.