Fish eye lens correction #1955
Replies: 2 comments
-
Thank you for starting a new discussion! We appreciate your input and will review it soon. Warning A friendly reminder that this is a public forum. Please be cautious when clicking links, downloading files, or running scripts posted by others.
Stay safe and happy SLEAPing! Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi @polycherry, Good question! First off, let me just say that that's nowhere close to the worst lens distortion that we've seen, so you're starting from a good place :) In general, it would be ideal if you undistorted the videos themselves before annotating or training in SLEAP. The downside is that this is slow and compute-intensive since you have to apply it to every pixel on every frame and re-render the video. The upside is that you'll have improved efficiency since the SLEAP model will be better able to reuse image features that it learns across the entire image, as opposed to having to learn different variants of what a mouse ear looks like under different degrees of nonlinear distortion. Note that this will only help to some extent -- ultimately, lens distortion is mapping different numbers of photons onto different pixels, so you lose information around the periphery that simply can't be recovered (i.e., it'll look blurry when you undistort). On the other hand, if your distortion isn't that bad (which I'd say is probably the case with your data), then you can save yourself the hassle of re-rendering the undistorted videos and instead just apply the undistortion of the keypoint coordinates themselves, which will be orders of magnitude faster. Let us know what you end up doing or if you have any questions! Cheers, Talmo |
Beta Was this translation helpful? Give feedback.
-
Hello! I am trying to label quite a few images so wanted to ask before that if there is a fish-eye correction that I need to apply before labelling.
![image](https://private-user-images.githubusercontent.com/29594922/366125457-9997223f-2757-40e0-beea-46d61a06ece8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNjA4MzYsIm5iZiI6MTczOTM2MDUzNiwicGF0aCI6Ii8yOTU5NDkyMi8zNjYxMjU0NTctOTk5NzIyM2YtMjc1Ny00MGUwLWJlZWEtNDZkNjFhMDZlY2U4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDExNDIxNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMzMDlmMTJiZTA5MTdmNmNhN2FkMzRjNDFjNDExZGRlNjM5MmQ0NTMwMTU0MDhiYWMwYmZjNjVlYjE5MmQ2NmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.32zQMqzKFxx4jTzwKnT9ZLiOv8Io7zKIkkqfJ2X5V5A)
Do I need to do it on sleap or before, on the videos?
My videos currently look like this -
Beta Was this translation helpful? Give feedback.
All reactions