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

Add ability to lower filesize and import mrcal cli settings #1244

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willtoth
Copy link
Contributor

@willtoth willtoth commented Feb 19, 2024

Photonvision only allows importing calibrations that are within a certain size limit. Currently that is 50000000 bytes, though even when getting close to that limit, the webUI struggles to import the files.

To mitigate this, a function was added to strip out observations from the json to keep the filesize within a specified limit.

A function was added to import mrcal command line intrinsic values from a camera model file into photonvision json. Note its for a workflow where you do the calibration in PV then re-run it in mrcal.

Marked as a draft for now, I threw this together quick to simplify shrinking file sizes and importing data, but perhaps the CLI or other aspects could be improved here. Figured I'd share either way.

Photonvision only allows importing calibrations that are within a
certain size limit. Currently that is 50000000 bytes, though even
when getting close to that limit, the webUI struggles to import the
files.

To mitigate this, a function was added to strip out observations
from the json to keep the filesize within a specified limit.

A function was added to import mrcal command line intrinsic values
from a camera model file into photonvision json.
@mcm001
Copy link
Contributor

mcm001 commented Feb 19, 2024

Stripping observations could happen in the frontend as well, for files larger than X MB, if that's easier?

@willtoth
Copy link
Contributor Author

That's not a bad idea. Just set to to the 50000000 bytes or so max that is imposed on import, so your exports are always importable.

On an aside, I know you really want to keep observation data with the calibration, but this also becomes clunky to check into version control. Would you be open to opting in to an option that strips all observations?

@mcm001
Copy link
Contributor

mcm001 commented Feb 20, 2024

That was my grand vision, but if there's a workflow that doesn't require that, then I'm open to it. It for sure seems like storing images is problematic -- keeping the corner detections but stripping images might be a middle ground? I think that a design conversation about what teams actually need is in order post champs

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

Successfully merging this pull request may close these issues.

2 participants