Conversation
|
@shantanu-gupta I'm still working my way through the TODOs above, but since we chatted about these features, let me know if you have any high-level feedback on the implementation. |
|
@jungerm2 Thanks for looping me in. I'll take a look. Just to start:
This should first confirm that the SPAD data is being generated with 1-bit precision; in the other PR I do take care of this. There is sometimes a practical case for not always generating binary data for SPAD, but instead using 3-bit or 5-bit data at a correspondingly lower frame rate. |
|
I think this PR's just about done. The plan is to merge it with main, fast-forward the sensor sim branch and merge it there, then update the quickstart docs as needed. Thoughts @shantanu-gupta ? |
|
I think I've addressed most of the issues here, so I'll go ahead and merge this and go work on the other branch. Going forward, it might be a good idea to add some database migrations when we modify the schema. I added the structure to support this with example code in the comments. |
Dataset format changes:
Metadata from the simulation is not saved, nor returned as a
transforms.jsonfile anymore. Instead, metadata is directly saved to a SQLite database when ground truths are rendered. This new format, composed of 3 tables defined in code insimulate/schema.py, allows many workers to write metadata to shared databases without contention. These new databases are defined per data type, one for depths, another for normals, etc. This disentagles that datasets, with each having it's independant metadata. Previously, ground-truth intensity frames and composited frames were confounded: if a blender scene had an existing compositor tree set up, for example, to add glare or change the image contrast, this was saved as the ground-truth frames instead of the unadulterated render. This now corresponds to a new "composites" output type, which comes with its owninclude_composites()method.The directory structure has also changed, all data is now saved in numbered subfolders, with previews (previously dubbed "debug" views) saved in a separate folder (only shown for
compositeshere for brevity):A
Metadataclass, and its related classes, namelyCamera,Data,Frame, have been added indataset/models.pyas the main way to interact with the metadata files, both the.dband.jsonvariants. These classes are Pydantic models which mirror the data schema used by the simulation code, provide data validation capabilities, extend and supersede the previous Nerfstudio-esque json schema, and provide utilities to convert between the formats. Users should use these classes instead of directly interacting with the schema variants.That dataset loaders have been re-written to accommodate these changes too, with
NpyDatasetorImgDatasetbeing replaced by a combinedDatasetclass which can support, and load data, that is either a set of images/exrs or a properly formed.dbor.jsondataset, supporting images/exrs/and numpy formats (bitpacked too!).CLI Changes:
dataset.convertto go from a.dbto a.jsondataset--patternswitch--forceflag--patternswitchtransforms.tonemap-exrstotransforms,tonemap-framesto make it clear this is for image data, not depths (also works with composites)MISC:
interpolate_posesintopose.pypy.typedto enable end-users to use vsim typesTODO:
dataset.infoandblender.sequence_infohave been removed.dataset.mergeCLI that can merge different (but similar!) transforms files, renaming the path parameters as needed.bitpack_dimoroffset. These only relate to NPY dataformats, so perhaps this is an OK limitation for now.Data Format and Loadingdocs, merge with data conventions PRWill punt on the following:
Questions:
.dbvs the.jsonformats?Is the naming confusing aroundThese have been marked as private.schema.Metadatavsmodels.Metadata(same for the other classes)? They mirror one another, but I don't want users accidentally importing the wrong one.📚 Documentation preview 📚: https://visionsim--26.org.readthedocs.build/en/26/