MiDaS icon indicating copy to clipboard operation
MiDaS copied to clipboard

3.0 models in ROS/LibTorch

Open jpapon opened this issue 3 years ago • 6 comments

Hello! I recently converted your ROS1 node to ROS2, and have found the model works very well, so thanks for sharing it!

One small question... would it be possible to get traced versions of the 3.0 models? Would love to try them out and see the performance differences.

Thanks!

jpapon avatar Jul 21 '21 19:07 jpapon

Thanks for the feedback. The current implementation is unfortunately not directly traceable and requires are rewrite+model conversion. As this seems to be popular request, we will prioritize this.

ranftlr avatar Jul 23 '21 08:07 ranftlr

Thanks for working on it, much appreciated!

jpapon avatar Jul 31 '21 00:07 jpapon

I just pushed a preview of a scriptable and traceable model to branch "dpt_scriptable" in the DPT repo: https://github.com/isl-org/DPT/tree/dpt_scriptable. Note that you have to download updated weight files for this to work. You can find updated links in the README of the branch.

Please let us know if this solves your problem or if you experience any issues with this. We'd also be happy to hear what you find out about performance differences.

ranftlr avatar Aug 05 '21 15:08 ranftlr

@ranftlr , I try to trace your "dpt_hybrid-midas-d889a10e.pt" using torch.jit.trace but failed

Below is the error message: File "/usr/local/lib/python3.9/dist-packages/torch/_tensor.py", line 867, in unflatten return super(Tensor, self).unflatten(dim, sizes, names) RuntimeError: NYI: Named tensors are not supported with the tracer

3togo avatar Sep 15 '21 05:09 3togo

Excellent @ranftlr thank you! I will test this on Friday.

jpapon avatar Sep 15 '21 18:09 jpapon

@jpapon Hi, Is your ROS2 ported code available anywhere?

naitiknakrani avatar Jun 30 '22 14:06 naitiknakrani