Git Product home page Git Product logo

Comments (15)

kwea123 avatar kwea123 commented on July 18, 2024

No, translation doesn't need depth values. Originally it is a matrix multiplication of 4x4 (projection matrix) times 4x1 (3d coordinate, homogeneous) as follows:

[R T] [xd]
[0 1] [yd]
      [d]
      [1]

= [R][xd] + [T]
     [yd]
     [d]

So if you do the multiplication, the parts with d inside is only multiplied with R.

from mvsnet_pytorch.

JiangQi715 avatar JiangQi715 commented on July 18, 2024

@kwea123 In the Homo warming function, the normalization result after coordinate transformation may not be between - 1 and 1. How do you understand this? I look forward to your reply, thank you.

from mvsnet_pytorch.

kwea123 avatar kwea123 commented on July 18, 2024

If it's not between -1 and 1 it means that pixel is warped outside of the image, in that case that pixel has value 0 (all black) which is specified by padding_mode='zeros'

from mvsnet_pytorch.

whubaichuan avatar whubaichuan commented on July 18, 2024

@JiangQi715 See the usage of grid_sample

from mvsnet_pytorch.

JiangQi715 avatar JiangQi715 commented on July 18, 2024

@kwea123 OK, I see what you mean. Now I have a problem: all the pixels are warped out of the image. What may be the problem? Is the previous matrix operation wrong (resulting in a warp error)?

from mvsnet_pytorch.

JiangQi715 avatar JiangQi715 commented on July 18, 2024

@whubaichuan 您好,这个grid_sample我用起来了。是在这个grid_sample之前遇到了一个问题:homo_warming函数中,像素坐标变换(旋转平移)后,x和y坐标变大了(超过了宽度W和高度H),使用这个代码的归一化方法后,导致grid全部在[-1,1]之外。请问可能是哪里出了问题?是不是前面的矩阵运算出错了(导致坐标变换错误)?还是这个归一化方法不适用呢?十分谢谢。

from mvsnet_pytorch.

JiangQi715 avatar JiangQi715 commented on July 18, 2024

@whubaichuan 您好,这个grid_sample我用起来了。是在这个grid_sample之前遇到了一个问题:homo_warming函数中,像素坐标变换(旋转平移)后,x和y坐标变大了(超过了宽度W和高度H),使用这个代码的归一化方法后,导致grid全部在[-1,1]之外。请问可能是哪里出了问题?是不是前面的矩阵运算出错了(导致坐标变换错误)?还是这个归一化方法不适用呢?十分谢谢。

代码在MVSNet_pytorch/models/module.py的117-123行

from mvsnet_pytorch.

kwea123 avatar kwea123 commented on July 18, 2024

你用的是DTU dataset?這是不可能的,這個代碼我確認過了是正確的,不會全部在[-1, 1]之外的。
還是你用的是別的dataset?

from mvsnet_pytorch.

JiangQi715 avatar JiangQi715 commented on July 18, 2024

那可能是我的DTU数据集预处理部分出了一些问题,我自己再检查一下。再次感谢您。

from mvsnet_pytorch.

whubaichuan avatar whubaichuan commented on July 18, 2024

@JiangQi715 是不是用到了torch.meshgrid?。注意其和np.meshgrid和tf.meshgrid的区别

from mvsnet_pytorch.

JiangQi715 avatar JiangQi715 commented on July 18, 2024

@JiangQi715 是不是用到了torch.meshgrid?。注意其和np.meshgrid和tf.meshgrid的区别

是的,用到了,我查一下。谢谢您。

from mvsnet_pytorch.

czha5168 avatar czha5168 commented on July 18, 2024

Hi CoolCats[0]
Nice to see your discussions above, as I am new to this domain and your discussions really help! Regarding the homo_warping function(), I do have one more concern and hoping to learn from your ideas on this. Any comments are appreciated!
In

with torch.no_grad():
, why we set torch.no_grad()? Is it against the differential design behind the idea of the differential homo warping?
Thanks in advance and looking forward to your replies! Take care.

from mvsnet_pytorch.

whubaichuan avatar whubaichuan commented on July 18, 2024

@czha5168 In fact, the code "with torch.no_grad()" is redundant. Cause that the grid will not pass the grad back. So if you delete the code "with torch.no_grad()", it's no different.

from mvsnet_pytorch.

czha5168 avatar czha5168 commented on July 18, 2024

@czha5168 In fact, the code "with torch.no_grad()" is redundant. Cause that the grid will not pass the grad back. So if you delete the code "with torch.no_grad()", it's no different.

Hi Baichuan! Thanks so much for your reply!

from mvsnet_pytorch.

UestcJay avatar UestcJay commented on July 18, 2024

@JiangQi715 是不是用到了torch.meshgrid?。注意其和np.meshgrid和tf.meshgrid的区别

Hi,recently I have a problemin homo_warp, If there is occlusion in the sampling place, the wrong place will be sampled, have you considered this problem? can you tell me how to solve?

from mvsnet_pytorch.

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.