NVlabs / eg3d

Other
3.24k stars 363 forks source link

camera conventions #65

Open RichardChen20 opened 2 years ago

RichardChen20 commented 2 years ago

Hi, is the world coordinate right? It seems strange. image

QQ截图20220906211323

I also check the dataset.json for more details, for example, 00023.png.

["00023.png", [0.9999417662620544, 0.010793998837471008, 0.00011557899415493011, 0.0015220991844047327, 0.010792133398354053, -0.9998840093612671, 0.01074833795428276, -0.012054688543150803, 0.0002315831370651722, -0.010746465064585209, -0.9999422430992126, 2.699972660546436, 0.0, 0.0, 0.0, 1.0, 4.2647, 0.0, 0.5, 0.0, 4.2647, 0.5, 0.0, 0.0, 1.0]]

According to the labels, I get the euler angles for rotation matrix [-179, 0, 0] (in degrees, x,y,z) and t=[0, 0, 2.67]. So this means we only have to rotate camera coordinate around Xc axis for 180 degrees and move it along the Zc axis. However, in this way, the world coordinate is not the same as that in your shown picture.

Is the world coordinate in your shown picture not correct? Or my caculations are wrong? I hope you can reply for my questions, that will help me a lot! Thanks!

MartinMao1101 commented 1 year ago

hi there, i also found that the 2 coordinates are using right hand and left hand respectively. I am also quite curious about this issue. Also, i am wondering how is the world coordinate defined in this project exactly. Have you by any chance found some information about your question?

RichardChen20 commented 1 year ago

@MartinMao1101 Yeah, I have figured out this question by myself. The Extrinsics in labels is used to transform a point in camera coordinate to the world coordinate (face).

image Here are the coordinates.

If u have questions, you can send me a msg.

MartinMao1101 commented 1 year ago

@SeanChen0220 thanks quite a lot for the tips and the nice pic! I have been wondering about the world coordinate for some weeks, you really solved my problem!

chenweikai commented 1 year ago

@RichardChen20 May I know where did you find the dataset.json file? Is it officially released by the authors? Thanks!

Blue-FishER commented 1 year ago

@RichardChen20 May I know where did you find the dataset.json file? Is it officially released by the authors? Thanks!

Take FFHQ for example, in the dataset_processing/ffhq/runme.py, search for "Downloading poses...", you will see the link.

print("Downloading poses...") gdown.download('https://drive.google.com/uc?id=14mzYD1DxUjh7BGgeWKgXtLHWwvr-he1Z', 'final_crops/dataset.json', quiet=False)

ZhenglinZhou commented 1 year ago

Hi all,

Recently, I try to render the image from EG3D using another camera conventions code (threestudio). And I succeeded in rendering image, when I use a c2w matrix (x_c, y_c, z_c) with (right, up, -lookat).

RichardChen20 commented 1 year ago

Hi all,

Recently, I try to render the image from EG3D using another camera conventions code (threestudio). And I succeeded in rendering image, when I use a c2w matrix (x_c, y_c, z_c) with (right, up, -lookat).

Yeah, this also works. So maybe the authors put the wrong pic here. By the way, c2w matrix (x_c, y_c, z_c) with (right, up, -lookat) is the common way we use. I was really confused about the pic in the rep as the face coord is using the left hand coord .

XinyaChen21 commented 1 year ago

Is the c2w matrix (x_c, y_c, z_c) of Shapenet car also (right, up, -lookat)? The rendered result seems wrong when set (x_c, y_c, z_c) be (right, up, -lookat) for Shapenet car.

povolann commented 10 months ago

@MartinMao1101 Yeah, I have figured out this question by myself. The Extrinsics in labels is used to transform a point in camera coordinate to the world coordinate (face).

image Here are the coordinates.

If u have questions, you can send me a msg.

Can you please explain a bit more, I am trying to use the Shapenet dataset for rendering, but I am really confused about the geometry. So, if I have the pose matrix, how exactly can I get the correct Extrinsics for EG3D?