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

About image resize with intrinsics in config. #4

Open
QixingJiang opened this issue Jul 14, 2023 · 2 comments
Open

About image resize with intrinsics in config. #4

QixingJiang opened this issue Jul 14, 2023 · 2 comments

Comments

@QixingJiang
Copy link

Thank you for your contribution to the community through your work!
But I have some doubts about the code in config:
HFT/configs/pyva/pyva_swin_kd_simple_fpn_force_nuscenes.py

dict(type='LoadAnnotations', reduce_zero_label=False, with_calib=True, imdecode_backend='pyramid'),
dict(type='Resize', img_scale=(1024, 1024), resize_gt=False, keep_ratio=False),

These configurations resize the images of nuScenes to 1024 and in the load function:
if self.with_calib:
token = osp.basename(filename).split('.')[0]
intrinsics = torch.tensor(self.nuscenes[token])
# scale calibration matrix to account for image downsampling
intrinsics[0] *= 800 / results['img_shape'][1]
intrinsics[1] *= 600 /results['img_shape'][0]

Here, the calib (intrinsics) is multiplied by a scaling factor, provided that the image is resized to a fixed size of 800600, not 10241024.
This hardcore caused some misalignment, did I miss something?
Thank you for answering my question.

@QixingJiang
Copy link
Author

In fact, when the resize scale is 1024 * 1024, the camera parameters scaled to incorrect 600 * 800 in the current code will be better, and I don't know why ... Can you give me some clues?

@XYX1998
Copy link

XYX1998 commented Jul 31, 2024

你好,我想问下作者说的这个make_nuscenes_label.py生成的标签名字是token,请问训练的时候输入的是前视相机的图片吗

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

2 participants