Comments (7)
-1.0400704145431519
is quite close to -1
, which is the boundary for minimum value. It may be due to precision error on different machines. To resolve this, you can increase the value of spatial_enlarge_factor
a little bit, e.g., to 1.01 or 1.1:
Line 92 in 6b538e8
from ml-gmpi.
I have made spatial_enlarge_factor : 1.1 but still I am getting this error
#Epoch - 0
0%|▏ | 92/69987 [00:42<7:16:10, 2.67it/s]
pos: tensor([[-0.6541, -0.0062, 0.2436]], device='cuda:0')dir: tensor([[ 0.5646, -0.1026, 0.8190]], device='cuda:0')
u: tensor([-0.1839, -0.1839, -0.1839, -0.1839], device='cuda:0')
v: tensor([-0.5088, -0.5048, -0.5008, -0.4968], device='cuda:0')
yaws: [[0.7130070924758911]]
pitches: [[-0.004669070243835449]]
<class 'AssertionError'>Traceback (most recent call last):
File "/proj/cvl/users/x_fahkh/mn/3D-generation/exps/ddpm-improved-concat-poses-conditioning/models/mpi.py", line 107, in homography
assert torch.max(u) <= 1, f"Ray's U direction goes out of plane at {distance}, max val {torch.max(u)}"
AssertionError: Ray's U direction goes out of plane at tensor([[1.1200]], device='cuda:0'), max val 1.0676274299621582
from ml-gmpi.
I see. I think I get it:
pass the same pose as given by the dataloader([flat_w2c_mats_real] line 419 train.py ) to self.mpi() function
This will cause issues. Due to MPI's intrinsic properties, it cannot be rendered for 360 degrees. Therefore, we have truncated Gaussian:
ml-gmpi/gmpi/utils/cam_utils.py
Line 522 in 566e9c5
The number of standard deviations is set here:
Line 94 in 6b538e8
If you use all estimated poses from real images, some of the poses will go out of the truncated range, which will cause problems.
BTW, truncated Gaussian is common in 3D generative models. For example, pi-GAN.
from ml-gmpi.
Got it !!!!!!!
Is there any way out to use all the images by setting some hyperparamteres?
from ml-gmpi.
If you really want to use all real images, you can:
- compute the real imges's pose range, i.e., minimum and maximum value of horizontal and vertical angle. Assume they are
pose_min
andpose_max
; - Set the
h_stddev
andv_stddev
to the largest deviation from the pose's mean. I.e.,
max(abs(pose_min - pose_mean), abs(pose_max - pose_mean))
- Assign those
h_stddev
andv_stddev
in thecurriculum.py
:
Lines 113 to 114 in 6b538e8
- Set
cam_pose_n_truncated_stds
to one or some values slightly larger than one to avoid precision issue, e.g., 1.05:
Line 94 in 6b538e8
Essentially, you want the truncated Gaussian to cover all real images's poses. Hope this helps.
from ml-gmpi.
After Calculating h_stddev and v_stddev for real image it comes out to be
'h_stddev': 1.4915,
'v_stddev': 0.9975,
and also after settinh
spatial_enlarge_factor: 1.1
cam_pose_n_truncated_stds: 1.05
But I am still get this
pos: tensor([[-0.9283, -0.3449, 0.8610]], device='cuda:0')
dir: tensor([[0.9383, 0.2390, 0.2504]], device='cuda:0')
u: tensor([0.0191, 0.0190, 0.0189, 0.0189], device='cuda:0')
v: tensor([-0.0484, -0.0480, -0.0476, -0.0471], device='cuda:0')
yaws: [[1.4311634302139282]]
pitches: [[-0.05110371112823486]]
Traceback (most recent call last):
File "/proj/cvl/users/x_fahkh/mn/debug-dmpi/gmpi/core/mpi.py", line 107, in homography
assert torch.max(u) <= 1, f"Ray's U direction goes out of plane at {distance}, max val {torch.max(u)}"
AssertionError: Ray's U direction goes out of plane at tensor([[1.1200]], device='cuda:0'), max val 3.882153272628784
from ml-gmpi.
The problem comes from that the h_stddev
and v_stddev
are too large, which may not be suitable for MPI representation.
MPI (as in the name) is a set of planes. It cannot handle extremely wide range of camera poses. If you have horizontal angle of 1.4915, the rays from camera are almost parallel to the MPI plane. This is too extreme for such a representation.
I recommend filtering out real image whose camera poses are too extreme. You may need to tune the h_stddev
and v_stddev
a little bit.
from ml-gmpi.
Related Issues (19)
- environment.yml error HOT 13
- Problem In training the FFHQ1024 model HOT 3
- "RuntimeError: output is too large" when extracting meshes with 1024x1024 models HOT 2
- Problem in Importing upfirdn2d_plugin.so HOT 2
- RuntimeError: Unable to find a valid cuDNN algorithm to run convolution HOT 10
- RuntimeError: "slow_conv_transpose2d_out_cpu" not implemented for 'Half' HOT 1
- Great Work!!!!! HOT 9
- I got error when I start to train HOT 9
- download FFHQ tfrecord dataset related issue HOT 1
- Problem in reproducing fid score HOT 9
- Maximum range of yaw and pitches HOT 1
- 感觉真是充满坑点 HOT 1
- Great Work!!!! Few queries regarding the evaluation code HOT 3
- Query Regarding the evaluation code for FFHOQ512 HOT 6
- Problem in calculating the Identity metric
- Query in calculating the depth and pose metric HOT 1
- Code for estimating pose for preprocessing (used in "Deep3DFaceRecon" directory) HOT 1
- Problem in Reproducing the Depth score HOT 5
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 ml-gmpi.