Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

一些关于深度预测的方法的询问 #323

Open
qqq1357962 opened this issue Jul 28, 2022 · 1 comment
Open

一些关于深度预测的方法的询问 #323

qqq1357962 opened this issue Jul 28, 2022 · 1 comment

Comments

@qqq1357962
Copy link

您好,我在翻一些数据集(比如coco)的数据处理的时候发现您好像没有传入相机内参。这让我有点疑惑,想确认一下这是否是我看错了。
如果您在预测时确实没用内参,那么我想询问一下就是照片上相同大小的人,在不同内参下,深度是不一样的。但BEV似乎是可以直接预测深度的,请问您是怎么解决这件事情的?

@qqq1357962
Copy link
Author

我去翻了翻issue,发现在另一个相似的issue里,您回答是预定义内参的,相关代码是:
def estimate_translation_cv2(joints_3d, joints_2d, focal_length=600, img_size=np.array([512.,512.]), proj_mat=None, cam_dist=None):
if proj_mat is None:
camK = np.eye(3)
camK[0,0], camK[1,1] = focal_length, focal_length
camK[:2,2] = img_size//2
else:
camK = proj_mat
ret, rvec, tvec,inliers = cv2.solvePnPRansac(joints_3d, joints_2d, camK, cam_dist,
flags=cv2.SOLVEPNP_EPNP,reprojectionError=20,iterationsCount=100)
我看到有的数据会同时往模型送入kp3ds和kp2ds,请问2d和3d坐标是基于focal_length=600做转换的吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant