Code Monkey home page Code Monkey logo

Comments (14)

ClementPinard avatar ClementPinard commented on August 21, 2024

This is a bug introduced with last version of TensorboardX which now expects 3xHxW tensors instead of HxWx3. Along with your multi gpu problem, I'm planning to update the code to torch 0.4.1 . Stay tuned in a few hours !

from depthnet.

3togo avatar 3togo commented on August 21, 2024

from depthnet.

3togo avatar 3togo commented on August 21, 2024

Only one gpu is running

screen shot 2018-09-03 at 10 14 27 pm

from depthnet.

ClementPinard avatar ClementPinard commented on August 21, 2024

Hmmm none of your GPU is actually running for the moment, is it the same when training is active ? see some documentation on how to use multi-gpu on pytorch here : https://pytorch.org/docs/stable/nn.html#dataparallel

As said before, I don't own a multi-gpu rig so you're likely on your own for that :(
But I'll be glad to know if you succeed in making it work on multi-gpus !

from depthnet.

ClementPinard avatar ClementPinard commented on August 21, 2024

Also, as cool as it would be to this code to be runnable with multi-gpu, I don't think it's going to be useful, unless some optimization is done regarding data loading and augmentation pipeline. I think with 5 GPU the data loading will be by far your bottle neck

from depthnet.

3togo avatar 3togo commented on August 21, 2024

you are right. My rough guess is that it takes more than three minutes to load the data but it might take less than one minute to run the codes.

from depthnet.

3togo avatar 3togo commented on August 21, 2024

Can you tell me how to use the pretrained DepthNet?

from depthnet.

ClementPinard avatar ClementPinard commented on August 21, 2024

just use the option `--pretrained̀ within the train script to load a pretrained network, that you can download in my google drive in the README

from depthnet.

3togo avatar 3togo commented on August 21, 2024

I downloaded these files but i can't untar it
Also, can u send me a sample folder for testing?
By the way, is below the correct way to test your program?
python3 train.py --pretrained Results/pretrained/DepthNet_elu_bn_128.pth.tar sample_folder

jc@:pretrained$ ls -l
total 161132
-rw-r--r-- 1 jc jc 41197810 Aug 30 2017 DepthNet_elu_bn_128.pth.tar
-rw-r--r-- 1 jc jc 41197810 Sep 1 2017 DepthNet_elu_bn_256.pth.tar
-rw-r--r-- 1 jc jc 41197806 Sep 4 2017 DepthNet_elu_bn_512.pth.tar
-rw-r--r-- 1 jc jc 41197488 Aug 30 2017 DepthNet_elu_bn_64.pth.tar

from depthnet.

ClementPinard avatar ClementPinard commented on August 21, 2024

you don't have to untar it, you just give the tar file to pretrained parameter

from depthnet.

3togo avatar 3togo commented on August 21, 2024

What should I do next to use your pretrained model to estimate a depth map from a jpg and "depth maps" from a avi?

data=torch.load('/home/jc/.torch/models/DepthNet_elu_bn_512.pth.tar')
print("=> using pre-trained model '{}'".format(data['arch']))
=> using pre-trained model 'DepthNet_elu_bn'
assert(not data['with_confidence'])

from depthnet.

3togo avatar 3togo commented on August 21, 2024

Traceback (most recent call last):
File "train.py", line 317, in
main()
File "train.py", line 159, in main
train_loss, train_error, train_normalized_error = train(train_loader, model, optimizer, args.epoch_size, term_logger, train_writer)
File "train.py", line 219, in train
for i, (input, target, _) in enumerate(train_loader):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
FileNotFoundError: Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/data/jc/git/DepthNet/datasets/scenelistdataset.py", line 42, in getitem
inputs, target = self.loader(self.root/scene['subdir'], inputs, target)
File "/data/jc/git/DepthNet/datasets/scenelistdataset.py", line 7, in default_loader
imgs = [imread(root/path) for path in path_imgs]
File "/data/jc/git/DepthNet/datasets/scenelistdataset.py", line 7, in
imgs = [imread(root/path) for path in path_imgs]
File "/usr/local/lib/python3.6/dist-packages/imageio/core/functions.py", line 206, in imread
reader = read(uri, format, 'i', **kwargs)

request = Request(uri, 'r' + mode, **kwargs)

File "/usr/local/lib/python3.6/dist-packages/imageio/core/request.py", line 128, in init

File "/usr/local/lib/python3.6/dist-packages/imageio/core/request.py", line 271, in _parse_uri
raise FileNotFoundError("No such file: '%s'" % fn)

from depthnet.

ClementPinard avatar ClementPinard commented on August 21, 2024

You cannot estimate depth from a single jpg, at least not with this network.
To have depth maps from a video, you have to convert it to a list of jpg files and then you can feed it successive jpegs. Depth1 is obtained with frame0 and frame1, Depth2 from frmae1 et frame 2, and so on.

And for your error, can you tell me what options you used for this script ?

from depthnet.

3togo avatar 3togo commented on August 21, 2024

from depthnet.

Related Issues (7)

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.