-
Notifications
You must be signed in to change notification settings - Fork 964
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
Training on a different dataset - Intrinsic parameters #6
Comments
Hello! The intrinsics in kitti_dataset are normalized. So, you need to do Make sure to use the image resolution of the original files that were used for calibration. Regards, Daniyar |
Ok, thanks a lot. Best regards, |
@bl0up Could you please let me know the intrinsics value for the cityscapes dataset? |
@ezorfa Sure, I used this matrix:
|
@bl0up Thankyou so much for quick reply! Appreciated. |
@ezorfa @bl0up There is a mistake in your intrinsics matrix {
"extrinsic": {
"baseline": 0.209313,
"pitch": 0.038,
"roll": 0.0,
"x": 1.7,
"y": 0.1,
"yaw": -0.0195,
"z": 1.22
},
"intrinsic": {
"fx": 2262.52,
"fy": 2265.3017905988554,
"u0": 1096.98,
"v0": 513.137
}
} Thus the intrinsics matrix should be: self.K = np.array([[2262 / 2048, 0, 0.5, 0],
[0, 2262 / 1024, 0.5, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]], dtype=np.float32) |
@bl0up @mrharicot Hmm.. I see the mistake. Thankyou! |
@mrharicot @daniyar-niantic Please clarify this: Will the intrinsics remain the same value as : |
@mrharicot In my understanding, for the resultant image size of (img_width=2048 , img_ht = 768) the intrinsics value should be:
Could you please verify the u0 and v0 values? Thankyou! |
@ezorfa for simplicity we did set the principal point to the center of the image, which is slightly inaccurate but has little impact in practice and makes horizontal flipping easy as there is no need to change the intrinsics |
Hello,
This is not an issue with the code, but rather a question about training on cityscapes instead of kitti. I created a new
Dataset
class in which I read the camera parameters stored in a json file and set them in a numpy array:K = np.array([[fx, 0, u0, 0], [0, fy, v0, 0], [0, 0, 1, 0], [0, 0, 0, 1]], dtype=np.float32)
These intrinsics are then used in
generate_images_pred
. I noticed on tensorboard that thecolor_pred_s_0
was sometimes really messy. Apart from that, the other outputs look good. So, I was wondering, is there anything else to change in the code?Best regards
The text was updated successfully, but these errors were encountered: