Comments (15)
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.
@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.
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.
@JiangQi715 See the usage of grid_sample
from mvsnet_pytorch.
@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.
@whubaichuan 您好,这个grid_sample我用起来了。是在这个grid_sample之前遇到了一个问题:homo_warming函数中,像素坐标变换(旋转平移)后,x和y坐标变大了(超过了宽度W和高度H),使用这个代码的归一化方法后,导致grid全部在[-1,1]之外。请问可能是哪里出了问题?是不是前面的矩阵运算出错了(导致坐标变换错误)?还是这个归一化方法不适用呢?十分谢谢。
from mvsnet_pytorch.
@whubaichuan 您好,这个grid_sample我用起来了。是在这个grid_sample之前遇到了一个问题:homo_warming函数中,像素坐标变换(旋转平移)后,x和y坐标变大了(超过了宽度W和高度H),使用这个代码的归一化方法后,导致grid全部在[-1,1]之外。请问可能是哪里出了问题?是不是前面的矩阵运算出错了(导致坐标变换错误)?还是这个归一化方法不适用呢?十分谢谢。
代码在MVSNet_pytorch/models/module.py的117-123行
from mvsnet_pytorch.
你用的是DTU dataset?這是不可能的,這個代碼我確認過了是正確的,不會全部在[-1, 1]之外的。
還是你用的是別的dataset?
from mvsnet_pytorch.
那可能是我的DTU数据集预处理部分出了一些问题,我自己再检查一下。再次感谢您。
from mvsnet_pytorch.
@JiangQi715 是不是用到了torch.meshgrid?。注意其和np.meshgrid和tf.meshgrid的区别
from mvsnet_pytorch.
@JiangQi715 是不是用到了torch.meshgrid?。注意其和np.meshgrid和tf.meshgrid的区别
是的,用到了,我查一下。谢谢您。
from mvsnet_pytorch.
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
MVSNet_pytorch/models/module.py
Line 106 in e0f2ae3
Thanks in advance and looking forward to your replies! Take care.
from mvsnet_pytorch.
@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 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.
@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)
- where is the file of test.sh? HOT 3
- CUDA error: unknown error when run train.sh
- 请问怎么训练和测试eth3d数据集呢?
- RuntimeError: Tensors must have same number of dimensions: got 4 and 3? HOT 1
- RuntimeError: Tensors must have same number of dimensions: got 4 and 3 HOT 2
- On the Problem of Calculating the Variance of cost volume HOT 1
- Have anyone checked RMVSNet-Pytorch repository?
- 1080Ti测试显存溢出 HOT 2
- how to solve the error "OSError : unrecognized data stream conntents when reading image file"? HOT 1
- About loss HOT 1
- Floating point exception(core dumped)
- 代码中的matlab问题 HOT 10
- About `Thres_metrics` HOT 4
- 训练UserWarning
- Question about loss function
- 预训练模型
- 测试结果深度图不正确
- how to create a logdir called checkpoints
- Reference image
- Questions about the meaning of grid in the F.grid_sample function.
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 mvsnet_pytorch.