Package: pit30m
Pit30M Development KitOverviewThis is the Python software development kit for the Pit30M benchmark for large-scale global localization. The devkit is currently in a pre-release state and many features are coming soon!Consider checking outthe original paper. If you would like to, you could also follow some of the authors' social media, e.g.,Julieta'sorAndrei'sin order to be among the first to hear of any updates!Getting StartedThe recommended way to interact with the dataset is with thepippackage, which you can install with:pip install pit30mThe devkit lets you efficiently access data on the fly. Here is a "hello world" command which renders a demo video from a random log segment. Note that it assumesffmpegis installed:python -m pit30m.cli multicam_demo --out-dir .To preview data more interactively, check out thetutorial notebook.More tutorials coming soon.Torch Data LoadingWe provide basic log-based PyTorch dataloaders. Visual-localization-specific ones are coming soon. To see an
example on how to use one of these dataloaders, have a look atdemo_dataloaderintorch/dataset.py.An example command:python -m pit30m.torch.dataset --root-uri s3://pit30m/ --logs 00682fa6-2183-4a0d-dcfe-bc38c448090f,021286dc-5fe5-445f-e5fa-f875f2eb3c57,1c915eda-c18a-46d5-e1ec-e4f624605ff0 --num-workers 16 --batch-size 64FeaturesFramework-agnostic multiprocessing-safe log reader objectsPyTorch dataloadersIn-progressMore lightweight package with fewer dependencies.Very efficient native S3 support throughAWS-authored PyTorch-optimized S3 DataPipes.Support for non-S3 data sources, for users who wish to copy the dataset, or parts of it, to their own storage.Tons of examples and tutorials. Seeexamples/for more information.DevelopmentPackage development, testing, and releasing is performed withpoetry. If you just want to use thepit30mpackage, you don't need to care about this section; just have a look at "Getting Started" above!Install poetrySetup/update yourdevvirtual environments withpoetry install --with=devin the project rootIf you encounter strange keyring/credential errors, you may needPYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring poetry install --with=devDevelop awayrun commands likepoetry run python -m pit30m.cliTest withpoetry run pytestAdvanced command:poetry run pytest -ff --new-first --quiet --color=yes --maxfail=3 -n 4This command will run tests, then wait for new changes and test them automatically. Test execution will run in parallel thanks to the-n 4argument.The command lets you get feedback on whether your code change fixed or broke a particular test within seconds.Make sure you lint. Refer toci.yamlfor exact commands we run in CI.format with black:poetry run black .type check with mypy:poetry run mypy . --ignore-missing-importsRemember to runpoetry installafter pulling and/or updating dependencies.Note that in the pre-release time,torchwill be a "dev" dependency, since it's necessary for all tests to pass.PublishingFirst TimeConfigure poetrywith a PyPI account which has access to edit the package. You need to make sure poetry is configured with your API key.New ReleaseDecide on the commit with the desired changes.Bump the version number inpyproject.toml.git tag vA.B.Candgit push origin <tag>poetry publish --buildCreate the release on GitHub.Citation@inproceedings{martinez2020pit30m,title={Pit30m: A benchmark for global localization in the age of self-driving cars},author={Martinez, Julieta and Doubov, Sasha and Fan, Jack and B{\^a}rsan, Ioan Andrei and Wang, Shenlong and M{\'a}ttyus, Gell{\'e}rt and Urtasun, Raquel},booktitle={{IROS}},pages={4477--4484},year={2020},organization={IEEE}}Additional DetailsImagesCompressionThe images in the dataset are stored using lossy WebP compression at quality level 85. We picked this as a sweet spot between space- and network-bandwidth-saving (about 10x smaller than equivalent PNGs) and maintaining very good image quality for tasks such as SLAM, 3D reconstruction, and visual localization. The images were saved usingPillow 9.2.0.Thes3://pit30m/rawprefix contains lossless image data for a small subset of the logs present in the bucket root. This can be used as a reference by those curious in understanding which artifacts are induced by the lossy compression, and which are inherent in the raw data.Known IssuesA fraction of the images in the dataset exhibit artifacts such as a strong purple tint or missing data (white images). An even smaller fraction of these purple images sometimes shows strong blocky compression artifacts. These represent a known (and, at this scale, difficult to avoid) problem; it was already present in the original raw logs from which we generated the public facing benchmark. Perfectly blank images can be detected quite reliably in a data loader or ETL script by checking whethernp.mean(img) > 250.On example of a log with many blank (whiteout) images is8438b1ba-44e2-4456-f83b-207351a99865.Ground Truth SanitizationPoses belonging to test-query are not available and have been removed with zeroes / NaNs / blank submap IDs in the corresponding pose files and indexes. The long term plan is to use this held-out test query ground truth for a public leaderboard. More information will come in the second half of 2023. In the meantime, there should be a ton of data to iterate on using the publicly available train and val splits.