Add files using upload-large-folder tool
Browse filesFiles changed (49)
- LICENSEAdded+190
- LICENSES/CC-BY-NC-4.0.txtAdded+408
- LICENSES/THIRD-PARTY-NOTICES.mdAdded+108
- LICENSES/ZipSplat-Apache-2.0.txtAdded+190
- README.mdAdded+347
- environment.ymlAdded+26
- evaluation/make_tables.pyAdded+97
- evaluation/paired_stats.pyAdded+112
- manifest.jsonAdded
- pipeline/README.mdAdded+307
- pipeline/arm_lib.pyAdded+411
- pipeline/calibration_gate.pyAdded+267
- pipeline/config.pyAdded+285
- pipeline/episodes.txtAdded+114
- pipeline/episodes_eligible.txtAdded+225
- pipeline/extract_frames.pyAdded+67
- pipeline/gate_expected.jsonAdded+3609
- pipeline/geometry_probe.pyAdded+167
- pipeline/intrinsics.jsonAdded
- pipeline/photometric_eval.pyAdded+295
- pipeline/probe_lib.pyAdded+260
- pipeline/pw_extrinsics.pyAdded+88
- pipeline/query_points.pyAdded+96
- pipeline/release_reconstruction.pyAdded+117
- pipeline/run_diagnostics.pyAdded+601
- pipeline/run_pipeline.pyAdded+189
- pipeline/stereo_lib.pyAdded+101
- reproduction.jsonAdded+1900
- requirements.txtAdded+29
- third_party/ZipSplat/LICENSEAdded+190
- third_party/ZipSplat/README.mdAdded+460
- third_party/ZipSplat/pyproject.tomlAdded+47
- third_party/ZipSplat/requirements.txtAdded+8
- third_party/ZipSplat/splatfactory/__init__.pyAdded+39
- third_party/ZipSplat/splatfactory/gaussians.pyAdded+395
- third_party/ZipSplat/splatfactory/pyproject.tomlAdded+44
- third_party/ZipSplat/splatfactory/requirements.txtAdded+30
- third_party/ZipSplat/splatfactory/settings.pyAdded+10
- third_party/ZipSplat/splatfactory/train.pyAdded+405
- third_party/ZipSplat/splatfactory/trainer.pyAdded+1341
- third_party/ZipSplat/zipsplat/__init__.pyAdded+27
- third_party/ZipSplat/zipsplat/backbone.pyAdded+422
- third_party/ZipSplat/zipsplat/camera.pyAdded+138
- third_party/ZipSplat/zipsplat/pose.pyAdded+178
- third_party/ZipSplat/zipsplat/predictor.pyAdded+136
- third_party/ZipSplat/zipsplat/utils.pyAdded+239
- third_party/ZipSplat/zipsplat/viewer.pyAdded+115
- third_party/ZipSplat/zipsplat/viz.pyAdded+152
- third_party/ZipSplat/zipsplat/zipsplat.pyAdded+243
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2026 ETH Zurich
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408Attribution-NonCommercial 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm anddoes not provide legal services or legal advice. Distribution ofCreative Commons public licenses does not create a lawyer-client orother relationship. Creative Commons makes its licenses and relatedinformation available on an "as-is" basis. Creative Commons gives nowarranties regarding its licenses, any material licensed under theirterms and conditions, or any related information. Creative Commonsdisclaims all liability for damages resulting from their use to thefullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms andconditions that creators and other rights holders may use to shareoriginal works of authorship and other material subject to copyrightand certain other rights specified in the public license below. Thefollowing considerations are for informational purposes only, are notexhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public: wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-NonCommercial 4.0 International PublicLicense
By exercising the Licensed Rights (defined below), You accept and agreeto be bound by the terms and conditions of this Creative CommonsAttribution-NonCommercial 4.0 International Public License ("PublicLicense"). To the extent this Public License may be interpreted as acontract, You are granted the Licensed Rights in consideration of Youracceptance of these terms and conditions, and the Licensor grants Yousuch rights in consideration of benefits the Licensor receives frommaking the Licensed Material available under these terms andconditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
i. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
j. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
k. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
l. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
b. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to thefollowing conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
a. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights thatapply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does notreplace Your obligations under this Public License where the LicensedRights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its publiclicenses. Notwithstanding, Creative Commons may elect to apply one ofits public licenses to material it publishes and in those instanceswill be considered the “Licensor.” The text of the Creative Commonspublic licenses is dedicated to the public domain under the CC0 PublicDomain Dedication. Except for the limited purpose of indicating thatmaterial is shared under a Creative Commons public license or asotherwise permitted by the Creative Commons policies published atcreativecommons.org/policies, Creative Commons does not authorize theuse of the trademark "Creative Commons" or any other trademark or logoof Creative Commons without its prior written consent including,without limitation, in connection with any unauthorized modificationsto any of its public licenses or any other arrangements,understandings, or agreements concerning use of licensed material. Forthe avoidance of doubt, this paragraph does not form part of thepublic licenses.
Creative Commons may be contacted at creativecommons.org.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108# Third-party notices
3DROID redistributes or derives from the following works. Each remains under its ownterms; nothing here relicenses upstream material.
## PointWorld-DROID — NVIDIA License
Refined left-eye camera extrinsics in `cameras.json` (`extrinsics_c2w.pointworld`) areredistributed from PointWorld-DROID, © NVIDIA Corporation.
* Source: <https://huggingface.co/datasets/nvidia/PointWorld-DROID>* Full licence: `LICENSES/PointWorld-DROID-LICENSE.pdf`, included complete and unmodified as Section 3.1 requires (sha256 `4ff203c3f7997c7fed287a463d733f794934a79cfabb2936008fca0bcc8ad3d6`)* Section 3.3 limits use to non-commercial purposes, except for NVIDIA and its affiliates.* The right-eye poses in `extrinsics_c2w.pointworld` are derived from these by composing DROID's within-rig stereo transform, and remain subject to the same terms.
Under Section 3.2, works derived from PointWorld-DROID may carry different terms onlyif the Section 3.3 use limitation continues to apply and the derived works arespecifically identified. To the extent that the 3DROID authors hold rights in them,the following derived works are offered under CC BY-NC 4.0:
scenes/*/gaussians.ply scenes/*/depth.npz scenes/*/metrics.json scenes/*/measurements.json manifest.json reproduction.json
These assets remain additionally subject to Section 3.3 of the NVIDIA License, whichlimits their use to research or evaluation purposes only. CC BY-NC 4.0 does not replacethe applicable upstream terms. `cameras.json` is not in that list: it carries upstreamcamera parameters and stays under the upstream terms.
## ZipSplat
Source code is vendored in `third_party/ZipSplat/`.
* Source: <https://github.com/cvg/ZipSplat>* Revision: `e1b592da0105e5c8c93ff47750c909cbe4634a1d` (2026-06-24)* Licence: Apache License 2.0, included verbatim at `LICENSES/ZipSplat-Apache-2.0.txt` and at `third_party/ZipSplat/LICENSE`* **Modifications: none.** The vendored tree is upstream code as published at that revision, with all copyright and attribution notices retained unmodified. The adaptation for this pipeline lives in our own scripts, not in the vendored code.* Omitted from the copy, neither being code nor a notice: `.git/` (history), `assets/` (70 MB of demo images no part of the pipeline reads), and the build artefact `zipsplat.egg-info/`.
### Pretrained weights are NOT included
The weights are licensed differently from the code and are deliberately absent:
* Checkpoint: `zipsplat-da3g-252p.tar` (252 px), 5,791,182,337 bytes* Licence: **CC BY-NC 4.0**, not Apache-2.0* Source: <https://huggingface.co/veichta/zipsplat>* Revision: `a0c9c8c1f886d1600e64837c2fcc6be6cc3b3694`* sha256: `e2906acdfadeb4f7b3311f398ede9e3a2fde734932a1a017c28a28597a5f5cd6`* Used **unmodified**; the README gives the pinned download and hash check
Shipping CC BY-NC weights inside an Apache-2.0 source tree would misstate their terms,so only the name and the official download route are given here. The reconstructions inthis bundle are outputs of those weights, which is the second reason the data assets arenon-commercial.
## YoNoSplat
Used as a second backbone for the comparisons reported in the accompanying paper. NoYoNoSplat code or output is included in this bundle.
* Code: MIT -- <https://github.com/cvg/yonosplat>* Checkpoint: `dl3dv_224x224_ctx2to32.ckpt`, 3,860,408,133 bytes, **MIT*** Source: <https://huggingface.co/botaoye/YoNoSplat>* Revision: `5c26f8b38b67d8c8878c021102cc424a4f8dcb1f`* sha256: `b72b979c9607984b238ab3e8e414e9576be68716e97c9688423e17dea217208b`* Used unmodified
## AnySplat
Used for the pose-free rows of the ablation reported in the accompanying paper. NoAnySplat code or output is included in this bundle.
* Checkpoint: `model.safetensors`, 2,944,896,024 bytes, **MIT*** Source: <https://huggingface.co/lhjiang/anysplat>* Revision: `d2e8c343672646041ad4ea518184968f94362f01`* sha256: `1c4de2ba5a29c540b899af901bf02107395b5f0617655d347e262f814b4c0c7c`* Used unmodified
## Franka Panda URDF and meshes
The URDF and mesh assets under `pipeline/assets/franka_panda/` are redistributedfrom the `franka_panda` data package in the Bullet Physics/PyBullet repository.They describe the Franka Emika Panda robot and are used for forward kinematicsand robot-surface sampling.
* Source: <https://github.com/bulletphysics/bullet3/tree/master/examples/pybullet/gym/pybullet_data/franka_panda>* Attribution: Bullet Physics/PyBullet `franka_panda` contributors* Licence: Apache License 2.0, included verbatim at `pipeline/assets/franka_panda/LICENSE.txt`* Modifications: none
## DROID
Camera intrinsics and shipped extrinsics in `cameras.json` are redistributed from DROIDand remain subject to DROID's applicable terms. No DROID images or robot states areredistributed; join to DROID by the `uuid` field.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2026 ETH Zurich
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347---pretty_name: "3DROID: A Renderable 3D Gaussian Dataset with Measured Per-Scene Reliability"task_categories: - robotics - image-to-3dsize_categories: - n<1Ksource_datasets: - extendedtags: - 3d - robotics - robot-manipulation - gaussian-splatting - 3d-reconstruction - novel-view-synthesis - multi-view - stereo - droidlicense: otherlicense_name: mixed-component-licenseslicense_link: https://huggingface.co/datasets/wonguen/3DROID/blob/main/LICENSES/THIRD-PARTY-NOTICES.mdviewer: false---
# 3DROID
3DROID provides renderable 3D Gaussian reconstructions of **114 DROID scenes**,together with the camera parameters used for reconstruction, rendered metric depth,and per-scene reliability measurements.
DROID source videos and robot states are not redistributed. Each scene records itsDROID `uuid`, which should be used to join the release with the original dataset. Thedirectory name is provided for readability but is not a reliable programmatic key.
## Dataset layout
```textscenes/<episode>/ gaussians.ply four-view 3D Gaussian reconstruction cameras.json intrinsics, extrinsics, preprocessing, and normalization depth.npz metric depth, alpha coverage, cameras, and metric scale metrics.json released-condition measurements, gate results, and flags measurements.json measurements for all four experimental conditionspipeline/ reconstruction, calibration-gate, and robot-probe codeevaluation/ table aggregation and paired statistical analysesthird_party/ZipSplat/ vendored ZipSplat source; pretrained weights are not includedmanifest.json sizes and SHA-256 hashes of per-scene release filesreproduction.json per-scene numerical reproduction recordrequirements.txt pinned pip environmentenvironment.yml pinned conda environmentLICENSES/ upstream licenses and third-party notices```
## Quick Start
This example downloads one scene and visualizes its released metric depth maps. It does not require a GPU, DROID source videos, or a reconstruction checkpoint.
### 1. Download one scene
```bashpip install -U huggingface_hub numpy matplotlib
hf download wonguen/3DROID \ --repo-type dataset \ --include "scenes/IPRL__Wed_Oct_18_23-32-56_2023/*" \ --local-dir 3DROID```
### 2. Load and visualize the depth maps
```pythonfrom pathlib import Pathimport json
import matplotlib.pyplot as pltimport numpy as np
scene = Path( "3DROID/scenes/IPRL__Wed_Oct_18_23-32-56_2023")
with open(scene / "cameras.json") as f: cameras = json.load(f)
data = np.load(scene / "depth.npz")
depth = data["depth_m"] # (4, 252, 252), camera-axis depth in metresalpha = data["alpha"] # (4, 252, 252), rendered coveragevalid = alpha > 0.5
print("Episode:", cameras["episode"])print("UUID:", cameras["uuid"])print("Views:", cameras["views"])print("Depth shape:", depth.shape)print("Model-to-metre scale:", float(data["s_m"]))
fig, axes = plt.subplots(1, 4, figsize=(14, 3))
for i, view in enumerate(cameras["views"]): visible_depth = np.where(valid[i], depth[i], np.nan) axes[i].imshow(visible_depth, cmap="turbo") axes[i].set_title(view) axes[i].axis("off")
plt.tight_layout()plt.show()```
The four depth maps follow the view order stored in `cameras.json`:
```textext1L, ext1R, ext2L, ext2R```
Pixels with `alpha <= 0.5` are not treated as valid depth measurements.
### Per-scene files
| File | Contents ||---|---|| `gaussians.ply` | Four-view reconstruction in the INRIA 3DGS PLY convention. This is the scene representation used for geometric evaluation. || `cameras.json` | Camera-to-world extrinsics for both calibration sources, DROID intrinsics, image preprocessing, and the normalization needed for rendering. || `depth.npz` | `depth_m` and `alpha` for the four exterior views, metric camera poses in `cams`, and the model-to-meter factor `s_m`. Pixels with `alpha > 0.5` are treated as covered. || `metrics.json` | Measurements and quality flags for the released `pw_inj` reconstruction. || `measurements.json` | Photometric and geometric measurements for all four pose/extrinsic conditions. |
The four conditions are:
| Tag | Extrinsics | Pose conditioning ||---|---|---|| `orig_free` | DROID shipped | No || `orig_inj` | DROID shipped | Yes || `pw_free` | PointWorld refined | No || `pw_inj` | PointWorld refined | Yes; released configuration |
## Reproduce the calibration and robot-surface diagnostics
The diagnostic driver is separate from reconstruction. The calibration gate runsbefore reconstruction, while the robot-surface probe evaluates rendered depth afterreconstruction.
```bashexport DROID_INTRINSICS_ALL=/path/to/droid/full-intrinsics.json
# Reproduce the 225-candidate calibration gate.python pipeline/run_diagnostics.py extract gate
# Recompute the robot-surface geometry measurements after the depth stage.python pipeline/run_diagnostics.py measure
# Compare available diagnostic outputs with the released references.python pipeline/run_diagnostics.py check```
`pipeline/episodes_eligible.txt` contains the 225 gate candidates, and`pipeline/episodes.txt` contains the 114 scenes that pass under the refined extrinsics.`pipeline/gate_expected.json` records the expected gate outputs. The two lists and thegate record agree exactly: 114 scenes pass under refined extrinsics and 80 under shippedextrinsics.
The robot-surface probe uses the included Franka URDF and meshes, DROID joint states,and the rendered four-view depth maps. It reproduces the `geometry_arm_surface` block.
See `pipeline/README.md` for stage dependencies, output paths, comparison tolerances,and troubleshooting details.
## Reconstruction backbones and checkpoints
Three feed-forward Gaussian backbones were evaluated in the paper. The released scenesand executable reconstruction path use ZipSplat; YoNoSplat and AnySplat are auxiliarybaselines identified by pinned upstream revisions and checkpoint hashes.
| Model | Checkpoint source and revision | SHA-256 | Included ||---|---|---|---|| ZipSplat | `veichta/zipsplat` @ `a0c9c8c1f886d1600e64837c2fcc6be6cc3b3694` | `e2906acdfadeb4f7b3311f398ede9e3a2fde734932a1a017c28a28597a5f5cd6` | Source only; weights excluded || YoNoSplat | `botaoye/YoNoSplat` @ `5c26f8b38b67d8c8878c021102cc424a4f8dcb1f` | `b72b979c9607984b238ab3e8e414e9576be68716e97c9688423e17dea217208b` | No || AnySplat | `lhjiang/anysplat` @ `d2e8c343672646041ad4ea518184968f94362f01` | `1c4de2ba5a29c540b899af901bf02107395b5f0617655d347e262f814b4c0c7c` | No |
Download and verify the ZipSplat checkpoint required by the release pipeline:
```bashhf download veichta/zipsplat zipsplat-da3g-252p.tar \ --revision a0c9c8c1f886d1600e64837c2fcc6be6cc3b3694 \ --local-dir weights
echo "e2906acdfadeb4f7b3311f398ede9e3a2fde734932a1a017c28a28597a5f5cd6 weights/zipsplat-da3g-252p.tar" \ | shasum -a 256 -c -```
Checkpoint licenses are separate from source-code licenses. Consult`LICENSES/THIRD-PARTY-NOTICES.md` before downloading or using them.
## Rebuild the released reconstructions
The executable release path uses ZipSplat and performs inference only. Run thefollowing commands from the bundle root:
```bashconda env create -f environment.ymlconda activate 3droidpip install -e third_party/ZipSplat```
The pipeline requires externally obtained DROID episodes, PointWorld camera files, andthe official ZipSplat checkpoint:
```bashexport DROID_ROOT=/path/to/droidexport POINTWORLD_CAMERAS=/path/to/pointworld/camerasexport ZIPSPLAT_CHECKPOINT=/path/to/weights/zipsplat-da3g-252p.tarexport PIPELINE_WORK_DIR=/path/to/work
python pipeline/run_pipeline.py all```
To rebuild only selected scenes:
```bashpython pipeline/run_pipeline.py all --episodes \ AUTOLab__Fri_Jul__7_09-43-39_2023 \ CLVR__Sun_May_21_19-26-15_2023```
The reconstruction driver performs four resumable stages:
| Stage | Output ||---|---|| `extract` | First frame from each camera stream || `reconstruct` | Three-view reconstruction and held-out `ext2R` rendering || `depth` | Four-view reconstruction, PLY, depth, and alpha || `check` | Numerical comparison with the released reconstruction |
The three-view and four-view scenes are different reconstructions. Held-out photometryuses `ext1L`, `ext1R`, and `ext2L` as input and evaluates `ext2R`; the released PLY andgeometric measurements use all four exterior views.
## Reconstruction verification
`run_pipeline.py check` treats numerical agreement as the reproduction criterion. Itcompares `depth_m`, `alpha`, `cams`, and `s_m` with their released counterparts. The PLYSHA-256 is reported separately as a diagnostic because atomic rasterization may not bebyte-identical across hardware.
On the reference environment—a single NVIDIA A100 80GB with CUDA 12.1—all 114 scenesmatched the released depth, alpha, cameras, and scale exactly. The per-scene results arerecorded in `reproduction.json`.
After model loading and one-time CUDA kernel compilation, reconstruction took a medianof 0.77 seconds per scene over the 114 released scenes. See the accompanying paper forthe complete compute report.
## Rendering the released PLY
`gaussians.ply` is stored in the model's normalized frame. Construct the render camerasas described by `cameras.json:normalisation`:
```pythonref = inv(E[0])Er = ref @ EEr[:, :3, 3] /= s_norm```
`depth.npz:cams` instead contains metric camera-to-world extrinsics for back-projection.Do not use those matrices directly as normalized render cameras.
The reported photometric scores cannot be reproduced by rendering `ext2R` from thereleased four-view PLY because `ext2R` was an input to that reconstruction. Photometricevaluation uses the separate three-view reconstruction produced by the `reconstruct`stage.
## Verify the reported aggregates
The released per-scene measurements can be aggregated without a GPU, network access,or DROID source videos:
```bashpip install numpy scipypython evaluation/make_tables.py --bundle .python evaluation/paired_stats.py --bundle .```
`make_tables.py` reproduces the ZipSplat entries in the paper's photometric andgeometric tables, including the 109/110 sample-count split. `paired_stats.py` reproducesthe ZipSplat paired effect sizes, Wilcoxon p-values, improve/worsen counts, anddifference percentiles. These commands re-aggregate stored measurements; they do notrerun reconstruction or re-measure geometry.
YoNoSplat and AnySplat serve as auxiliary baselines in the paper. Their code, outputs,and measurements are not included, so their table rows cannot be derived from thisbundle.
## Known upstream data issues
The release exposes upstream camera defects rather than silently hiding them. Each caseis marked in `metrics.json:flags`.
- Four scenes contain all-zero DROID intrinsics. Their reconstructions retain those values and are flagged as degenerate. The gate uses the documented serial-median substitution to evaluate the extrinsics, so a gate pass does not certify these reconstructions.- One scene has no DROID intrinsic entry and uses the median camera matrix from 501 other episodes recorded with the same physical camera serial.
## Interpreting the measurements
- Report depth errors together with coverage. An error computed from very few valid queries is not representative of the full scene.- SGBM depth is a classical stereo reference, not absolute ground truth.- Robot-referenced comparisons across shipped and refined extrinsics are not independent because the refined calibration uses a related robot-depth signal. Within-source comparisons and held-out photometry avoid this direct cross-source comparison.
## License and provenance
3DROID-authored code is released under Apache-2.0. Generated Gaussian, depth, andmeasurement assets are offered under CC BY-NC 4.0 to the extent that the authors holdthe relevant rights, and remain subject to applicable upstream terms.
| Component | Terms ||---|---|| `pipeline/` and `evaluation/` authored for 3DROID | Apache-2.0; see `LICENSE` || Vendored ZipSplat source | Apache-2.0; see `third_party/ZipSplat/LICENSE` || Franka URDF and meshes | Apache-2.0; see `pipeline/assets/franka_panda/LICENSE.txt` || Generated scene and measurement files | CC BY-NC 4.0 plus applicable upstream terms || Refined left-eye extrinsics | PointWorld-DROID NVIDIA License || Derived right-eye extrinsics | PointWorld terms, with the original within-rig stereo transform composed onto the refined left-eye pose || DROID intrinsics and shipped extrinsics | DROID terms |
No DROID images or robot states are redistributed. Refined left-eye extrinsics comefrom PointWorld-DROID; the right-eye poses are derived by composing DROID's within-rigstereo transform. See `LICENSES/THIRD-PARTY-NOTICES.md` for source revisions,attribution, and component-specific restrictions.
No new camera calibration was performed for this release.
## Citation
If you use 3DROID, please cite the accompanying paper, *3DROID: A Renderable 3DGaussian Dataset with Measured Per-Scene Reliability*. Complete BibTeX will be addedafter de-anonymization. Please also cite DROID and PointWorld for the redistributedcamera metadata.
- DROID: <https://droid-dataset.github.io/>- PointWorld: <https://github.com/NVlabs/PointWorld>1234567891011121314151617181920212223242526# conda env create -f environment.yml && conda activate 3droid# Then: pip install -e third_party/ZipSplat# On our reference machine (a single A100 80GB, CUDA 12.1) a clean environment built# from this file rebuilds the shipped gaussians.ply byte for byte; byte identity is not# guaranteed on other hardware. The ZipSplat checkpoint is licensed separately and is# not distributed here.name: 3droidchannels: - conda-forgedependencies: - python=3.10.20 - pip - pip: - --extra-index-url https://download.pytorch.org/whl/cu121 - torch==2.4.1+cu121 - torchvision==0.19.1+cu121 - numpy==1.26.4 # third_party/ZipSplat requires numpy < 2 - opencv-python==4.11.0.86 - scipy==1.15.3 - h5py==3.16.0 - plyfile==1.1.3 - einops==0.8.2 - jaxtyping==0.3.7 - pillow==12.3.0 - scikit-image==0.25.2 - imageio==2.37.412345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697"""Recompute the ZipSplat rows of the paper's Tables 2-4 from this bundle alone.
Reads only scenes/*/measurements.json. No rendering, no GPU, no network: theper-scene values were measured when the bundle was built, and this script performsthe same aggregation the paper reports, so the tables can be checked against thereleased data without re-running any reconstruction.
python evaluation/make_tables.py [--bundle .] [--json out.json]
Aggregation rules, matching the paper: photometry median over scenes, excluding the four with all-zero DROID intrinsics geometry median over scenes; scenes with no valid measurement under a given extrinsic source drop out, which is where n = 109 vs 110 comes from stereo median over every (scene, view) row"""import argparseimport globimport jsonimport os
import numpy as np
CONDS = ["orig_free", "orig_inj", "pw_free", "pw_inj"]VARIANT = {"orig_free": "Baseline", "orig_inj": "Baseline + pose inj.", "pw_free": "Baseline + refined ext.", "pw_inj": "Ours"}
def load(bundle): paths = sorted(glob.glob(os.path.join(bundle, "scenes", "*", "measurements.json"))) if not paths: raise SystemExit(f"no scenes under {bundle!r} -- point --bundle at the bundle root") return [json.load(open(p)) for p in paths]
def med(scenes, block, cond, field): v = [(m[block]["per_condition"].get(cond) or {}).get(field) for m in scenes] v = [x for x in v if x is not None] return len(v), (float(np.median(v)) if v else None)
def stereo_med(scenes, cond): v = [d["abs_diff_cm_med"] for m in scenes for d in (m["dense_vs_sgbm"]["per_condition"].get(cond) or {}).values() if isinstance(d, dict) and d.get("abs_diff_cm_med") is not None] return len(v), (float(np.median(v)) if v else None)
def main(): ap = argparse.ArgumentParser() ap.add_argument("--bundle", default=os.path.dirname(os.path.dirname( os.path.abspath(__file__)))) ap.add_argument("--json", help="also write the numbers here") a = ap.parse_args()
every = load(a.bundle) # the paper's photometric population excludes the scenes DROID ships with all-zero # intrinsics; the flag travels with the bundle, so the exclusion is reproducible photo = [m for m in every if not m.get("intrinsics_all_zero")] print(f"{len(every)} scenes, {len(photo)} with usable intrinsics\n")
out = {"n_scenes": len(every), "n_photometric": len(photo)}
print("Table 2 / 4 photometric fidelity, held-out ext2R") print(f" {'variant':24s} {'n':>4s} {'PSNR':>7s} {'SSIM':>8s} {'LPIPS':>8s}") out["photometry"] = {} for c in CONDS: n, p = med(photo, "photometry_heldout_ext2R", c, "psnr") _, s = med(photo, "photometry_heldout_ext2R", c, "ssim") _, l = med(photo, "photometry_heldout_ext2R", c, "lpips") out["photometry"][c] = {"n": n, "psnr": p, "ssim": s, "lpips": l} print(f" {VARIANT[c]:24s} {n:4d} {p:7.2f} {s:8.4f} {l:8.4f}")
print("\nTable 3 geometric consistency, four-view reconstructions") print(f" {'variant':24s} {'n':>4s} {'Proj.Cov':>9s} {'Robot Err':>10s} {'Stereo Disagr':>14s}") out["geometry"] = {} for c in CONDS: n, e = med(every, "geometry_arm_surface", c, "err_cm_median") _, v = med(every, "geometry_arm_surface", c, "coverage_matched") ns, sd = stereo_med(every, c) out["geometry"][c] = {"n": n, "coverage": v, "err_cm": e, "stereo_rows": ns, "stereo_disagree_cm": sd} print(f" {VARIANT[c]:24s} {n:4d} {v:9.3f} {e:10.2f} {sd:14.2f}")
print("\nGeometric rows using shipped extrinsics are computed on fewer scenes: one\n" "scene projects the arm entirely off-frame under those extrinsics and leaves\n" "no query points.")
if a.json: json.dump(out, open(a.json, "w"), indent=1) print(f"\nwrote {a.json}")
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112"""Recompute the paired statistics the paper reports, from this bundle alone.
Reads scenes/*/measurements.json. No GPU, no network, no DROID frames: the per-scenemeasurements were made when the bundle was built, and this script performs the sameaggregation and the same test the paper reports, so its claims can be checked againstthe released data.
python evaluation/paired_stats.py [--bundle .] [--json out.json]
Every contrast is paired within scene, and significance is a two-sided Wilcoxonsigned-rank test on the per-scene differences, uncorrected for multiple comparisons --the scene is the only unit of variability, since reconstruction is a deterministicsingle forward pass."""import argparseimport globimport jsonimport os
import numpy as npfrom scipy.stats import wilcoxon
BACKBONE = "ZipSplat" # the bundle ships one backboneCOND = {"orig_free": "shipped extrinsics, pose-free", "orig_inj": "shipped extrinsics, poses injected", "pw_free": "refined extrinsics, pose-free", "pw_inj": "refined extrinsics, poses injected"}
def load(bundle): paths = sorted(glob.glob(os.path.join(bundle, "scenes", "*", "measurements.json"))) if not paths: raise SystemExit(f"no scenes under {bundle!r} -- point --bundle at the bundle root") return [json.load(open(p)) for p in paths]
def photo(m, cond, metric): return (m["photometry_heldout_ext2R"]["per_condition"].get(cond) or {}).get(metric)
def geom(m, cond): return (m["geometry_arm_surface"]["per_condition"].get(cond) or {}).get("err_cm_median")
def contrast(scenes, get, a, b, keep): """Per-scene difference b - a, over scenes where both sides exist.""" d = [get(m, b) - get(m, a) for m in scenes if keep(m) and get(m, a) is not None and get(m, b) is not None] if not d: return None d = np.asarray(d, float) return {"n": len(d), "median": float(np.median(d)), "mean": float(d.mean()), "p": float(wilcoxon(d).pvalue) if np.any(d != 0) else float("nan"), "better": int((d > 0).sum()), "worse": int((d < 0).sum()), "pct": [float(np.percentile(d, q)) for q in (5, 25, 50, 75, 95)]}
def main(): ap = argparse.ArgumentParser() ap.add_argument("--bundle", default=os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) ap.add_argument("--json") a = ap.parse_args()
every = load(a.bundle) photo_pool = [m for m in every if not m.get("intrinsics_all_zero")] print(f"{len(every)} scenes, {len(photo_pool)} with usable intrinsics\n") out = {"n_scenes": len(every), "n_photometric": len(photo_pool)}
print(f"Photometric, held-out ext2R -- paired per-scene differences ({BACKBONE} only)") print(f" {'contrast':40s} {'n':>4s} {'dPSNR':>7s} {'p':>9s} {'better':>9s}") out["backbone"] = BACKBONE out["photometric"] = {} axes = [("pose conditioning", [("orig_free", "orig_inj"), ("pw_free", "pw_inj")]), ("refined extrinsics", [("orig_free", "pw_free"), ("orig_inj", "pw_inj")])] for axis, pairs in axes: rows = [] for lo, hi in pairs: r = contrast(photo_pool, lambda m, c: photo(m, c, "psnr"), lo, hi, lambda m: True) rows.append(r) out["photometric"][f"{axis}|{lo}->{hi}"] = r print(f" {lo} -> {hi:31s} {r['n']:4d} {r['median']:+7.2f} {r['p']:9.1e} " f"{r['better']:4d}/{r['n']}") med = [r["median"] for r in rows] pmax = max(r["p"] for r in rows) print(f" {BACKBONE} range {min(med):+.2f} to {max(med):+.2f} dB, max p = {pmax:.1e}\n") out[f"{axis}_range"] = [min(med), max(med), pmax]
print("The paper quotes these ranges across both pose-accepting backbones. Only") print(f"{BACKBONE} reconstructions ship here, so the values above are the {BACKBONE}") print("half of each range; the YoNoSplat half is not derivable from this bundle.\n")
print("Geometric, arm-surface depth error -- paired per-scene differences (cm)") print(f" {'contrast':44s} {'n':>4s} {'d med':>7s} {'p':>9s} {'improve':>8s}") out["geometric"] = {} for lo, hi in (("orig_free", "orig_inj"), ("pw_free", "pw_inj"), ("orig_free", "pw_free"), ("orig_inj", "pw_inj")): r = contrast(every, geom, lo, hi, lambda m: True) out["geometric"][f"{lo}->{hi}"] = r print(f" {lo} -> {hi:32s} {r['n']:4d} {r['median']:+7.2f} {r['p']:9.1e} " f"{r['worse']:4d}/{r['n']}") g = out["geometric"]["orig_free->orig_inj"] print(f"\n shipped-extrinsic pose injection: median {g['median']:+.2f} cm, p = {g['p']:.4f}, " f"n = {g['n']}; {g['worse']} improve, {g['better']} worsen") print(f" percentiles 5/25/50/75/95 = " + " / ".join(f"{x:+.2f}" for x in g["pct"]))
if a.json: json.dump(out, open(a.json, "w"), indent=1) print(f"\nwrote {a.json}")
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307# Rebuilding the reconstructions
This directory rebuilds `scenes/<episode>/gaussians.ply` and `scenes/<episode>/depth.npz`from the DROID source videos, and reproduces the two measurements that stand beside them:the calibration gate that chose the episodes, and the geometry table that scores thereconstructions against the robot arm. Nothing here is needed to *use* the bundle: thereconstructions, their cameras and every reported measurement already ship, and`evaluation/make_tables.py` reproduces the paper's table rows from them with no GPU andno downloads.
Everything below is inference. Nothing is trained.
## Two things happen here, and they are separate — one driver each
**Selection** comes first and **is not a reconstruction stage**. The `gate` scores anepisode's *camera extrinsics* against the robot's own joint encoders, using classicalstereo and no learned model at all, and it does so *before* anything is reconstructed. Itruns over the 225 candidate names in `episodes_eligible.txt` — a wider list than therelease — and the 114 that passed under the refined extrinsics are `episodes.txt`. Itreads extracted frames rather than the MP4s, so it carries its own `extract` stage;`run_pipeline.py extract` covers the released 114 only and cannot reach anything else.
**The gate is a rule, not a replay of our run.** Its criterion — at least 30 stereomatches on the arm, and a median ratio of stereo depth to kinematic depth inside[0.85, 1.15] — is a property of an episode, and applies to any DROID episode with aFranka arm and a stereo rig. Our 225 are only the *default* pool, used when `--episodes`is omitted; `--episodes` itself accepts any episode present under `--droid-root`, so youcan screen your own without editing a shipped list:
```bashpython run_diagnostics.py extract gate --episodes <any DROID episode name>```
`gate_expected.json` is likewise a *comparison set*, not a permitted-input list. `check`compares the episodes it covers and reports the rest as scored with no reference verdict;that is a normal outcome and does not fail the check.
**Reconstruction** comes second and works from that already-selected list. `run_pipeline.py`'s`extract`, `reconstruct` and `depth` run over the 114 names in `episodes.txt` and performno filtering of their own — by the time they run, the choice has been made.
**Measurement** comes third: `measure` reads the depth maps `depth` already wrote andscores them against the arm. It runs no model.
Because gating is upstream *selection* and `measure` is downstream *measurement*, neitherbelongs in the reconstruction driver, and neither is in it. There are two executables:
| driver | stages | over | what it is ||---|---|---|---|| `run_pipeline.py` | `extract`, `reconstruct`, `depth`, `check` (= `all`) | `episodes.txt`, 114 names | the reconstruction path, and nothing else || `run_diagnostics.py` | `extract`, `gate`, `measure`, `check` (= `all`) | `extract`, `gate`: any episode under `--droid-root`, defaulting to `episodes_eligible.txt`'s 225 names; `measure`: any episode with rendered depth in `<work>/four_view`, defaulting to `episodes.txt`'s 114 | the two measurements that stand beside it |
Each driver has its own `check`, which compares only its own outputs against what ships.Splitting them this way means a `gate` or `measure` run cannot touch, reconfigure orinvalidate the reconstruction path.
That is also the whole reason both episode files ship:
| you want to reproduce | run | over ||---|---|---|| the released reconstructions | `run_pipeline.py all` | `episodes.txt`, 114 names || the geometry table | `run_diagnostics.py measure`, after `depth` | `episodes.txt`, 114 names (the default) || the 225 → 114 selection | `run_diagnostics.py extract gate` | `episodes_eligible.txt`, 225 names (the default) || the gate applied to other episodes | `run_diagnostics.py extract gate --episodes ...` | any episode under `--droid-root` |
## What you must supply
| input | flag | environment variable | where it comes from ||---|---|---|---|| DROID episodes | `--droid-root` | `DROID_ROOT` | <https://droid-dataset.github.io/> — one directory per episode, named as in `episodes.txt`, each holding `metadata_*.json`, `trajectory.h5` and the `<serial>-stereo.mp4` recordings || PointWorld cameras | `--pointworld-dir` | `POINTWORLD_CAMERAS` | the NVIDIA PointWorld-DROID release — a flat directory of `<uuid>_cameras.json`. The refined extrinsics for the released scenes are also in `scenes/<episode>/cameras.json` || ZipSplat checkpoint | `--checkpoint` | `ZIPSPLAT_CHECKPOINT` | `zipsplat-da3g-252p.tar`, pinned by revision and sha256 in the top-level `README.md` || work directory | `--work-dir` | `PIPELINE_WORK_DIR` | anywhere writable; defaults to `<bundle>/work` |
Ask for one that was not supplied and the run stops with a message naming the flag, thevariable and the source. No path outside the bundle is ever assumed.
Shipped alongside, and resolved automatically: `episodes.txt` (the 114 released episodenames), `episodes_eligible.txt` (the 225 candidates the gate scores), `intrinsics.json`(DROID intrinsics keyed by uuid, then by camera serial) and `gate_expected.json` (thegate verdict each of those 225 candidates should reproduce).
The `gate` and `measure` stages additionally need DROID's full intrinsics table, whichcovers every DROID episode rather than only the released ones. It has no flag; set`DROID_INTRINSICS_ALL` to its path. `intrinsics.json` cannot stand in for it: the gatescores candidates that are not in the release, so their records are not in that file.
## Install
```bashconda env create -f ../environment.yml && conda activate 3droid # or: pip install -r ../requirements.txtpip install -e ../third_party/ZipSplat```
## Run
```bashexport DROID_ROOT=/path/to/droidexport POINTWORLD_CAMERAS=/path/to/pointworld/camerasexport ZIPSPLAT_CHECKPOINT=/path/to/weights/zipsplat-da3g-252p.tarexport PIPELINE_WORK_DIR=/path/to/work
python run_pipeline.py all```
A subset, which is the usual case since the source videos are large:
```bashpython run_pipeline.py all --episodes AUTOLab__Fri_Jul__7_09-43-39_2023 CLVR__Sun_May_21_19-26-15_2023```
Stages can be run one at a time, and every stage is resumable — rerunning skips episodeswhose outputs are already complete.
```bashpython run_pipeline.py extractpython run_pipeline.py depth check```
`run_pipeline.py all` is the reconstruction path — `extract`, `reconstruct`, `depth`,`check` — and nothing else. The gate and the geometry table live in the second driver:
```bashexport DROID_INTRINSICS_ALL=/path/to/droid/full-intrinsics.json
python run_diagnostics.py extract gate # the 225 candidates; CPU only, no checkpointpython run_diagnostics.py measure # the geometry table, after depth has runpython run_diagnostics.py check # compares both against what shipspython run_diagnostics.py all # extract, gate, measure, check```
`extract` comes first because the gate reads `<work>/frames/`, not the source videos, and`run_pipeline.py extract` will only write frames for the 114 released names. Running`gate` on a candidate whose frames were never extracted stops with a message naming themissing file and this stage; it does not fail somewhere inside OpenCV. For the releasedepisodes the two `extract` stages do the same work, so whichever ran first satisfies both.
`run_diagnostics.py` takes the same `--work-dir`, `--droid-root` and `--pointworld-dir`flags and reads the same environment variables, so both drivers share one work directory.It takes no `--checkpoint`: none of its stages runs a model. Every stage validates`--episodes` against the thing it actually needs, never against a shipped list:
| stage | precondition on `--episodes` | default when omitted ||---|---|---|| `extract`, `gate` | the episode directory exists under `--droid-root` | `episodes_eligible.txt`, 225 names || `measure` | `<work>/four_view/<episode>/depth_<condition>.npz` exists | `episodes.txt`, 114 names || `check` | none — it reports on the output it finds | `episodes.txt`, 114 names |
Because `check` imposes no precondition, one `--episodes` list may name gate episodes andmeasure episodes together; it compares whatever it has output for and stays quiet aboutthe rest.
**How far `measure`'s scoping actually reaches.** Not far, and it is worth being plainabout it. `run_pipeline.py depth` is the only thing that writes those depth maps, and itis itself scoped to `episodes.txt`, so the measurable set today is still the released 114.What changed is that the restriction now names the real precondition — the rendered depthmaps — instead of a list, which is why `check` can accept a mixed episode list and why theerror you get for an unmeasurable episode names the missing file rather than a list youare not on.
`calibration_gate.py` and `geometry_probe.py` can also be run directly, with the sameflags; each hands its stage straight to the driver.
Within either driver, several stages named at once run in dependency order whatever orderyou type them in — `extract`, `reconstruct`, `depth`, `check` for `run_pipeline.py`, and`extract`, `gate`, `measure`, `check` for `run_diagnostics.py`.
## What each stage writes
| driver | stage | writes | what it is ||---|---|---|---|| `run_pipeline.py` | `extract` | `<work>/frames/<episode>/images/<view>_0000.png` | the first frame of each camera, stereo-split into left and right eyes || `run_pipeline.py` | `reconstruct` (`photometric_eval.py`) | `<work>/three_view/<episode>/` | the held-out photometry: `ext1L`, `ext1R` and `ext2L` in, `ext2R` rendered and scored against the photograph, for all four conditions. Plus `manifest.json` with the per-condition PSNR and coverage || `run_pipeline.py` | `depth` (`release_reconstruction.py`) | `<work>/four_view/<episode>/gaussians.ply`, `depth_<condition>.npz` | the four-view reconstruction — the object this release ships. The `.ply` is written for the release condition (`pw_inj`) only || `run_diagnostics.py` | `extract` (`extract_frames.py`) | `<work>/frames/<episode>/images/<view>_0000.png` | the same frames, for whatever episodes the gate is asked to score rather than the 114 released ones. Identical work for an episode both drivers cover || `run_diagnostics.py` | `gate` (`calibration_gate.py`) | `<work>/gate/verdicts.json` | the calibration-gate verdict for each episode scored — the 225 candidates by default — under both extrinsic sources. CPU only — no GPU, no checkpoint || `run_diagnostics.py` | `measure` (`geometry_probe.py`) | `<work>/measure/<episode>/geometry.json` | the arm-surface geometry table for all four conditions, read out of the depth maps `depth` wrote — for any episode those maps exist for. No model runs || `run_pipeline.py` | `check` | `<work>/check.json` | the rebuilt reconstruction against the shipped one, per episode || `run_diagnostics.py` | `check` | `<work>/diagnostics_check.json` | the recomputed gate verdicts and geometry table against the shipped ones |
The three-view and four-view reconstructions are different objects and neither replacesthe other: the photometric numbers come from the three-view pass, the released `.ply` anddepth from the four-view pass. See "Rendering `gaussians.ply`" in the top-level README.
## The checks
Each driver checks only what it produced, so a diagnostics run can never change theverdict on the reconstruction path.
### The reconstruction check
`run_pipeline.py check` reports two independent comparisons per episode, and they decidedifferent things.
* **values** — `depth_m`, `alpha` and `cams` of the rebuilt render against `scenes/<episode>/depth.npz`, element by element, plus exact equality of `s_m`. **This is the pass criterion.** An episode counts as reproduced when the depth agrees to within 0.05 m, alpha to within 0.01, the cameras exactly, and `s_m` exactly. The depth tolerance sits far below the centimetre-scale floor of the measurements it feeds.* **bytes** — sha256 of the rebuilt `gaussians.ply` against the shipped one and against the hash in `manifest.json`. **Reported as a diagnostic, never as the verdict.**
### The gate comparison
`run_diagnostics.py check` reads `gate_expected.json` — which ships, and carries all 225candidates — and compares it against `<work>/gate/verdicts.json` for whatever subset wasactually run.Two things come out of it, and the first needs no raw data at all: the shipped file onits own shows 114 candidates passing under `pw` and 80 under `orig`, and that the 114`pw`-passing names are exactly the contents of `episodes.txt`. That is the 225 → 114selection, readable from the bundle by itself.
The gate is deterministic — CPU block matching plus seeded CAD sampling, no GPU anywhere— so it is held to a strict standard: `n_matched`, `frac_in_frame` and `passed` mustagree **exactly**, and `ratio` and `err_cm` within a relative `1e-06`. That lasttolerance is a property of the stored numbers, not of this code: they were writtenthrough float32 and carry about `6e-08` of relative round-off that the float64 path heredoes not. A rerun of all 225 episodes reproduced every exact leaf and left `ratio` and`err_cm` within `5e-09`, two orders of magnitude inside the tolerance.
An episode that was scored but is **not** in `gate_expected.json` — anything outside ourown candidate pool — has no reference verdict to be held to. `check` counts thoseseparately, prints its verdict for them, and does not treat them as a failure. Thesummary line reads "scored N episodes: M had a reference verdict, of which Kreproduced", so the compared and the uncomparable are never conflated.
### The geometry comparison
`run_diagnostics.py check` compares `<work>/measure/<episode>/geometry.json` against`scenes/<episode>/measurements.json`, **per condition** rather than collapsed — the fourconditions are the comparison the table exists to make, so a verdict that averaged overthem would hide the thing being checked.
`measurements.json` is a *comparison set*, in the same sense as `gate_expected.json`. Anepisode that was measured but has none — anything outside the release — is reported withthe table it produced, counted separately, and never treated as a failure. An episode withno `geometry.json` at all was simply never measured; it is counted and otherwise passedover. The summary reads "N episodes measured: M had reference measurements".
It is compared against `measurements.json` and not `metrics.json` on purpose. The samequantity appears in both, and `metrics.json` carries the float32 form of it:`err_cm_median` is `10.014851570129395` there against `10.014851419964183` in`measurements.json`, a relative difference of about `1.5e-08`.
This stage does **not** get the gate's tolerances, because it is not the gate's kind ofcomputation. Its input is a GPU render, which the reconstruction check already allows tomove by up to 0.05 m and still count as reproduced. A depth wobble inside that budget can push a querypoint across the alpha threshold and change `n_matched`, so requiring `n_matched` exactlywould fail on any machine that is not the reference one — the exact outcome thevalue-based verdict exists to avoid. So:
| leaf | how it is compared | why ||---|---|---|| `n_rows` | exactly | fixed by the query-point definition, 1200 arm points × 4 views || `n_matched` | within ±2 | a depth wobble inside the 0.05 m budget can cross the alpha threshold || `coverage_matched`, `err_cm_median`, `ratio_median` | relative `1e-04` | derived medians, see below |
Both numbers were measured rather than chosen. Recomputing the table from the originalrendered depth maps reproduced all 456 cells (114 episodes × 4 conditions) of`measurements.json` bit-for-bit, `n_matched` included — the metric code contributes noerror of its own. Recomputing it from depth maps re-rendered on the same machine movedexactly one cell out of 36: `err_cm_median` `122.63243623` → `122.63152428`, a relative`7.4e-06`, with `n_matched`, `ratio_median` and `coverage_matched` unmoved. The `1e-04`tolerance sits an order of magnitude above that and is still physically negligible —`1e-04` of the median cell is 7 micrometres, against a measurement whose own floor iscentimetres. The ±2 band was never exercised; it is headroom for the threshold-crossingargument, sized so it cannot mask the signal: on 108 of the 114 episodes the fourconditions differ in `n_matched` by more than 2 (median 64, maximum 1269).
The rasteriser accumulates with atomics, so identical Gaussians can render a marginallydifferent depth map on different hardware, and a differently ordered accumulation canchange the serialised bytes. On our reference machine — a single A100 80GB under CUDA12.1 — the rebuild is byte-identical on every episode we ran, and `reproduction.json`records the bundle's own same-machine check at `max |depth| = 0` across all 114 scenes.Elsewhere, expect the values to match and the hash not to; that combination means thereconstruction reproduced and only the rendering differs.
## Notes
* `extract` needs the **wrist** recording as well as the four exterior ones, and skips an episode entirely if any of the five is missing. Only the four exterior frames are read by the reconstruction.* Four scenes carry all-zero DROID intrinsics and were reconstructed with those zeros. They rebuild identically and remain degenerate; see "Known defects" in the top-level README.* The `gate` and `measure` stages both need the DROID robot states (`trajectory.h5`) as well as the images, because their ground truth is the robot's own joint encoders fed through the Franka URDF. The URDF and its meshes ship under `assets/franka_panda/`.* `gate` needs the extracted frames, not the source videos: it reads `<work>/frames/<episode>/images/<view>_0000.png`, which `extract` writes. Only `extract` touches the MP4s. Use `run_diagnostics.py extract`, not `run_pipeline.py extract`, for anything outside the release — the latter rejects any name that is not in `episodes.txt`. A frame that is absent when `gate` runs is reported by name, together with the stage that writes it, and the remaining episodes are still scored.* The `stereo_floor` block in `scenes/<episode>/metrics.json` is the gate's own output, re-presented next to the reconstruction it bounds — `stereo_floor.<source>.n_matched`, `err_cm_median` and `ratio_median` are the gate's `n_matched`, `err_cm` and `ratio`, and `coverage_matched` is `n_matched / 2400`. It is one computation shown twice, not two that happen to agree, and the `gate` stage is its single producer.* **Out of scope: `dense_vs_sgbm`.** `scenes/<episode>/measurements.json` also carries a `dense_vs_sgbm` block — rendered depth against confidence-filtered stereo, compared per pixel over the left view of each rig. `measure` does **not** reproduce it. It is a different computation from the query-point probe in this directory: it scores whole depth images rather than a fixed set of points with known 3-D coordinates, and needs machinery that is not part of the shipped set. The block's values ship; the code that produced them does not.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411"""Shared plumbing for the robot-arm depth probe.
WHAT THIS ADDS, AND WHAT IT DELIBERATELY DOES NOT-------------------------------------------------Two stages of this pipeline measure geometry against the robot rather than against aphotograph, and both are built out of this module:
* `gate` -- scores an EXTRINSIC. Classical SGBM stereo depth at arm pixels versus the arm's own kinematic depth. No learned model enters it. * `measure` -- scores a RECONSTRUCTION. The same query points and the same metric, read out of the four-view depth maps the `depth` stage already wrote (`<work>/four_view/<episode>/depth_<condition>.npz`, in metres).
Neither re-infers anything: no GPU, no checkpoint, no training. `measure` in particularopens a `.npz` and projects into it -- that is the seam that keeps the geometric numbersindependent of a second forward pass.
Every *metric* definition is imported or copied verbatim from the probe the paperadopted:
* `query_points.build` -- the query-point families * `probe_lib` -- URDF FK, CAD surface sampling, the z-buffer visibility mask * `depth_probe_K` -- a character-for-character copy of the adopted `depth_probe`, with the ONE change that the pinhole intrinsics arrive as arguments instead of being read from module globals.
Why that one change is necessary, and why it is not a metric change-------------------------------------------------------------------The original `depth_probe` hard-codes `fx = FOCAL * RES / min(W, H)` and `cxy = RES / 2`-- a single nominal focal (530 px) and a principal point assumed to be the image centre,both frozen at one model's 252 px grid. This release is not that setting:
* it renders with the MEASURED per-episode intrinsics (`intrinsics.json`), whose principal point is up to 26 px off centre (cx spans 640.98 +/- 26 px at 1280); * the released backbone renders at 252 px, and a second backbone at 224 px, on different crops.
Projecting with the wrong intrinsics puts the query point on the wrong pixel, whichcorrupts the measurement before any metric is applied. The 15x15 window, ALPHA_MIN,`depth_ratio`, `err_1d_cm` and `depth_ratio_win_min` are untouched.
CIRCULARITY BOUNDARY (enforced by the reporting, not by this file)------------------------------------------------------------------PointWorld optimised its extrinsics so that STEREO depth at arm pixels matches the arm'skinematic depth. The arm is therefore not a neutral referee between the two extrinsicsources, and the released tables say so. Concretely: * the ABSOLUTE reconstruction number in each condition is valid -- reconstruction depth never entered PointWorld's objective; * `orig_free` vs `orig_inj` (both scored with DROID extrinsics) is valid; * `orig_*` -> `pw_*` may NOT be read as "PointWorld's extrinsics are more accurate", because that is the comparison PointWorld was fitted to win.Anything that prints a row crossing that boundary must print the boundary next to it.
Reads: the bundle's own files, plus the user-supplied DROID episodes and the workdirectory. Writes: nothing -- this is a library; the stage modules do the writing."""import globimport json
import numpy as np
import configimport probe_lib as PL # noqa: E402import query_points as QP # noqa: E402from pw_extrinsics import VIEWS, batch_root, load_orig, load_pw, raw_root # noqa: E402
CONDITIONS = ["orig_free", "orig_inj", "pw_free", "pw_inj"]SRC = {"orig_free": "orig", "orig_inj": "orig", "pw_free": "pw", "pw_inj": "pw"}W, H = 1280, 720SIDE = min(W, H)
# The adopted query families. `flange_at_close` and the tool ladder are INVALID -- the# point sits in mid-air, frac(ratio>1) = 0.86..0.91 -- and are not tabulated.# `flange_at_close` is still probed, because it is the regression handle that proves the# point-building path did not drift.ADOPTED = ["arm_surface_t0", "finger_surface_t0", "table_under_gripper", "tcp_at_t0"]REGRESSION = "flange_at_close"
# `alpha` is a coverage mask; ALPHA_MIN turns it into "this pixel carries a depth".# The value is 0.5, stated in two places this bundle ships: the gate's own comment in# calibration_gate.py, and photometric_eval.py, which uses the literal 0.5 for the# identical test when it computes held-out coverage. It is not proven here -- what# tests it is the gate reproducing its stored per-episode n_matched exactly.ALPHA_MIN = 0.5
_KINTR = config.intrinsics()
# --------------------------------------------------------------------------- metadata_META = {}
def meta(ep): if ep not in _META: _META[ep] = json.load(open(glob.glob(f"{raw_root(ep)}/{ep}/metadata_*.json")[0])) return _META[ep]
def serial(ep, view): m = meta(ep) return m["ext1_cam_serial"] if view.startswith("ext1") else m["ext2_cam_serial"]
# ------------------------------------------------------------------------ intrinsics# DEFECT FOUND WHILE WIRING THIS UP, reported rather than silently repaired.## The intrinsics table shipped as `intrinsics.json` was assembled by substituting a# per-serial donor value only for episodes whose uuid was ABSENT from DROID's own# annotations. Some uuids are PRESENT but carry an all-zero cameraMatrix, and those# slipped through: the released reconstruction rendered them with fx = 0 and cx = 0.# They carry the signature in their own scene record -- held-out PSNR 5.5-7.1 dB,# coverage_heldout = 0.0, and a scale fit pinned at the 0.15 floor of the search -- and# `scenes/<episode>/metrics.json` flags them under `flags.intrinsics_all_zero`. Those# episodes are DEGENERATE for every model-side number and are counted, not repaired.## The classical-stereo control and the entrance gate are computed fresh on the CPU here,# so for THOSE we can use a correct focal: the per-serial median over every other DROID# episode that used the same physical camera, which is the same substitution rule the# shipped intrinsics table already applies to its patched episodes. Both are reported._MEDIAN_CACHE = None
def _per_serial_median(need): global _MEDIAN_CACHE if _MEDIAN_CACHE is None: acc = {} with open(config.droid_intrinsics_all()) as f: KI = json.load(f) for d in KI.values(): for ser, v in d.items(): if v.get("cameraMatrix") and v.get("width") == 1280 \ and all(float(x) > 0 for x in v["cameraMatrix"]): acc.setdefault(ser, []).append([float(x) for x in v["cameraMatrix"]]) _MEDIAN_CACHE = acc out = {} for ser in need: vals = _MEDIAN_CACHE.get(ser, []) out[ser] = (np.median(np.array(vals, dtype=np.float64), axis=0).tolist() if len(vals) >= 20 else None) return out
def zero_intrinsic_episodes(eps): """Which of `eps` have an ext1/ext2 cameraMatrix in intrinsics.json that is all zeros.
The caller supplies the episode list, because the two stages that would ask draw from two different tables: the gate from the candidate pool, `measure` from the release. """ bad = [] for ep in eps: u = meta(ep)["uuid"] for v in ("ext1L", "ext2L"): s = serial(ep, v) cm = _KINTR.get(u, {}).get(s, {}).get("cameraMatrix") if not cm or float(cm[0]) == 0.0: bad.append(ep) break return bad
ZERO_INTR = None # filled on first use, cached
def zero_intr_set(eps): global ZERO_INTR if ZERO_INTR is None: ZERO_INTR = set(zero_intrinsic_episodes(eps)) return ZERO_INTR
def native_K(ep, repair=False): """(fx, cx, fy, cy) at native 1280x720, per view.
repair=False -> exactly what the released reconstruction was rendered with, including the all-zero episodes. The `measure` stage must use this: the stored depth maps cannot be un-rendered. repair=True -> the all-zero episodes get the per-serial DROID median instead. Only the CPU-side stereo control and the calibration gate may use this, because both recompute their depth from the raw images. """ u = meta(ep)["uuid"] out = {} need = {serial(ep, v) for v in VIEWS} med = _per_serial_median(need) if repair else {} for v in VIEWS: s = serial(ep, v) cm = _KINTR[u][s]["cameraMatrix"] if repair and float(cm[0]) == 0.0: cm = med[s] if cm is None: raise ValueError(f"{ep}/{s}: no donor episodes for a per-serial median") out[v] = tuple(float(x) for x in cm) # (fx, cx, fy, cy) return out
def grid_K(ep, model, repair=False): """Pinhole intrinsics on the grid the depth map actually lives on.
Returns {view: (fx_px, cx_px, cy_px, res)} in that grid's pixels.
ZipSplat, res 252 -- `to_square` = crop_to_ar(1.0) then resize, and `Camera.crop((side-W, side-H)).scale(RES/side)` mirrors it exactly: x_252 = (x_1280 - 280) * 252/720, y_252 = y_720 * 252/720
A 224 px backbone -- its preprocessing resizes 1280x720 to 398x224 (scale 224/720, width rounded), then centre-crops 224 columns starting at col 87: x_224 = x_1280 * 398/1280 - 87, y_224 = y_720 * 224/720 NOTE: that step rescales fx/fy but leaves the NORMALISED principal point untouched, i.e. it assumes cx = W/2 exactly. Since DROID's cx is within ~1 px of W/2 after the resize, the model saw a principal point <=1 px from the truth. We project with the true image geometry above, because that is where the arm actually lands in the image. """ K = native_K(ep, repair=repair) out = {} for v in VIEWS: fx, cx, fy, cy = K[v] if model == "zip": s = 252.0 / SIDE out[v] = (fx * s, (cx - (W - SIDE) / 2.0) * s, cy * s, 252) elif model == "yono": res, w_scaled = 224, 398 sx, sy = w_scaled / W, res / H col = (w_scaled - res) // 2 out[v] = (fx * sx, cx * sx - col, cy * sy, res) # fy * sy == fx * sx to 0.1%: DROID's fx == fy exactly and sx ~ sy. else: raise ValueError(model) return out
def stereo_grid_K(ep, repair=False): """Intrinsics on stereo_lib's 252 square-crop grid (`to_square_grid`).
`to_square_grid` slices columns [280, 1000) and resizes to 252 -- the same geometry as ZipSplat's, so the mapping is identical. Kept as its own function so that a future change to either grid cannot silently alias the other. """ K = native_K(ep, repair=repair) s = 252.0 / SIDE return {v: (fx * s, (cx - (W - SIDE) / 2.0) * s, cy * s, 252) for v, (fx, cx, fy, cy) in K.items()}
# ------------------------------------------------------------------------- extrinsicsdef cams_for(ep, source): """The (4,4,4) metric c2w stack, robot base frame, for one extrinsic source.
This is the camera the query point is projected through. It is ALWAYS the metric extrinsic of the condition -- never the model's own recovered pose. That matches the adopted probe, which passes the metric extrinsic in every condition: pose-free means the reconstruction ignored the extrinsics, but the pixel a world point lands on is fixed by the photograph, not by the reconstruction.
The `cams` array inside `<work>/four_view/<episode>/depth_<condition>.npz` IS this stack -- `release_reconstruction.py` writes the condition's own `ext` there -- so the `measure` stage reads it from the npz rather than recomputing it. """ return (load_orig(ep) if source == "orig" else load_pw(ep))[1]
# -------------------------------------------------------------------------- t_closedef t_close(ep): """Frame at which the gripper is commanded shut. Verbatim from the adopted probe's `robot_facts`, which is the definition `query_points.build` was validated against.""" import h5py with h5py.File(f"{raw_root(ep)}/{ep}/trajectory.h5", "r") as f: grip = np.array(f["action/gripper_position"]) thr = max(grip.min() + 0.2 * (grip.max() - grip.min()), grip[0] + 0.05) idx = np.where(grip > thr)[0] return int(idx[0]) if len(idx) else len(grip) - 1
def episode_points(ep): """(points, meta) for one episode, from the robot's own encoders + Franka CAD.""" import h5py with h5py.File(f"{raw_root(ep)}/{ep}/trajectory.h5", "r") as f: qj = np.array(f["action/robot_state/joint_positions"]) cart = np.array(f["action/robot_state/cartesian_position"]) return QP.build(qj[0], cart[0], cart[t_close(ep)])
# ------------------------------------------------------------------------ the metricdef depth_probe_K(dmap, alpha, cams_gt, s_m, named_pts, Ks, view_names, win=15): """VERBATIM copy of the adopted `depth_probe`, with per-view intrinsics injected.
The only edits versus the original are: fx = FOCAL * RES / min(W, H) -> fx, cxy_x, cxy_y, RES read from Ks[vi] cxy = RES / 2.0 -> (same) CTX[vi] -> view_names[vi] Nothing that defines the measurement changes: the 15x15 window, ALPHA_MIN, the depth_ratio, err_1d_cm and depth_ratio_win_min expressions are the original objects. """ out = {} for name, p in named_pts.items(): per = [] for vi in range(len(cams_gt)): fx, cx, cy, RES = Ks[vi] Rc, tc = cams_gt[vi][:3, :3], cams_gt[vi][:3, 3] pc = Rc.T @ (p - tc) z = float(pc[2]) rec = dict(view=view_names[vi], z_true_m=z) if z > 1e-6: u, v = fx * pc[0] / z + cx, fx * pc[1] / z + cy rec.update(u=float(u), v=float(v)) if 0 <= u < RES and 0 <= v < RES: iu, iv = int(u), int(v) a = float(alpha[vi, iv, iu]) zr = float(dmap[vi, iv, iu]) * s_m h = win // 2 sl = (slice(max(0, iv - h), min(RES, iv + h + 1)), slice(max(0, iu - h), min(RES, iu + h + 1))) aw, dw = alpha[vi][sl], dmap[vi][sl] * s_m ok = aw > ALPHA_MIN rec.update(in_frame=True, alpha=a, z_recon_m=zr, depth_ratio=zr / z if a > ALPHA_MIN else None, err_1d_cm=abs(zr - z) * 100 if a > ALPHA_MIN else None, depth_ratio_win_min=float(dw[ok].min() / z) if ok.any() else None, win_cover=float(ok.mean())) else: rec.update(in_frame=False) else: rec.update(in_frame=False) per.append(rec) r = [x for x in per if x.get("depth_ratio") is not None] rw = [x["depth_ratio_win_min"] for x in per if x.get("depth_ratio_win_min") is not None] out[name] = dict(per_view=per, n_views_in_frame=int(sum(1 for x in per if x.get("in_frame"))), n_views_hit=len(r), depth_ratio_median=float(np.median([x["depth_ratio"] for x in r])) if r else None, depth_ratio_win_min_median=float(np.median(rw)) if rw else None, err_1d_cm_median=float(np.median([x["err_1d_cm"] for x in r])) if r else None) return out
# --------------------------------------------------------------------- row flatteningROW_KEYS = ["name", "family", "link", "view", "z_true", "z_recon", "ratio", "err_cm", "win_min", "alpha", "frontmost", "d_m", "in_frame", "matched"]
def flatten(dp, names, pmeta, front, view_names): """The long-format record used by every downstream table.
Every (point, view) pair is kept, including those that never reach a depth ratio: "outside the frame" and "in the frame but nothing was rendered" are different failures and must not silently shrink n. """ rows = {k: [] for k in ROW_KEYS} nan = float("nan") for ni, n in enumerate(names): m = pmeta[n] for vi, pv in enumerate(dp[n]["per_view"]): rows["name"].append(n) rows["family"].append(m["family"]) rows["link"].append(m.get("link", "")) rows["view"].append(view_names[vi]) rows["z_true"].append(pv["z_true_m"]) rows["in_frame"].append(bool(pv.get("in_frame", False))) rows["matched"].append(pv.get("depth_ratio") is not None) rows["z_recon"].append(pv.get("z_recon_m", nan)) rows["ratio"].append(pv.get("depth_ratio") if pv.get("depth_ratio") is not None else nan) rows["err_cm"].append(pv.get("err_1d_cm") if pv.get("err_1d_cm") is not None else nan) rows["win_min"].append(pv.get("depth_ratio_win_min") if pv.get("depth_ratio_win_min") is not None else nan) rows["alpha"].append(pv.get("alpha", nan)) rows["frontmost"].append(bool(front[vi, ni])) rows["d_m"].append(float(m.get("d_m", m.get("z_m", nan)))) return rows
def frontmost_mask_K(P, c2w, fx, cx, cy, res, tol_m=0.01): """VERBATIM copy of probe_lib.frontmost_mask with a split principal point.
The original takes one `cxy` because the setting it came from assumed the principal point was the image centre. On the measured DROID intrinsics cx and cy land up to 9.3 px apart on the square-crop grid, which is enough to bin a point into the wrong z-buffer cell and drop a visible arm sample. Only the two projection lines differ from the original; the z-buffer, the 0.01 m tolerance and the in-frame test are the original expressions. """ R, t = c2w[:3, :3], c2w[:3, 3] pc = (R.T @ (P - t).T).T z = pc[:, 2] with np.errstate(divide="ignore", invalid="ignore"): u = fx * pc[:, 0] / z + cx v = fx * pc[:, 1] / z + cy ok = (z > 1e-6) & (u >= 0) & (u < res) & (v >= 0) & (v < res) keep = np.zeros(len(P), dtype=bool) if not ok.any(): return keep, ok iu = np.clip(u[ok].astype(int), 0, res - 1) iv = np.clip(v[ok].astype(int), 0, res - 1) key = iv * res + iu zz = z[ok] zbuf = np.full(res * res, np.inf) np.minimum.at(zbuf, key, zz) keep[np.where(ok)[0]] = zz <= zbuf[key] + tol_m return keep, ok
def visibility(P, cams, Ks): """Per-view z-buffer over the sampled robot points, with each view's own intrinsics.
A point that another sampled robot point occludes by more than 1 cm is dropped: those are the far side of a link, where a depth probe legitimately reads the near side. """ return np.stack([frontmost_mask_K(P, cams[i], *Ks[i])[0] for i in range(len(cams))])123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267"""The calibration gate: which episodes are good enough to reconstruct at all.
WHAT THIS STAGE IS, AND WHAT IT IS NOT--------------------------------------The gate scores an EXTRINSIC, not a reconstruction. It asks one question of an episode:when classical stereo -- no learned model, no checkpoint, no training -- measures thedepth of the robot arm in the left image of each rig, does that agree with where therobot's own joint encoders say the arm is? If it does not, the camera pose is wrong, andnothing built on top of that pose can be trusted.
That is why the gate is upstream of everything else. It ran over the candidate pool in`episodes_eligible.txt` first; the episodes that passed under the refined extrinsics are`episodes.txt`, and those are what the reconstruction stages consume. The reconstructionpath does no filtering of its own -- it works from an already-selected list.
THE RULE BELOW IS A PROPERTY OF AN EPISODE, not of this release. Nothing in it refers tothe 225 candidates or the 114 released names, and this module holds no episode table ofits own: it scores whatever list `run_diagnostics.py` hands it. Any DROID episode with aFranka arm and a stereo rig can be screened with it; `episodes_eligible.txt` is only thedefault list, and `gate_expected.json` only says what OUR candidates should score.
Every line that defines a measurement is reached by calling the shared object, so thegate and the `measure` stage cannot drift apart:
* `stereo_lib.make_sgbm / stereo_depth / to_square_grid` -- the zero-prior instrument * `arm_lib.episode_points` -> `query_points.build` -> `probe_lib` FK + CAD surface * `arm_lib.stereo_grid_K`, `arm_lib.visibility`, `arm_lib.depth_probe_K` * `pw_extrinsics.load_orig / load_pw`
THE RULE on family `arm_surface_t0`, classical SGBM must match at least GATE_N = 30 of the query points, AND have a median depth ratio inside [GATE_LO, GATE_HI] = [0.85, 1.15].
Both extrinsic sources are scored, `orig` (DROID's own) and `pw` (PointWorld-refined),and the verdicts are reported separately: an episode can pass under one and fail underthe other, and the difference between the two columns is the interesting part.
WHY THIS IS THE SAME COMPUTATION AS `stereo_floor`--------------------------------------------------`scenes/<episode>/metrics.json` carries a `stereo_floor` block beside every reconstructionnumber. It is this computation, re-presented: `stereo_floor.<source>.n_matched`,`err_cm_median` and `ratio_median` are the gate's `n_matched`, `err_cm` and `ratio`, and`coverage_matched` is `n_matched / 2400`. They are one measurement shown twice, not twomeasurements that happen to agree, and the gate stage is their single producer.
CPU only. No GPU, no checkpoint. Writes `<work>/gate/verdicts.json`."""import jsonimport osimport sysimport timeimport traceback
import numpy as np
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import config # noqa: E402import arm_lib as AL # noqa: E402from arm_lib import (depth_probe_K, episode_points, flatten, # noqa: E402 native_K, stereo_grid_K, visibility)import pw_extrinsics as PWE # noqa: E402from pw_extrinsics import VIEWS, load_orig, load_pw # noqa: E402from stereo_lib import make_sgbm, stereo_depth, to_square_grid # noqa: E402
# --- the rule.GATE_N, GATE_LO, GATE_HI = 30, 0.85, 1.15FAMILY = "arm_surface_t0"
RIGS = ("ext1", "ext2")LEFT = ("ext1L", "ext2L") # stereo can only produce depth for a LEFT viewSOURCES = ("orig", "pw")REPAIR = True # SGBM is recomputed from the raw images, so it is not # stuck with a zero focal
# --------------------------------------------------------------------------- plumbingdef register(ep, pool_txt=None): """Make `ep` resolvable by `arm_lib`. In-memory only; nothing on disk is touched.
The candidate pool is wider than the release, so most of these episodes are absent from the shipped `intrinsics.json`. Their entry is filled here from DROID's full intrinsics table. An episode that is absent there too, or present with an all-zero cameraMatrix, is given a zero placeholder, which `arm_lib.native_K(repair=True)` then replaces with the median over every other DROID episode that used the same physical camera serial -- the same substitution rule the shipped table was built with. """ import glob AL._META.pop(ep, None) raw = config.droid_root() metas = glob.glob(f"{raw}/{ep}/metadata_*.json") if not metas: raise config.MissingInput( f"\nno metadata_*.json under {raw}/{ep}\n" f" --droid-root must contain one directory per DROID episode, each holding\n" f" that episode's metadata_*.json, trajectory.h5 and <serial>-stereo.mp4\n" f" recordings. Any such episode can be gated; the names in\n" f" {pool_txt or 'episodes_eligible.txt'}\n" f" are only the default pool.\n") with open(metas[0]) as f: m = json.load(f) u = m["uuid"] src = _droid_intr().get(u, {}) entry = AL._KINTR.setdefault(u, {}) for s in (str(m["ext1_cam_serial"]), str(m["ext2_cam_serial"])): if s not in entry: entry[s] = src.get(s) or {"cameraMatrix": [0.0, 0.0, 0.0, 0.0]} return m
_DI = None
def _droid_intr(): """DROID's intrinsics table for EVERY episode, not only the released ones.""" global _DI if _DI is None: with open(config.droid_intrinsics_all()) as f: _DI = json.load(f) return _DI
def rig_facts(ep, source): """fx and stereo baseline per rig, for one extrinsic source.""" ext = (load_orig(ep) if source == "orig" else load_pw(ep))[1] K = native_K(ep, repair=REPAIR) out = {} for rig, (li, ri) in (("ext1", (0, 1)), ("ext2", (2, 3))): fx = K[VIEWS[li]][0] rel = np.linalg.inv(ext[li]) @ ext[ri] out[rig] = dict(fx=fx, baseline_m=float(np.linalg.norm(rel[:3, 3]))) return ext, out
# ------------------------------------------------------------------------- the gatedef gate_episode(ep, sgbm=None, sources=SOURCES): """Run the gate on one registered episode. Returns {source: verdict}.""" sgbm = sgbm or make_sgbm() pts, pmeta = episode_points(ep) names = list(pts) P = np.stack([pts[n] for n in names]) Kmap = stereo_grid_K(ep, repair=REPAIR) Ks = [Kmap[v] for v in LEFT] batch = PWE.batch_root(ep)
out = {} for source in sources: ext, facts = rig_facts(ep, source) dmaps, alphas, cams = [], [], [] for rig in RIGS: r = facts[rig] Z, v, _ = stereo_depth(batch, ep, rig, r["fx"], r["baseline_m"], sgbm) Zs, vs = to_square_grid(Z, v) dmaps.append(Zs) alphas.append(vs) cams.append(ext[VIEWS.index(rig + "L")]) cams = np.stack(cams) front = visibility(P, cams, Ks) # `alpha` is the stereo validity mask (1.0/0.0); ALPHA_MIN = 0.5 turns it into # "the matcher produced a depth on this pixel". s_m = 1.0: to_square_grid # already carries metres. dp = depth_probe_K(np.stack(dmaps), np.stack(alphas), cams, 1.0, pts, Ks, LEFT) rows = flatten(dp, names, pmeta, front, LEFT)
fam = np.array(rows["family"]) == FAMILY ratio = np.array(rows["ratio"], dtype=float)[fam] err = np.array(rows["err_cm"], dtype=float)[fam] inf = np.array(rows["in_frame"], dtype=bool)[fam] ok = np.isfinite(ratio) n_matched = int(ok.sum()) med = float(np.median(ratio[ok])) if n_matched else float("nan") out[source] = dict( n_matched=n_matched, ratio=med, err_cm=(float(np.median(err[np.isfinite(err)])) if n_matched else float("nan")), frac_in_frame=float(inf.mean()), passed=bool(n_matched >= GATE_N and GATE_LO <= med <= GATE_HI), n_rows=int(fam.sum()), coverage_matched=float(n_matched / max(1, int(fam.sum()))), fx={k: v["fx"] for k, v in facts.items()}, baseline_m={k: v["baseline_m"] for k, v in facts.items()}, ) return out
LEAVES = ("n_matched", "ratio", "err_cm", "frac_in_frame", "passed")
def _jsonable(x): """NaN is not portable JSON; the shipped scene records write these as null.""" if isinstance(x, float) and not np.isfinite(x): return None return x
def run_many(eps, out_path, sources=SOURCES, log=print, pool_txt=None): """Gate a list of episode names; resumable through `out_path`.""" res = json.load(open(out_path)) if os.path.exists(out_path) else {} sgbm = make_sgbm() todo = [e for e in eps if e not in res] log(f"gate: {len(todo)} to run, {len(eps) - len(todo)} already scored") for i, ep in enumerate(todo, 1): t0 = time.time() try: register(ep, pool_txt) v = gate_episode(ep, sgbm, sources) v = {s: {k: _jsonable(x) for k, x in d.items()} for s, d in v.items()} v["_uuid"] = AL.meta(ep)["uuid"] res[ep] = v log(f" [{i}/{len(todo)}] {ep} " + " ".join(f"{s}: n={v[s]['n_matched']:4d} " f"r={v[s]['ratio'] if v[s]['ratio'] is not None else float('nan'):.3f} " f"{'PASS' if v[s]['passed'] else 'fail'}" for s in sources) + f" ({time.time() - t0:.1f}s)") # `config.MissingInput` subclasses SystemExit, so it is not an `Exception` and # would otherwise abort the whole sweep. A per-episode input gap -- no # metadata_*.json, no extracted frame -- is exactly what the resumable # per-episode error record is for, so it is caught here and the remaining # candidates still get scored. The check stage still refuses to call such an # episode reproduced. Inputs that are missing for the WHOLE run are caught in # `main` before the loop starts, and those still stop the run. except (Exception, config.MissingInput) as ex: res[ep] = {"error": f"{type(ex).__name__}: {ex}"} # A MissingInput already carries the guidance the user needs and its stack # says nothing beyond "a file was not there"; anything else is unexpected, # and there the traceback is the only thing that explains it. tb = ("" if isinstance(ex, config.MissingInput) else "\n" + traceback.format_exc()) log(f" !! {ep}: {type(ex).__name__}: {ex}{tb}") with open(out_path, "w") as f: json.dump(res, f, indent=1) return res
# ---------------------------------------------------------------------- the stagedef main(eps, out_path, pool_txt=None): """The `gate` stage: score the given episodes, under both extrinsic sources.
`run_diagnostics.py` owns the episode list and the output directory and passes them in; `pool_txt` is only the file the DEFAULT names come from, named in the error a missing episode directory raises. Nothing here requires `eps` to be a subset of it. """ # Fail on a missing input before the loop starts, not two hours into it. config.droid_intrinsics_all() config.droid_root()
print(f"gate: {len(eps)} episodes -> {out_path}", flush=True) res = run_many(eps, out_path, pool_txt=pool_txt)
scored = {e: v for e, v in res.items() if "error" not in v} print(f"\nscored {len(scored)} of {len(eps)} episodes") for s in SOURCES: print(f" {s}: {sum(v[s]['passed'] for v in scored.values())} pass") failed = [e for e, v in res.items() if "error" in v] if failed: print(f" {len(failed)} episodes could not be scored:") for e in failed[:20]: print(f" {e}: {res[e]['error']}") return res
if __name__ == "__main__": import run_diagnostics as RD # noqa: E402 _args = RD.parse_args(["gate"] + sys.argv[1:]) main(RD.gate_episodes(_args), os.path.join(RD.gate_dir(), "verdicts.json"), RD.EPISODES_ELIGIBLE_TXT)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285"""Single place where every path this pipeline touches is resolved.
Resolution order for each input:
1. an explicit command-line argument 2. an environment variable 3. a default relative to the bundle root
Inputs that cannot be redistributed with the bundle (the DROID episodes, thePointWorld camera files, the ZipSplat checkpoint) have no default. Asking for onethat was not supplied raises `MissingInput`, which names the input, the flag, theenvironment variable and where the data comes from.
Nothing here points outside the bundle root unless the user supplied the path."""import argparseimport jsonimport os
# --------------------------------------------------------------- bundle layoutHERE = os.path.dirname(os.path.abspath(__file__))BUNDLE_ROOT = os.path.dirname(HERE)
EPISODES_TXT = os.path.join(HERE, "episodes.txt")INTRINSICS_JSON = os.path.join(HERE, "intrinsics.json")SCENES_DIR = os.path.join(BUNDLE_ROOT, "scenes")MANIFEST_JSON = os.path.join(BUNDLE_ROOT, "manifest.json")
# The released scenes/<ep>/gaussians.ply and scenes/<ep>/depth.npz are the four-view# reconstruction under this condition (manifest.json: "condition").RELEASE_CONDITION = "pw_inj"
# Environment variables, for callers who prefer not to repeat flags.ENV_WORK_DIR = "PIPELINE_WORK_DIR"ENV_DROID_ROOT = "DROID_ROOT"ENV_POINTWORLD_DIR = "POINTWORLD_CAMERAS"ENV_CHECKPOINT = "ZIPSPLAT_CHECKPOINT"# Only the geometric-measurement modules need this one, and only to repair the# episodes whose DROID intrinsics are all zero. It has no flag: nothing in the# reconstruction path reads it.ENV_DROID_INTRINSICS_ALL = "DROID_INTRINSICS_ALL"
class MissingInput(SystemExit): """A required external input was not supplied.
Subclasses SystemExit so that a script run directly prints the guidance and exits without a traceback. """
def _missing(what, flag, env, where): raise MissingInput( f"\n3DROID pipeline: missing required input -- {what}\n" f" pass {flag} <path>\n" f" or export {env}=<path>\n" f" {where}\n" )
# ------------------------------------------------------------------- the state_STATE = { "work_dir": None, "droid_root": None, "pointworld_dir": None, "checkpoint": None, "episodes": None,}
def add_arguments(ap): """Attach the shared path flags to an ArgumentParser.""" ap.add_argument("--work-dir", default=None, help=f"where this run writes (default <bundle>/work, env {ENV_WORK_DIR})") ap.add_argument("--droid-root", default=None, help=f"directory holding one <episode>/ per DROID episode (env {ENV_DROID_ROOT})") ap.add_argument("--pointworld-dir", default=None, help=f"directory of <uuid>_cameras.json files (env {ENV_POINTWORLD_DIR})") ap.add_argument("--checkpoint", default=None, help=f"ZipSplat checkpoint .tar (env {ENV_CHECKPOINT})") ap.add_argument("--episodes", nargs="+", default=None, help="run only these episode names (default: every name in episodes.txt)") return ap
def configure(args=None, **overrides): """Record the resolved inputs. Call once, before importing the stage modules.""" src = dict(overrides) if args is not None: for k in ("work_dir", "droid_root", "pointworld_dir", "checkpoint", "episodes"): v = getattr(args, k, None) if v is not None: src.setdefault(k, v) for k, v in src.items(): if k not in _STATE: raise KeyError(f"unknown configuration key {k!r}") _STATE[k] = v if _STATE["episodes"] is not None: known = set(all_episodes()) unknown = [e for e in _STATE["episodes"] if e not in known] if unknown: raise SystemExit( f"\nnot episodes of this release: {', '.join(unknown)}\n" f" the {len(known)} valid names are in {EPISODES_TXT}\n") return _STATE
def _get(key, env): v = _STATE[key] if v is None: v = os.environ.get(env) or None return v
# ------------------------------------------------------------- external inputsdef droid_root(): """Directory containing one `<episode>/` per DROID episode.
Each must hold the episode's `metadata_*.json`, `trajectory.h5` and the `<serial>-stereo.mp4` recordings. Not redistributed. """ p = _get("droid_root", ENV_DROID_ROOT) if not p: _missing("the DROID episode directory", "--droid-root", ENV_DROID_ROOT, "one <episode>/ per episode, each with metadata_*.json, trajectory.h5\n" " and the <serial>-stereo.mp4 recordings; obtain from\n" " https://droid-dataset.github.io/ and use the episode names in\n" f" {EPISODES_TXT}") if not os.path.isdir(p): raise MissingInput(f"\n--droid-root does not exist: {p}\n") return p
def droid_episode_dir(ep): return os.path.join(droid_root(), ep)
def pointworld_dir(): """Flat directory of `<uuid>_cameras.json` files from the PointWorld-DROID release.
Not redistributed; the refined left-eye extrinsics for the released scenes are already in `scenes/<episode>/cameras.json`. """ p = _get("pointworld_dir", ENV_POINTWORLD_DIR) if not p: _missing("the PointWorld camera directory", "--pointworld-dir", ENV_POINTWORLD_DIR, "a flat directory of <uuid>_cameras.json files from the NVIDIA\n" " PointWorld-DROID release; see LICENSES/PointWorld-DROID-LICENSE.pdf.\n" " The refined extrinsics for the released scenes are also in\n" " scenes/<episode>/cameras.json under extrinsics_c2w.pointworld") if not os.path.isdir(p): raise MissingInput(f"\n--pointworld-dir does not exist: {p}\n") return p
def droid_intrinsics_all(): """DROID's intrinsics table for EVERY episode, not only the released ones.
Needed only by the geometric-measurement modules, to take a per-serial median over the episodes that share a physical camera. Roughly 126 MB, not redistributed; `pipeline/intrinsics.json` covers the released episodes only. """ p = os.environ.get(ENV_DROID_INTRINSICS_ALL) or None if not p: _missing("DROID's full intrinsics table", "(no flag)", ENV_DROID_INTRINSICS_ALL, "the per-episode camera annotations of the DROID release, keyed by\n" " uuid then camera serial; pipeline/intrinsics.json holds the same\n" " records for the released episodes only") if not os.path.isfile(p): raise MissingInput(f"\n{ENV_DROID_INTRINSICS_ALL} is not a file: {p}\n") return p
def checkpoint(): """The ZipSplat checkpoint. 5.8 GB, not redistributed.""" p = _get("checkpoint", ENV_CHECKPOINT) if not p: _missing("the ZipSplat checkpoint", "--checkpoint", ENV_CHECKPOINT, "hf download veichta/zipsplat zipsplat-da3g-252p.tar \\\n" " --revision a0c9c8c1f886d1600e64837c2fcc6be6cc3b3694 --local-dir weights\n" " 5,791,182,337 bytes; the sha256 is in README.md under\n" " 'Reconstruction backbones'") if not os.path.isfile(p): raise MissingInput(f"\n--checkpoint is not a file: {p}\n") return p
# ------------------------------------------------------- caller-chosen outputsdef work_dir(): p = _get("work_dir", ENV_WORK_DIR) or os.path.join(BUNDLE_ROOT, "work") return os.path.abspath(p)
def _sub(*parts): p = os.path.join(work_dir(), *parts) os.makedirs(p, exist_ok=True) return p
def frames_root(): """Parent of `<episode>/images/<view>_0000.png`, written by the extract stage.""" return _sub("frames")
def three_view_dir(): """Held-out reconstruction: three views in, the fourth rendered and scored.""" return _sub("three_view")
def four_view_dir(): """Four-view reconstruction: the object the release ships.""" return _sub("four_view")
# -------------------------------------------------------------- episode tables_ALL = None_UUID = {}
def all_episodes(): global _ALL if _ALL is None: with open(EPISODES_TXT) as f: _ALL = f.read().split() return list(_ALL)
def episodes(): """The episodes this run covers: the `--episodes` subset, else all of them.""" sub = _STATE["episodes"] if not sub: return all_episodes() order = {e: i for i, e in enumerate(all_episodes())} return sorted(set(sub), key=order.__getitem__)
def intrinsics(): """DROID intrinsics for the released episodes, keyed by uuid then camera serial.""" with open(INTRINSICS_JSON) as f: return json.load(f)
def scene_dir(ep): return os.path.join(SCENES_DIR, ep)
def uuid_for(ep): """DROID's own episode identifier, read from the shipped scene record.
A run that has the DROID episodes on disk gets the same value out of the episode metadata; this exists so that the inputs can be checked before anything is loaded. """ if ep not in _UUID: p = os.path.join(scene_dir(ep), "cameras.json") if not os.path.isfile(p): raise MissingInput(f"\nno scene record for {ep}: expected {p}\n") with open(p) as f: _UUID[ep] = json.load(f)["uuid"] return _UUID[ep]
def describe(): """One block naming every resolved path, for the run log.""" def soft(fn): try: return fn() except SystemExit: return "(not supplied)" return "\n".join([ f" bundle root {BUNDLE_ROOT}", f" work directory {work_dir()}", f" DROID episodes {soft(droid_root)}", f" PointWorld {soft(pointworld_dir)}", f" checkpoint {soft(checkpoint)}", f" episodes {len(episodes())} of {len(all_episodes())}", ])
def parse_known(argv=None): """Convenience for a stage module run on its own.""" ap = argparse.ArgumentParser() add_arguments(ap) args, rest = ap.parse_known_args(argv) configure(args) return args, rest123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114AUTOLab__Fri_Jul__7_09-43-39_2023AUTOLab__Mon_Aug_21_13-27-50_2023AUTOLab__Sat_Oct_14_18-59-38_2023AUTOLab__Sat_Oct__7_17-34-45_2023AUTOLab__Sun_Oct_15_17-50-57_2023AUTOLab__Tue_Sep__5_08-50-21_2023CLVR__Sun_Jun__4_15-03-02_2023CLVR__Sun_May_21_19-26-15_2023CLVR__Tue_Jun__6_00-07-47_2023GuptaLab__Sun_Apr_30_12-39-17_2023GuptaLab__Sun_Jun_18_16-40-11_2023GuptaLab__Sun_May_28_15-33-36_2023GuptaLab__Thu_Apr_20_12-41-59_2023ILIAD__Fri_Jul_28_10-21-54_2023ILIAD__Mon_Jun_12_18-34-18_2023ILIAD__Sun_May_28_22-06-23_2023ILIAD__Thu_Jul_20_10-23-44_2023ILIAD__Tue_May_23_19-07-50_2023ILIAD__Wed_Jul_19_11-35-04_2023IPRL__Fri_Aug_25_14-06-36_2023IPRL__Fri_Jun_30_17-15-06_2023IPRL__Fri_May_12_15-28-06_2023IPRL__Fri_May__5_15-56-56_2023IPRL__Fri_Oct_13_13-36-27_2023IPRL__Fri_Sep_22_17-39-39_2023IPRL__Mon_Apr_24_16-33-21_2023IPRL__Mon_Aug_21_12-14-36_2023IPRL__Sat_Jul__1_09-34-03_2023IPRL__Sat_May_13_09-38-55_2023IPRL__Sat_Oct_14_01-37-50_2023IPRL__Sat_Oct_21_14-27-43_2023IPRL__Sat_Oct__7_15-53-18_2023IPRL__Sat_Sep_23_02-45-53_2023IPRL__Sun_Apr_23_10-55-20_2023IPRL__Sun_Apr_30_18-17-27_2023IPRL__Sun_Oct_15_01-31-32_2023IPRL__Sun_Oct_22_00-54-27_2023IPRL__Thu_Aug_24_12-31-44_2023IPRL__Tue_Aug_22_12-36-24_2023IPRL__Tue_Oct_17_21-14-05_2023IPRL__Tue_Oct_24_15-07-14_2023IPRL__Wed_Apr_19_17-36-20_2023IPRL__Wed_Aug_23_11-53-26_2023IPRL__Wed_Oct_11_01-24-27_2023IPRL__Wed_Oct_18_23-32-56_2023IRIS__Fri_Apr__7_13-26-32_2023IRIS__Fri_Jun__2_10-46-36_2023IRIS__Fri_May_19_10-25-10_2023IRIS__Mon_Apr_17_15-39-00_2023IRIS__Mon_Jul_17_10-47-47_2023IRIS__Mon_Jun__5_14-39-50_2023IRIS__Mon_May_15_15-23-36_2023IRIS__Mon_May_22_15-02-46_2023IRIS__Sun_Jul_16_15-34-22_2023IRIS__Thu_Apr_13_15-03-37_2023IRIS__Thu_Apr_20_13-18-51_2023IRIS__Thu_Apr_27_14-14-13_2023IRIS__Thu_Jun__8_14-14-24_2023IRIS__Thu_Mar__2_14_57_40_2023IRIS__Thu_May_18_13-45-46_2023IRIS__Thu_May_25_13-35-00_2023IRIS__Tue_Jul_11_11-46-06_2023IRIS__Tue_Jul__4_16-38-58_2023IRIS__Tue_Jun_13_10-56-59_2023IRIS__Tue_May_23_10-58-26_2023IRIS__Tue_May__2_12-11-42_2023IRIS__Wed_Apr_26_09-27-12_2023IRIS__Wed_Jul__5_01-07-36_2023IRIS__Wed_Jun__7_09-41-51_2023IRIS__Wed_Mar__8_13_18_53_2023IRIS__Wed_May_17_09-31-48_2023IRIS__Wed_May_24_09-27-45_2023IRIS__Wed_May_31_09-35-08_2023PennPAL__Fri_Jul_14_16-37-07_2023PennPAL__Fri_Jun_30_15-39-41_2023PennPAL__Fri_Oct__6_19-27-50_2023PennPAL__Mon_Jul_10_20-33-09_2023PennPAL__Mon_Oct__9_20-55-26_2023PennPAL__Sat_Jul_15_22-43-30_2023PennPAL__Sun_Oct__1_16-55-32_2023PennPAL__Thu_Apr_27_22-24-23_2023PennPAL__Tue_Oct_24_16-27-30_2023PennPAL__Wed_Aug_16_17-13-27_2023PennPAL__Wed_Jul_19_15-53-56_2023RAD__Fri_Sep__1_10-43-47_2023REAL__Fri_Jun__9_12-21-55_2023REAL__Fri_May_19_11-45-49_2023REAL__Sat_Jul_15_11-41-25_2023REAL__Sun_Aug_27_10-25-30_2023REAL__Sun_May_28_15-16-08_2023REAL__Thu_Jul_13_13-24-11_2023REAL__Thu_Jul_20_13-10-12_2023REAL__Thu_Jun__1_18-12-52_2023REAL__Wed_May_31_09-42-48_2023RPL__Mon_Jun__5_16-00-47_2023RPL__Mon_May_29_15-38-14_2023RPL__Sun_Jun__4_12-20-40_2023RPL__Thu_May_25_10-40-29_2023RPL__Tue_May_30_15-49-08_2023TRI__Mon_Oct_16_10-45-06_2023TRI__Mon_Oct_23_10-18-39_2023TRI__Mon_Oct_23_13-21-11_2023TRI__Thu_Aug_10_08-59-39_2023TRI__Thu_Oct_12_09-22-46_2023TRI__Thu_Oct_12_13-37-48_2023TRI__Thu_Oct_19_09-57-44_2023TRI__Thu_Sep_21_09-26-47_2023TRI__Tue_Oct_24_10-03-27_2023TRI__Tue_Oct_24_10-04-20_2023TRI__Wed_Aug__9_08-48-15_2023TRI__Wed_Oct_18_10-27-33_2023TRI__Wed_Oct_18_15-39-19_2023TRI__Wed_Oct_25_09-39-54_2023Tue_Aug__8_08-55-57_2023123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225AUTOLab__Fri_Aug_18_11-40-54_2023AUTOLab__Fri_Jul__7_09-43-39_2023AUTOLab__Fri_Oct_13_18-54-47_2023AUTOLab__Mon_Aug_21_13-27-50_2023AUTOLab__Mon_Sep__4_18-36-25_2023AUTOLab__Sat_Aug_12_12-08-02_2023AUTOLab__Sat_Jul__8_08-57-28_2023AUTOLab__Sat_Oct_14_18-59-38_2023AUTOLab__Sat_Oct__7_17-34-45_2023AUTOLab__Sat_Sep__2_09-37-09_2023AUTOLab__Sun_Jul_23_20-53-26_2023AUTOLab__Sun_Oct_15_17-50-57_2023AUTOLab__Thu_Aug_17_17-02-12_2023AUTOLab__Thu_Jul_27_08-44-00_2023AUTOLab__Tue_Sep__5_08-50-21_2023AUTOLab__Wed_Jul_26_16-38-56_2023CLVR__Fri_Jun__2_23-06-17_2023CLVR__Fri_Jun__9_11-23-32_2023CLVR__Mon_Jun_19_00-02-50_2023CLVR__Mon_Jun__5_22-56-51_2023CLVR__Mon_May_22_11-36-50_2023CLVR__Sat_Jun__3_00-09-27_2023CLVR__Sat_May_20_15-18-09_2023CLVR__Sun_Jun_25_04-35-11_2023CLVR__Sun_Jun__4_15-03-02_2023CLVR__Sun_May_21_19-26-15_2023CLVR__Thu_May_18_15-06-00_2023CLVR__Tue_Jun_13_01-12-42_2023CLVR__Tue_Jun_20_00-29-14_2023CLVR__Tue_Jun_27_00-42-00_2023CLVR__Tue_Jun__6_00-07-47_2023CLVR__Tue_May_30_00-13-47_2023CLVR__Wed_May_31_13-15-57_2023GuptaLab__Sun_Apr_30_12-39-17_2023GuptaLab__Sun_Jun_18_16-40-11_2023GuptaLab__Sun_May_28_15-33-36_2023GuptaLab__Thu_Apr_20_12-41-59_2023ILIAD__Fri_Jul_28_10-21-54_2023ILIAD__Fri_May_12_16-16-04_2023ILIAD__Fri_May_19_12-16-05_2023ILIAD__Fri_May_26_18-43-09_2023ILIAD__Mon_Jun_12_18-34-18_2023ILIAD__Sat_Aug_19_10-41-39_2023ILIAD__Sat_Sep__2_00-09-20_2023ILIAD__Sun_Aug_20_10-49-26_2023ILIAD__Sun_Jun_11_14-56-46_2023ILIAD__Sun_Jun__4_18-46-27_2023ILIAD__Sun_May_28_22-06-23_2023ILIAD__Thu_Aug_17_19-13-45_2023ILIAD__Thu_Jul_20_10-23-44_2023ILIAD__Thu_Jun_15_11-36-19_2023ILIAD__Thu_May_11_16-54-10_2023ILIAD__Thu_May_18_11-33-22_2023ILIAD__Tue_Aug_15_22-24-03_2023ILIAD__Tue_Jul_18_22-10-21_2023ILIAD__Tue_May_23_19-07-50_2023ILIAD__Wed_Jul_12_20-31-15_2023ILIAD__Wed_Jul_19_11-35-04_2023ILIAD__Wed_May_24_18-40-40_2023ILIAD__Wed_May_31_17-29-31_2023IPRL__Fri_Aug_25_14-06-36_2023IPRL__Fri_Jun_30_17-15-06_2023IPRL__Fri_May_12_15-28-06_2023IPRL__Fri_May__5_15-56-56_2023IPRL__Fri_Oct_13_13-36-27_2023IPRL__Fri_Oct_20_00-03-32_2023IPRL__Fri_Sep_22_17-39-39_2023IPRL__Mon_Apr_24_16-33-21_2023IPRL__Mon_Aug_21_12-14-36_2023IPRL__Mon_Jun_19_22-56-28_2023IPRL__Mon_Jun_26_22-53-49_2023IPRL__Mon_Oct_16_20-05-37_2023IPRL__Sat_Jul__1_09-34-03_2023IPRL__Sat_May_13_09-38-55_2023IPRL__Sat_Oct_14_01-37-50_2023IPRL__Sat_Oct_21_14-27-43_2023IPRL__Sat_Oct__7_15-53-18_2023IPRL__Sat_Sep_23_02-45-53_2023IPRL__Sun_Apr_23_10-55-20_2023IPRL__Sun_Apr_30_18-17-27_2023IPRL__Sun_Oct_15_01-31-32_2023IPRL__Sun_Oct_22_00-54-27_2023IPRL__Thu_Apr_20_23-59-24_2023IPRL__Thu_Aug_24_12-31-44_2023IPRL__Tue_Aug_22_12-36-24_2023IPRL__Tue_Oct_17_21-14-05_2023IPRL__Tue_Oct_24_15-07-14_2023IPRL__Wed_Apr_19_17-36-20_2023IPRL__Wed_Aug_23_11-53-26_2023IPRL__Wed_Oct_11_01-24-27_2023IPRL__Wed_Oct_18_23-32-56_2023IRIS__Fri_Apr__7_13-26-32_2023IRIS__Fri_Jun__2_10-46-36_2023IRIS__Fri_Mar__3_15_27_34_2023IRIS__Fri_May_12_10-42-13_2023IRIS__Fri_May_19_10-25-10_2023IRIS__Fri_May__5_10-14-39_2023IRIS__Mon_Apr_17_15-39-00_2023IRIS__Mon_Jul_10_15-57-13_2023IRIS__Mon_Jul_17_10-47-47_2023IRIS__Mon_Jun__5_14-39-50_2023IRIS__Mon_Mar__6_15_38_26_2023IRIS__Mon_May_15_15-23-36_2023IRIS__Mon_May_22_15-02-46_2023IRIS__Mon_May__8_14-29-52_2023IRIS__Sat_Jun_17_19-52-43_2023IRIS__Sun_Jul_16_15-34-22_2023IRIS__Thu_Apr_13_15-03-37_2023IRIS__Thu_Apr_20_13-18-51_2023IRIS__Thu_Apr_27_14-14-13_2023IRIS__Thu_Jun__8_14-14-24_2023IRIS__Thu_Mar__2_14_57_40_2023IRIS__Thu_May_18_13-45-46_2023IRIS__Thu_May_25_13-35-00_2023IRIS__Tue_Apr_18_10-45-36_2023IRIS__Tue_Jul_11_11-46-06_2023IRIS__Tue_Jul__4_16-38-58_2023IRIS__Tue_Jun_13_10-56-59_2023IRIS__Tue_May_23_10-58-26_2023IRIS__Tue_May_30_10-56-48_2023IRIS__Tue_May__2_12-11-42_2023IRIS__Wed_Apr_19_10-07-49_2023IRIS__Wed_Apr_26_09-27-12_2023IRIS__Wed_Jul__5_01-07-36_2023IRIS__Wed_Jun__7_09-41-51_2023IRIS__Wed_Mar__8_13_18_53_2023IRIS__Wed_May_17_09-31-48_2023IRIS__Wed_May_24_09-27-45_2023IRIS__Wed_May_31_09-35-08_2023IRIS__Wed_May__3_09-20-47_2023PennPAL__Fri_Jul_14_16-37-07_2023PennPAL__Fri_Jul__7_19-15-41_2023PennPAL__Fri_Jun_30_15-39-41_2023PennPAL__Fri_Oct__6_19-27-50_2023PennPAL__Mon_Jul_10_20-33-09_2023PennPAL__Mon_Oct__9_20-55-26_2023PennPAL__Sat_Jul_15_22-43-30_2023PennPAL__Sun_Jun_18_20-09-33_2023PennPAL__Sun_Oct__1_16-55-32_2023PennPAL__Thu_Apr_27_22-24-23_2023PennPAL__Thu_Jun_15_17-04-05_2023PennPAL__Thu_Oct_19_00-01-02_2023PennPAL__Tue_Jun_20_17-21-06_2023PennPAL__Tue_Oct_24_16-27-30_2023PennPAL__Wed_Aug_16_17-13-27_2023PennPAL__Wed_Aug_23_20-39-45_2023PennPAL__Wed_Jul_19_15-53-56_2023RAD__Fri_Sep__1_10-43-47_2023RAD__Thu_Aug_31_13-55-38_2023RAIL__Fri_Apr__7_19-34-49_2023RAIL__Fri_Jun__2_12-26-06_2023RAIL__Mon_Apr_17_14-40-36_2023RAIL__Mon_Jun_12_14-12-33_2023RAIL__Mon_May_15_11-06-03_2023RAIL__Sat_May_20_14-06-27_2023RAIL__Sun_May_28_14-42-43_2023RAIL__Thu_Jun_15_13-23-04_2023RAIL__Thu_Jun__8_10-38-32_2023RAIL__Tue_Jun_20_16-02-59_2023RAIL__Tue_Jun__6_13-52-37_2023RAIL__Tue_May_30_14-43-13_2023RAIL__Wed_Apr_19_13-24-24_2023RAIL__Wed_Apr_26_15-44-20_2023RAIL__Wed_Jun_21_12-48-06_2023RAIL__Wed_May_31_10-42-42_2023REAL__Fri_Apr_14_15_48_04_2023REAL__Fri_Jun_16_17-22-09_2023REAL__Fri_Jun_23_15-16-14_2023REAL__Fri_Jun__9_12-21-55_2023REAL__Fri_May_12_14-19-52_2023REAL__Fri_May_19_11-45-49_2023REAL__Mon_Jun_19_16-25-38_2023REAL__Sat_Jul_15_11-41-25_2023REAL__Sat_Jun_10_13-23-45_2023REAL__Sat_Jun_17_11-27-00_2023REAL__Sat_May_27_10-38-29_2023REAL__Sun_Aug_27_10-25-30_2023REAL__Sun_Jun_11_14-25-53_2023REAL__Sun_May_21_09-06-25_2023REAL__Sun_May_28_15-16-08_2023REAL__Thu_Apr__6_14_26_59_2023REAL__Thu_Aug_24_13-11-27_2023REAL__Thu_Jul_13_13-24-11_2023REAL__Thu_Jul_20_13-10-12_2023REAL__Thu_Jun_15_14-45-20_2023REAL__Thu_Jun__1_18-12-52_2023REAL__Thu_Jun__8_12-02-01_2023REAL__Tue_Apr_18_15_07_29_2023REAL__Tue_Aug_15_12-42-37_2023REAL__Tue_Aug_29_13-04-08_2023REAL__Tue_Jul_11_12-03-26_2023REAL__Tue_Jul_25_12-30-52_2023REAL__Tue_Jul__4_11-44-41_2023REAL__Tue_Jun_27_11-36-13_2023REAL__Tue_Jun__6_17-26-51_2023REAL__Tue_May_30_16-06-32_2023REAL__Wed_Jun_21_15-42-14_2023REAL__Wed_Jun__7_11-29-09_2023REAL__Wed_May_17_10-24-35_2023REAL__Wed_May_31_09-42-48_2023RPL__Mon_Jun__5_16-00-47_2023RPL__Mon_May_29_15-38-14_2023RPL__Sun_Jun__4_12-20-40_2023RPL__Thu_May_25_10-40-29_2023RPL__Tue_May_30_15-49-08_2023TRI__Mon_Oct_16_10-45-06_2023TRI__Mon_Oct_16_10-55-29_2023TRI__Mon_Oct_23_10-18-39_2023TRI__Mon_Oct_23_13-21-11_2023TRI__Mon_Sep_25_08-36-07_2023TRI__Thu_Aug_10_08-59-39_2023TRI__Thu_Oct_12_09-22-46_2023TRI__Thu_Oct_12_13-37-48_2023TRI__Thu_Oct_19_09-53-56_2023TRI__Thu_Oct_19_09-57-44_2023TRI__Thu_Sep_21_09-26-47_2023TRI__Tue_Oct_17_09-44-32_2023TRI__Tue_Oct_24_10-03-27_2023TRI__Tue_Oct_24_10-04-20_2023TRI__Wed_Aug__9_08-48-15_2023TRI__Wed_Oct_18_10-27-33_2023TRI__Wed_Oct_18_15-39-19_2023TRI__Wed_Oct_25_09-39-54_2023TRI__Wed_Sep__6_13-03-27_2023Tue_Aug__8_08-55-57_202312345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667"""Extract the t=0 frame (mono + stereo split) of each requested DROID episode.
Reads `<droid-root>/<episode>/<serial>-stereo.mp4`, writes`<work-dir>/frames/<episode>/images/<view>_0000.png`.
The frame selection and the stereo split are unchanged: first decoded frame, lefthalf for the L views, right half for the R views."""import glob, json, os, sys
import cv2
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import config
def extract(raw_root, out_root, episodes): ok, skipped = 0, [] for name in episodes: ep = os.path.join(raw_root, name) if not os.path.isdir(ep): skipped.append((name, "no episode directory under --droid-root")) continue metas = glob.glob(f"{ep}/metadata_*.json") if not metas: skipped.append((name, "no metadata")) continue m = json.load(open(metas[0])) roles = [("ext1L", m["ext1_cam_serial"], "L"), ("ext1R", m["ext1_cam_serial"], "R"), ("ext2L", m["ext2_cam_serial"], "L"), ("ext2R", m["ext2_cam_serial"], "R"), ("wristL", m["wrist_cam_serial"], "L")] d = os.path.join(out_root, name, "images") os.makedirs(d, exist_ok=True) bad = None for cam, serial, side in roles: src = f"{ep}/{serial}-stereo.mp4" if not os.path.exists(src): bad = f"missing {os.path.basename(src)}" break cap = cv2.VideoCapture(src) r, fr = cap.read() cap.release() if not r: bad = f"unreadable {os.path.basename(src)}" break half = fr.shape[1] // 2 cv2.imwrite(os.path.join(d, f"{cam}_0000.png"), fr[:, :half] if side == "L" else fr[:, half:]) if bad: skipped.append((name, bad)) continue ok += 1
print(f"extracted: {ok} skipped: {len(skipped)}") for n, why in skipped: print(f" SKIP {n}: {why}") return ok, skipped
def main(): return extract(config.droid_root(), config.frames_root(), config.episodes())
if __name__ == "__main__": config.parse_known() main() print("BATCH_EXTRACT_DONE")123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609{ "what": "the calibration-gate verdict for every episode in episodes_eligible.txt", "rule": "n_matched >= 30 AND median depth ratio in [0.85, 1.15], on family arm_surface_t0", "what_it_scores": "the EXTRINSIC, via SGBM stereo depth at arm pixels vs forward kinematics. It does not score the reconstruction.", "note": "ratio and err_cm are null exactly when n_matched is 0, i.e. when the matcher produced no depth on any query point; such an episode always fails.", "n_episodes": 225, "verdicts": { "AUTOLab__Fri_Aug_18_11-40-54_2023": { "orig": { "n_matched": 19, "ratio": 0.922096312046051, "err_cm": 9.867776870727539, "frac_in_frame": 0.020416666666666666, "passed": false }, "pw": { "n_matched": 21, "ratio": 2.404282331466675, "err_cm": 42.61827850341797, "frac_in_frame": 0.02, "passed": false } }, "AUTOLab__Fri_Jul__7_09-43-39_2023": { "orig": { "n_matched": 36, "ratio": 0.9684131443500519, "err_cm": 3.8613898754119873, "frac_in_frame": 0.03916666666666667, "passed": true }, "pw": { "n_matched": 39, "ratio": 1.0068553686141968, "err_cm": 3.9602272510528564, "frac_in_frame": 0.02875, "passed": true } }, "AUTOLab__Fri_Oct_13_18-54-47_2023": { "orig": { "n_matched": 37, "ratio": 0.994909461368034, "err_cm": 1.9188146507468806, "frac_in_frame": 0.02375, "passed": true }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0016666666666666668, "passed": false } }, "AUTOLab__Mon_Aug_21_13-27-50_2023": { "orig": { "n_matched": 45, "ratio": 1.0400521755218506, "err_cm": 2.961693048477173, "frac_in_frame": 0.03625, "passed": true }, "pw": { "n_matched": 222, "ratio": 0.9586918950080872, "err_cm": 4.224351644515991, "frac_in_frame": 0.14291666666666666, "passed": true } }, "AUTOLab__Mon_Sep__4_18-36-25_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "AUTOLab__Sat_Aug_12_12-08-02_2023": { "orig": { "n_matched": 3, "ratio": 0.9121710658073425, "err_cm": 9.453269958496094, "frac_in_frame": 0.00375, "passed": false }, "pw": { "n_matched": 16, "ratio": 6.531583786010742, "err_cm": 207.87854766845703, "frac_in_frame": 0.009166666666666667, "passed": false } }, "AUTOLab__Sat_Jul__8_08-57-28_2023": { "orig": { "n_matched": 12, "ratio": 5.544841289520264, "err_cm": 170.70973205566406, "frac_in_frame": 0.0275, "passed": false }, "pw": { "n_matched": 15, "ratio": 1.0798441171646118, "err_cm": 4.386078834533691, "frac_in_frame": 0.0275, "passed": false } }, "AUTOLab__Sat_Oct_14_18-59-38_2023": { "orig": { "n_matched": 251, "ratio": 2.7283341721321666, "err_cm": 105.97039998818663, "frac_in_frame": 0.18875, "passed": false }, "pw": { "n_matched": 39, "ratio": 0.9669768213180594, "err_cm": 5.465785731199357, "frac_in_frame": 0.029166666666666667, "passed": true } }, "AUTOLab__Sat_Oct__7_17-34-45_2023": { "orig": { "n_matched": 24, "ratio": 2.27729853799762, "err_cm": 43.736237966128606, "frac_in_frame": 0.030833333333333334, "passed": false }, "pw": { "n_matched": 252, "ratio": 0.9876753589119112, "err_cm": 2.7052486954101616, "frac_in_frame": 0.15583333333333332, "passed": true } }, "AUTOLab__Sat_Sep__2_09-37-09_2023": { "orig": { "n_matched": 8, "ratio": 41.30033536885844, "err_cm": 158.55779239809033, "frac_in_frame": 0.0075, "passed": false }, "pw": { "n_matched": 22, "ratio": 12.283181936254735, "err_cm": 192.84962151306297, "frac_in_frame": 0.025, "passed": false } }, "AUTOLab__Sun_Jul_23_20-53-26_2023": { "orig": { "n_matched": 8, "ratio": 0.88138347864151, "err_cm": 15.419584274291992, "frac_in_frame": 0.010416666666666666, "passed": false }, "pw": { "n_matched": 1, "ratio": 1.147653341293335, "err_cm": 6.347710132598877, "frac_in_frame": 0.0075, "passed": false } }, "AUTOLab__Sun_Oct_15_17-50-57_2023": { "orig": { "n_matched": 45, "ratio": 0.9326103925704956, "err_cm": 4.914707660675049, "frac_in_frame": 0.059583333333333335, "passed": true }, "pw": { "n_matched": 57, "ratio": 0.9591660499572754, "err_cm": 6.586827278137207, "frac_in_frame": 0.06041666666666667, "passed": true } }, "AUTOLab__Thu_Aug_17_17-02-12_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "AUTOLab__Thu_Jul_27_08-44-00_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0004166666666666667, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0004166666666666667, "passed": false } }, "AUTOLab__Tue_Sep__5_08-50-21_2023": { "orig": { "n_matched": 7, "ratio": 1.4532384402987517, "err_cm": 15.024076440203626, "frac_in_frame": 0.00875, "passed": false }, "pw": { "n_matched": 39, "ratio": 0.9883497988617461, "err_cm": 6.765146680694461, "frac_in_frame": 0.03666666666666667, "passed": true } }, "AUTOLab__Wed_Jul_26_16-38-56_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 3, "ratio": 3.4005539417266846, "err_cm": 113.82717895507812, "frac_in_frame": 0.0025, "passed": false } }, "CLVR__Fri_Jun__2_23-06-17_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Fri_Jun__9_11-23-32_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Mon_Jun_19_00-02-50_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Mon_Jun__5_22-56-51_2023": { "orig": { "n_matched": 12, "ratio": 5.450813055038452, "err_cm": 237.40396881103516, "frac_in_frame": 0.011666666666666667, "passed": false }, "pw": { "n_matched": 8, "ratio": 5.42154598236084, "err_cm": 230.35484313964844, "frac_in_frame": 0.007083333333333333, "passed": false } }, "CLVR__Mon_May_22_11-36-50_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Sat_Jun__3_00-09-27_2023": { "orig": { "n_matched": 17, "ratio": 5.799393653869629, "err_cm": 214.98854064941406, "frac_in_frame": 0.0175, "passed": false }, "pw": { "n_matched": 11, "ratio": 0.9280393719673157, "err_cm": 6.936359882354736, "frac_in_frame": 0.0125, "passed": false } }, "CLVR__Sat_May_20_15-18-09_2023": { "orig": { "n_matched": 62, "ratio": 3.7660365104675293, "err_cm": 182.08792877197266, "frac_in_frame": 0.06833333333333333, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Sun_Jun_25_04-35-11_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Sun_Jun__4_15-03-02_2023": { "orig": { "n_matched": 157, "ratio": 4.400763180891429, "err_cm": 162.1856066875086, "frac_in_frame": 0.12083333333333333, "passed": false }, "pw": { "n_matched": 366, "ratio": 0.9500589791739689, "err_cm": 4.156287304889828, "frac_in_frame": 0.22125, "passed": true } }, "CLVR__Sun_May_21_19-26-15_2023": { "orig": { "n_matched": 212, "ratio": 4.982730150222778, "err_cm": 159.90933227539062, "frac_in_frame": 0.14708333333333334, "passed": false }, "pw": { "n_matched": 48, "ratio": 0.8817237019538879, "err_cm": 6.417343854904175, "frac_in_frame": 0.03625, "passed": true } }, "CLVR__Thu_May_18_15-06-00_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Tue_Jun_13_01-12-42_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Tue_Jun_20_00-29-14_2023": { "orig": { "n_matched": 3, "ratio": 11.536455154418945, "err_cm": 240.20460510253906, "frac_in_frame": 0.010833333333333334, "passed": false }, "pw": { "n_matched": 1, "ratio": 15.642194747924805, "err_cm": 329.3949890136719, "frac_in_frame": 0.002916666666666667, "passed": false } }, "CLVR__Tue_Jun_27_00-42-00_2023": { "orig": { "n_matched": 7, "ratio": 7.33694227047247, "err_cm": 220.40268637825125, "frac_in_frame": 0.009583333333333333, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Tue_Jun__6_00-07-47_2023": { "orig": { "n_matched": 98, "ratio": 0.9592509672853726, "err_cm": 4.743727276428961, "frac_in_frame": 0.06333333333333334, "passed": true }, "pw": { "n_matched": 110, "ratio": 0.9279246254519296, "err_cm": 5.924526811289155, "frac_in_frame": 0.06791666666666667, "passed": true } }, "CLVR__Tue_May_30_00-13-47_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "CLVR__Wed_May_31_13-15-57_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "GuptaLab__Sun_Apr_30_12-39-17_2023": { "orig": { "n_matched": 490, "ratio": 0.9264321625232697, "err_cm": 12.544615745544434, "frac_in_frame": 0.315, "passed": true }, "pw": { "n_matched": 775, "ratio": 0.9351953268051147, "err_cm": 4.89321231842041, "frac_in_frame": 0.4083333333333333, "passed": true } }, "GuptaLab__Sun_Jun_18_16-40-11_2023": { "orig": { "n_matched": 324, "ratio": 0.9145945608615875, "err_cm": 5.5808868408203125, "frac_in_frame": 0.21541666666666667, "passed": true }, "pw": { "n_matched": 449, "ratio": 0.9343186020851135, "err_cm": 4.137489318847656, "frac_in_frame": 0.3, "passed": true } }, "GuptaLab__Sun_May_28_15-33-36_2023": { "orig": { "n_matched": 620, "ratio": 0.906720757484436, "err_cm": 7.266860485076904, "frac_in_frame": 0.4245833333333333, "passed": true }, "pw": { "n_matched": 650, "ratio": 0.9137838780879974, "err_cm": 6.864810466766357, "frac_in_frame": 0.42625, "passed": true } }, "GuptaLab__Thu_Apr_20_12-41-59_2023": { "orig": { "n_matched": 574, "ratio": 0.9292980432510376, "err_cm": 6.020535945892334, "frac_in_frame": 0.33791666666666664, "passed": true }, "pw": { "n_matched": 603, "ratio": 0.9194906949996948, "err_cm": 6.561058521270752, "frac_in_frame": 0.34041666666666665, "passed": true } }, "ILIAD__Fri_Jul_28_10-21-54_2023": { "orig": { "n_matched": 147, "ratio": 0.9539384429030906, "err_cm": 3.4726929899093872, "frac_in_frame": 0.10625, "passed": true }, "pw": { "n_matched": 158, "ratio": 0.9487475515304056, "err_cm": 3.291385537151992, "frac_in_frame": 0.105, "passed": true } }, "ILIAD__Fri_May_12_16-16-04_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 24, "ratio": 1.0654134154319763, "err_cm": 2.8947410583496094, "frac_in_frame": 0.015416666666666667, "passed": false } }, "ILIAD__Fri_May_19_12-16-05_2023": { "orig": { "n_matched": 19, "ratio": 1.1572552919387817, "err_cm": 6.472425937652588, "frac_in_frame": 0.042083333333333334, "passed": false }, "pw": { "n_matched": 24, "ratio": 1.4881970882415771, "err_cm": 17.262704849243164, "frac_in_frame": 0.0425, "passed": false } }, "ILIAD__Fri_May_26_18-43-09_2023": { "orig": { "n_matched": 36, "ratio": 6.161423683166504, "err_cm": 211.3956298828125, "frac_in_frame": 0.0275, "passed": false }, "pw": { "n_matched": 28, "ratio": 0.9589552581310272, "err_cm": 5.280769109725952, "frac_in_frame": 0.015416666666666667, "passed": false } }, "ILIAD__Mon_Jun_12_18-34-18_2023": { "orig": { "n_matched": 116, "ratio": 10.568103790283203, "err_cm": 297.9169464111328, "frac_in_frame": 0.0675, "passed": false }, "pw": { "n_matched": 116, "ratio": 0.9579741954803467, "err_cm": 3.170294404029846, "frac_in_frame": 0.07125, "passed": true } }, "ILIAD__Sat_Aug_19_10-41-39_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "ILIAD__Sat_Sep__2_00-09-20_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "ILIAD__Sun_Aug_20_10-49-26_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0004166666666666667, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0004166666666666667, "passed": false } }, "ILIAD__Sun_Jun_11_14-56-46_2023": { "orig": { "n_matched": 10, "ratio": 2.2805556385717454, "err_cm": 64.96181000659297, "frac_in_frame": 0.034583333333333334, "passed": false }, "pw": { "n_matched": 119, "ratio": 1.597042482228572, "err_cm": 31.26444887399056, "frac_in_frame": 0.0975, "passed": false } }, "ILIAD__Sun_Jun__4_18-46-27_2023": { "orig": { "n_matched": 2, "ratio": 26.653841268782116, "err_cm": 728.5923217302534, "frac_in_frame": 0.01375, "passed": false }, "pw": { "n_matched": 20, "ratio": 6.7233525035497745, "err_cm": 85.16004868294135, "frac_in_frame": 0.058333333333333334, "passed": false } }, "ILIAD__Sun_May_28_22-06-23_2023": { "orig": { "n_matched": 75, "ratio": 0.8778794407844543, "err_cm": 5.010593891143799, "frac_in_frame": 0.07291666666666667, "passed": true }, "pw": { "n_matched": 79, "ratio": 0.9036316275596619, "err_cm": 4.540361404418945, "frac_in_frame": 0.06875, "passed": true } }, "ILIAD__Thu_Aug_17_19-13-45_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "ILIAD__Thu_Jul_20_10-23-44_2023": { "orig": { "n_matched": 92, "ratio": 0.8251529056187055, "err_cm": 19.17941609943884, "frac_in_frame": 0.05541666666666667, "passed": false }, "pw": { "n_matched": 464, "ratio": 0.9869735398833754, "err_cm": 2.905038007650307, "frac_in_frame": 0.20208333333333334, "passed": true } }, "ILIAD__Thu_Jun_15_11-36-19_2023": { "orig": { "n_matched": 389, "ratio": 2.1796261339661926, "err_cm": 63.6151362133315, "frac_in_frame": 0.25166666666666665, "passed": false }, "pw": { "n_matched": 3, "ratio": 2.008519991287363, "err_cm": 39.40750328867196, "frac_in_frame": 0.00125, "passed": false } }, "ILIAD__Thu_May_11_16-54-10_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "ILIAD__Thu_May_18_11-33-22_2023": { "orig": { "n_matched": 2, "ratio": 1.0643252730369568, "err_cm": 3.2202314138412476, "frac_in_frame": 0.010833333333333334, "passed": false }, "pw": { "n_matched": 1, "ratio": 1.036047339439392, "err_cm": 1.8642120361328125, "frac_in_frame": 0.01125, "passed": false } }, "ILIAD__Tue_Aug_15_22-24-03_2023": { "orig": { "n_matched": 3, "ratio": 6.233880457436094, "err_cm": 146.0958089797071, "frac_in_frame": 0.002916666666666667, "passed": false }, "pw": { "n_matched": 6, "ratio": 6.8527832930786055, "err_cm": 152.9262706532307, "frac_in_frame": 0.004166666666666667, "passed": false } }, "ILIAD__Tue_Jul_18_22-10-21_2023": { "orig": { "n_matched": 30, "ratio": 1.0626697406428054, "err_cm": 4.4464470085105905, "frac_in_frame": 0.017083333333333332, "passed": true }, "pw": { "n_matched": 14, "ratio": 0.9897824942492768, "err_cm": 1.5926818646331968, "frac_in_frame": 0.010833333333333334, "passed": false } }, "ILIAD__Tue_May_23_19-07-50_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 50, "ratio": 0.9866723418235779, "err_cm": 6.590749979019165, "frac_in_frame": 0.03375, "passed": true } }, "ILIAD__Wed_Jul_12_20-31-15_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "ILIAD__Wed_Jul_19_11-35-04_2023": { "orig": { "n_matched": 477, "ratio": 0.9617502689361572, "err_cm": 3.7733049392700195, "frac_in_frame": 0.2966666666666667, "passed": true }, "pw": { "n_matched": 492, "ratio": 0.9640955626964569, "err_cm": 3.501163363456726, "frac_in_frame": 0.29041666666666666, "passed": true } }, "ILIAD__Wed_May_24_18-40-40_2023": { "orig": { "n_matched": 43, "ratio": 1.3407584428787231, "err_cm": 18.289979934692383, "frac_in_frame": 0.042916666666666665, "passed": false }, "pw": { "n_matched": 23, "ratio": 1.063596487045288, "err_cm": 4.568952560424805, "frac_in_frame": 0.023333333333333334, "passed": false } }, "ILIAD__Wed_May_31_17-29-31_2023": { "orig": { "n_matched": 13, "ratio": 15.552550048704369, "err_cm": 586.5875189352118, "frac_in_frame": 0.005833333333333334, "passed": false }, "pw": { "n_matched": 6, "ratio": 11.383665595023611, "err_cm": 512.5034571581471, "frac_in_frame": 0.0033333333333333335, "passed": false } }, "IPRL__Fri_Aug_25_14-06-36_2023": { "orig": { "n_matched": 111, "ratio": 2.2606654853006525, "err_cm": 67.99739479663796, "frac_in_frame": 0.24666666666666667, "passed": false }, "pw": { "n_matched": 189, "ratio": 1.0186130851349429, "err_cm": 3.086896635122671, "frac_in_frame": 0.15541666666666668, "passed": true } }, "IPRL__Fri_Jun_30_17-15-06_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 310, "ratio": 0.9372498954797275, "err_cm": 3.909056272329947, "frac_in_frame": 0.22333333333333333, "passed": true } }, "IPRL__Fri_May_12_15-28-06_2023": { "orig": { "n_matched": 122, "ratio": 2.8814077288035778, "err_cm": 84.6342670240257, "frac_in_frame": 0.14333333333333334, "passed": false }, "pw": { "n_matched": 215, "ratio": 0.9569104895213555, "err_cm": 4.088832602897796, "frac_in_frame": 0.14291666666666666, "passed": true } }, "IPRL__Fri_May__5_15-56-56_2023": { "orig": { "n_matched": 364, "ratio": 2.6704013347625732, "err_cm": 100.76435852050781, "frac_in_frame": 0.2775, "passed": false }, "pw": { "n_matched": 366, "ratio": 1.0352063179016113, "err_cm": 4.196862697601318, "frac_in_frame": 0.23, "passed": true } }, "IPRL__Fri_Oct_13_13-36-27_2023": { "orig": { "n_matched": 548, "ratio": 0.9212942157789835, "err_cm": 4.108295421805428, "frac_in_frame": 0.41125, "passed": true }, "pw": { "n_matched": 544, "ratio": 0.9151086417027858, "err_cm": 4.268717241834275, "frac_in_frame": 0.41458333333333336, "passed": true } }, "IPRL__Fri_Oct_20_00-03-32_2023": { "orig": { "n_matched": 368, "ratio": 0.8512494266241323, "err_cm": 7.722396544166463, "frac_in_frame": 0.27666666666666667, "passed": true }, "pw": { "n_matched": 357, "ratio": 0.8326118498213624, "err_cm": 8.712587866310562, "frac_in_frame": 0.27791666666666665, "passed": false } }, "IPRL__Fri_Sep_22_17-39-39_2023": { "orig": { "n_matched": 589, "ratio": 0.9452332854270935, "err_cm": 4.075444221496582, "frac_in_frame": 0.38125, "passed": true }, "pw": { "n_matched": 563, "ratio": 0.9482836127281189, "err_cm": 3.6739370822906494, "frac_in_frame": 0.3729166666666667, "passed": true } }, "IPRL__Mon_Apr_24_16-33-21_2023": { "orig": { "n_matched": 251, "ratio": 0.9597105536375152, "err_cm": 4.258773774467239, "frac_in_frame": 0.17958333333333334, "passed": true }, "pw": { "n_matched": 224, "ratio": 0.9701660322300527, "err_cm": 3.280922030058939, "frac_in_frame": 0.17416666666666666, "passed": true } }, "IPRL__Mon_Aug_21_12-14-36_2023": { "orig": { "n_matched": 182, "ratio": 0.9741359651088715, "err_cm": 3.7319579124450684, "frac_in_frame": 0.1475, "passed": true }, "pw": { "n_matched": 191, "ratio": 0.9751942157745361, "err_cm": 3.4765286445617676, "frac_in_frame": 0.14666666666666667, "passed": true } }, "IPRL__Mon_Jun_19_22-56-28_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "IPRL__Mon_Jun_26_22-53-49_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 3, "ratio": 2.9926774439180988, "err_cm": 31.139992954413465, "frac_in_frame": 0.0016666666666666668, "passed": false } }, "IPRL__Mon_Oct_16_20-05-37_2023": { "orig": { "n_matched": 483, "ratio": 0.835398599993117, "err_cm": 8.64086291864612, "frac_in_frame": 0.40958333333333335, "passed": false }, "pw": { "n_matched": 500, "ratio": 0.8435352056214915, "err_cm": 8.348827505582202, "frac_in_frame": 0.39, "passed": false } }, "IPRL__Sat_Jul__1_09-34-03_2023": { "orig": { "n_matched": 32, "ratio": 1.0959902549668437, "err_cm": 4.360972287645456, "frac_in_frame": 0.04666666666666667, "passed": true }, "pw": { "n_matched": 43, "ratio": 1.0473505302685382, "err_cm": 3.3946141833118118, "frac_in_frame": 0.045, "passed": true } }, "IPRL__Sat_May_13_09-38-55_2023": { "orig": { "n_matched": 135, "ratio": 0.9211056232452393, "err_cm": 5.345340728759766, "frac_in_frame": 0.10458333333333333, "passed": true }, "pw": { "n_matched": 133, "ratio": 0.9165182113647461, "err_cm": 5.839267730712891, "frac_in_frame": 0.10375, "passed": true } }, "IPRL__Sat_Oct_14_01-37-50_2023": { "orig": { "n_matched": 531, "ratio": 0.9893402183810557, "err_cm": 4.50778002054375, "frac_in_frame": 0.39375, "passed": true }, "pw": { "n_matched": 570, "ratio": 0.9873135379932981, "err_cm": 4.3306934822298135, "frac_in_frame": 0.40041666666666664, "passed": true } }, "IPRL__Sat_Oct_21_14-27-43_2023": { "orig": { "n_matched": 251, "ratio": 0.9359700701806746, "err_cm": 3.5801963471825515, "frac_in_frame": 0.205, "passed": true }, "pw": { "n_matched": 268, "ratio": 0.9329815063232559, "err_cm": 3.417945601113723, "frac_in_frame": 0.22083333333333333, "passed": true } }, "IPRL__Sat_Oct__7_15-53-18_2023": { "orig": { "n_matched": 360, "ratio": 0.9811030323162896, "err_cm": 3.8874532963423194, "frac_in_frame": 0.22333333333333333, "passed": true }, "pw": { "n_matched": 352, "ratio": 0.9841391039496501, "err_cm": 3.8041515189149138, "frac_in_frame": 0.22375, "passed": true } }, "IPRL__Sat_Sep_23_02-45-53_2023": { "orig": { "n_matched": 701, "ratio": 1.0052712845046559, "err_cm": 7.157585227070196, "frac_in_frame": 0.42583333333333334, "passed": true }, "pw": { "n_matched": 506, "ratio": 0.9458471806021195, "err_cm": 3.5172386832656386, "frac_in_frame": 0.3358333333333333, "passed": true } }, "IPRL__Sun_Apr_23_10-55-20_2023": { "orig": { "n_matched": 211, "ratio": 0.9701359868049622, "err_cm": 2.7740023136138916, "frac_in_frame": 0.18375, "passed": true }, "pw": { "n_matched": 213, "ratio": 0.9818059802055359, "err_cm": 1.9752801656723022, "frac_in_frame": 0.17375, "passed": true } }, "IPRL__Sun_Apr_30_18-17-27_2023": { "orig": { "n_matched": 64, "ratio": 8.068897243565718, "err_cm": 363.20694064152735, "frac_in_frame": 0.13333333333333333, "passed": false }, "pw": { "n_matched": 439, "ratio": 0.9522980698453657, "err_cm": 3.5164317076669227, "frac_in_frame": 0.3358333333333333, "passed": true } }, "IPRL__Sun_Oct_15_01-31-32_2023": { "orig": { "n_matched": 440, "ratio": 0.8977218381088051, "err_cm": 5.13104165177857, "frac_in_frame": 0.3775, "passed": true }, "pw": { "n_matched": 441, "ratio": 0.8872058270677176, "err_cm": 5.115133993734955, "frac_in_frame": 0.3754166666666667, "passed": true } }, "IPRL__Sun_Oct_22_00-54-27_2023": { "orig": { "n_matched": 342, "ratio": 0.8910700082855563, "err_cm": 6.35762402607239, "frac_in_frame": 0.20208333333333334, "passed": true }, "pw": { "n_matched": 331, "ratio": 0.9029121258413634, "err_cm": 5.637489840301679, "frac_in_frame": 0.20333333333333334, "passed": true } }, "IPRL__Thu_Apr_20_23-59-24_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "IPRL__Thu_Aug_24_12-31-44_2023": { "orig": { "n_matched": 208, "ratio": 1.031418501049818, "err_cm": 7.741579299090626, "frac_in_frame": 0.17291666666666666, "passed": true }, "pw": { "n_matched": 207, "ratio": 0.8816264787435483, "err_cm": 6.344236426793626, "frac_in_frame": 0.14291666666666666, "passed": true } }, "IPRL__Tue_Aug_22_12-36-24_2023": { "orig": { "n_matched": 139, "ratio": 0.9967975420530895, "err_cm": 11.113713463021973, "frac_in_frame": 0.11625, "passed": true }, "pw": { "n_matched": 80, "ratio": 0.9154553391218463, "err_cm": 4.97198602106452, "frac_in_frame": 0.06916666666666667, "passed": true } }, "IPRL__Tue_Oct_17_21-14-05_2023": { "orig": { "n_matched": 687, "ratio": 0.9171097278594971, "err_cm": 4.447277069091797, "frac_in_frame": 0.5066666666666667, "passed": true }, "pw": { "n_matched": 727, "ratio": 0.9250989556312561, "err_cm": 4.353789329528809, "frac_in_frame": 0.5083333333333333, "passed": true } }, "IPRL__Tue_Oct_24_15-07-14_2023": { "orig": { "n_matched": 311, "ratio": 2.16787604043386, "err_cm": 50.678674093734855, "frac_in_frame": 0.31958333333333333, "passed": false }, "pw": { "n_matched": 117, "ratio": 0.9547447005351222, "err_cm": 3.5345521981037686, "frac_in_frame": 0.14583333333333334, "passed": true } }, "IPRL__Wed_Apr_19_17-36-20_2023": { "orig": { "n_matched": 511, "ratio": 1.013231635093689, "err_cm": 3.539588689804077, "frac_in_frame": 0.2995833333333333, "passed": true }, "pw": { "n_matched": 494, "ratio": 1.0212939977645874, "err_cm": 3.614227056503296, "frac_in_frame": 0.2945833333333333, "passed": true } }, "IPRL__Wed_Aug_23_11-53-26_2023": { "orig": { "n_matched": 339, "ratio": 2.0701565742492676, "err_cm": 53.340511322021484, "frac_in_frame": 0.24625, "passed": false }, "pw": { "n_matched": 397, "ratio": 0.9389840960502625, "err_cm": 3.728346586227417, "frac_in_frame": 0.26875, "passed": true } }, "IPRL__Wed_Oct_11_01-24-27_2023": { "orig": { "n_matched": 469, "ratio": 0.9764712452888489, "err_cm": 10.09564208984375, "frac_in_frame": 0.39125, "passed": true }, "pw": { "n_matched": 700, "ratio": 0.8650898635387421, "err_cm": 8.17686939239502, "frac_in_frame": 0.48791666666666667, "passed": true } }, "IPRL__Wed_Oct_18_23-32-56_2023": { "orig": { "n_matched": 432, "ratio": 0.8715620330271744, "err_cm": 6.719179762654381, "frac_in_frame": 0.30625, "passed": true }, "pw": { "n_matched": 428, "ratio": 0.8534790267911125, "err_cm": 7.289618605713005, "frac_in_frame": 0.30625, "passed": true } }, "IRIS__Fri_Apr__7_13-26-32_2023": { "orig": { "n_matched": 58, "ratio": 0.9807121840066926, "err_cm": 2.5255975113828653, "frac_in_frame": 0.03875, "passed": true }, "pw": { "n_matched": 57, "ratio": 0.9944903076134772, "err_cm": 2.4843126674462312, "frac_in_frame": 0.035, "passed": true } }, "IRIS__Fri_Jun__2_10-46-36_2023": { "orig": { "n_matched": 394, "ratio": 0.9895736873149872, "err_cm": 12.940831661224365, "frac_in_frame": 0.30625, "passed": true }, "pw": { "n_matched": 575, "ratio": 0.9068496823310852, "err_cm": 7.025608539581299, "frac_in_frame": 0.3258333333333333, "passed": true } }, "IRIS__Fri_Mar__3_15_27_34_2023": { "orig": { "n_matched": 132, "ratio": 11.220484733581543, "err_cm": 449.31996154785156, "frac_in_frame": 0.07958333333333334, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "IRIS__Fri_May_12_10-42-13_2023": { "orig": { "n_matched": 5, "ratio": 1.4876159200079075, "err_cm": 25.19195284087241, "frac_in_frame": 0.0020833333333333333, "passed": false }, "pw": { "n_matched": 27, "ratio": 0.9415907395563089, "err_cm": 4.8316631697026935, "frac_in_frame": 0.022083333333333333, "passed": false } }, "IRIS__Fri_May_19_10-25-10_2023": { "orig": { "n_matched": 696, "ratio": 0.9332393905435483, "err_cm": 5.085831577463268, "frac_in_frame": 0.40875, "passed": true }, "pw": { "n_matched": 727, "ratio": 0.9320293538286474, "err_cm": 5.419095996409928, "frac_in_frame": 0.40875, "passed": true } }, "IRIS__Fri_May__5_10-14-39_2023": { "orig": { "n_matched": 13, "ratio": 6.233447636960978, "err_cm": 134.60977981283992, "frac_in_frame": 0.00875, "passed": false }, "pw": { "n_matched": 14, "ratio": 6.270053975705763, "err_cm": 130.83391061627304, "frac_in_frame": 0.007916666666666667, "passed": false } }, "IRIS__Mon_Apr_17_15-39-00_2023": { "orig": { "n_matched": 416, "ratio": 0.9796187877655029, "err_cm": 4.99601149559021, "frac_in_frame": 0.27625, "passed": true }, "pw": { "n_matched": 351, "ratio": 0.9791686534881592, "err_cm": 3.6612844467163086, "frac_in_frame": 0.22, "passed": true } }, "IRIS__Mon_Jul_10_15-57-13_2023": { "orig": { "n_matched": 240, "ratio": 1.7861402034759521, "err_cm": 42.705345153808594, "frac_in_frame": 0.14125, "passed": false }, "pw": { "n_matched": 17, "ratio": 0.9975098371505737, "err_cm": 7.575838088989258, "frac_in_frame": 0.020833333333333332, "passed": false } }, "IRIS__Mon_Jul_17_10-47-47_2023": { "orig": { "n_matched": 46, "ratio": 1.0772333153328262, "err_cm": 7.915771828987508, "frac_in_frame": 0.0525, "passed": true }, "pw": { "n_matched": 82, "ratio": 0.8850143978618938, "err_cm": 5.850572381747354, "frac_in_frame": 0.0725, "passed": true } }, "IRIS__Mon_Jun__5_14-39-50_2023": { "orig": { "n_matched": 635, "ratio": 1.0524872045273013, "err_cm": 23.048103421622777, "frac_in_frame": 0.42875, "passed": true }, "pw": { "n_matched": 786, "ratio": 0.9166275016283032, "err_cm": 6.288436573545603, "frac_in_frame": 0.435, "passed": true } }, "IRIS__Mon_Mar__6_15_38_26_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 21, "ratio": 0.8203014860192619, "err_cm": 6.67059711589734, "frac_in_frame": 0.0125, "passed": false } }, "IRIS__Mon_May_15_15-23-36_2023": { "orig": { "n_matched": 466, "ratio": 1.5717384219169617, "err_cm": 33.79471778869629, "frac_in_frame": 0.3175, "passed": false }, "pw": { "n_matched": 642, "ratio": 1.0420785546302795, "err_cm": 13.883512496948242, "frac_in_frame": 0.3645833333333333, "passed": true } }, "IRIS__Mon_May_22_15-02-46_2023": { "orig": { "n_matched": 504, "ratio": 3.088142344688225, "err_cm": 142.12587165140474, "frac_in_frame": 0.41458333333333336, "passed": false }, "pw": { "n_matched": 289, "ratio": 0.961241273035645, "err_cm": 4.187625366022424, "frac_in_frame": 0.18625, "passed": true } }, "IRIS__Mon_May__8_14-29-52_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "IRIS__Sat_Jun_17_19-52-43_2023": { "orig": { "n_matched": 3, "ratio": 0.6906432200573451, "err_cm": 11.372659778333578, "frac_in_frame": 0.005833333333333334, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "IRIS__Sun_Jul_16_15-34-22_2023": { "orig": { "n_matched": 215, "ratio": 0.9983424786367547, "err_cm": 3.2431154988898148, "frac_in_frame": 0.16291666666666665, "passed": true }, "pw": { "n_matched": 230, "ratio": 0.9866758488222616, "err_cm": 3.4292430792742827, "frac_in_frame": 0.1675, "passed": true } }, "IRIS__Thu_Apr_13_15-03-37_2023": { "orig": { "n_matched": 470, "ratio": 0.9892781270624391, "err_cm": 8.00878946063704, "frac_in_frame": 0.38, "passed": true }, "pw": { "n_matched": 612, "ratio": 0.9503842312660742, "err_cm": 4.081584991206744, "frac_in_frame": 0.40791666666666665, "passed": true } }, "IRIS__Thu_Apr_20_13-18-51_2023": { "orig": { "n_matched": 172, "ratio": 10.125443935394287, "err_cm": 194.16357421875, "frac_in_frame": 0.09, "passed": false }, "pw": { "n_matched": 106, "ratio": 1.0745823979377747, "err_cm": 4.950585842132568, "frac_in_frame": 0.085, "passed": true } }, "IRIS__Thu_Apr_27_14-14-13_2023": { "orig": { "n_matched": 329, "ratio": 1.0131144523620605, "err_cm": 3.887948751449585, "frac_in_frame": 0.19125, "passed": true }, "pw": { "n_matched": 323, "ratio": 1.0184246301651, "err_cm": 4.032291412353516, "frac_in_frame": 0.18791666666666668, "passed": true } }, "IRIS__Thu_Jun__8_14-14-24_2023": { "orig": { "n_matched": 25, "ratio": 1.3622000279887443, "err_cm": 19.87592012114928, "frac_in_frame": 0.0225, "passed": false }, "pw": { "n_matched": 307, "ratio": 0.8953803371809528, "err_cm": 8.192779605889378, "frac_in_frame": 0.20833333333333334, "passed": true } }, "IRIS__Thu_Mar__2_14_57_40_2023": { "orig": { "n_matched": 173, "ratio": 2.0105137825012207, "err_cm": 32.94659423828125, "frac_in_frame": 0.13375, "passed": false }, "pw": { "n_matched": 468, "ratio": 0.9612707197666168, "err_cm": 3.63922381401062, "frac_in_frame": 0.2920833333333333, "passed": true } }, "IRIS__Thu_May_18_13-45-46_2023": { "orig": { "n_matched": 292, "ratio": 1.9590600063153911, "err_cm": 55.45484793367393, "frac_in_frame": 0.20125, "passed": false }, "pw": { "n_matched": 302, "ratio": 0.9194414458356956, "err_cm": 6.021832849041797, "frac_in_frame": 0.1625, "passed": true } }, "IRIS__Thu_May_25_13-35-00_2023": { "orig": { "n_matched": 361, "ratio": 1.3642524160624014, "err_cm": 27.01690641635833, "frac_in_frame": 0.24208333333333334, "passed": false }, "pw": { "n_matched": 701, "ratio": 0.9699872740957597, "err_cm": 4.09243354218879, "frac_in_frame": 0.4, "passed": true } }, "IRIS__Tue_Apr_18_10-45-36_2023": { "orig": { "n_matched": 313, "ratio": 2.5498210602740485, "err_cm": 93.64885348129242, "frac_in_frame": 0.21041666666666667, "passed": false }, "pw": { "n_matched": 5, "ratio": 1.026485247668995, "err_cm": 1.9120398812186634, "frac_in_frame": 0.0020833333333333333, "passed": false } }, "IRIS__Tue_Jul_11_11-46-06_2023": { "orig": { "n_matched": 406, "ratio": 0.9554254875779513, "err_cm": 9.554714192785152, "frac_in_frame": 0.2325, "passed": true }, "pw": { "n_matched": 337, "ratio": 0.9313608024141345, "err_cm": 5.390248613856741, "frac_in_frame": 0.19166666666666668, "passed": true } }, "IRIS__Tue_Jul__4_16-38-58_2023": { "orig": { "n_matched": 400, "ratio": 0.9572185245359576, "err_cm": 3.869738404898454, "frac_in_frame": 0.2475, "passed": true }, "pw": { "n_matched": 390, "ratio": 0.9640169296272185, "err_cm": 3.174097130730785, "frac_in_frame": 0.24625, "passed": true } }, "IRIS__Tue_Jun_13_10-56-59_2023": { "orig": { "n_matched": 275, "ratio": 0.9558816812132191, "err_cm": 10.92707258014759, "frac_in_frame": 0.23291666666666666, "passed": true }, "pw": { "n_matched": 326, "ratio": 0.9333333283641885, "err_cm": 4.584212244280236, "frac_in_frame": 0.23166666666666666, "passed": true } }, "IRIS__Tue_May_23_10-58-26_2023": { "orig": { "n_matched": 9, "ratio": 10.932649381830695, "err_cm": 332.5823855882455, "frac_in_frame": 0.009583333333333333, "passed": false }, "pw": { "n_matched": 229, "ratio": 0.9096025144084938, "err_cm": 4.738345834587587, "frac_in_frame": 0.1475, "passed": true } }, "IRIS__Tue_May_30_10-56-48_2023": { "orig": { "n_matched": 39, "ratio": 5.488195973004466, "err_cm": 330.13049451349923, "frac_in_frame": 0.041666666666666664, "passed": false }, "pw": { "n_matched": 15, "ratio": 1.0402472367561002, "err_cm": 1.9578809442222733, "frac_in_frame": 0.011666666666666667, "passed": false } }, "IRIS__Tue_May__2_12-11-42_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 34, "ratio": 1.002076682639087, "err_cm": 6.236051487598706, "frac_in_frame": 0.0375, "passed": true } }, "IRIS__Wed_Apr_19_10-07-49_2023": { "orig": { "n_matched": 37, "ratio": 1.0979236364364624, "err_cm": 5.349794864654541, "frac_in_frame": 0.15541666666666668, "passed": true }, "pw": { "n_matched": 33, "ratio": 10.013238906860352, "err_cm": 166.53761291503906, "frac_in_frame": 0.08583333333333333, "passed": false } }, "IRIS__Wed_Apr_26_09-27-12_2023": { "orig": { "n_matched": 8, "ratio": 0.9122739355848963, "err_cm": 5.264954628315127, "frac_in_frame": 0.0175, "passed": false }, "pw": { "n_matched": 36, "ratio": 1.036947996852882, "err_cm": 5.530754472789246, "frac_in_frame": 0.05416666666666667, "passed": true } }, "IRIS__Wed_Jul__5_01-07-36_2023": { "orig": { "n_matched": 593, "ratio": 0.9484958478383012, "err_cm": 4.101685048789683, "frac_in_frame": 0.37916666666666665, "passed": true }, "pw": { "n_matched": 592, "ratio": 0.9542117380883499, "err_cm": 5.022510968488736, "frac_in_frame": 0.36541666666666667, "passed": true } }, "IRIS__Wed_Jun__7_09-41-51_2023": { "orig": { "n_matched": 295, "ratio": 0.879398507487687, "err_cm": 10.768452081150926, "frac_in_frame": 0.20041666666666666, "passed": true }, "pw": { "n_matched": 369, "ratio": 0.9583583155618365, "err_cm": 3.6622305966869773, "frac_in_frame": 0.22666666666666666, "passed": true } }, "IRIS__Wed_Mar__8_13_18_53_2023": { "orig": { "n_matched": 317, "ratio": 0.8960014596602233, "err_cm": 5.339288682852173, "frac_in_frame": 0.21375, "passed": true }, "pw": { "n_matched": 326, "ratio": 0.8962613485086384, "err_cm": 5.4179709372597085, "frac_in_frame": 0.21833333333333332, "passed": true } }, "IRIS__Wed_May_17_09-31-48_2023": { "orig": { "n_matched": 300, "ratio": 0.9386993389796976, "err_cm": 4.464379906620983, "frac_in_frame": 0.20166666666666666, "passed": true }, "pw": { "n_matched": 306, "ratio": 0.9349078245480861, "err_cm": 4.048178549111269, "frac_in_frame": 0.19958333333333333, "passed": true } }, "IRIS__Wed_May_24_09-27-45_2023": { "orig": { "n_matched": 266, "ratio": 1.7717572621587676, "err_cm": 37.10569662912222, "frac_in_frame": 0.24166666666666667, "passed": false }, "pw": { "n_matched": 308, "ratio": 0.9011333926286937, "err_cm": 6.906375977687151, "frac_in_frame": 0.19375, "passed": true } }, "IRIS__Wed_May_31_09-35-08_2023": { "orig": { "n_matched": 417, "ratio": 2.5025285107567243, "err_cm": 93.50071648485631, "frac_in_frame": 0.22, "passed": false }, "pw": { "n_matched": 192, "ratio": 0.9436789615957182, "err_cm": 4.438905368842899, "frac_in_frame": 0.12708333333333333, "passed": true } }, "IRIS__Wed_May__3_09-20-47_2023": { "orig": { "n_matched": 62, "ratio": 9.675704956054688, "err_cm": 348.3187255859375, "frac_in_frame": 0.07458333333333333, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "PennPAL__Fri_Jul_14_16-37-07_2023": { "orig": { "n_matched": 432, "ratio": 1.0020822882652283, "err_cm": 4.016042232513428, "frac_in_frame": 0.27291666666666664, "passed": true }, "pw": { "n_matched": 468, "ratio": 1.0131326913833618, "err_cm": 3.8055466413497925, "frac_in_frame": 0.275, "passed": true } }, "PennPAL__Fri_Jul__7_19-15-41_2023": { "orig": { "n_matched": 22, "ratio": 9.16135549545288, "err_cm": 336.7854309082031, "frac_in_frame": 0.035416666666666666, "passed": false }, "pw": { "n_matched": 2, "ratio": 1.0650192499160767, "err_cm": 2.4485765397548676, "frac_in_frame": 0.01, "passed": false } }, "PennPAL__Fri_Jun_30_15-39-41_2023": { "orig": { "n_matched": 211, "ratio": 0.9584299325942993, "err_cm": 3.6922833919525146, "frac_in_frame": 0.18208333333333335, "passed": true }, "pw": { "n_matched": 217, "ratio": 0.9355288147926331, "err_cm": 3.8972890377044678, "frac_in_frame": 0.19958333333333333, "passed": true } }, "PennPAL__Fri_Oct__6_19-27-50_2023": { "orig": { "n_matched": 132, "ratio": 1.178681508378567, "err_cm": 10.266890061155959, "frac_in_frame": 0.11625, "passed": false }, "pw": { "n_matched": 185, "ratio": 1.0888628701100171, "err_cm": 5.243295553466709, "frac_in_frame": 0.12416666666666666, "passed": true } }, "PennPAL__Mon_Jul_10_20-33-09_2023": { "orig": { "n_matched": 179, "ratio": 1.0060283080790513, "err_cm": 3.793218522533942, "frac_in_frame": 0.18, "passed": true }, "pw": { "n_matched": 214, "ratio": 0.9911758653102456, "err_cm": 2.8422537714096388, "frac_in_frame": 0.18208333333333335, "passed": true } }, "PennPAL__Mon_Oct__9_20-55-26_2023": { "orig": { "n_matched": 189, "ratio": 2.9550092220306396, "err_cm": 103.80626678466797, "frac_in_frame": 0.11708333333333333, "passed": false }, "pw": { "n_matched": 82, "ratio": 0.9357175529003143, "err_cm": 5.166908264160156, "frac_in_frame": 0.056666666666666664, "passed": true } }, "PennPAL__Sat_Jul_15_22-43-30_2023": { "orig": { "n_matched": 313, "ratio": 1.016926884651184, "err_cm": 4.45793342590332, "frac_in_frame": 0.22333333333333333, "passed": true }, "pw": { "n_matched": 175, "ratio": 0.9862558841705322, "err_cm": 3.6315500736236572, "frac_in_frame": 0.10833333333333334, "passed": true } }, "PennPAL__Sun_Jun_18_20-09-33_2023": { "orig": { "n_matched": 135, "ratio": 4.750782326326922, "err_cm": 169.2686470464372, "frac_in_frame": 0.12083333333333333, "passed": false }, "pw": { "n_matched": 45, "ratio": 14.080388525732214, "err_cm": 369.2127716881299, "frac_in_frame": 0.04875, "passed": false } }, "PennPAL__Sun_Oct__1_16-55-32_2023": { "orig": { "n_matched": 289, "ratio": 1.1808373928070068, "err_cm": 13.538811683654785, "frac_in_frame": 0.175, "passed": false }, "pw": { "n_matched": 171, "ratio": 0.9343631267547607, "err_cm": 3.905663251876831, "frac_in_frame": 0.13791666666666666, "passed": true } }, "PennPAL__Thu_Apr_27_22-24-23_2023": { "orig": { "n_matched": 32, "ratio": 0.9747880697250366, "err_cm": 4.75597071647644, "frac_in_frame": 0.020833333333333332, "passed": true }, "pw": { "n_matched": 31, "ratio": 1.0176423788070679, "err_cm": 4.306854248046875, "frac_in_frame": 0.019166666666666665, "passed": true } }, "PennPAL__Thu_Jun_15_17-04-05_2023": { "orig": { "n_matched": 125, "ratio": 0.8283615708351135, "err_cm": 9.776479721069336, "frac_in_frame": 0.09041666666666667, "passed": false }, "pw": { "n_matched": 145, "ratio": 0.8263817429542542, "err_cm": 9.749624252319336, "frac_in_frame": 0.10375, "passed": false } }, "PennPAL__Thu_Oct_19_00-01-02_2023": { "orig": { "n_matched": 13, "ratio": 0.8691130782816768, "err_cm": 10.973931912545265, "frac_in_frame": 0.0175, "passed": false }, "pw": { "n_matched": 13, "ratio": 1.0361397387277191, "err_cm": 3.492040708675831, "frac_in_frame": 0.012083333333333333, "passed": false } }, "PennPAL__Tue_Jun_20_17-21-06_2023": { "orig": { "n_matched": 188, "ratio": 0.7557446956634521, "err_cm": 10.8878812789917, "frac_in_frame": 0.17666666666666667, "passed": false }, "pw": { "n_matched": 192, "ratio": 0.8063816428184509, "err_cm": 8.102555751800537, "frac_in_frame": 0.175, "passed": false } }, "PennPAL__Tue_Oct_24_16-27-30_2023": { "orig": { "n_matched": 41, "ratio": 1.0207917170812717, "err_cm": 5.121662684825323, "frac_in_frame": 0.02125, "passed": true }, "pw": { "n_matched": 48, "ratio": 0.9822920322064352, "err_cm": 5.375959344330059, "frac_in_frame": 0.03, "passed": true } }, "PennPAL__Wed_Aug_16_17-13-27_2023": { "orig": { "n_matched": 212, "ratio": 9.94600248336792, "err_cm": 457.55320739746094, "frac_in_frame": 0.17333333333333334, "passed": false }, "pw": { "n_matched": 61, "ratio": 1.0329711437225342, "err_cm": 2.6739532947540283, "frac_in_frame": 0.04666666666666667, "passed": true } }, "PennPAL__Wed_Aug_23_20-39-45_2023": { "orig": { "n_matched": 115, "ratio": 0.9289135789526521, "err_cm": 10.934769159609093, "frac_in_frame": 0.16541666666666666, "passed": true }, "pw": { "n_matched": 85, "ratio": 0.8248718156204188, "err_cm": 10.313249601060631, "frac_in_frame": 0.15166666666666667, "passed": false } }, "PennPAL__Wed_Jul_19_15-53-56_2023": { "orig": { "n_matched": 325, "ratio": 1.081823429162754, "err_cm": 5.825232071308073, "frac_in_frame": 0.175, "passed": true }, "pw": { "n_matched": 324, "ratio": 1.0844988025788873, "err_cm": 5.8392862304164845, "frac_in_frame": 0.17541666666666667, "passed": true } }, "RAD__Fri_Sep__1_10-43-47_2023": { "orig": { "n_matched": 276, "ratio": 1.090492844581604, "err_cm": 6.718348026275635, "frac_in_frame": 0.20708333333333334, "passed": true }, "pw": { "n_matched": 308, "ratio": 1.0826200246810913, "err_cm": 6.211650609970093, "frac_in_frame": 0.19666666666666666, "passed": true } }, "RAD__Thu_Aug_31_13-55-38_2023": { "orig": { "n_matched": 6, "ratio": 0.8453959226608276, "err_cm": 8.702454090118408, "frac_in_frame": 0.002916666666666667, "passed": false }, "pw": { "n_matched": 7, "ratio": 0.8591946959495544, "err_cm": 7.806931018829346, "frac_in_frame": 0.0033333333333333335, "passed": false } }, "RAIL__Fri_Apr__7_19-34-49_2023": { "orig": { "n_matched": 60, "ratio": 5.910195589065552, "err_cm": 323.60394287109375, "frac_in_frame": 0.03208333333333333, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Fri_Jun__2_12-26-06_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Mon_Apr_17_14-40-36_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Mon_Jun_12_14-12-33_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Mon_May_15_11-06-03_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Sat_May_20_14-06-27_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 4, "ratio": 1.0678072571754456, "err_cm": 3.0184881687164307, "frac_in_frame": 0.0020833333333333333, "passed": false } }, "RAIL__Sun_May_28_14-42-43_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Thu_Jun_15_13-23-04_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Thu_Jun__8_10-38-32_2023": { "orig": { "n_matched": 48, "ratio": 1.636623186982374, "err_cm": 25.307625295998573, "frac_in_frame": 0.02625, "passed": false }, "pw": { "n_matched": 29, "ratio": 0.9804489578851391, "err_cm": 5.382163988416011, "frac_in_frame": 0.01875, "passed": false } }, "RAIL__Tue_Jun_20_16-02-59_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Tue_Jun__6_13-52-37_2023": { "orig": { "n_matched": 9, "ratio": 14.379638228891618, "err_cm": 279.4798320489921, "frac_in_frame": 0.007916666666666667, "passed": false }, "pw": { "n_matched": 9, "ratio": 14.880490650629499, "err_cm": 281.91935858573106, "frac_in_frame": 0.007916666666666667, "passed": false } }, "RAIL__Tue_May_30_14-43-13_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Wed_Apr_19_13-24-24_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Wed_Apr_26_15-44-20_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 2, "ratio": 1.0835177898406982, "err_cm": 2.9968907833099365, "frac_in_frame": 0.00125, "passed": false } }, "RAIL__Wed_Jun_21_12-48-06_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "RAIL__Wed_May_31_10-42-42_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Fri_Apr_14_15_48_04_2023": { "orig": { "n_matched": 561, "ratio": 0.8107799291610718, "err_cm": 9.687582015991211, "frac_in_frame": 0.35291666666666666, "passed": false }, "pw": { "n_matched": 531, "ratio": 0.8243585824966431, "err_cm": 8.278979301452637, "frac_in_frame": 0.35, "passed": false } }, "REAL__Fri_Jun_16_17-22-09_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Fri_Jun_23_15-16-14_2023": { "orig": { "n_matched": 6, "ratio": 0.46111774661415916, "err_cm": 31.52196927181986, "frac_in_frame": 0.00375, "passed": false }, "pw": { "n_matched": 4, "ratio": 0.4718241536219283, "err_cm": 30.303253586937284, "frac_in_frame": 0.002916666666666667, "passed": false } }, "REAL__Fri_Jun__9_12-21-55_2023": { "orig": { "n_matched": 30, "ratio": 0.784690648317337, "err_cm": 12.410837173461914, "frac_in_frame": 0.015416666666666667, "passed": false }, "pw": { "n_matched": 135, "ratio": 0.8843722939491272, "err_cm": 6.959386348724365, "frac_in_frame": 0.08833333333333333, "passed": true } }, "REAL__Fri_May_12_14-19-52_2023": { "orig": { "n_matched": 1, "ratio": 5.6327924728393555, "err_cm": 226.8625946044922, "frac_in_frame": 0.0004166666666666667, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Fri_May_19_11-45-49_2023": { "orig": { "n_matched": 62, "ratio": 1.103550672531128, "err_cm": 4.087064743041992, "frac_in_frame": 0.045, "passed": true }, "pw": { "n_matched": 60, "ratio": 1.148265302181244, "err_cm": 5.215351819992065, "frac_in_frame": 0.050833333333333335, "passed": true } }, "REAL__Mon_Jun_19_16-25-38_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Sat_Jul_15_11-41-25_2023": { "orig": { "n_matched": 276, "ratio": 0.8741467569184094, "err_cm": 9.296479839285727, "frac_in_frame": 0.16958333333333334, "passed": true }, "pw": { "n_matched": 256, "ratio": 0.8759130381032886, "err_cm": 7.783576516176938, "frac_in_frame": 0.15333333333333332, "passed": true } }, "REAL__Sat_Jun_10_13-23-45_2023": { "orig": { "n_matched": 154, "ratio": 1.3118022147011765, "err_cm": 19.393839280908022, "frac_in_frame": 0.10875, "passed": false }, "pw": { "n_matched": 138, "ratio": 1.1863060937400962, "err_cm": 9.451649102971793, "frac_in_frame": 0.10208333333333333, "passed": false } }, "REAL__Sat_Jun_17_11-27-00_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Sat_May_27_10-38-29_2023": { "orig": { "n_matched": 17, "ratio": 5.634461402893066, "err_cm": 301.3914489746094, "frac_in_frame": 0.011666666666666667, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Sun_Aug_27_10-25-30_2023": { "orig": { "n_matched": 98, "ratio": 0.8158839021887669, "err_cm": 9.227697619176674, "frac_in_frame": 0.06916666666666667, "passed": false }, "pw": { "n_matched": 169, "ratio": 0.9676333417300582, "err_cm": 2.9801806186431525, "frac_in_frame": 0.11083333333333334, "passed": true } }, "REAL__Sun_Jun_11_14-25-53_2023": { "orig": { "n_matched": 108, "ratio": 1.9034982076736155, "err_cm": 52.08491940092433, "frac_in_frame": 0.08875, "passed": false }, "pw": { "n_matched": 3, "ratio": 1.0404729124710652, "err_cm": 2.214633980593428, "frac_in_frame": 0.0020833333333333333, "passed": false } }, "REAL__Sun_May_21_09-06-25_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Sun_May_28_15-16-08_2023": { "orig": { "n_matched": 25, "ratio": 0.8292579348576314, "err_cm": 7.185672434931101, "frac_in_frame": 0.015833333333333335, "passed": false }, "pw": { "n_matched": 284, "ratio": 0.8691699547846152, "err_cm": 8.303178154960221, "frac_in_frame": 0.17708333333333334, "passed": true } }, "REAL__Thu_Apr__6_14_26_59_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Thu_Aug_24_13-11-27_2023": { "orig": { "n_matched": 67, "ratio": 1.0384925556451023, "err_cm": 6.787142861960504, "frac_in_frame": 0.09875, "passed": true }, "pw": { "n_matched": 68, "ratio": 1.3916108613123588, "err_cm": 8.737430916393091, "frac_in_frame": 0.08416666666666667, "passed": false } }, "REAL__Thu_Jul_13_13-24-11_2023": { "orig": { "n_matched": 56, "ratio": 2.1396210910588023, "err_cm": 53.83648741388985, "frac_in_frame": 0.029166666666666667, "passed": false }, "pw": { "n_matched": 104, "ratio": 0.8884825162386083, "err_cm": 6.327355376944052, "frac_in_frame": 0.06916666666666667, "passed": true } }, "REAL__Thu_Jul_20_13-10-12_2023": { "orig": { "n_matched": 92, "ratio": 0.9390103330139581, "err_cm": 3.7491903036366683, "frac_in_frame": 0.08791666666666667, "passed": true }, "pw": { "n_matched": 103, "ratio": 0.9224814853210408, "err_cm": 4.661117233475642, "frac_in_frame": 0.08875, "passed": true } }, "REAL__Thu_Jun_15_14-45-20_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Thu_Jun__1_18-12-52_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 88, "ratio": 0.950402021408081, "err_cm": 3.9834089279174805, "frac_in_frame": 0.06583333333333333, "passed": true } }, "REAL__Thu_Jun__8_12-02-01_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 3, "ratio": 1.2485120328945316, "err_cm": 12.8109013468173, "frac_in_frame": 0.005, "passed": false } }, "REAL__Tue_Apr_18_15_07_29_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Tue_Aug_15_12-42-37_2023": { "orig": { "n_matched": 1, "ratio": 0.8423158624601724, "err_cm": 4.829270564012589, "frac_in_frame": 0.0020833333333333333, "passed": false }, "pw": { "n_matched": 1, "ratio": 0.8517871737224559, "err_cm": 4.381616071737132, "frac_in_frame": 0.0020833333333333333, "passed": false } }, "REAL__Tue_Aug_29_13-04-08_2023": { "orig": { "n_matched": 5, "ratio": 0.9022687602175034, "err_cm": 5.259951396537654, "frac_in_frame": 0.004166666666666667, "passed": false }, "pw": { "n_matched": 10, "ratio": 0.9323165454963844, "err_cm": 3.668452693691293, "frac_in_frame": 0.01125, "passed": false } }, "REAL__Tue_Jul_11_12-03-26_2023": { "orig": { "n_matched": 36, "ratio": 1.6299306180518478, "err_cm": 22.607030967509, "frac_in_frame": 0.04958333333333333, "passed": false }, "pw": { "n_matched": 41, "ratio": 1.6418088143122083, "err_cm": 21.868112075704392, "frac_in_frame": 0.0525, "passed": false } }, "REAL__Tue_Jul_25_12-30-52_2023": { "orig": { "n_matched": 29, "ratio": 1.9585244226474925, "err_cm": 36.76223042370865, "frac_in_frame": 0.014583333333333334, "passed": false }, "pw": { "n_matched": 1, "ratio": 0.9726685726691598, "err_cm": 1.0019830737070357, "frac_in_frame": 0.0004166666666666667, "passed": false } }, "REAL__Tue_Jul__4_11-44-41_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Tue_Jun_27_11-36-13_2023": { "orig": { "n_matched": 101, "ratio": 2.427508592605591, "err_cm": 66.05912780761719, "frac_in_frame": 0.12, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Tue_Jun__6_17-26-51_2023": { "orig": { "n_matched": 35, "ratio": 1.057403770234617, "err_cm": 12.39519300420701, "frac_in_frame": 0.027083333333333334, "passed": true }, "pw": { "n_matched": 34, "ratio": 2.1129261530245915, "err_cm": 55.19765852668231, "frac_in_frame": 0.0225, "passed": false } }, "REAL__Tue_May_30_16-06-32_2023": { "orig": { "n_matched": 412, "ratio": 3.0949355363845825, "err_cm": 128.3718490600586, "frac_in_frame": 0.2833333333333333, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Wed_Jun_21_15-42-14_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Wed_Jun__7_11-29-09_2023": { "orig": { "n_matched": 2, "ratio": 2.009832203388214, "err_cm": 68.36809921264648, "frac_in_frame": 0.0020833333333333333, "passed": false }, "pw": { "n_matched": 4, "ratio": 0.748542070388794, "err_cm": 13.138734817504883, "frac_in_frame": 0.0020833333333333333, "passed": false } }, "REAL__Wed_May_17_10-24-35_2023": { "orig": { "n_matched": 3, "ratio": 10.576892494912023, "err_cm": 667.1227787046336, "frac_in_frame": 0.004166666666666667, "passed": false }, "pw": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false } }, "REAL__Wed_May_31_09-42-48_2023": { "orig": { "n_matched": 15, "ratio": 0.7330056316546971, "err_cm": 17.303818622728194, "frac_in_frame": 0.04416666666666667, "passed": false }, "pw": { "n_matched": 63, "ratio": 1.1460195008674954, "err_cm": 5.973310596170977, "frac_in_frame": 0.049166666666666664, "passed": true } }, "RPL__Mon_Jun__5_16-00-47_2023": { "orig": { "n_matched": 213, "ratio": 0.936193585395813, "err_cm": 4.525187969207764, "frac_in_frame": 0.12666666666666668, "passed": true }, "pw": { "n_matched": 205, "ratio": 0.9497388601303101, "err_cm": 3.2469024658203125, "frac_in_frame": 0.12666666666666668, "passed": true } }, "RPL__Mon_May_29_15-38-14_2023": { "orig": { "n_matched": 306, "ratio": 0.9406201243400574, "err_cm": 4.125471115112305, "frac_in_frame": 0.17708333333333334, "passed": true }, "pw": { "n_matched": 277, "ratio": 0.9460062384605408, "err_cm": 3.783872365951538, "frac_in_frame": 0.17, "passed": true } }, "RPL__Sun_Jun__4_12-20-40_2023": { "orig": { "n_matched": 360, "ratio": 0.8990872800350189, "err_cm": 5.82628321647644, "frac_in_frame": 0.23083333333333333, "passed": true }, "pw": { "n_matched": 367, "ratio": 0.8967264890670776, "err_cm": 6.065602779388428, "frac_in_frame": 0.23291666666666666, "passed": true } }, "RPL__Thu_May_25_10-40-29_2023": { "orig": { "n_matched": 358, "ratio": 0.9339252710342407, "err_cm": 4.454075336456299, "frac_in_frame": 0.20458333333333334, "passed": true }, "pw": { "n_matched": 368, "ratio": 0.930672824382782, "err_cm": 4.985002279281616, "frac_in_frame": 0.20458333333333334, "passed": true } }, "RPL__Tue_May_30_15-49-08_2023": { "orig": { "n_matched": 447, "ratio": 0.9351726174354553, "err_cm": 3.8802342414855957, "frac_in_frame": 0.2504166666666667, "passed": true }, "pw": { "n_matched": 448, "ratio": 0.9348795413970947, "err_cm": 3.704410433769226, "frac_in_frame": 0.2475, "passed": true } }, "TRI__Mon_Oct_16_10-45-06_2023": { "orig": { "n_matched": 221, "ratio": 0.8192877923235019, "err_cm": 9.948608977750462, "frac_in_frame": 0.15958333333333333, "passed": false }, "pw": { "n_matched": 332, "ratio": 0.931923208407381, "err_cm": 3.9359051740707085, "frac_in_frame": 0.2425, "passed": true } }, "TRI__Mon_Oct_16_10-55-29_2023": { "orig": { "n_matched": 6, "ratio": 4.538639511105683, "err_cm": 170.69403667579328, "frac_in_frame": 0.0125, "passed": false }, "pw": { "n_matched": 6, "ratio": 0.9251119980130966, "err_cm": 3.5725310139229887, "frac_in_frame": 0.00375, "passed": false } }, "TRI__Mon_Oct_23_10-18-39_2023": { "orig": { "n_matched": 288, "ratio": 0.8928756195814196, "err_cm": 20.38023582533721, "frac_in_frame": 0.25958333333333333, "passed": true }, "pw": { "n_matched": 726, "ratio": 0.9221696009374349, "err_cm": 5.164384398996064, "frac_in_frame": 0.5108333333333334, "passed": true } }, "TRI__Mon_Oct_23_13-21-11_2023": { "orig": { "n_matched": 251, "ratio": 1.6181627320853351, "err_cm": 38.62726636819822, "frac_in_frame": 0.2658333333333333, "passed": false }, "pw": { "n_matched": 472, "ratio": 0.978022518423763, "err_cm": 4.0936636850624435, "frac_in_frame": 0.38083333333333336, "passed": true } }, "TRI__Mon_Sep_25_08-36-07_2023": { "orig": { "n_matched": 276, "ratio": 0.8348423838615417, "err_cm": 9.653520584106445, "frac_in_frame": 0.18291666666666667, "passed": false }, "pw": { "n_matched": 267, "ratio": 0.8294149041175842, "err_cm": 10.175529479980469, "frac_in_frame": 0.18041666666666667, "passed": false } }, "TRI__Thu_Aug_10_08-59-39_2023": { "orig": { "n_matched": 125, "ratio": 0.9573508501052856, "err_cm": 3.919649362564087, "frac_in_frame": 0.09291666666666666, "passed": true }, "pw": { "n_matched": 117, "ratio": 0.9552125930786133, "err_cm": 3.1131041049957275, "frac_in_frame": 0.1, "passed": true } }, "TRI__Thu_Oct_12_09-22-46_2023": { "orig": { "n_matched": 259, "ratio": 0.9818604588508606, "err_cm": 2.7582249641418457, "frac_in_frame": 0.195, "passed": true }, "pw": { "n_matched": 283, "ratio": 0.9438903331756592, "err_cm": 3.84071946144104, "frac_in_frame": 0.19625, "passed": true } }, "TRI__Thu_Oct_12_13-37-48_2023": { "orig": { "n_matched": 66, "ratio": 1.0483673810958862, "err_cm": 4.455574035644531, "frac_in_frame": 0.051666666666666666, "passed": true }, "pw": { "n_matched": 51, "ratio": 0.9815044403076172, "err_cm": 3.0786092281341553, "frac_in_frame": 0.04083333333333333, "passed": true } }, "TRI__Thu_Oct_19_09-53-56_2023": { "orig": { "n_matched": 4, "ratio": 1.1487887501716614, "err_cm": 5.233600378036499, "frac_in_frame": 0.009583333333333333, "passed": false }, "pw": { "n_matched": 233, "ratio": 0.5260418653488159, "err_cm": 34.80415725708008, "frac_in_frame": 0.23083333333333333, "passed": false } }, "TRI__Thu_Oct_19_09-57-44_2023": { "orig": { "n_matched": 476, "ratio": 0.9581257700920105, "err_cm": 3.879642605781555, "frac_in_frame": 0.31833333333333336, "passed": true }, "pw": { "n_matched": 477, "ratio": 0.9695248007774353, "err_cm": 3.4023189544677734, "frac_in_frame": 0.32, "passed": true } }, "TRI__Thu_Sep_21_09-26-47_2023": { "orig": { "n_matched": 76, "ratio": 1.0318404667314045, "err_cm": 7.352876595082569, "frac_in_frame": 0.155, "passed": true }, "pw": { "n_matched": 112, "ratio": 0.9995372744460748, "err_cm": 5.458170738934454, "frac_in_frame": 0.08, "passed": true } }, "TRI__Tue_Oct_17_09-44-32_2023": { "orig": { "n_matched": 368, "ratio": 0.9292362951129305, "err_cm": 4.66236741544696, "frac_in_frame": 0.25916666666666666, "passed": true }, "pw": { "n_matched": 270, "ratio": 0.6928922586014885, "err_cm": 42.08952289302964, "frac_in_frame": 0.44916666666666666, "passed": false } }, "TRI__Tue_Oct_24_10-03-27_2023": { "orig": { "n_matched": 487, "ratio": 3.6803166578536994, "err_cm": 151.49176443287885, "frac_in_frame": 0.3016666666666667, "passed": false }, "pw": { "n_matched": 287, "ratio": 0.9732646289785872, "err_cm": 4.019831707383192, "frac_in_frame": 0.2275, "passed": true } }, "TRI__Tue_Oct_24_10-04-20_2023": { "orig": { "n_matched": 446, "ratio": 0.9897494717121609, "err_cm": 4.105481251071552, "frac_in_frame": 0.31958333333333333, "passed": true }, "pw": { "n_matched": 430, "ratio": 0.9964987908940148, "err_cm": 3.915458121150012, "frac_in_frame": 0.31583333333333335, "passed": true } }, "TRI__Wed_Aug__9_08-48-15_2023": { "orig": { "n_matched": 66, "ratio": 4.195356369018555, "err_cm": 187.04803466796875, "frac_in_frame": 0.08833333333333333, "passed": false }, "pw": { "n_matched": 43, "ratio": 0.9514780640602112, "err_cm": 5.92810583114624, "frac_in_frame": 0.03208333333333333, "passed": true } }, "TRI__Wed_Oct_18_10-27-33_2023": { "orig": { "n_matched": 46, "ratio": 0.9612240096584304, "err_cm": 16.212997674690797, "frac_in_frame": 0.03875, "passed": true }, "pw": { "n_matched": 41, "ratio": 0.9661307558482067, "err_cm": 14.493415829611633, "frac_in_frame": 0.035, "passed": true } }, "TRI__Wed_Oct_18_15-39-19_2023": { "orig": { "n_matched": 114, "ratio": 3.7233204725267783, "err_cm": 138.844721120773, "frac_in_frame": 0.12291666666666666, "passed": false }, "pw": { "n_matched": 365, "ratio": 0.9431781112936319, "err_cm": 4.624048834150263, "frac_in_frame": 0.26208333333333333, "passed": true } }, "TRI__Wed_Oct_25_09-39-54_2023": { "orig": { "n_matched": 111, "ratio": 0.9497297860218563, "err_cm": 3.6991146025610933, "frac_in_frame": 0.09541666666666666, "passed": true }, "pw": { "n_matched": 115, "ratio": 0.946189267814742, "err_cm": 4.401904262250228, "frac_in_frame": 0.09625, "passed": true } }, "TRI__Wed_Sep__6_13-03-27_2023": { "orig": { "n_matched": 0, "ratio": null, "err_cm": null, "frac_in_frame": 0.0, "passed": false }, "pw": { "n_matched": 24, "ratio": 0.9223835170269012, "err_cm": 4.029715895652771, "frac_in_frame": 0.02, "passed": false } }, "Tue_Aug__8_08-55-57_2023": { "orig": { "n_matched": 145, "ratio": 0.98082435131073, "err_cm": 5.685301780700684, "frac_in_frame": 0.11, "passed": true }, "pw": { "n_matched": 240, "ratio": 0.9589372873306274, "err_cm": 3.597178101539612, "frac_in_frame": 0.14875, "passed": true } } }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167"""The `measure` stage: the geometry table, read out of the depth maps already rendered.
WHAT THIS MEASURES------------------A reconstruction that looks right in a photograph can still be the wrong shape. Thephotometric numbers cannot tell the difference, because a novel view rendered from adistorted cloud can still land the right colours on the right pixels. So the releasealso measures the reconstruction against a ruler that owes nothing to any camera: therobot arm. The arm's 3-D surface at frame 0 is known exactly from its own joint encodersplus the manufacturer's CAD (`probe_lib`), and that is where the query points live.
For each of the 1200 arm points and each of the four views, the point is projected intothat view and the rendered depth at the landing pixel is compared with the point's truecamera-frame depth. 1200 x 4 = 4800 rows. The reported cell is the median over the rowsthat actually landed on a covered pixel, plus how many those were -- and the count is notdecoration: `err_cm_median` is meaningless without it, because a reconstruction thatrenders almost nothing is scored only on its few opaque pixels.
WHY THIS STAGE HAS NO MODEL IN IT---------------------------------The `depth` stage already wrote `<work>/four_view/<episode>/depth_<condition>.npz` forall four conditions. This stage opens those files. There is no second forward pass, nocheckpoint and no GPU, which is what makes the geometric numbers reproducible from thereconstruction rather than alongside it. Run `depth` first; this stage reads its output.
THE CONTRACT THAT IS EASY TO GET WRONG--------------------------------------`depth_m` in that npz is ALREADY IN METRES -- `release_reconstruction.py` stores`depth * s_m`, not the raw normalised depth. `s_m` is stored beside it only as a recordof the scale chain that produced it. So `depth_probe_K` is called with `s_m = 1.0`,exactly as the gate calls it after `to_square_grid`. Passing the stored `s_m` here wouldapply the scale a second time and every number would come out wrong by a factor thatlooks entirely plausible.
Intrinsics are read with `repair=False`: the point is to measure the reconstruction as itwas actually rendered, including the episodes whose DROID intrinsics are all zero. Thegate may repair, because it recomputes its depth from the raw images; a stored rendercannot be un-rendered.
Writes `<work>/measure/<episode>/geometry.json`."""import jsonimport osimport sysimport traceback
import numpy as np
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import config # noqa: E402from arm_lib import (CONDITIONS, depth_probe_K, episode_points, # noqa: E402 flatten, grid_K, visibility)from pw_extrinsics import VIEWS # noqa: E402
FAMILY = "arm_surface_t0"# The depth maps are already metres; see "THE CONTRACT THAT IS EASY TO GET WRONG" above.S_M = 1.0
def _cell(rows): """One condition's row of the geometry table.""" fam = np.array(rows["family"]) == FAMILY ratio = np.array(rows["ratio"], dtype=float)[fam] err = np.array(rows["err_cm"], dtype=float)[fam] inf = np.array(rows["in_frame"], dtype=bool)[fam] ok = np.isfinite(ratio) n_rows = int(fam.sum()) n_matched = int(ok.sum()) return dict( n_rows=n_rows, n_matched=n_matched, coverage_matched=float(n_matched / n_rows) if n_rows else 0.0, err_cm_median=(float(np.median(err[np.isfinite(err)])) if n_matched else None), ratio_median=(float(np.median(ratio[ok])) if n_matched else None), n_in_frame=int(inf.sum()), frac_in_frame=float(inf.mean()) if n_rows else 0.0, )
def measure_episode(ep): """The four-condition geometry table for one episode.""" four = config.four_view_dir() missing = [t for t in CONDITIONS if not os.path.exists(f"{four}/{ep}/depth_{t}.npz")] if missing: raise config.MissingInput( f"\nno rendered depth for {ep}: {', '.join('depth_%s.npz' % t for t in missing)}\n" f" expected under {four}/{ep}/\n" f" run the depth stage for this episode first:\n" f" python pipeline/run_pipeline.py depth --episodes {ep}\n")
pts, pmeta = episode_points(ep) names = list(pts) P = np.stack([pts[n] for n in names]) # repair=False: measure the render as it was rendered. Kmap = grid_K(ep, "zip", repair=False) Ks = [Kmap[v] for v in VIEWS]
per_condition = {} for tag in CONDITIONS: z = np.load(f"{four}/{ep}/depth_{tag}.npz") # `cams` is the condition's own metric extrinsic stack, written by the depth # stage. Reading it here rather than reloading the extrinsics guarantees the # measurement uses the cameras the depth map was actually rendered from. cams = np.asarray(z["cams"], dtype=np.float64) dmap = np.asarray(z["depth_m"], dtype=np.float32) alpha = np.asarray(z["alpha"], dtype=np.float32) front = visibility(P, cams, Ks) dp = depth_probe_K(dmap, alpha, cams, S_M, pts, Ks, VIEWS) per_condition[tag] = _cell(flatten(dp, names, pmeta, front, VIEWS))
return { "episode": ep, "geometry_arm_surface": { "protocol": ("all four views as context; 1-D depth error at Franka arm " "surface points located by joint encoders and CAD " f"(family {FAMILY})"), "source": "the depth maps written by the depth stage; no model is run here", "views": list(VIEWS), "n_points": sum(1 for n in names if pmeta[n]["family"] == FAMILY), "coverage_warning": ("err_cm_median is meaningless without coverage_matched: " "a scene that renders almost nothing scores only its " "few opaque pixels."), "per_condition": per_condition, }, }
def main(eps, out_root): """The `measure` stage over the episodes `run_diagnostics.py` passes in.
Nothing here requires them to be released episodes; the precondition is the rendered depth npz, and `measure_episode` raises `config.MissingInput` naming the file when it is absent. The driver checks the same thing up front for an explicit --episodes. """ config.droid_root() # fail on a missing input before the loop, not inside it print(f"measure: {len(eps)} episodes -> {out_root}/<episode>/geometry.json", flush=True)
n_ok = 0 for i, ep in enumerate(eps, 1): d = os.path.join(out_root, ep) path = os.path.join(d, "geometry.json") if os.path.exists(path): n_ok += 1 continue try: rec = measure_episode(ep) os.makedirs(d, exist_ok=True) with open(path, "w") as f: json.dump(rec, f, indent=1) c = rec["geometry_arm_surface"]["per_condition"][config.RELEASE_CONDITION] print(f" [{i}/{len(eps)}] {ep} {config.RELEASE_CONDITION}: " f"n_matched={c['n_matched']} err_cm={c['err_cm_median']}", flush=True) n_ok += 1 except config.MissingInput as ex: print(f" !! {ep}: {str(ex).strip().splitlines()[0]}", flush=True) except Exception: print(f" !! {ep}:\n{traceback.format_exc()}", flush=True)
print(f"\nmeasured {n_ok} of {len(eps)} episodes") return n_ok
if __name__ == "__main__": import run_diagnostics as RD # noqa: E402 _args = RD.parse_args(["measure"] + sys.argv[1:]) main(RD.measure_episodes(_args), RD.measure_dir())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295"""Photometric evaluation: the THREE-view reconstruction, for measuring novel-viewquality. Reconstructs from ext1L, ext1R and ext2L, renders the held-out ext2R andscores it against the photograph -- the protocol the paper reports.
This object is NOT part of the release; only its scores are. The released Gaussianscome from `release_reconstruction.py`, which feeds in all four views. The two differonly in which views go in, but they are different objects: 31,104 Gaussians hereagainst 41,472 there.
This module also holds the shared machinery both passes use -- camera construction,normalisation, the model call, the photometric scale search -- which`release_reconstruction.py` imports rather than duplicating.
Four conditions per episode. These are the photometric numbers of the release:three views go in, the fourth is rendered and scored against the photograph. Theobject reconstructed here is NOT the one shipped as scenes/<ep>/gaussians.ply --that is the four-view reconstruction, produced by release_reconstruction.py.
Three things define a condition:
1. EXTRINSIC SOURCE is a condition axis. `orig_*` uses DROID's own observation/camera_extrinsics; `pw_*` uses PointWorld's optimized_extrinsics (inverted to camera-to-world, right eye chained on -- see pw_extrinsics.py). 2. INTRINSICS are the measured per-episode values from intrinsics.json (fx=fy, real cx/cy) instead of a flat 530 px / image-centre estimate. Episodes without a usable measurement are not in EPISODES. 3. The held-out render also dumps depth + alpha, so the dense stereo comparison can be run afterwards without a second forward pass.
Note on `*_free`: pose-free means the *reconstruction* ignores the extrinsics, butthe held-out view is still rendered at a pose derived from them (target poseexpressed relative to context view 0). So `pw_free` is NOT a copy of `orig_free`:same Gaussians, different camera placement. Both are run.
Inference only. No training. Writes only under the work directory.Crash-safe: manifest re-dumped after every episode, per-episode try/except, OOMretry, resumable."""import json, os, sys, time, traceback
import imageio, numpy as np, torchfrom scipy.spatial.transform import Rotation
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import configfrom pw_extrinsics import VIEWS, batch_root, load_orig, load_pw
from zipsplat import ZipSplat, Camera, Pose, load_imagefrom zipsplat.utils import to_square
# ---------------------------------------------------------------- constantsW, H = 1280, 720RES, FRAME_IDX = 252, 0TARGET = "ext2R"COMPRESSION = 1.0
EPISODES = config.all_episodes()KINTR = config.intrinsics()
CONDITIONS = { # tag -> (extrinsic source, use_priors) "orig_free": ("orig", False), "orig_inj": ("orig", True), "pw_free": ("pw", False), "pw_inj": ("pw", True),}
# ---------------------------------------------------------------- geometry helpersdef normalise(E): ref = np.linalg.inv(E[0]) Er = np.einsum("ij,vjk->vik", ref, E) t = Er[:, :3, 3] s = float(np.max(np.linalg.norm(t[:, None] - t[None], axis=-1))) s = s if s > 1e-9 else 1.0 Er = Er.copy() Er[:, :3, 3] /= s return Er, ref, s
def apply_norm(M, ref, s): out = ref @ M out = out.copy() out[:3, 3] /= s return out
def psnr(a, b): mse = float(((a - b) ** 2).mean()) return 99.0 if mse == 0 else float(-10 * np.log10(mse))
# ---------------------------------------------------------------- camerasdef episode_cameras(m): """Per-view Camera at native 1280x720 and at ZipSplat's 252 square grid.""" e = KINTR[m["uuid"]] full, res = [], [] side = min(H, W) for v in VIEWS: ser = m["ext1_cam_serial"] if v.startswith("ext1") else m["ext2_cam_serial"] fx, cx, fy, cy = e[ser]["cameraMatrix"] c = Camera.from_focal(torch.tensor(float(fx)), torch.tensor(float(fy)), w=W, h=H, cx=torch.tensor(float(cx)), cy=torch.tensor(float(cy))) full.append(c.data_) res.append(c.crop((side - W, side - H)).scale(RES / side).data_) return torch.stack(full), torch.stack(res)
def load_images(ep): b = batch_root(ep) missing = [v for v in VIEWS if not os.path.exists(f"{b}/{ep}/images/{v}_0000.png")] if missing: raise config.MissingInput( f"\nno extracted frames for {ep}: {', '.join(missing)}\n" f" expected under {b}/{ep}/images/\n" f" run the extract stage first:\n" f" python pipeline/run_pipeline.py extract --droid-root <dir> --episodes {ep}\n") return {v: load_image(f"{b}/{ep}/images/{v}_0000.png") for v in VIEWS}
def render(g, cam_res_rows, Ms, want_depth=False): """Render c2w matrices (N,4,4) in the model frame with per-row cameras.""" poses = Pose.from_4x4mat(torch.from_numpy(np.asarray(Ms)).float()) cams = Camera(cam_res_rows.clone()) out, info = g.render(cams, poses, mode="RGB+ED" if want_depth else "RGB") if want_depth: rgb = out[:, :3].clamp(0, 1).float().cpu().numpy() depth = out[:, 3:4].float().cpu().numpy()[:, 0] alpha = info["alphas"].float().cpu().numpy()[:, 0] return rgb, depth, alpha return out.clamp(0, 1).float().cpu().numpy()
# ---------------------------------------------------------------- coredef predict(model, imgs, views, cam_full_rows, Er, use_priors, compression=COMPRESSION): ims = torch.stack([imgs[v] for v in views]) poses = Pose.from_4x4mat(torch.from_numpy(Er).float()) cams = Camera(cam_full_rows.clone()) return model(ims, cameras=cams if use_priors else None, poses=poses if use_priors else None, use_priors=use_priors, compression=compression)[0]
def fit_scale(g, cam_res_rows, Er, ctx_np): """Photometric 1-D scale search on the CONTEXT views only (view 0 excluded).""" if len(Er) < 2: return 1.0, None
def score(s): M = Er.copy() M[:, :3, 3] *= s pr = render(g, cam_res_rows[1:], M[1:]) return float(np.mean([psnr(pr[i], ctx_np[i + 1]) for i in range(len(Er) - 1)]))
grid = np.exp(np.linspace(np.log(0.15), np.log(6.0), 24)) sc = [score(float(s)) for s in grid] best = int(np.argmax(sc)) lo, hi = grid[max(0, best - 1)], grid[min(len(grid) - 1, best + 1)] fine = np.exp(np.linspace(np.log(lo), np.log(hi), 13)) sf = [score(float(s)) for s in fine] bi = int(np.argmax(sf)) return float(fine[bi]), float(sf[bi])
def run_condition(model, ep, tag, imgs, ext, cam_full, cam_res, epdir): """Leave-one-out held-out protocol: reconstruct from the three views other than TARGET, then render TARGET and score it against the photograph.""" _, use_priors = CONDITIONS[tag] ctx = [v for v in VIEWS if v != TARGET] cidx = [VIEWS.index(v) for v in ctx] tidx = VIEWS.index(TARGET)
Ec, refc, sc = normalise(ext[cidx]) g = predict(model, imgs, ctx, cam_full[cidx], Ec, use_priors) cnp = to_square(torch.stack([imgs[v] for v in ctx])).cpu().numpy()
if use_priors: s_fit, s_score = 1.0, None s_probe, p_score = fit_scale(g, cam_res[cidx], Ec, cnp) # read-only diagnostic else: s_fit, s_score = fit_scale(g, cam_res[cidx], Ec, cnp) s_probe, p_score = s_fit, s_score
res = {"pose_free": not use_priors, "ctx": ctx, "target": TARGET, "n_gaussians": int(g.num_gaussians), "gt_norm_scale_m": sc, "scale_fit": {"scale": s_fit, "ctx_psnr_at_best": s_score}, "scale_probe": {"scale": s_probe, "abs_err": abs(1.0 - s_probe), "ctx_psnr_at_best": p_score, "note": "photometric 1-D search; diagnostic only when priors injected"}}
Em = Ec.copy(); Em[:, :3, 3] *= s_fit pr_ctx = render(g, cam_res[cidx], Em) res["psnr_context"] = {v: psnr(pr_ctx[i], cnp[i]) for i, v in enumerate(ctx)}
# ---- held-out TARGET ---- Mt = apply_norm(ext[tidx], refc, sc) Mt[:3, 3] *= s_fit rgb, depth, alpha = render(g, cam_res[tidx][None], Mt[None], want_depth=True) pr_t, d_t, a_t = rgb[0], depth[0], alpha[0] gt_t = to_square(imgs[TARGET][None]).cpu().numpy()[0]
imageio.imwrite(f"{epdir}/{tag}_heldout_{TARGET}.png", (pr_t.transpose(1, 2, 0) * 255).astype(np.uint8)) if not os.path.exists(f"{epdir}/real_{TARGET}.png"): imageio.imwrite(f"{epdir}/real_{TARGET}.png", (gt_t.transpose(1, 2, 0) * 255).astype(np.uint8)) # depth is in the model's normalised frame -> metres via the same s_fit / sc chain np.savez_compressed(f"{epdir}/depth_{tag}.npz", depth_m=(d_t * sc / max(s_fit, 1e-9)).astype(np.float32), alpha=a_t.astype(np.float32), pose_c2w=Mt.astype(np.float64), scale_norm_m=sc, scale_fit=s_fit)
cov = float((a_t > 0.5).mean()) m = a_t > 0.5 res[f"psnr_heldout_{TARGET}"] = psnr(pr_t, gt_t) res["coverage_heldout"] = cov res["psnr_heldout_covered"] = (psnr(pr_t[:, m], gt_t[:, m]) if m.any() else None) del g torch.cuda.empty_cache() return res
# ---------------------------------------------------------------- driverdef outputs_complete(ep): out = config.three_view_dir() f = [f"{out}/{ep}/real_{TARGET}.png"] for tag in CONDITIONS: f += [f"{out}/{ep}/{tag}_heldout_{TARGET}.png", f"{out}/{ep}/depth_{tag}.npz"] return all(os.path.exists(x) and os.path.getsize(x) > 0 for x in f)
def main(): OUT = config.three_view_dir() ckpt = config.checkpoint() selected = config.episodes() os.makedirs(OUT, exist_ok=True) mpath = f"{OUT}/manifest.json" manifest = json.load(open(mpath)) if os.path.exists(mpath) else [] done = {e["episode"] for e in manifest if outputs_complete(e["episode"])} todo = [e for e in selected if e not in done] print(f"[{time.strftime('%H:%M:%S')}] {len(done)} done, {len(todo)} to run", flush=True) if not todo: print("ALL DONE", flush=True) return
print(f"[{time.strftime('%H:%M:%S')}] loading {ckpt}", flush=True) model = ZipSplat(weights=ckpt).cuda().eval() print(f"[{time.strftime('%H:%M:%S')}] model ready", flush=True)
for ep in selected: if ep in done: continue try: t0 = time.time() epdir = f"{OUT}/{ep}" os.makedirs(epdir, exist_ok=True) m, orig = load_orig(ep) _, pw = load_pw(ep) imgs = load_images(ep) cam_full, cam_res = episode_cameras(m) e = KINTR[m["uuid"]] entry = {"episode": ep, "lab": m.get("lab", ""), "uuid": m["uuid"], "intrinsics": {ser: e[ser]["cameraMatrix"] for ser in (m["ext1_cam_serial"], m["ext2_cam_serial"])}, "conditions": {}} for tag, (src, _) in CONDITIONS.items(): ext = orig if src == "orig" else pw for attempt in range(6): try: entry["conditions"][tag] = run_condition( model, ep, tag, imgs, ext, cam_full, cam_res, epdir) c = entry["conditions"][tag] print(f" {ep} {tag}: heldout={c[f'psnr_heldout_{TARGET}']:.2f} " f"cov={c['coverage_heldout']:.3f} " f"s={c['scale_probe']['scale']:.3f}", flush=True) break except torch.cuda.OutOfMemoryError: torch.cuda.empty_cache() print(f" OOM {ep}/{tag}, retry {attempt+1}/6 in 60s", flush=True) time.sleep(60) else: entry["conditions"][tag] = {"error": "OOM after 6 retries"} manifest = [x for x in manifest if x["episode"] != ep] + [entry] manifest.sort(key=lambda x: EPISODES.index(x["episode"])) json.dump(manifest, open(mpath, "w"), indent=2) print(f"[{time.strftime('%H:%M:%S')}] {ep} done in {time.time()-t0:.0f}s", flush=True) except Exception: print(f"FAILED {ep}:\n{traceback.format_exc()}", flush=True) json.dump(manifest, open(mpath, "w"), indent=2) json.dump(manifest, open(mpath, "w"), indent=2) print("ALL DONE", flush=True)
if __name__ == "__main__": config.parse_known() main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260"""Surface-anchored query points for the DROID depth probe.
Why this module exists----------------------An earlier version of this geometry probe asked for the depth of ONE point,`action/robot_state/cartesian_position[t_close][:3]`. That is the Franka **flange**pose, and the visible surface sits well below it, so the probe ray flew past the objectand landed on the background. The tell was that the classical SGBM stereo control --which shares no code, no model and no calibration with the reconstruction -- reproducedthe same "2.5x depth error" on that point. A number that a zero-prior instrumentreproduces exactly is a property of the query point, not of the reconstructor. That iswhy the released tables score a *surface* family instead, and why the bundle publishesthe stereo control beside every reconstruction number (`stereo_floor` in`scenes/<episode>/metrics.json`): the floor is what makes the reconstruction numberreadable.
Two hard constraints shape everything here:
1. **The reconstruction is a single static frame-0 scene.** Every model is fed `{view}_0000.png` only. A query point is therefore only admissible if the surface it names is present *at frame 0*. The end-effector travels a median 0.42 m (min 0.14 m over the episodes measured) between frame 0 and `t_close`, so the arm is nowhere near the grasp point at frame 0. The grasp point is admissible only under the reading "a point on the *object*, which is static until it is grasped".
2. **Nothing here may depend on the camera calibration being right.** Every ground truth 3-D coordinate below comes from the robot (joint encoders / URDF kinematics) or from a plane fitted to the scene itself, never from the camera extrinsics. This is what lets the same points score an extrinsic (the `gate` stage) and a reconstruction (the `measure` stage) without the two arguments becoming circular.
This module builds and projects points. It reads nothing outside the bundle: theFranka URDF and its collision meshes ship under `assets/franka_panda/`, resolvedrelative to this file."""import os, reimport numpy as npfrom scipy.spatial.transform import Rotation
ASSETS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "assets", "franka_panda")URDF = os.path.join(ASSETS, "panda.urdf")
# Franka Hand: panda_link8 (flange) -> TCP is +0.1034 m along the flange z axis.TCP_OFFSET_M = 0.1034
# ------------------------------------------------------------------ URDF / FKdef _rpy(r, p, y): return Rotation.from_euler("xyz", [r, p, y]).as_matrix()
def load_urdf(path=URDF): """Minimal URDF reader: joint chain + per-link visual mesh references.
Only what forward kinematics needs. Returns (joints, links) where each joint is (name, type, parent, child, T_origin, axis) and each link maps to a list of (mesh_path, T_visual_origin, scale). """ txt = open(path).read() joints = [] for m in re.finditer(r'<joint name="([^"]+)" type="([^"]+)">(.*?)</joint>', txt, re.S): name, jtype, body = m.group(1), m.group(2), m.group(3) o = re.search(r'<origin([^/]*)/>', body) xyz = np.zeros(3); rpy = np.zeros(3) if o: a = o.group(1) if (v := re.search(r'xyz="([^"]+)"', a)): xyz = np.array([float(x) for x in v.group(1).split()]) if (v := re.search(r'rpy="([^"]+)"', a)): rpy = np.array([float(x) for x in v.group(1).split()]) ax = re.search(r'<axis xyz="([^"]+)"', body) axis = np.array([float(x) for x in ax.group(1).split()]) if ax else np.array([0, 0, 1.]) T = np.eye(4); T[:3, :3] = _rpy(*rpy); T[:3, 3] = xyz joints.append(dict(name=name, type=jtype, parent=re.search(r'<parent link="([^"]+)"', body).group(1), child=re.search(r'<child link="([^"]+)"', body).group(1), T=T, axis=axis)) links = {} for m in re.finditer(r'<link name="([^"]+)">(.*?)</link>', txt, re.S): name, body = m.group(1), m.group(2) vis = [] for v in re.finditer(r'<visual>(.*?)</visual>', body, re.S): vb = v.group(1) mesh = re.search(r'<mesh filename="package://([^"]+)"', vb) if not mesh: continue o = re.search(r'<origin([^/]*)/>', vb) xyz = np.zeros(3); rpy = np.zeros(3) if o: a = o.group(1) if (w := re.search(r'xyz="([^"]+)"', a)): xyz = np.array([float(x) for x in w.group(1).split()]) if (w := re.search(r'rpy="([^"]+)"', a)): rpy = np.array([float(x) for x in w.group(1).split()]) T = np.eye(4); T[:3, :3] = _rpy(*rpy); T[:3, 3] = xyz vis.append(dict(mesh=os.path.join(ASSETS, mesh.group(1)), T=T)) links[name] = vis return joints, links
_URDF_CACHE = None
def urdf(): global _URDF_CACHE if _URDF_CACHE is None: _URDF_CACHE = load_urdf() return _URDF_CACHE
def fk(q, finger_m=0.0): """Forward kinematics from the 7 arm joint angles.
q : (7,) `action/robot_state/joint_positions[t]` finger_m : prismatic finger opening (m), each finger moves +finger_m along its axis
Returns {link_name: 4x4 pose in the robot base frame}. The base frame is `panda_link0`, which is the frame DROID's `cartesian_position` and the camera extrinsics both live in -- `fk_matches_robot_state()` proves it rather than assuming it. """ joints, _ = urdf() T = {"panda_link0": np.eye(4)} qi = 0 for j in joints: if j["parent"] not in T: continue L = j["T"].copy() if j["type"] == "revolute": ang = q[qi]; qi += 1 R = Rotation.from_rotvec(j["axis"] * ang).as_matrix() M = np.eye(4); M[:3, :3] = R L = L @ M elif j["type"] == "prismatic": M = np.eye(4); M[:3, 3] = j["axis"] * finger_m L = L @ M T[j["child"]] = T[j["parent"]] @ L return T
def fk_matches_robot_state(q, cart6): """Distance between FK(panda_link8) and DROID's own `cartesian_position`.
This is the validation gate for the whole URDF path: if DROID's reported EE pose is the flange, `flange_err_m` is ~0 and `tcp_err_m` is ~0.1034; if it is the TCP, the two swap. Either way the answer is measured, not assumed. """ T = fk(q) M = np.eye(4) M[:3, :3] = Rotation.from_euler("xyz", cart6[3:]).as_matrix() M[:3, 3] = cart6[:3] f8 = T["panda_link8"] tcp = f8 @ _tz(TCP_OFFSET_M) rot = float(np.degrees(np.linalg.norm( Rotation.from_matrix(f8[:3, :3].T @ M[:3, :3]).as_rotvec()))) return dict(flange_err_m=float(np.linalg.norm(f8[:3, 3] - M[:3, 3])), tcp_err_m=float(np.linalg.norm(tcp[:3, 3] - M[:3, 3])), rot_err_deg=rot)
def _tz(d): T = np.eye(4); T[2, 3] = d return T
# ------------------------------------------------------------------ meshesdef load_obj(path): """Vertices + triangle faces of a Wavefront OBJ (positions only).""" V, F = [], [] for line in open(path): if line.startswith("v "): V.append([float(x) for x in line.split()[1:4]]) elif line.startswith("f "): idx = [int(t.split("/")[0]) for t in line.split()[1:]] idx = [i - 1 if i > 0 else len(V) + i for i in idx] for k in range(1, len(idx) - 1): F.append([idx[0], idx[k], idx[k + 1]]) return np.array(V, dtype=np.float64), np.array(F, dtype=np.int64)
_MESH_CACHE = {}
def mesh(path): if path not in _MESH_CACHE: _MESH_CACHE[path] = load_obj(path) return _MESH_CACHE[path]
def sample_link_surface(q, n_total=4000, seed=0, links=None): """Area-weighted surface samples of the robot's visual meshes, in the base frame.
This is the *dense, calibration-independent* ground truth: joint encoders give the configuration, the manufacturer's CAD gives the shape. PointWorld uses the same trick to refine extrinsics. We only use it as a ruler -- the arm is never proposed as dataset content. """ rng = np.random.default_rng(seed) _, linkvis = urdf() T = fk(q) want = links or [k for k in linkvis if linkvis[k]] tris, names = [], [] for name in want: if name not in T: continue for v in linkvis[name]: V, F = mesh(v["mesh"]) if len(F) == 0: continue M = T[name] @ v["T"] Vw = (M[:3, :3] @ V.T).T + M[:3, 3] tris.append(Vw[F]) names += [name] * len(F) if not tris: return np.zeros((0, 3)), np.array([], dtype=object) tri = np.concatenate(tris) names = np.array(names) a = 0.5 * np.linalg.norm(np.cross(tri[:, 1] - tri[:, 0], tri[:, 2] - tri[:, 0]), axis=1) p = a / a.sum() pick = rng.choice(len(tri), size=n_total, p=p) u = rng.random((n_total, 1)); v = rng.random((n_total, 1)) over = (u + v) > 1 u[over] = 1 - u[over]; v[over] = 1 - v[over] t = tri[pick] P = t[:, 0] + u * (t[:, 1] - t[:, 0]) + v * (t[:, 2] - t[:, 0]) return P, names[pick]
# ------------------------------------------------------------------ visibilitydef project(P, c2w, fx, cxy): """Square-crop pinhole projection. Returns (u, v, z) with z the camera-frame depth.""" R, t = c2w[:3, :3], c2w[:3, 3] pc = (R.T @ (P - t).T).T z = pc[:, 2] with np.errstate(divide="ignore", invalid="ignore"): u = fx * pc[:, 0] / z + cxy v = fx * pc[:, 1] / z + cxy return u, v, z
def frontmost_mask(P, c2w, fx, cxy, res, tol_m=0.01): """Keep only points that are the nearest surface of the *same object set* on their ray.
A z-buffer over the sampled robot points at the probe's own resolution. A point that another sampled point occludes by more than `tol_m` is dropped: those are the far side of a link, where a depth probe legitimately reads the near side instead. """ u, v, z = project(P, c2w, fx, cxy) ok = (z > 1e-6) & (u >= 0) & (u < res) & (v >= 0) & (v < res) keep = np.zeros(len(P), dtype=bool) if not ok.any(): return keep, ok iu = np.clip(u[ok].astype(int), 0, res - 1) iv = np.clip(v[ok].astype(int), 0, res - 1) key = iv * res + iu zz = z[ok] zbuf = np.full(res * res, np.inf) np.minimum.at(zbuf, key, zz) keep[np.where(ok)[0]] = zz <= zbuf[key] + tol_m return keep, ok12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788"""PointWorld optimized extrinsics -> the 4-view c2w stack.
The convention: optimized_extrinsics is a 4x4 WORLD-TO-CAMERA matrix for the LEFTeye of each ZED pair, metres, robot-base world frame, OpenCV axes; the right eye isDROID's own left->right rigid offset chained on.
`_c2w`, `load_orig` and `load_pw` are the computation the released bundle was builtwith, unchanged. Only the path lookups moved into config.py: every episode is readfrom the one user-supplied DROID root, and the extracted frames from the one workdirectory, so no per-episode root table is needed."""import json, os
import h5py, numpy as npfrom scipy.spatial.transform import Rotation
import config
VIEWS = ["ext1L", "ext1R", "ext2L", "ext2R"]FRAME_IDX = 0
def raw_root(ep): """Parent of the episode's own DROID directory.""" return config.droid_root()
def batch_root(ep): """Parent of the episode's extracted frames.""" return config.frames_root()
def _c2w(v6): M = np.eye(4) M[:3, :3] = Rotation.from_euler("xyz", v6[3:]).as_matrix() M[:3, 3] = v6[:3] return M
def load_orig(ep): """DROID original: (metadata, (4,4,4) c2w stack in VIEWS order).""" raw = raw_root(ep) import glob metas = glob.glob(f"{raw}/{ep}/metadata_*.json") if not metas: raise config.MissingInput( f"\nno metadata_*.json under {raw}/{ep}\n" f" --droid-root must contain one directory per episode, named as in\n" f" {config.EPISODES_TXT}\n") m = json.load(open(metas[0])) key = {"ext1L": f"{m['ext1_cam_serial']}_left", "ext1R": f"{m['ext1_cam_serial']}_right", "ext2L": f"{m['ext2_cam_serial']}_left", "ext2R": f"{m['ext2_cam_serial']}_right"} with h5py.File(f"{raw}/{ep}/trajectory.h5", "r") as f: ex = f["observation/camera_extrinsics"] g6 = {k: np.array(ex[v][FRAME_IDX], dtype=np.float64) for k, v in key.items()} return m, np.stack([_c2w(g6[v]) for v in VIEWS])
def pw_path(m): return os.path.join(config.pointworld_dir(), f"{m['uuid']}_cameras.json")
def has_pw(m): return os.path.exists(pw_path(m))
def load_pw(ep): """PointWorld-refined c2w stack in VIEWS order, right eye chained from DROID.""" m, orig = load_orig(ep) p = pw_path(m) if not os.path.exists(p): raise config.MissingInput( f"\nno PointWorld cameras for {ep} (uuid {m['uuid']})\n" f" expected {p}\n") d = json.load(open(p)) if not d.get("optimization_success", False): raise ValueError(f"{ep}: optimization_success is False") out = [] for i, v in enumerate(VIEWS): ser = m["ext1_cam_serial"] if v.startswith("ext1") else m["ext2_cam_serial"] w2c = np.array(d[ser]["optimized_extrinsics"], dtype=np.float64) L_new = np.linalg.inv(w2c) # -> camera-to-world, left eye if v.endswith("L"): out.append(L_new) else: rel = np.linalg.inv(orig[i - 1]) @ orig[i] # left->right rigid offset, DROID's out.append(L_new @ rel) return m, np.stack(out)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596"""The candidate query-point families, and nothing else.
Kept separate from the runners so that the stereo *control* and the threereconstruction runs consume literally the same point sets. Each family carries thetwo things the coordinator asked to be stated explicitly:
* `gt` -- how the ground-truth 3-D coordinate is obtained * `indep`-- why that coordinate does not depend on the camera calibration
A family is *admissible* only if a zero-prior classical stereo depth map scores adepth ratio near 1.0 on it. That verdict is produced by the `gate` stage, which runsexactly that classical control; this module only builds the points."""import numpy as npfrom scipy.spatial.transform import Rotation
import probe_lib as PL
# Ladder along the *tool* z axis at t_close, in metres below the flange.# The previous diagnostic swept world -z; that is only the same thing for a perfectly# top-down grasp, and the tool axis is a median 10.3 deg (max 48.8 deg) off world -z.TOOL_LADDER = [0.0, 0.05, 0.1034, 0.13, 0.15, 0.18, 0.21]TABLE_LADDER = [0.0, 0.02, 0.04, 0.06]N_ARM = 1200ARM_LINKS = ["panda_link0", "panda_link1", "panda_link2", "panda_link3", "panda_link4", "panda_link5", "panda_link6", "panda_link7", "panda_hand"]FINGER_LINKS = ["panda_leftfinger", "panda_rightfinger"]
def flange_pose(cart6): M = np.eye(4) M[:3, :3] = Rotation.from_euler("xyz", cart6[3:]).as_matrix() M[:3, 3] = cart6[:3] return M
def build(q0, cart_t0, cart_tclose, finger_m=0.0, seed=0): """All candidate families for one episode.
q0 : joint_positions at frame 0 (the frame every model actually sees) cart_t0 : cartesian_position at frame 0 cart_tclose : cartesian_position at t_close
Returns (points, meta) where `points` is {name: (3,)} ready for `depth_probe`, and `meta` maps each name to its family and, for the arm families, its link. """ pts, meta = {}, {}
def add(name, p, family, **kw): pts[name] = np.asarray(p, dtype=np.float64) meta[name] = dict(family=family, **kw)
F0 = flange_pose(cart_t0) Fc = flange_pose(cart_tclose) zc = Fc[:3, 2] # tool axis at t_close
# ---- family 1: robot surface at frame 0 ------------------------------------- # gt : joint encoders -> URDF forward kinematics -> manufacturer CAD surface. # fk() reproduces DROID's own cartesian_position to 0.0 m, so the URDF and # DROID agree on the base frame exactly. # indep : encoders and CAD; no camera enters. P, links = PL.sample_link_surface(q0, n_total=N_ARM, seed=seed, links=ARM_LINKS) for i, (p, lk) in enumerate(zip(P, links)): add(f"arm_{i:04d}", p, "arm_surface_t0", link=str(lk)) Pf, lf = PL.sample_link_surface(q0, n_total=200, seed=seed + 1, links=FINGER_LINKS) for i, (p, lk) in enumerate(zip(Pf, lf)): add(f"fing_{i:04d}", p, "finger_surface_t0", link=str(lk))
# ---- family 2: the original, invalid point (kept as the reference line) ------- add("flange_at_close", Fc[:3, 3], "flange_at_close")
# ---- family 3: tool-axis ladder below the flange at t_close ------------------ # gt : flange pose (encoders) + a rigid offset along the measured tool axis. # indep : same as above. Where the ratio crosses 1.0 IS the flange-to-visible- # surface distance, measured rather than assumed. for d in TOOL_LADDER: add(f"tool_d{int(round(d*1000)):03d}mm", Fc[:3, 3] + d * zc, "tool_ladder", d_m=d)
# ---- family 4: frame-0 flange and TCP (continuity with the old probe) -------- add("flange_at_t0", F0[:3, 3], "flange_at_t0") add("tcp_at_t0", F0[:3, 3] + PL.TCP_OFFSET_M * F0[:3, 2], "tcp_at_t0")
# ---- family 5: table directly under the grasp, at several assumed heights ---- # gt : (gx, gy) from encoders, z from an ASSUMED table height. # indep : xy is encoder-only; the z assumption is what the ladder tests. g = Fc[:3, 3] for z in TABLE_LADDER: add(f"table_z{int(round(z*1000)):03d}mm", [g[0], g[1], z], "table_under_gripper", z_m=z) return pts, meta
def families(meta): out = {} for name, m in meta.items(): out.setdefault(m["family"], []).append(name) return out123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117"""The released reconstruction: the FOUR-view pass, all exterior views as context.
This is the object the bundle ships. Under the release condition it writes`gaussians.ply`, and for every condition the rendered metric depth and coverage.A clean-room rebuild of this pass reproduces the shipped ply byte for byte.
Distinct from `photometric_eval.py`, which holds ext2R out; the geometric numberscome from this pass, the photometric ones from that one. The shared machinery livesthere and is imported here.
This is the pass that produced the released bundle. Under the release condition itserialises the Gaussians to `gaussians.ply` and the render to `depth_<tag>.npz`;those two are what `scenes/<episode>/gaussians.ply` and `scenes/<episode>/depth.npz`hold.
The held-out run reconstructs from 3 views (ext2R is the target), but the densestereo comparison can only score LEFT views, so it needs a reconstruction in whichext1L is an input. This is that second pass: all four external views as context,depth + alpha dumped for every view, in metres, in each view's own camera frame.
Metric chain: s_m = s_norm / s_fit, depth_m = rendered_depth * s_mInference only. Writes only under the work directory."""import json, os, sys, time, traceback
import numpy as np, torch
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import configfrom pw_extrinsics import VIEWS, load_orig, load_pwfrom photometric_eval import (EPISODES, CONDITIONS, episode_cameras, fit_scale, load_images, normalise, predict, psnr)
from zipsplat import ZipSplat, Camera, Posefrom zipsplat.utils import to_square
RES = 252
def render_depth(g, cam_res, Ms): poses = Pose.from_4x4mat(torch.from_numpy(np.asarray(Ms)).float()) out, info = g.render(Camera(cam_res.clone()), poses, mode="RGB+ED") return (out[:, 3].float().cpu().numpy(), info["alphas"].float().cpu().numpy()[:, 0], out[:, :3].clamp(0, 1).float().cpu().numpy())
def run_episode(model, ep, epdir): m, orig = load_orig(ep) _, pw = load_pw(ep) imgs = load_images(ep) cam_full, cam_res = episode_cameras(m) ctx_np = to_square(torch.stack([imgs[v] for v in VIEWS])).cpu().numpy() rec = {} for tag, (src, use_priors) in CONDITIONS.items(): ext = orig if src == "orig" else pw Er, ref, s_norm = normalise(ext) g = predict(model, imgs, VIEWS, cam_full, Er, use_priors) s_fit = 1.0 if use_priors else fit_scale(g, cam_res, Er, ctx_np)[0] Em = Er.copy(); Em[:, :3, 3] *= s_fit s_m = s_norm / max(s_fit, 1e-9) d, a, rgb = render_depth(g, cam_res, Em) np.savez_compressed(f"{epdir}/depth_{tag}.npz", depth_m=(d * s_m).astype(np.float32), alpha=a.astype(np.float32), cams=np.asarray(ext, dtype=np.float64), s_m=np.float64(s_m)) if tag == config.RELEASE_CONDITION: # The released cloud, serialised by the upstream writer. Read-only with # respect to `g`: nothing above or below this line sees a different value. g.save_ply(f"{epdir}/gaussians.ply") rec[tag] = {"s_norm_m": s_norm, "s_fit": s_fit, "s_m": s_m, "psnr_context": {v: psnr(rgb[i], ctx_np[i]) for i, v in enumerate(VIEWS)}, "n_gaussians": int(g.num_gaussians)} del g torch.cuda.empty_cache() return {"episode": ep, "uuid": m["uuid"], "conditions": rec}
def main(): OUT = config.four_view_dir() ckpt = config.checkpoint() selected = config.episodes() os.makedirs(OUT, exist_ok=True) mpath = f"{OUT}/manifest.json" manifest = json.load(open(mpath)) if os.path.exists(mpath) else [] done = {e["episode"] for e in manifest if all(os.path.exists(f"{OUT}/{e['episode']}/depth_{t}.npz") for t in CONDITIONS) and os.path.exists(f"{OUT}/{e['episode']}/gaussians.ply")} todo = [e for e in selected if e not in done] print(f"[{time.strftime('%H:%M:%S')}] {len(done)} done, {len(todo)} to run", flush=True) if not todo: print("ALL DONE", flush=True) return print(f"[{time.strftime('%H:%M:%S')}] loading {ckpt}", flush=True) model = ZipSplat(weights=ckpt).cuda().eval() for ep in selected: if ep in done: continue try: t0 = time.time() epdir = f"{OUT}/{ep}" os.makedirs(epdir, exist_ok=True) entry = run_episode(model, ep, epdir) manifest = [x for x in manifest if x["episode"] != ep] + [entry] manifest.sort(key=lambda x: EPISODES.index(x["episode"])) json.dump(manifest, open(mpath, "w"), indent=2) print(f"[{time.strftime('%H:%M:%S')}] {ep} done in {time.time()-t0:.0f}s", flush=True) except Exception: print(f"FAILED {ep}:\n{traceback.format_exc()}", flush=True) json.dump(manifest, open(mpath, "w"), indent=2) json.dump(manifest, open(mpath, "w"), indent=2) print("ALL DONE", flush=True)
if __name__ == "__main__": config.parse_known() main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601"""Driver for the two measurements that stand beside the reconstructions.
python pipeline/run_diagnostics.py <stage> [<stage> ...] [paths] [--episodes ...]
Stages, in order:
extract t=0 frames of the CANDIDATE pool -> <work>/frames/<episode>/images/ gate calibration-gate verdicts -> <work>/gate/verdicts.json measure geometry table from the rendered depths -> <work>/measure/<episode>/ check both against what the bundle ships -> <work>/diagnostics_check.json all extract, gate, measure, check
NO STAGE HERE IS PART OF THE RECONSTRUCTION PATH, which is why they are here and not in`run_pipeline.py`.
`gate` is upstream SELECTION. It scores an episode's camera extrinsics against therobot's own joint encoders using classical stereo -- no learned model, no checkpoint --before anything is reconstructed, and it runs over the 225 candidates in`episodes_eligible.txt`, not the 114 released names in `episodes.txt`. The reconstructionpath does no filtering of its own: by the time it runs, the choice has been made.
THE GATE IS A RULE, NOT A REPLAY. Its criterion -- at least GATE_N stereo matches on thearm and a median depth ratio inside [GATE_LO, GATE_HI] -- is a property of an episode, andapplies to any DROID episode with a Franka arm and a stereo rig, not only to the ones thisrelease happened to consider. `episodes_eligible.txt` is therefore the DEFAULT pool, usedwhen `--episodes` is omitted, and `gate_expected.json` is the COMPARISON set: an episodeoutside it is scored normally and reported as having no reference verdict, which is not afailure. `--episodes` for `extract` and `gate` is validated against what exists under`--droid-root`, so screening your own episodes needs no edit to any shipped list.
`extract` is here for the same reason. The gate reads extracted frames, never the MP4s,and `run_pipeline.py extract` validates `--episodes` against the 114 released names -- soon its own it can never produce frames for anything else, and neither the 225 -> 114selection nor a run over new episodes would be possible from the bundle at all. Thisstage is the same extraction over whatever the gate is being asked to score: it calls`extract_frames.extract` with that list, writes to the same `<work>/frames/`, and is ano-op for episodes already extracted. It is part of `all` because `all` here means "thediagnostics end to end" and `gate` cannot run without it.
`measure` is downstream MEASUREMENT. It opens the depth maps`run_pipeline.py depth` already wrote and projects known 3-D arm points into them. Nomodel runs, so run `run_pipeline.py depth` first if you want it.
MEASURE IS SCOPED BY ARTIFACT, NOT BY LIST, the same way the gate is scoped by whatexists under `--droid-root`. Its precondition is that`<work>/four_view/<episode>/depth_<condition>.npz` is on disk; `episodes.txt` is only theDEFAULT used when `--episodes` is omitted, and `scenes/<episode>/measurements.json` is theCOMPARISON set, so an episode without one is measured and reported as having no reference.Be clear about the practical reach: `run_pipeline.py depth` is the only producer of thosenpz files and is itself scoped to `episodes.txt`, so the measurable set today is still thereleased 114. What the change buys is an honest precondition -- and, concretely, that`check` no longer rejects an episode list that was perfectly valid for the gate.
`--episodes` is validated against `--droid-root` for `extract` and `gate`, and against therendered depth maps for `measure`. `check` validates nothing: it compares whatever of thenamed episodes it finds output for, so one list can name gate and measure episodes at once."""import argparseimport jsonimport mathimport osimport sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import config
HERE = os.path.dirname(os.path.abspath(__file__))
# The wider candidate pool the calibration gate was run over, before the gate and the# reconstruction budget cut it down to the released episodes in config.EPISODES_TXT.EPISODES_ELIGIBLE_TXT = os.path.join(HERE, "episodes_eligible.txt")# The gate verdict every episode in that pool is expected to reproduce. Shipped so that# the gate can be checked without the raw episodes, and so that the 225 -> 114 selection# is readable from the bundle alone.GATE_EXPECTED_JSON = os.path.join(HERE, "gate_expected.json")
STAGES = ["extract", "gate", "measure", "check"]
# The gate is deterministic: CPU block matching plus seeded CAD sampling, no GPU# anywhere. Its stored `ratio` and `err_cm` carry ~6e-8 of relative round-off from# having been written through float32, so those two are compared with a relative# tolerance and the integer/boolean leaves are compared exactly.GATE_TOL_REL = 1e-6GATE_EXACT = ("n_matched", "frac_in_frame", "passed")GATE_APPROX = ("ratio", "err_cm")
# The geometry table is derived from rendered depth maps, so it inherits their slack and# must NOT be held to the gate's regime. `run_pipeline.py check` allows `depth_m` to move# by up to its VALUE_TOL_M (0.05 m) and still count as reproduced; a wobble inside that# budget can push a query point across the alpha threshold and change `n_matched`.# Requiring `n_matched` exactly would therefore fail on a machine that is not the# reference one, which is the outcome the value-based verdict exists to avoid. So# `n_matched` gets a band and the medians a relative tolerance. Both were measured, not# guessed:## * recomputing the table from the ORIGINAL rendered depth maps reproduced all 456# cells (114 episodes x 4 conditions) of measurements.json bit-for-bit, `n_matched`# included. The metric code contributes no error of its own.# * recomputing it from depth maps RE-RENDERED on the same machine moved one cell out# of 36: err_cm_median 122.63243623 -> 122.63152428, a relative 7.4e-06. `n_matched`,# `ratio_median` and `coverage_matched` did not move at all.## GEOM_TOL_REL is set an order of magnitude above that worst observed deviation. It is# still far below anything physical: 1e-04 of the median cell is 7 micrometres, against a# measurement whose own floor is centimetres.GEOM_TOL_REL = 1e-4# Never exercised by the runs above -- every cell agreed exactly -- so this is headroom# for the threshold-crossing argument, not a fitted value. It is sized against the# signal it must not mask: on 108 of the 114 episodes the four conditions differ in# `n_matched` by more than 2 (median 64, max 1269), so a +/-2 band cannot blur the# between-condition comparison the table exists to make.GEOM_N_MATCHED_BAND = 2 # absolute, per condition
# -------------------------------------------------------------- episode tables_ALL_ELIGIBLE = None
def all_eligible_episodes(): """Every episode the calibration gate scores: the candidate pool, not the release.
The gate ran on this pool first; the released episodes are the subset that passed it and could then be reconstructed. Most names here have no `scenes/<episode>/` directory, which is why a gate run says nothing about the bundle contents on its own. """ global _ALL_ELIGIBLE if _ALL_ELIGIBLE is None: with open(EPISODES_ELIGIBLE_TXT) as f: _ALL_ELIGIBLE = f.read().split() return list(_ALL_ELIGIBLE)
def _ordered(sub, table): """`sub` deduplicated, or all of `table` when nothing was asked for.
Names that are in `table` come first, in `table`'s order, so a subset of a default pool runs in exactly the order it always did; anything else follows in the order it was given. Neither list is treated as a membership test -- that job belongs to the callers, which check the real precondition instead. """ if not sub: return list(table) seen, named = set(), [] for e in sub: if e not in seen: seen.add(e) named.append(e) order = {e: i for i, e in enumerate(table)} return (sorted((e for e in named if e in order), key=order.__getitem__) + [e for e in named if e not in order])
def gate_episodes(args): """The episodes `extract` and `gate` cover. NOT restricted to any shipped list.
The gate scores a rule that any DROID episode either satisfies or does not, so the only real precondition is that the episode is on disk. `--episodes` is therefore checked against `--droid-root`; `episodes_eligible.txt` supplies the default when `--episodes` is omitted, which is what reproduces our own 225 -> 114 selection.
Names that are in the default pool keep the pool's order, so a subset of it runs in exactly the order it always did; anything else follows, in the order it was given. """ sub = args.episode_names if not sub: return list(all_eligible_episodes())
root = config.droid_root() named = _ordered(sub, []) absent = [e for e in named if not os.path.isdir(os.path.join(root, e))] if absent: raise config.MissingInput( f"\nno such episode directory under --droid-root ({root}):\n" + "".join(f" {os.path.join(root, e)}\n" for e in absent) + f" --droid-root holds one directory per DROID episode, each with its\n" f" metadata_*.json, trajectory.h5 and <serial>-stereo.mp4 recordings.\n" f" The gate accepts ANY such episode; {EPISODES_ELIGIBLE_TXT}\n" f" is only the default pool used when --episodes is omitted.\n")
return _ordered(named, all_eligible_episodes())
def check_episodes(args): """The episodes `check` looks for output from. Validated against NOTHING.
`check` reports on what it finds and stays quiet about what it does not, so one `--episodes` list can name gate episodes and measure episodes at the same time. That is the whole reason it validates nothing: the two stages have different preconditions, and a name that is legitimate for one must not make the other refuse to run. """ return _ordered(args.episode_names, config.all_episodes())
def measure_episodes(args): """The episodes `measure` covers: those whose rendered depth maps are on disk.
Scoped by ARTIFACT, not by list. `episodes.txt` is only the default when `--episodes` is omitted, so our own reproduction is unchanged; an explicit name is accepted when `<work>/four_view/<episode>/depth_<condition>.npz` is present for every condition, which is the file this stage actually opens.
The practical reach is narrow and worth stating plainly: `run_pipeline.py depth` is the only producer of those npz files and is itself scoped to `episodes.txt`, so the measurable set today is still the released 114. The change makes the restriction name the real precondition rather than a list, which is what lets `check` accept a mixed episode list. """ eps = check_episodes(args) if not args.episode_names: return eps
from arm_lib import CONDITIONS four = config.four_view_dir() absent = [(ep, t) for ep in eps for t in CONDITIONS if not os.path.isfile(os.path.join(four, ep, f"depth_{t}.npz"))] if absent: shown = "".join(f" {os.path.join(four, ep, f'depth_{t}.npz')}\n" for ep, t in absent[:12]) more = (f" ... and {len(absent) - 12} more\n" if len(absent) > 12 else "") raise config.MissingInput( f"\nno rendered depth for the episode(s) named with --episodes:\n" + shown + more + f" `measure` is scoped by these files, not by {config.EPISODES_TXT}:\n" f" it reads the four-view depth maps rather than rendering anything.\n" f" They are written by the reconstruction driver's depth stage:\n" f" python pipeline/run_pipeline.py depth --episodes <episode>\n" f" which accepts the released names only, so the measurable set is still\n" f" effectively that list. `check` needs no such episodes: it reports on\n" f" whatever output it finds and ignores the rest.\n") return eps
# ------------------------------------------------------------------ output dirsdef gate_dir(): """Calibration-gate verdicts, written by the gate stage.""" p = os.path.join(config.work_dir(), "gate") os.makedirs(p, exist_ok=True) return p
def measure_dir(): """Geometric measurements, written by the measure stage.""" p = os.path.join(config.work_dir(), "measure") os.makedirs(p, exist_ok=True) return p
def _rel(a, b): """Relative deviation, with both-null and both-NaN counted as agreement.""" if a is None and b is None: return 0.0 if a is None or b is None: return float("inf") a, b = float(a), float(b) if math.isnan(a) and math.isnan(b): return 0.0 return abs(a - b) / max(1e-12, abs(a))
def _scene_json(ep, name): p = os.path.join(config.scene_dir(ep), name) if not os.path.isfile(p): return None with open(p) as f: return json.load(f)
# ------------------------------------------------------------- the gate comparisondef _check_gate(): """Recomputed gate verdicts against the expectations shipped in gate_expected.json.
`gate_expected.json` carries all 225 candidate episodes, so this comparison covers whatever subset of them was actually run, and the pass counts it reports are readable with no raw data present at all. It is a comparison SET, not a permitted-input list: an episode scored outside it has no reference verdict, which is reported and is not a failure -- the gate rule is defined for any DROID episode. """ out = {"tolerance_rel": GATE_TOL_REL, "exact": list(GATE_EXACT), "within_tolerance": list(GATE_APPROX)} with open(GATE_EXPECTED_JSON) as f: exp = json.load(f)["verdicts"]
out["expected"] = { "n_episodes": len(exp), "pw_passed": sum(1 for v in exp.values() if v["pw"]["passed"]), "orig_passed": sum(1 for v in exp.values() if v["orig"]["passed"]), "pw_passed_equals_episodes_txt": sorted(e for e, v in exp.items() if v["pw"]["passed"]) == sorted(config.all_episodes()), }
path = os.path.join(config.work_dir(), "gate", "verdicts.json") if not os.path.isfile(path): out["status"] = "not run" out["hint"] = "run the gate stage to compare recomputed verdicts" return out with open(path) as f: got = json.load(f)
episodes, bad, worst = {}, [], 0.0 for ep, g in got.items(): if "error" in g: episodes[ep] = {"status": "error", "error": g["error"]} continue if ep not in exp: episodes[ep] = {"status": "no reference verdict", "orig_passed": g["orig"]["passed"], "pw_passed": g["pw"]["passed"]} continue r = {} for src in ("orig", "pw"): for k in GATE_EXACT: if exp[ep][src][k] != g[src][k]: bad.append((ep, src, k, exp[ep][src][k], g[src][k])) r[f"{src}.{k}"] = [exp[ep][src][k], g[src][k]] for k in GATE_APPROX: d = _rel(exp[ep][src][k], g[src][k]) worst = max(worst, d if d != float("inf") else worst) if d > GATE_TOL_REL: bad.append((ep, src, k, exp[ep][src][k], g[src][k])) r[f"{src}.{k}"] = [exp[ep][src][k], g[src][k], d] r["status"] = "differs" if r else "reproduced" episodes[ep] = r
def _n(*want): return sum(1 for v in episodes.values() if v.get("status") in want)
n_ok = _n("reproduced") out.update(status="compared", n_scored=len(episodes), n_compared=_n("reproduced", "differs"), n_reproduced=n_ok, n_no_reference=_n("no reference verdict"), n_errors=_n("error"), n_mismatched_leaves=len(bad), worst_relative_deviation=worst, recomputed_pw_passed=sum(1 for e, v in got.items() if "error" not in v and v["pw"]["passed"]), recomputed_orig_passed=sum(1 for e, v in got.items() if "error" not in v and v["orig"]["passed"]), episodes=episodes) return out
# --------------------------------------------------------- the geometry comparisondef _check_geometry(eps): """Recomputed geometry table against `scenes/<episode>/measurements.json`.
`measurements.json` is a COMPARISON set, not a permitted-input list: an episode that was measured but has none -- anything outside the release -- is reported with the table it produced and counted separately, and it is not a failure. An episode with no `geometry.json` at all was simply never measured; it is counted and otherwise passed over, because there is nothing to say about it.
Compared against measurements.json rather than metrics.json on purpose: the same quantity appears in both, and metrics.json carries the float32 form of it, e.g. err_cm_median 10.014851570129395 there against 10.014851419964183 here. The verdict is reported per condition, never collapsed, because the four conditions are the comparison the table exists to make. """ out = {"tolerance_rel": GEOM_TOL_REL, "n_matched_band": GEOM_N_MATCHED_BAND, "compared_against": "scenes/<episode>/measurements.json", "conditions": {}} root = os.path.join(config.work_dir(), "measure") episodes = {} per_cond = {} n_not_measured = 0
CELL = ("n_matched", "coverage_matched", "err_cm_median", "ratio_median") for ep in eps: path = os.path.join(root, ep, "geometry.json") if not os.path.isfile(path): n_not_measured += 1 continue with open(path) as f: got = json.load(f)["geometry_arm_surface"]["per_condition"] ref = _scene_json(ep, "measurements.json") if ref is None: episodes[ep] = { "status": "no reference measurements", "measured": {c: {k: got[c].get(k) for k in CELL} for c in sorted(got)}} continue ref = ref["geometry_arm_surface"]["per_condition"] r = {} for cond in sorted(got): if cond not in ref: r[cond] = {"status": "not in measurements.json"} continue a, b = ref[cond], got[cond] cell = {} dn = abs(int(a["n_matched"]) - int(b["n_matched"])) cell["n_matched"] = [a["n_matched"], b["n_matched"], dn] ok = dn <= GEOM_N_MATCHED_BAND for k in ("coverage_matched", "err_cm_median", "ratio_median"): d = _rel(a.get(k), b.get(k)) cell[k] = [a.get(k), b.get(k), d] ok = ok and d <= GEOM_TOL_REL if a["n_rows"] != b["n_rows"]: cell["n_rows"] = [a["n_rows"], b["n_rows"]] ok = False cell["status"] = "reproduced" if ok else "differs" r[cond] = cell s_ = per_cond.setdefault(cond, {"n": 0, "reproduced": 0, "worst_rel": 0.0, "worst_n_matched": 0}) s_["n"] += 1 s_["reproduced"] += int(ok) s_["worst_n_matched"] = max(s_["worst_n_matched"], dn) for k in ("coverage_matched", "err_cm_median", "ratio_median"): if cell[k][2] != float("inf"): s_["worst_rel"] = max(s_["worst_rel"], cell[k][2]) episodes[ep] = r
def _n(*want): return sum(1 for v in episodes.values() if v.get("status") in want)
out["conditions"] = per_cond out["episodes"] = episodes out["n_scored"] = len(episodes) out["n_compared"] = sum(1 for v in episodes.values() if "status" not in v) out["n_no_reference"] = _n("no reference measurements") out["n_not_measured"] = n_not_measured out["status"] = "compared" if episodes else "not run" if not episodes: out["hint"] = "run the measure stage to compare the geometry table" return out
def stage_check(args): gate = _check_gate() # `check_episodes`, not `measure_episodes`: `check` reports on the output it finds and # imposes no precondition of its own, so one --episodes list may name gate episodes # and measure episodes together. geom = _check_geometry(check_episodes(args))
path = os.path.join(config.work_dir(), "diagnostics_check.json") with open(path, "w") as f: json.dump({"gate_tolerance_rel": GATE_TOL_REL, "geometry_tolerance_rel": GEOM_TOL_REL, "geometry_n_matched_band": GEOM_N_MATCHED_BAND, "gate": gate, "geometry": geom}, f, indent=1)
e = gate["expected"] print(f"\ngate expectations shipped for {e['n_episodes']} candidate episodes: " f"{e['pw_passed']} pass under pw, {e['orig_passed']} under orig") print(f" the pw-passing names are exactly episodes.txt: " f"{e['pw_passed_equals_episodes_txt']}") gate_ok = True if gate["status"] == "compared": print(f" scored {gate['n_scored']} episodes: {gate['n_compared']} had a reference " f"verdict, of which {gate['n_reproduced']} reproduced " f"({gate['n_mismatched_leaves']} mismatched leaves)") if gate["n_no_reference"]: print(f" {gate['n_no_reference']} scored with NO reference verdict: not in " f"gate_expected.json, so there is nothing to compare them against.\n" f" That is not a failure -- the gate rule is defined for any DROID " f"episode, and\n the shipped expectations cover our own candidate pool " f"only.") if gate["n_errors"]: print(f" {gate['n_errors']} could not be scored at all; see their error field") print(f" {GATE_EXACT} compared exactly; {GATE_APPROX} within rtol " f"{GATE_TOL_REL:g}; worst deviation {gate['worst_relative_deviation']:.2e}") gate_ok = gate["n_mismatched_leaves"] == 0 for ep, v in gate["episodes"].items(): if v.get("status") != "reproduced": print(f" {ep}: {v}") else: print(f" {gate['status']} -- {gate.get('hint', '')}")
geom_ok = True if geom["status"] == "compared": print("\ngeometry, per condition " f"(n_matched band +/-{GEOM_N_MATCHED_BAND}, medians rtol {GEOM_TOL_REL:g}):") print(f" {geom['n_scored']} episodes measured: {geom['n_compared']} had " f"reference measurements") for cond in sorted(geom["conditions"]): c = geom["conditions"][cond] print(f" {cond:10s} {c['reproduced']}/{c['n']} reproduced " f"worst |dn_matched| = {c['worst_n_matched']} " f"worst rel = {c['worst_rel']:.2e}") geom_ok = geom_ok and c["reproduced"] == c["n"] if geom["n_no_reference"]: print(f" {geom['n_no_reference']} measured with NO reference: no " f"scenes/<episode>/measurements.json ships for them, so there is\n" f" nothing to compare against. Not a failure -- their table is in the " f"JSON under `measured`.") if geom["n_not_measured"]: print(f" {geom['n_not_measured']} of the episodes asked for have no " f"geometry.json yet; run the measure stage for them") else: print(f"\ngeometry: {geom['status']} -- {geom.get('hint', '')}")
print(f"wrote {path}") return gate_ok and geom_ok
# ------------------------------------------------------------------- the stagesdef stage_extract(args): """The frames the gate reads, for whatever episodes the gate is being asked to score.
`extract_frames.extract` already takes an explicit episode list; only its `main()` wrapper is bound to `config.episodes()`, which is the released 114. Calling the function directly is therefore the whole of this stage -- the extraction, the frame choice and the stereo split are the ones `run_pipeline.py extract` performs, byte for byte, and the frames land in the one `<work>/frames/` both drivers read. """ import extract_frames extract_frames.extract(config.droid_root(), config.frames_root(), gate_episodes(args))
def stage_gate(args): import calibration_gate calibration_gate.main(gate_episodes(args), os.path.join(gate_dir(), "verdicts.json"), EPISODES_ELIGIBLE_TXT)
def stage_measure(args): import geometry_probe geometry_probe.main(measure_episodes(args), measure_dir())
RUNNERS = {"extract": stage_extract, "gate": stage_gate, "measure": stage_measure, "check": stage_check}
# ------------------------------------------------------------------ command linedef parse_args(argv=None): """Parse the diagnostics command line and record the resolved paths.
`--episodes` deliberately lands in `episode_names`, not `episodes`: `config.configure` reads the release list with `getattr(args, "episodes", None)`, so leaving that attribute unset skips its validation and lets the two stages validate against the two different tables themselves. """ ap = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap.add_argument("stages", nargs="+", choices=STAGES + ["all"]) ap.add_argument("--work-dir", default=None, help=f"where this run writes (default <bundle>/work, env {config.ENV_WORK_DIR})") ap.add_argument("--droid-root", default=None, help=f"directory holding one <episode>/ per DROID episode (env {config.ENV_DROID_ROOT})") ap.add_argument("--pointworld-dir", default=None, help=f"directory of <uuid>_cameras.json files (env {config.ENV_POINTWORLD_DIR})") ap.add_argument("--episodes", nargs="+", default=None, dest="episode_names", metavar="EPISODE", help="run only these episode names (extract, gate: any episode " "under --droid-root, default episodes_eligible.txt; measure: " "any episode with rendered depth in <work>/four_view, default " "episodes.txt; check: no restriction)") args = ap.parse_args(argv) config.configure(args) return args
def describe(args, stages): """One block naming every resolved path, for the run log.""" def soft(fn): try: return fn() except SystemExit: return "(not supplied)" lines = [f" bundle root {config.BUNDLE_ROOT}", f" work directory {config.work_dir()}", f" DROID episodes {soft(config.droid_root)}", f" PointWorld {soft(config.pointworld_dir)}", f" full intrinsics {soft(config.droid_intrinsics_all)}"] if "extract" in stages or "gate" in stages: named = args.episode_names lines.append(f" gate episodes {len(set(named))} named on the command line" if named else f" gate episodes {len(all_eligible_episodes())} " f"(the default pool, episodes_eligible.txt)") if "measure" in stages or "check" in stages: # `check_episodes` imposes no precondition, so naming the paths never fails. lines.append(f" measure episodes {len(check_episodes(args))} named on the " f"command line" if args.episode_names else f" measure episodes {len(config.all_episodes())} " f"(the default, episodes.txt)") return "\n".join(lines)
def main(argv=None): args = parse_args(argv) stages = (list(STAGES) if "all" in args.stages else [s for s in STAGES if s in args.stages])
print("3DROID diagnostics") print(describe(args, stages)) print(f" stages {', '.join(stages)}\n")
ok = True for s in stages: print(f"=== {s} ===", flush=True) r = RUNNERS[s](args) if s == "check": ok = bool(r) return 0 if ok else 1
if __name__ == "__main__": raise SystemExit(main())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189"""Driver for the 3DROID reconstruction pipeline.
python pipeline/run_pipeline.py <stage> [<stage> ...] [paths] [--episodes ...]
Stages, in order:
extract MP4 -> <work>/frames/<episode>/images/<view>_0000.png reconstruct three-view held-out reconstruction -> <work>/three_view/ depth four-view reconstruction + depth -> <work>/four_view/ check rebuilt vs shipped, per episode -> <work>/check.json all extract, reconstruct, depth, check
`check` compares `<work>/four_view/<ep>/gaussians.ply` against`scenes/<ep>/gaussians.ply` byte for byte, and the rebuilt depth against`scenes/<ep>/depth.npz` element by element. Both are reported: a byte differencewith an all-zero depth difference is a serialisation or platform difference, not adifferent reconstruction."""import argparseimport hashlibimport jsonimport osimport sys
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import config
STAGES = ["extract", "reconstruct", "depth", "check"]
# ------------------------------------------------------------------- the checkdef _sha256(path): h = hashlib.sha256() with open(path, "rb") as f: for chunk in iter(lambda: f.read(1 << 20), b""): h.update(chunk) return h.hexdigest()
def _shipped_hashes(): """episode -> {filename: sha256} from the bundle manifest, when it is present.""" if not os.path.isfile(config.MANIFEST_JSON): return {} with open(config.MANIFEST_JSON) as f: man = json.load(f) return {s["episode"]: {k: v.get("sha256") for k, v in s.get("files", {}).items()} for s in man.get("scenes", [])}
def _compare_depth(rebuilt_npz, shipped_npz): import numpy as np a = np.load(rebuilt_npz) b = np.load(shipped_npz) out = {} for key in ("depth_m", "alpha", "cams"): if key in a.files and key in b.files: x, y = np.asarray(a[key], np.float64), np.asarray(b[key], np.float64) out[f"{key}_max_abs"] = (float(np.max(np.abs(x - y))) if x.shape == y.shape else None) if x.shape != y.shape: out[f"{key}_shape_mismatch"] = [list(x.shape), list(y.shape)] if "s_m" in a.files and "s_m" in b.files: out["s_m_rebuilt"] = float(a["s_m"]) out["s_m_shipped"] = float(b["s_m"]) out["s_m_exact"] = out["s_m_rebuilt"] == out["s_m_shipped"] return out
# The rasteriser accumulates with atomics, so identical Gaussians can still render a# marginally different depth map on different hardware. The verdict therefore rests on# the values; the ply hash is reported as a reference-machine diagnostic.VALUE_TOL_M = 0.05 # metres, well under the centimetre-scale stereo floorVALUE_TOL_ALPHA = 0.01
def stage_check(): four = config.four_view_dir() shipped_hash = _shipped_hashes() results, verdicts = {}, []
for ep in config.episodes(): r = {} rebuilt_ply = os.path.join(four, ep, "gaussians.ply") shipped_ply = os.path.join(config.scene_dir(ep), "gaussians.ply") rebuilt_npz = os.path.join(four, ep, f"depth_{config.RELEASE_CONDITION}.npz") shipped_npz = os.path.join(config.scene_dir(ep), "depth.npz")
if not os.path.exists(rebuilt_ply): r["status"] = "not rebuilt" r["hint"] = "run the depth stage for this episode first" elif not os.path.exists(shipped_ply): r["status"] = "not in this bundle" else: rb, sb = _sha256(rebuilt_ply), _sha256(shipped_ply) r["ply_bytes_rebuilt"] = os.path.getsize(rebuilt_ply) r["ply_bytes_shipped"] = os.path.getsize(shipped_ply) r["ply_sha256_rebuilt"] = rb r["ply_sha256_shipped"] = sb r["ply_identical"] = (rb == sb) expect = shipped_hash.get(ep, {}).get("gaussians.ply") if expect is not None: r["shipped_matches_manifest"] = (sb == expect) if os.path.exists(rebuilt_npz) and os.path.exists(shipped_npz): r["depth"] = _compare_depth(rebuilt_npz, shipped_npz) d = r.get("depth") if d is None: r["value_match"] = None r["status"] = "no depth to compare" else: r["value_match"] = bool( d.get("depth_m_max_abs", 1) <= VALUE_TOL_M and d.get("alpha_max_abs", 1) <= VALUE_TOL_ALPHA and d.get("cams_max_abs", 1) == 0.0 and d.get("s_m_exact") is True) r["status"] = "reproduced" if r["value_match"] else "differs" r["byte_match"] = r["ply_identical"] results[ep] = r verdicts.append(r["status"])
path = os.path.join(config.work_dir(), "check.json") with open(path, "w") as f: json.dump({"release_condition": config.RELEASE_CONDITION, "value_tolerance_m": VALUE_TOL_M, "value_tolerance_alpha": VALUE_TOL_ALPHA, "episodes": results}, f, indent=1)
n_ok = verdicts.count("reproduced") n_diff = verdicts.count("differs") n_byte = sum(1 for r in results.values() if r.get("byte_match")) print(f"\nchecked {len(verdicts)} episodes: {n_ok} reproduced, {n_diff} differing, " f"{len(verdicts) - n_ok - n_diff} not comparable") print(f" of those, {n_byte} are also byte-identical to the shipped ply " f"(a reference-machine diagnostic, not the pass criterion)") for ep, r in results.items(): if r["status"] == "differs": d = r.get("depth", {}) print(f" {ep}: depth max |diff| = {d.get('depth_m_max_abs')} m, " f"alpha max |diff| = {d.get('alpha_max_abs')}, " f"s_m exact = {d.get('s_m_exact')}") elif r["status"] not in ("reproduced",): print(f" {ep}: {r['status']}") print(f"wrote {path}") return n_diff == 0
# ------------------------------------------------------------------- the stagesdef stage_extract(): import extract_frames extract_frames.main()
def stage_reconstruct(): import photometric_eval photometric_eval.main()
def stage_depth(): import release_reconstruction release_reconstruction.main()
RUNNERS = {"extract": stage_extract, "reconstruct": stage_reconstruct, "depth": stage_depth, "check": stage_check}
def main(): ap = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) ap.add_argument("stages", nargs="+", choices=STAGES + ["all"]) config.add_arguments(ap) args = ap.parse_args() config.configure(args)
stages = STAGES if "all" in args.stages else [s for s in STAGES if s in args.stages] print("3DROID pipeline") print(config.describe()) print(f" stages {', '.join(stages)}\n")
ok = True for s in stages: print(f"=== {s} ===", flush=True) r = RUNNERS[s]() if s == "check": ok = bool(r) return 0 if ok else 1
if __name__ == "__main__": raise SystemExit(main())123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101"""Classical stereo depth from a DROID rig: the zero-prior instrument.
This is block matching and nothing else. No learned model, no checkpoint, no trainingand no reconstruction enter any function here -- which is the whole point of it. Thecalibration gate needs a depth estimate that is independent of everything the bundleships, so that a disagreement between the two can be attributed. OpenCV's semi-globalblock matcher, fed the raw left/right photographs and the rig's own focal length andbaseline, is that estimate.
`to_square_grid` puts the result on the same 252 x 252 square-crop grid the releasedreconstruction renders on, so a query point projects to the same pixel in both. Thegrid mapping is stated once, in `arm_lib.stereo_grid_K`, and the two must agree: thismodule crops columns [280, 1000) and resizes to 252, and that function scales themeasured intrinsics by exactly that geometry.
CPU only. Reads the extracted frames, writes nothing."""import osimport sys
import cv2import numpy as np
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))import config # noqa: E402
W, H, RES = 1280, 720, 252CROP_LEFT = (W - H) // 2 # square crop: x in [280, 1000)SCALE = H / RES # native px per 252-grid px (720/252 = 2.857)Z_MAX_M = 8.0 # disparities below fx*B/Z_MAX are treated invalidNOMINAL_B_M = 0.120 # ZED 2 nominal baseline
# ------------------------------------------------------------- disparity -> depthdef make_sgbm(num_disp=256, block=5): return cv2.StereoSGBM_create( minDisparity=0, numDisparities=num_disp, blockSize=block, P1=8 * 3 * block * block, P2=32 * 3 * block * block, disp12MaxDiff=1, uniquenessRatio=10, speckleWindowSize=200, speckleRange=2, preFilterCap=63, mode=cv2.STEREO_SGBM_MODE_SGBM_3WAY)
def read_frame(batch, ep, view): """One extracted frame, or a message naming the file and the stage that writes it.
`cv2.imread` returns None for a file that is not there, and a None only fails much later, inside the block matcher, as an assertion about a buffer size. The extracted frames are an input to this module like the DROID episodes are an input to the rest of the pipeline, so an absent one is reported the same way: `config.MissingInput`, naming the file and the stage that produces it. """ path = os.path.join(batch, ep, "images", f"{view}_0000.png") img = cv2.imread(path, cv2.IMREAD_COLOR) if img is None: raise config.MissingInput( f"\n3DROID pipeline: missing or unreadable extracted frame\n" f" {path}\n" f" written by the `extract` stage, which must run before `gate`:\n" f" python pipeline/run_diagnostics.py extract gate --episodes {ep}\n" f" run_diagnostics.py extracts the gate's candidate pool; run_pipeline.py\n" f" extracts the released episodes only. `extract` skips an episode whose\n" f" <serial>-stereo.mp4 recordings are not all present under --droid-root,\n" f" and says so; check its SKIP lines if the file is still absent.\n") return img
def stereo_depth(batch, ep, rig, fx, baseline_m, sgbm): """Metric depth (H, W) for the LEFT image of `rig`, plus a validity mask.
`batch` is the parent of the extracted frames -- the caller passes it in, so this function holds no episode table of its own. """ L = read_frame(batch, ep, rig + "L") R = read_frame(batch, ep, rig + "R") disp = sgbm.compute(L, R).astype(np.float32) / 16.0 d_min = fx * baseline_m / Z_MAX_M valid = disp > max(d_min, 0.5) Z = np.zeros_like(disp) Z[valid] = fx * baseline_m / disp[valid] return Z, valid, disp
def to_square_grid(Z, valid): """Map a native (720, 1280) map onto the 252x252 square-crop grid (nearest).""" Zc, vc = Z[:, CROP_LEFT:CROP_LEFT + H], valid[:, CROP_LEFT:CROP_LEFT + H] Zs = cv2.resize(Zc, (RES, RES), interpolation=cv2.INTER_NEAREST) vs = cv2.resize(vc.astype(np.uint8), (RES, RES), interpolation=cv2.INTER_NEAREST) return Zs, vs.astype(np.float32)
def backproject(Z, valid, K, c2w, stride=1): """Valid pixels -> 3-D points in the robot base frame. K = (fx, fy, cx, cy).""" fx, fy, cx, cy = K h, w = Z.shape ys, xs = np.mgrid[0:h:stride, 0:w:stride] m = valid[::stride, ::stride] > 0.5 z = Z[::stride, ::stride][m].astype(np.float64) x = (xs[m] + 0.5 - cx) / fx * z y = (ys[m] + 0.5 - cy) / fy * z P = np.stack([x, y, z], 1) return (c2w[:3, :3] @ P.T).T + c2w[:3, 3]1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900{ "episodes": { "AUTOLab__Fri_Jul__7_09-43-39_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999685059208868, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8196378601409963, "s_m_pub": 0.8196378601409963, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "AUTOLab__Mon_Aug_21_13-27-50_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.228471318204024, "s_m_pub": 1.228471318204024, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "AUTOLab__Sat_Oct_14_18-59-38_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0530376181166923, "s_m_pub": 1.0530376181166923, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "AUTOLab__Sat_Oct__7_17-34-45_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.242177075336721, "s_m_pub": 1.242177075336721, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "AUTOLab__Sun_Oct_15_17-50-57_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.864610946272618, "s_m_pub": 0.864610946272618, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "AUTOLab__Tue_Sep__5_08-50-21_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1943950282795361, "s_m_pub": 1.1943950282795361, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "CLVR__Sun_Jun__4_15-03-02_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9996575018896448, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0407348581762819, "s_m_pub": 1.0407348581762819, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "CLVR__Sun_May_21_19-26-15_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9071769677930988, "s_m_pub": 0.9071769677930988, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "CLVR__Tue_Jun__6_00-07-47_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.99986221340388, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8450281483989256, "s_m_pub": 0.8450281483989256, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "GuptaLab__Sun_Apr_30_12-39-17_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.5530613688056385, "s_m_pub": 1.5530613688056385, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "GuptaLab__Sun_Jun_18_16-40-11_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2002491574519083, "s_m_pub": 1.2002491574519083, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "GuptaLab__Sun_May_28_15-33-36_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999685059208868, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1951806477986648, "s_m_pub": 1.1951806477986648, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "GuptaLab__Thu_Apr_20_12-41-59_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.6405091588772995, "s_m_pub": 1.6405091588772995, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "ILIAD__Fri_Jul_28_10-21-54_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9926960536359157, "s_m_pub": 0.9926960536359157, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "ILIAD__Mon_Jun_12_18-34-18_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0263034455549371, "s_m_pub": 1.0263034455549371, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "ILIAD__Sun_May_28_22-06-23_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999842529604435, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1174029817053526, "s_m_pub": 1.1174029817053526, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "ILIAD__Thu_Jul_20_10-23-44_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.5835599213996807, "s_m_pub": 1.5835599213996807, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "ILIAD__Tue_May_23_19-07-50_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9559760890067412, "s_m_pub": 0.9559760890067412, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "ILIAD__Wed_Jul_19_11-35-04_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.4014518504747444, "s_m_pub": 1.4014518504747444, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Fri_Aug_25_14-06-36_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9383683973176442, "s_m_pub": 0.9383683973176442, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Fri_Jun_30_17-15-06_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1978082284323375, "s_m_pub": 1.1978082284323375, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Fri_May_12_15-28-06_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0969385165050167, "s_m_pub": 1.0969385165050167, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Fri_May__5_15-56-56_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0528039230151305, "s_m_pub": 1.0528039230151305, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Fri_Oct_13_13-36-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999645691609977, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.7673416039357265, "s_m_pub": 0.7673416039357265, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Fri_Sep_22_17-39-39_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1213364987478598, "s_m_pub": 1.1213364987478598, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Mon_Apr_24_16-33-21_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999291383219955, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.130637473498537, "s_m_pub": 1.130637473498537, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Mon_Aug_21_12-14-36_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.312190225317978, "s_m_pub": 1.312190225317978, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sat_Jul__1_09-34-03_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2270396237736267, "s_m_pub": 1.2270396237736267, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sat_May_13_09-38-55_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999960632401108, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0861169524771002, "s_m_pub": 1.0861169524771002, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sat_Oct_14_01-37-50_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999960632401108, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.7747436640570935, "s_m_pub": 0.7747436640570935, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sat_Oct_21_14-27-43_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.999972442680776, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.7815024231240786, "s_m_pub": 0.7815024231240786, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sat_Oct__7_15-53-18_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0364166018318919, "s_m_pub": 1.0364166018318919, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sat_Sep_23_02-45-53_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1264198537381873, "s_m_pub": 1.1264198537381873, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sun_Apr_23_10-55-20_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9994055492567397, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1244537892321178, "s_m_pub": 1.1244537892321178, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sun_Apr_30_18-17-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.073945555738962, "s_m_pub": 1.073945555738962, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sun_Oct_15_01-31-32_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9997086797682035, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.7758200965479735, "s_m_pub": 0.7758200965479735, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Sun_Oct_22_00-54-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.999972442680776, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9261159072028237, "s_m_pub": 0.9261159072028237, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Thu_Aug_24_12-31-44_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0500751334991016, "s_m_pub": 1.0500751334991016, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Tue_Aug_22_12-36-24_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.93166671927761, "s_m_pub": 0.93166671927761, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Tue_Oct_17_21-14-05_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9979725686570925, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.7644804501331606, "s_m_pub": 0.7644804501331606, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Tue_Oct_24_15-07-14_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8955221913196931, "s_m_pub": 0.8955221913196931, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Wed_Apr_19_17-36-20_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999881897203325, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0435784256201708, "s_m_pub": 1.0435784256201708, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Wed_Aug_23_11-53-26_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999803162005543, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0410046770481483, "s_m_pub": 1.0410046770481483, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Wed_Oct_11_01-24-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9730753102969513, "s_m_pub": 0.9730753102969513, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IPRL__Wed_Oct_18_23-32-56_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.7882085390586917, "s_m_pub": 0.7882085390586917, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Fri_Apr__7_13-26-32_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0891647742496937, "s_m_pub": 1.0891647742496937, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Fri_Jun__2_10-46-36_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.450756026925431, "s_m_pub": 1.450756026925431, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Fri_May_19_10-25-10_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.3962161845361183, "s_m_pub": 1.3962161845361183, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Mon_Apr_17_15-39-00_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999960632401108, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.894949693846691, "s_m_pub": 0.894949693846691, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Mon_Jul_17_10-47-47_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9357688171208102, "s_m_pub": 0.9357688171208102, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Mon_Jun__5_14-39-50_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.6223147088112797, "s_m_pub": 1.6223147088112797, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Mon_May_15_15-23-36_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2019773052037968, "s_m_pub": 1.2019773052037968, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Mon_May_22_15-02-46_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999685059208868, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.36177090222264, "s_m_pub": 1.36177090222264, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Sun_Jul_16_15-34-22_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0398687752378817, "s_m_pub": 1.0398687752378817, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_Apr_13_15-03-37_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9164099232127426, "s_m_pub": 0.9164099232127426, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_Apr_20_13-18-51_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999881897203325, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.3880024637181845, "s_m_pub": 1.3880024637181845, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_Apr_27_14-14-13_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999252015621063, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9665352441086724, "s_m_pub": 0.9665352441086724, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_Jun__8_14-14-24_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.5450377074481974, "s_m_pub": 1.5450377074481974, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_Mar__2_14_57_40_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.4086705164396451, "s_m_pub": 1.4086705164396451, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_May_18_13-45-46_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1532050977139592, "s_m_pub": 1.1532050977139592, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Thu_May_25_13-35-00_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.4759014743957573, "s_m_pub": 1.4759014743957573, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Tue_Jul_11_11-46-06_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.056753499291391, "s_m_pub": 1.056753499291391, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Tue_Jul__4_16-38-58_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.4431008048350946, "s_m_pub": 1.4431008048350946, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Tue_Jun_13_10-56-59_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9998189090450995, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.121645437940346, "s_m_pub": 1.121645437940346, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Tue_May_23_10-58-26_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0810825694056998, "s_m_pub": 1.0810825694056998, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Tue_May__2_12-11-42_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0862821331579946, "s_m_pub": 1.0862821331579946, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_Apr_26_09-27-12_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9570983749940346, "s_m_pub": 0.9570983749940346, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_Jul__5_01-07-36_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0017833357892252, "s_m_pub": 1.0017833357892252, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_Jun__7_09-41-51_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999842529604435, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.266054472074065, "s_m_pub": 1.266054472074065, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_Mar__8_13_18_53_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1133302429466763, "s_m_pub": 1.1133302429466763, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_May_17_09-31-48_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2010187728314727, "s_m_pub": 1.2010187728314727, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_May_24_09-27-45_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2787926083755226, "s_m_pub": 1.2787926083755226, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "IRIS__Wed_May_31_09-35-08_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999881897203325, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.4668433813205701, "s_m_pub": 1.4668433813205701, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Fri_Jul_14_16-37-07_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0621765404837302, "s_m_pub": 1.0621765404837302, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Fri_Jun_30_15-39-41_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0014019614598837, "s_m_pub": 1.0014019614598837, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Fri_Oct__6_19-27-50_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9791917635961978, "s_m_pub": 0.9791917635961978, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Mon_Jul_10_20-33-09_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.98549109634187, "s_m_pub": 0.98549109634187, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Mon_Oct__9_20-55-26_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9320158778915246, "s_m_pub": 0.9320158778915246, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Sat_Jul_15_22-43-30_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999094545225498, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9938274489369744, "s_m_pub": 0.9938274489369744, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Sun_Oct__1_16-55-32_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8132415741866654, "s_m_pub": 0.8132415741866654, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Thu_Apr_27_22-24-23_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999566956412195, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8270645043976235, "s_m_pub": 0.8270645043976235, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Tue_Oct_24_16-27-30_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9011332806982327, "s_m_pub": 0.9011332806982327, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Wed_Aug_16_17-13-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9551975658005551, "s_m_pub": 0.9551975658005551, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "PennPAL__Wed_Jul_19_15-53-56_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1971753573546975, "s_m_pub": 1.1971753573546975, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "RAD__Fri_Sep__1_10-43-47_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2750721224418093, "s_m_pub": 1.2750721224418093, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Fri_Jun__9_12-21-55_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9998228458049887, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2875878038252595, "s_m_pub": 1.2875878038252595, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Fri_May_19_11-45-49_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9996417548500882, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0167638483381263, "s_m_pub": 1.0167638483381263, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Sat_Jul_15_11-41-25_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9348644392647351, "s_m_pub": 0.9348644392647351, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Sun_Aug_27_10-25-30_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1273856759337304, "s_m_pub": 1.1273856759337304, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Sun_May_28_15-16-08_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1900886689765706, "s_m_pub": 1.1900886689765706, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Thu_Jul_13_13-24-11_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9915719248898041, "s_m_pub": 0.9915719248898041, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Thu_Jul_20_13-10-12_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0303980975053464, "s_m_pub": 1.0303980975053464, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Thu_Jun__1_18-12-52_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.5637664812556646, "s_m_pub": 1.5637664812556646, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "REAL__Wed_May_31_09-42-48_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0771138091672923, "s_m_pub": 1.0771138091672923, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "RPL__Mon_Jun__5_16-00-47_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9995472726127488, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9314019881045053, "s_m_pub": 0.9314019881045053, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "RPL__Mon_May_29_15-38-14_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9995039682539683, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9344843919790201, "s_m_pub": 0.9344843919790201, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "RPL__Sun_Jun__4_12-20-40_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.0, "depth_max_abs_covered": null, "depth_median_abs_covered": null, "depth_rel_p999_covered": null, "depth_rel_median_covered": null, "n_gaussians": 41472, "s_m_new": 0.9379625506723553, "s_m_pub": 0.9379625506723553, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "RPL__Thu_May_25_10-40-29_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9341614846347732, "s_m_pub": 0.9341614846347732, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "RPL__Tue_May_30_15-49-08_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9304377903953499, "s_m_pub": 0.9304377903953499, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Mon_Oct_16_10-45-06_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.0, "depth_max_abs_covered": null, "depth_median_abs_covered": null, "depth_rel_p999_covered": null, "depth_rel_median_covered": null, "n_gaussians": 41472, "s_m_new": 0.9736121811331985, "s_m_pub": 0.9736121811331985, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Mon_Oct_23_10-18-39_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0653491051142385, "s_m_pub": 1.0653491051142385, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Mon_Oct_23_13-21-11_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.0, "depth_max_abs_covered": null, "depth_median_abs_covered": null, "depth_rel_p999_covered": null, "depth_rel_median_covered": null, "n_gaussians": 41472, "s_m_new": 1.0699299180653563, "s_m_pub": 1.0699299180653563, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Thu_Aug_10_08-59-39_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.0, "depth_max_abs_covered": null, "depth_median_abs_covered": null, "depth_rel_p999_covered": null, "depth_rel_median_covered": null, "n_gaussians": 41472, "s_m_new": 1.009585915452675, "s_m_pub": 1.009585915452675, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Thu_Oct_12_09-22-46_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.0551763671248322, "s_m_pub": 1.0551763671248322, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Thu_Oct_12_13-37-48_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.9021275741725978, "s_m_pub": 0.9021275741725978, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Thu_Oct_19_09-57-44_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2946537463259749, "s_m_pub": 1.2946537463259749, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Thu_Sep_21_09-26-47_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9998543398841018, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8807670336484995, "s_m_pub": 0.8807670336484995, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Tue_Oct_24_10-03-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.100168126191009, "s_m_pub": 1.100168126191009, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Tue_Oct_24_10-04-20_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9997795414462081, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2603538582786138, "s_m_pub": 1.2603538582786138, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Wed_Aug__9_08-48-15_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999763794406652, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1648669124492155, "s_m_pub": 1.1648669124492155, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Wed_Oct_18_10-27-33_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.2976433080279766, "s_m_pub": 1.2976433080279766, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Wed_Oct_18_15-39-19_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 0.8498826939657996, "s_m_pub": 0.8498826939657996, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "TRI__Wed_Oct_25_09-39-54_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.1422990838654972, "s_m_pub": 1.1422990838654972, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 }, "Tue_Aug__8_08-55-57_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999881897203325, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0, "n_gaussians": 41472, "s_m_new": 1.233978182454461, "s_m_pub": 1.233978182454461, "s_m_exact": true, "cams_max_abs": 0.0, "ply_bytes": 4313719 } }, "selfcheck": { "AUTOLab__Fri_Jul__7_09-43-39_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999685059208868, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 }, "AUTOLab__Sat_Oct__7_17-34-45_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 }, "IPRL__Fri_Oct_13_13-36-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9999645691609977, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 }, "IPRL__Wed_Oct_11_01-24-27_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 }, "IRIS__Tue_Jun_13_10-56-59_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 0.9998189090450995, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 }, "PennPAL__Wed_Jul_19_15-53-56_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 }, "TRI__Thu_Oct_12_09-22-46_2023": { "depth_max_abs": 0.0, "depth_frac_exact": 1.0, "alpha_max_abs": 0.0, "covered_frac": 1.0, "depth_max_abs_covered": 0.0, "depth_median_abs_covered": 0.0, "depth_rel_p999_covered": 0.0, "depth_rel_median_covered": 0.0 } }}1234567891011121314151617181920212223242526272829# The versions this release was produced with. On our reference machine -- a single# A100 80GB, CUDA 12.1 -- a clean environment built from this file rebuilds the shipped# gaussians.ply byte for byte. Byte identity is not guaranteed on other hardware: the# rasteriser accumulates with atomics. The pipeline's check stage therefore passes on# matching values (depth, alpha, cameras, s_m) and reports the hash as a diagnostic.## pip install torch==2.4.1 torchvision==0.19.1 --index-url https://download.pytorch.org/whl/cu121# pip install -r requirements.txt# pip install -e third_party/ZipSplat## numpy is held below 2 because third_party/ZipSplat requires it; opencv is pinned to a# 4.x release for the same reason, since opencv-python 5.x requires numpy >= 2.## evaluation/make_tables.py needs only numpy.# pipeline/ additionally needs the rest, plus the DROID source videos, the PointWorld# camera files, and the ZipSplat checkpoint -- all external, see pipeline/README.md.
torch==2.4.1torchvision==0.19.1numpy==1.26.4opencv-python==4.11.0.86scipy==1.15.3h5py==3.16.0plyfile==1.1.3einops==0.8.2jaxtyping==0.3.7pillow==12.3.0scikit-image==0.25.2imageio==2.37.4123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
Copyright 2026 ETH Zurich
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460<p align="center"> <h1 align="center">ZipSplat: Fewer Gaussians, Better Splats</h1> <p align="center"> <a href="https://veichta.com">Alexander Veicht</a> · <a href="https://sunghwanhong.github.io">Sunghwan Hong</a> · <a href="https://scholar.google.com/citations?user=U9-D8DYAAAAJ">Dániel Baráth</a> · <a href="https://people.inf.ethz.ch/marc.pollefeys/">Marc Pollefeys</a> <br> <sub>ETH Zürich · Microsoft</sub> </p> <h2 align="center"> <a href="https://arxiv.org/abs/2606.05102">Paper</a> | <a href="https://veichta.com/zipsplat">Project Page</a> </h2></p>
<p align="center"> <img src="assets/teaser.png" alt="ZipSplat teaser" width="100%"> <br> <em>ZipSplat decouples Gaussian placement from the pixel grid, reconstructing a scene from a few unposed images in under a second, with higher quality from far fewer Gaussians.</em></p>
---
ZipSplat is a feed-forward model for 3D Gaussian Splatting: it reconstructs a scene from a fewunposed images in a single forward pass, with no poses, intrinsics, or per-scene optimization.Instead of emitting one Gaussian per pixel, it compresses the input views into a compact set ofscene tokens and decodes each into a small group of Gaussians, reaching state-of-the-art qualitywith far fewer Gaussians and a single knob to trade quality for size. This repository hosts the[inference](#inference), [evaluation](#evaluation), and [training](#training) code for ZipSplat,together with our pretrained weights.
## Setup and demo
We provide a standalone inference package [`zipsplat`](zipsplat) that requires only minimaldependencies and Python >= 3.10. First clone the repository and install it:
```bashgit clone https://github.com/cvg/ZipSplat.git && cd ZipSplatpython -m pip install -e .# optional: xformers' fused SwiGLU kernel the released checkpoint was trained with (small speedup)python -m pip install -e ".[xformers]"```
Rendering uses [gsplat](https://github.com/nerfstudio-project/gsplat) and requires a CUDA GPU; thepretrained weights are downloaded automatically on first use.
The easiest way to try ZipSplat is the interactive viewer: reconstruct a scene and explore it livein your browser. Drag the **compression** slider to trade Gaussians for quality in real time, andtoggle **token coloring** to see how each token's group of Gaussians is placed:
```bashpip install "zipsplat[viewer]"python -m zipsplat.viewer assets/examples/drone.mp4 # or assets/examples/office/, or your own dir/glob/video```
## Inference
Here is a minimal usage example:
```pythonimport math, torchfrom zipsplat import ZipSplat, Camera, Pose, load_image, viz
model = ZipSplat(weights="zipsplat").cuda().eval()images = [load_image(p) for p in paths] # raw images, any size (auto-resized)gaussians = model(images)[0] # feed-forward 3D Gaussians
# render a novel viewcamera = Camera.from_fov(math.radians(60), w=512, h=512)pose = Pose.from_Rt(torch.eye(3), torch.zeros(3)) # identity posergb, info = gaussians.render(camera, pose)
# exportgaussians.save_ply("scene.ply") # open in any 3DGS viewerviz.turntable(gaussians, "turntable.mp4", sweep_deg=None) # wiggle orbit video```
`gaussians` is a [`Gaussians`](zipsplat/gaussians.py) object; `gaussians.save_ply(...)` writes a standard 3DGS `.ply` you candrop into [SuperSplat](https://playcanvas.com/supersplat/editor) or any Gaussian-splat viewer.
<details><summary><b>Input: images, a video, or a single image</b></summary>
```pythonfrom zipsplat import load_image, load_video
# multiple images (any sizes; center-cropped to square and resized internally)gaussians = model([load_image(p) for p in paths])[0]
# a single imagegaussians = model([load_image("photo.jpg")])[0]
# a video clip (evenly samples num_frames across the clip)gaussians = model(load_video("assets/examples/drone.mp4", num_frames=24))[0]```
The model handles 1-24+ views; more views give wider coverage, fewer give a tighter reconstruction.</details>
<details><summary><b>Compression: fewer Gaussians</b></summary>
`compression` is the query-sampling ratio in `(0, 1]`. `1.0` (default) uses every token; lower valuesrun k-means to keep a subset, shrinking the Gaussian count with graceful quality falloff.
```pythongaussians = model(images, compression=1.0) # full qualitygaussians = model(images, compression=0.25) # ~4x fewer Gaussiansprint(gaussians.num_gaussians)```</details>
<details><summary><b>Rendering</b></summary>
```python# a single view (scalar camera/pose) or a batch of views ([V])rgb, info = gaussians.render(camera, pose) # mode="RGB" by defaultrgbd, _ = gaussians.render(camera, pose, mode="RGB+ED") # append expected depth```
Cameras/poses are moved to the scene's device automatically. `info["alphas"]` holds the renderedopacity. Build cameras with `Camera.from_fov`, `Camera.from_focal`, or `Camera.from_K`.</details>
<details><summary><b>Turntable video</b></summary>
```pythonfrom zipsplat import viz
viz.turntable(gaussians, "orbit.mp4") # full 360-degree turntableviz.turntable(gaussians, "wiggle.mp4", sweep_deg=None) # gentle wiggle (best for front-facing scenes)```</details>
<details><summary><b>Camera priors (optional)</b></summary>
If you have calibrated cameras and poses, pass them with `use_priors=True` to inject them into thebackbone. Intrinsics are adjusted automatically for the internal resize.
```pythongaussians = model(images, cameras=cameras, poses=poses, use_priors=True)```</details>
## Models
| Name | Backbone | Train res | Notes || ---------- | --------- | --------- | ------------------------------------------ || `zipsplat` | DA3-Giant | 252 px | Default release checkpoint (RE10K + DL3DV) |
Weights are hosted on the [Hugging Face Hub](https://huggingface.co/veichta/zipsplat) and fetched onfirst use. You can also pass a local path or URL: `ZipSplat(weights="path/to/checkpoint.tar")`.
## Training and evaluation
The training and evaluation code lives in [`splatfactory`](splatfactory), a general library forfeed-forward Gaussian Splatting. It streams large multi-view datasets, composes models andlosses through Hydra configs, trains across multiple GPUs, and benchmarks novel-view synthesis on asuite of standard datasets. ZipSplat is the model we train with it; the recipes below reproduce thereleased checkpoint and the paper tables.
### Setup
`splatfactory` needs a CUDA toolchain to build two compiled extensions([gsplat](https://github.com/JoannaCCJH/gsplat) for rasterization and[fused-ssim](https://github.com/rahul-goel/fused-ssim) for the SSIM loss), so install in this order:
```bash# from the repo rootconda create -n splatfactory python=3.12 -y && conda activate splatfactoryconda install -c nvidia cuda-toolkit -y # provides nvcc for the kernels below
# 1) torch first (CUDA build), then the training package + its core depspip install torch torchvision --index-url https://download.pytorch.org/whl/cu128pip install -e splatfactory/
# 2) CUDA extensions need a built torch present, so disable build isolationpip install --no-build-isolation --use-pep517 \ git+https://github.com/JoannaCCJH/gsplat.git \ git+https://github.com/rahul-goel/fused-ssim/python -c "from gsplat.cuda._backend import _C" # sanity check
# optional: xformers' fused SwiGLU kernel the released checkpoint was trained withpip install -e "splatfactory/[xformers]"```
We use a [gsplat fork](https://github.com/JoannaCCJH/gsplat) rather than upstream because it exposesa per-Gaussian `activated` flag from the rasterizer. Training uses it to detach Gaussians that werealready rendered from the geometry (chamfer) loss, so that term only supervises the Gaussians theimages don't already constrain. Inference works with stock gsplat; this fork only matters fortraining.
<details><summary><b>Preparing the data</b></summary>
Every dataset is converted into a common format: uncompressed tar shards of scenes (images,cameras, poses, and optional depth) written under `data/<dataset>/<HxW>/{train,test}-scenes/`. Theshipped configs point `data.dataset_dir` at these paths, so the default commands below produceexactly what training and evaluation expect. Each dataset has a `download` step (fetch the raw data)and a `convert` step (pack it into shards); add `--num-workers N` to parallelize either. **Forevaluation you only need the test split**, so pass `--split test` to `convert` where available.
<details><summary><b>RE10K</b></summary>
A single archive (pixelSplat/MVSplat format) packed into shards at 360x640:
```bash# download -> data/re10k/raw/re10k.zippython -m splatfactory.datasets.scripts.re10k.download# convert -> data/re10k/360x640/{train,test}-scenespython -m splatfactory.datasets.scripts.re10k.convert --num-workers 8# evaluation only: just the test splitpython -m splatfactory.datasets.scripts.re10k.convert --split test```</details>
<details><summary><b>DL3DV</b></summary>
Gated on Hugging Face, so accept the dataset terms and run `huggingface-cli login` first. We use the960P release (540x960). Redistribution is not permitted; the script pulls directly from Hugging Faceper the DL3DV terms.
```bash# download -> data/dl3dv/raw/960P/<batch>/<hash>.zip (one zip per scene)python -m splatfactory.datasets.scripts.dl3dv.download --resolution 960P --num-workers 4# convert -> data/dl3dv/540x960/{train,test}-scenespython -m splatfactory.datasets.scripts.dl3dv.convert --resolution 960P --num-workers 8# evaluation only: just the test splitpython -m splatfactory.datasets.scripts.dl3dv.convert --resolution 960P --split test```</details>
<details><summary><b>MipNeRF360</b> (evaluation only)</summary>
A single ~3.6 GB archive, converted from COLMAP poses into one shard per scene at 822x1236 (the 7public scenes). The whole dataset is an evaluation set, so there is no train/test split to select.
```bash# download -> data/mipnerf360/raw/360_v2.zippython -m splatfactory.datasets.scripts.mipnerf360.download# convert -> data/mipnerf360/822x1236/test-scenespython -m splatfactory.datasets.scripts.mipnerf360.convert```</details>
Two optional post-processing tools operate on any shard directory:[`repack`](splatfactory/datasets/scripts/repack.py) re-buckets shards to a uniform size, and[`resize`](splatfactory/datasets/scripts/resize.py) writes a fixed-resolution copy (e.g. `--size252`) to a new directory.
**Depth.** Every dataset needs per-view depth maps, for both training and evaluation: training uses them forthe depth and chamfer loss, and the data pipeline uses them to normalize each scene's scale. Theshards from `convert` carry images and poses but no depth; add it in place withthe [`extract_depth`](splatfactory/datasets/scripts/extract_depth.py) script, which runs DA3 on eachscene (needs a GPU and the `depth-anything-3` package). Run it on every shard directory you train orevaluate on:
```bashpython -m splatfactory.datasets.scripts.extract_depth data/re10k/360x640/train-scenespython -m splatfactory.datasets.scripts.extract_depth data/re10k/360x640/test-scenespython -m splatfactory.datasets.scripts.extract_depth data/dl3dv/540x960/train-scenespython -m splatfactory.datasets.scripts.extract_depth data/dl3dv/540x960/test-scenespython -m splatfactory.datasets.scripts.extract_depth data/mipnerf360/822x1236/test-scenes```
It can be parallelized across GPUs with torchrun:`torchrun --nproc_per_node=4 -m splatfactory.datasets.scripts.extract_depth <shard-dir>`.
</details>
## Evaluation
With the data prepared, evaluate the **released model** with the `zipsplat_eval` config; its weightsare downloaded automatically, so no local checkpoint is needed:
```bashpython -m splatfactory.eval.run <benchmark> --conf zipsplat_eval eval.num_views=<N>```
Each benchmark renders held-out target views and reports PSNR, SSIM, and LPIPS, writing results to`outputs/results/`. `eval.num_views=N` sets how many context views the model sees, while the scenesand context/target views are fixed by the indices in `splatfactory/eval/indices/`, so runs areexactly reproducible. To score one of your own training runs instead, pass `--checkpoint <exp>` inplace of `--conf zipsplat_eval`. The per-benchmark commands below cover the protocols we report:
<details><summary><b>DL3DV</b> (6 / 12 / 24 context views)</summary>
Evaluate the released model (append `model.eval_use_priors=true` to feed ground-truth camera priors):
```bashpython -m splatfactory.eval.run dl3dv_benchmark --conf zipsplat_eval eval.num_views=6python -m splatfactory.eval.run dl3dv_benchmark --conf zipsplat_eval eval.num_views=12python -m splatfactory.eval.run dl3dv_benchmark --conf zipsplat_eval eval.num_views=24# with ground-truth camera priors:python -m splatfactory.eval.run dl3dv_benchmark --conf zipsplat_eval eval.num_views=6 model.eval_use_priors=true```
Evaluate your own checkpoint:
```bashpython -m splatfactory.eval.run dl3dv_benchmark --checkpoint <exp_name> eval.num_views=6```
Results (PSNR / SSIM / LPIPS, pose-free; DA3 and YoNoSplat for reference):
| Method | 6 views | 12 views | 24 views || --------------------- | --------------------- | --------------------- | --------------------- || DA3 | 23.77 / 0.795 / 0.165 | 22.38 / 0.736 / 0.208 | 21.69 / 0.711 / 0.229 || YoNoSplat | 24.10 / 0.783 / 0.160 | 22.73 / 0.736 / 0.200 | 22.01 / 0.710 / 0.223 || **ZipSplat** | 25.24 / 0.804 / 0.172 | 24.27 / 0.767 / 0.197 | 24.14 / 0.768 / 0.198 || **ZipSplat + priors** | 25.34 / 0.810 / 0.169 | 24.37 / 0.773 / 0.194 | 24.23 / 0.773 / 0.194 |
</details>
<details><summary><b>RE10K</b> (6 context views)</summary>
Evaluate the released model (append `model.eval_use_priors=true` to feed ground-truth camera priors):
```bashpython -m splatfactory.eval.run re10k_benchmark --conf zipsplat_eval eval.num_views=6# with ground-truth camera priors:python -m splatfactory.eval.run re10k_benchmark --conf zipsplat_eval eval.num_views=6 model.eval_use_priors=true```
Evaluate your own checkpoint:
```bashpython -m splatfactory.eval.run re10k_benchmark --checkpoint <exp_name> eval.num_views=6```
Results (pose-free; DA3 and YoNoSplat for reference):
| Method | PSNR | SSIM | LPIPS || --------------------- | ----- | ----- | ----- || DA3 | 20.90 | 0.724 | 0.234 || YoNoSplat | 24.99 | 0.835 | 0.151 || **ZipSplat** | 26.20 | 0.842 | 0.158 || **ZipSplat + priors** | 27.19 | 0.872 | 0.143 |
</details>
<details><summary><b>MipNeRF360</b> (32 / 64 / 128 context views)</summary>
Evaluate the released model (append `model.eval_use_priors=true` to feed ground-truth camera priors):
```bashpython -m splatfactory.eval.run mipnerf360_benchmark --conf zipsplat_eval eval.num_views=32python -m splatfactory.eval.run mipnerf360_benchmark --conf zipsplat_eval eval.num_views=64python -m splatfactory.eval.run mipnerf360_benchmark --conf zipsplat_eval eval.num_views=128# with ground-truth camera priors:python -m splatfactory.eval.run mipnerf360_benchmark --conf zipsplat_eval eval.num_views=32 model.eval_use_priors=true```
Evaluate your own checkpoint:
```bashpython -m splatfactory.eval.run mipnerf360_benchmark --checkpoint <exp_name> eval.num_views=32```
Results (PSNR / SSIM / LPIPS, pose-free; DA3 and YoNoSplat for reference):
| Method | 32 views | 64 views | 128 views || --------------------- | --------------------- | --------------------- | --------------------- || DA3 | 20.94 / 0.577 / 0.295 | 20.30 / 0.554 / 0.311 | 20.19 / 0.568 / 0.306 || YoNoSplat | 17.62 / 0.409 / 0.465 | 17.77 / 0.413 / 0.466 | 17.16 / 0.409 / 0.509 || **ZipSplat** | 21.72 / 0.594 / 0.325 | 22.18 / 0.615 / 0.298 | 22.29 / 0.624 / 0.290 || **ZipSplat + priors** | 22.95 / 0.655 / 0.276 | 23.31 / 0.675 / 0.260 | 23.37 / 0.683 / 0.255 |
</details>
## Training
ZipSplat is initialized from the DA3-Giant backbone, so first download those weights into `weights/`and convert them to the `.pth` layout the backbone expects:
```bashhuggingface-cli download depth-anything/DA3-GIANT model.safetensors --local-dir weightsmv weights/model.safetensors weights/da3-giant.safetensorpython -m splatfactory.models.encoders.dav3_encoder --size giant # -> weights/da3-giant.pth```
With the data prepared (including the depth maps) and the backbone in place, start training from therepo root:
```bash# single GPUpython -m splatfactory.train zipsplat --conf zipsplat# multiple GPUs on one nodetorchrun --nproc_per_node=4 -m splatfactory.train zipsplat --conf zipsplat --distributed```
`zipsplat` is the experiment name (checkpoints are written to `outputs/training/zipsplat/`); use anyname you like. The released model trains on the 50/50 RE10K + DL3DV mix at 252px for 450K steps; ourrun used 16 GPUs (4 nodes x 4) at a global batch size of 384, so scale `data.batch_size` to yourhardware. Add `--restore` to resume an interrupted run. Configs are [Hydra](https://hydra.cc), soanything can be overridden from the command line, e.g. a smaller backbone:
```bashpython -m splatfactory.models.encoders.dav3_encoder --size small # -> weights/da3-small.pthpython -m splatfactory.train zipsplat-da3s --conf zipsplat model/backbone=da3s data.batch_size=96```
To log training to [TensorBoard](https://www.tensorflow.org/tensorboard) or[Weights & Biases](https://wandb.ai), set `train.writer`:
```bashtorchrun --nproc_per_node=4 -m splatfactory.train zipsplat --conf zipsplat --distributed train.writer=tensorboard```
The trained model can then be evaluated by its experiment name (see [Evaluation](#evaluation)):
```bashpython -m splatfactory.eval.run dl3dv_benchmark --checkpoint zipsplat --tag zipsplat-retrained eval.num_views=6```
## BibTeX
```bibtex@article{veicht2026zipsplat, title = {ZipSplat: Fewer Gaussians, Better Splats}, author = {Veicht, Alexander and Hong, Sunghwan and Bar{\'a}th, D{\'a}niel and Pollefeys, Marc}, journal = {arXiv preprint arXiv:2606.05102}, year = {2026}}```
## License
The **code** in this repository (the `zipsplat` and `splatfactory` packages) is released under the[Apache-2.0 License](LICENSE).
The **pretrained weights** are released separately under[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/), **non-commercial use only**. Thisis required by their dependencies: the released checkpoint is initialized from[DA3-Giant](https://huggingface.co/depth-anything/DA3-GIANT) (CC BY-NC 4.0) and trained on[DL3DV-10K](https://github.com/DL3DV-10K/Dataset) (CC BY-NC 4.0). See the[Hugging Face model card](https://huggingface.co/veichta/zipsplat) for the full weights license anddataset attribution.
## Acknowledgements
`splatfactory` is built mainly on the excellent [glue-factory](https://github.com/cvg/glue-factory)training framework. Our model is initialized from the[Depth Anything 3](https://huggingface.co/depth-anything/DA3-GIANT) backbone, and rendering uses[gsplat](https://github.com/nerfstudio-project/gsplat). We thank the authors of these projects forreleasing their code and models.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647[build-system]requires = ["setuptools", "wheel"]build-backend = "setuptools.build_meta"
[project]name = "zipsplat"version = "1.0"description = "ZipSplat: Fewer Gaussians, Better Splats."authors = [{ name = "Alexander Veicht" }]readme = "README.md"requires-python = ">=3.10"license = { file = "LICENSE" }classifiers = [ "Programming Language :: Python :: 3", "Operating System :: OS Independent",]urls = { Repository = "https://github.com/cvg/ZipSplat" }
dynamic = ["dependencies"]
[project.optional-dependencies]# xformers' fused SwiGLU kernel the DA3-Giant checkpoint was trained with (optional speedup).xformers = ["xformers"]# interactive viser viewer (python -m zipsplat.viewer)viewer = ["viser", "nerfview"]dev = ["black==23.9.1", "flake8", "isort==5.12.0"]
[tool.setuptools]packages = ["zipsplat"]
[tool.setuptools.dynamic]dependencies = { file = ["requirements.txt"] }
[tool.black]line-length = 100exclude = "(venv/|docs/|third_party/)"
[tool.isort]profile = "black"line_length = 100atomic = true
[tool.flake8]max-line-length = 100docstring-convention = "google"ignore = ["E203", "W503", "E402"]exclude = [".git", "__pycache__", "venv", "docs", "third_party", "scripts"]12345678torchnumpy<2einopsmatplotlibgsplatplyfilepillowimageio[ffmpeg]123456789101112131415161718192021222324252627282930313233343536373839import loggingimport os
def get_logger(name: str, level: int | None = None) -> logging.Logger: """Get a rank-aware logger.
Args: name: Logger name (typically __name__) level: Optional log level override for all ranks. If None, uses INFO on rank 0, WARNING on other ranks.
Returns logger with INFO level on rank 0, WARNING on other ranks. Drop-in replacement for logging.getLogger(__name__). """ log = logging.getLogger(name) if level is not None: log.setLevel(level) else: rank_str = os.environ.get("RANK") if rank_str is None or int(rank_str) == 0: log.setLevel(logging.INFO) else: log.setLevel(logging.WARNING) return log
formatter = logging.Formatter( fmt="[%(asctime)s %(name)s %(levelname)s] %(message)s", datefmt="%m/%d/%Y %H:%M:%S")handler = logging.StreamHandler()handler.setFormatter(formatter)handler.setLevel(logging.INFO)
logger = get_logger(__name__)logger.addHandler(handler)logger.propagate = False
__module_name__ = __name__123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395"""3D Gaussian Splatting scene: construction, rendering (gsplat), and PLY I/O.
Author: Alexander Veicht"""
from typing import Dict, Optional
import matplotlib.pyplot as pltimport torchimport torch.nn.functional as Ffrom einops import rearrange, repeatfrom gsplat.rendering import rasterization
from splatfactory import get_loggerfrom splatfactory.geometry import Camera, Posefrom splatfactory.geometry.utils import knnfrom splatfactory.utils import conversions, mappings, tensor, tools
logger = get_logger(__name__)
class Gaussians(tensor.TensorWrapper): """Gaussian splat representation as a unified tensor.
Tensor layout per Gaussian (dimension D): [0:3] means (xyz positions) [3:6] scales (xyz scales, linear space) [6:10] quats (wxyz quaternion) [10:11] logit_opacity (logit of opacity) [11:11+K*3] sh_coefficients (K coefficients x 3 RGB channels, flattened)
where K = (max_sh_degree + 1)^2 """
# Dimension indices MEANS_START = 0 MEANS_END = 3 SCALES_START = 3 SCALES_END = 6 QUATS_START = 6 QUATS_END = 10 OPACITY_START = 10 OPACITY_END = 11 SH_START = 11
def __init__(self, data_: torch.Tensor): """Initialize Gaussian with raw tensor data.""" assert data_.shape[-1] >= self.SH_START, f"Data dimension too small: {data_.shape[-1]}" self.data_ = data_ super().__post_init__()
@classmethod def from_parameters( cls, means: torch.Tensor, scales: torch.Tensor, quats: torch.Tensor, opacities: torch.Tensor, sh_coeffs: torch.Tensor, ) -> "Gaussians": """Create Gaussians from separate parameter tensors.
Args: means: (..., N, 3) xyz positions scales: (..., N, 3) scales in [0, inf] quats: (..., N, 4) quaternions opacities: (..., N) opacities in [0, 1] sh_coeffs: (..., N, K, 3) spherical harmonics coefficients
Returns: Gaussian: New Gaussian instance """ N = means.shape[-2] K = sh_coeffs.shape[-2] D = cls.SH_START + K * 3
shape = means.shape[:-2] + (N, D)
data = torch.zeros(shape, device=means.device, dtype=means.dtype) data[..., cls.MEANS_START : cls.MEANS_END] = means data[..., cls.SCALES_START : cls.SCALES_END] = scales data[..., cls.QUATS_START : cls.QUATS_END] = quats data[..., cls.OPACITY_START : cls.OPACITY_END] = opacities.unsqueeze(-1) data[..., cls.SH_START : cls.SH_START + K * 3] = rearrange( sh_coeffs, "... n k c -> ... n (k c)" ) return cls(data)
@classmethod def random_init( cls, points: torch.Tensor = None, colors: torch.Tensor = None, num_gaussians: int = 1000, init_opacity: float = 0.1, max_sh_degree: int = 3, ) -> "Gaussians": """Randomly initialize Gaussians in a cube [-3, 3]^3.
Args: points (torch.Tensor, optional): Optional initial xyz positions [N, 3]. Defaults to None. colors (torch.Tensor, optional): Optional initial rgb colors [N, 3]. Defaults to None. num_gaussians (int, optional): Number of Gaussians to create. Defaults to 1000. init_opacity (float, optional): Initial opacity value. Defaults to 0.1. max_sh_degree (int, optional): Maximum spherical harmonics degree. Defaults to 3.
Returns: Gaussians: New Gaussian instance """ num_gaussians = num_gaussians if points is None else points.shape[0] num_gaussians = num_gaussians if colors is None else colors.shape[0]
if points is None: points = 3 * (torch.rand((num_gaussians, 3)) * 2 - 1).float()
if colors is None: colors = torch.rand((num_gaussians, 3)).float()
# Initialize the GS size to be the average dist of the 3 nearest neighbors dist2_avg = (knn(points, 4)[:, 1:] ** 2).mean(dim=-1) # [N,] dist_avg = torch.sqrt(dist2_avg) scales = torch.log(dist_avg * 1.0).unsqueeze(-1).repeat(1, 3) # [N, 3]
N = points.shape[0] quats = torch.rand((N, 4)) # [N, 4] opacities = torch.logit(torch.full((N,), init_opacity)) # [N,]
harmonics = torch.zeros((N, (max_sh_degree + 1) ** 2, 3)) # [N, K, 3] harmonics[:, 0, :] = conversions.rgb_to_sh(colors)
return cls.from_parameters( means=points, scales_log=scales, quats=quats, opacities_logit=opacities, sh_coeffs=harmonics, )
def color_gaussians_by_prototype(self, n: int, k: int) -> "Gaussians": """Color gaussians based on their prototype cluster.""" n = self.num_gaussians // k clusters = torch.tensor(list(range(n)), device=tools.get_device())
# shuffle cluster-to-color mapping to break spatial patterns perm = torch.randperm(n, device=tools.get_device()) shuffled = perm[clusters] shuffled = repeat(shuffled[None], "1 N -> N K", K=k)
# map clusters to Set1 colormap cmap = plt.get_cmap("tab20") cluster_colors = cmap(shuffled.cpu().numpy().flatten() % cmap.N)[:, :3] cluster_colors = torch.tensor(cluster_colors, device=tools.get_device()) cluster_sh = conversions.rgb_to_sh(cluster_colors)[..., None, :]
return self.from_parameters( means=self.means, scales=self.scales, quats=self.quats, opacities=self.opacities, sh_coeffs=cluster_sh, )
# ================================ # ========== Properties ========== # ================================ @property def num_gaussians(self) -> int: """Number of Gaussians (N).""" return self.data_.shape[-2]
@property def max_sh_degree(self) -> int: """Infer maximum SH degree from tensor dimensions.""" D = self.data_.shape[-1] sh_dim = D - self.SH_START n_coeffs = sh_dim // 3 return int(n_coeffs**0.5) - 1
# ========== Position ========== @property def means(self) -> torch.Tensor: """Get xyz positions [N, 3]""" return self.data_[..., self.MEANS_START : self.MEANS_END]
# ========== Scale ========== @property def scales(self) -> torch.Tensor: """Get scales [N, 3]""" return self.data_[..., self.SCALES_START : self.SCALES_END]
# @property # def scales_log(self) -> torch.Tensor: # """Get log scales [N, 3]""" # return self.data_[..., self.SCALES_START : self.SCALES_END]
# ========== Rotation ========== @property def quats(self) -> torch.Tensor: """Get quaternions [N, 4]""" return self.data_[..., self.QUATS_START : self.QUATS_END]
# ========== Opacity ========== @property def opacities(self) -> torch.Tensor: """Get opacities (sigmoided) [N]""" return self.data_[..., self.OPACITY_START : self.OPACITY_END].squeeze(-1) # return torch.sigmoid(self.data_[..., self.OPACITY_START : self.OPACITY_END].squeeze(-1))
# @property # def opacities_logit(self) -> torch.Tensor: # """Get logit opacities [N]""" # return self.data_[..., self.OPACITY_START : self.OPACITY_END].squeeze(-1)
# ========= Covariance ========= @property def covariances(self) -> torch.Tensor: """Get covariance matrices [N, 3, 3]""" return conversions.build_covariance(scale=self.scales, rotation_xyzw=self.quats)
# ===== Spherical Harmonics ==== @property def sh_coeffs(self) -> torch.Tensor: """Get all SH coefficients [N, max_K, 3]""" n_coeffs = (self.max_sh_degree + 1) ** 2 shdata_ = self.data_[..., self.SH_START : self.SH_START + n_coeffs * 3] return shdata_.reshape(*self.shape, n_coeffs, 3)
@property def sh0(self) -> torch.Tensor: """Get SH 0 coefficients [N, 1, 3]""" shdata_ = self.data_[..., self.SH_START : self.SH_START + 3] return shdata_.reshape(*self.shape, 1, 3)
@property def shN(self) -> torch.Tensor: """Get SH >0 coefficients [N, max_K-1, 3]""" n_coeffs = (self.max_sh_degree + 1) ** 2 shdata_ = self.data_[..., self.SH_START + 3 : self.SH_START + n_coeffs * 3] return shdata_.reshape(*self.shape, n_coeffs - 1, 3)
@property def rgb(self) -> torch.Tensor: """Get RGB colors by evaluating SH at normal direction [N, 3]""" colors = conversions.sh_to_rgb(self.sh0) return colors.squeeze(-2)
# =============================== # ============ Misc ============= # ===============================
def scale(self, factor: float) -> "Gaussians": """Scale the entire scene by a given factor.""" # adjust for broadcasting factor = factor if not hasattr(factor, "shape") else factor[..., None, None] means = self.means * factor scales = self.scales * factor return Gaussians.from_parameters( means=means, scales=scales, quats=self.quats, opacities=self.opacities, sh_coeffs=self.sh_coeffs, )
# =============================== # ========== Rendering ========== # =============================== def _render_single_scene( self, cameras: Camera, poses: Pose, rendering_mode: str = "RGB", sh_degree: Optional[int] = None, **kwargs, ) -> Dict[str, torch.Tensor]: """Render a single unbatched scene.
This is an internal method that assumes Gaussians have shape [N, D]. """ width, height = cameras[0].size.round().unbind(-1)
args = { "means": self.means, "quats": self.quats, "scales": self.scales, "opacities": self.opacities, "viewmats": poses.Rt_inv, "Ks": cameras.K, "width": width, "height": height, "render_mode": rendering_mode, "packed": False, **kwargs, }
if rendering_mode.upper() in ["RGB", "RGB+D", "RGB+ED", "D", "ED"]: args["colors"] = torch.cat([self.sh0, self.shN], -2) args["sh_degree"] = sh_degree if sh_degree is not None else self.max_sh_degree elif rendering_mode.lower() == "features": if not self.has_features(): raise ValueError("Cannot render features: scene has no features") feature_level = kwargs.pop("feature_level", 0) args["colors"] = self.get_features(feature_level) args["render_mode"] = "RGB" elif rendering_mode.lower() in ["features"]: raise NotImplementedError(f"Rendering mode {rendering_mode} is not yet supported.") else: raise NotImplementedError(f"Rendering mode {rendering_mode} is not supported.")
# Filter to valid args for rasterization args.pop("feature_level", None) valid_args = set(rasterization.__code__.co_varnames) for k in args: if k not in valid_args: raise ValueError( f"Unknown argument for rasterization: {k} - valid args: {valid_args}" )
args = {k: v for k, v in args.items() if k in valid_args}
rendering, alphas, info = rasterization(**args)
if rendering_mode.lower() == "features": rendering = F.normalize(rendering, dim=-1, p=2)
return { "rendering": rendering.moveaxis(-1, -3), "alphas": alphas.moveaxis(-1, -3), "info": info, }
def render_view( self, cameras: Camera, poses: Pose, rendering_mode: str = "RGB", sh_degree: Optional[int] = None, **kwargs, ) -> Dict[str, torch.Tensor]: """Render the scene for the given camera poses.
Args: cameras (Camera): The camera to use for rendering. poses (Pose): The poses of the camera in the scene. rendering_mode (str, optional): The rendering mode to use. Defaults to "RGB". feature_level (int, optional): The feature level to use. Defaults to 0.
Returns: Dict[str, torch.Tensor]: The rendering results. """ assert len(self.shape) <= 2, "Only gaussians of shape (N, D) or (B, N, D) are supported." if len(self.shape) == 1: return self._render_single_scene( cameras, poses, rendering_mode=rendering_mode, sh_degree=sh_degree, **kwargs, )
# batched gaussians results = [] for batch_id in range(self.shape[0]): result = self[batch_id]._render_single_scene( cameras[batch_id], poses[batch_id], rendering_mode=rendering_mode, sh_degree=sh_degree, **kwargs, ) # remove dynamic sized tensors from info result["info"].pop("isect_ids", None) result["info"].pop("flatten_ids", None)
info = {} for k in ["activated"]: if k not in result["info"]: continue info[k] = result["info"][k] result["info"] = info
results.append(result)
return mappings.stack_tree(results)
def __str__(self) -> str: return f"Gaussians({self.shape} - max_sh_degree={self.max_sh_degree} - {self.device} - {self.dtype})"
if __name__ == "__main__": # Simple test N = 10 K = 3 gaussians = Gaussians.random_init(num_gaussians=N, max_sh_degree=K) print(gaussians)1234567891011121314151617181920212223242526272829303132333435363738394041424344[build-system]requires = ["setuptools", "wheel"]build-backend = "setuptools.build_meta"
[project]name = "splatfactory"version = "1.0"description = "General training library for gaussian splatting related projects."authors = [{ name = "Alexander Veicht" }]requires-python = ">=3.10"urls = { Repository = "https://github.com/cvg/ZipSplat" }
dynamic = ["dependencies"]
[project.optional-dependencies]# xformers' fused SwiGLU kernel the released checkpoint was trained with (small speedup).xformers = ["xformers"]# interactive plotly/dash figure server (splatfactory.visualization.viz3d.show_figure).viz = ["dash"]dev = ["black==23.9.1", "flake8", "isort==5.12.0"]
# pyproject lives inside the package dir (mirrors GeoCalib's siclib/). Discover subpackages relative# to it; training is run from the repo root (e.g. `python -m splatfactory.train`), so# `import splatfactory` resolves via the repo root on sys.path.[tool.setuptools.packages.find]where = ["."]
[tool.setuptools.dynamic]dependencies = { file = ["requirements.txt"] }
[tool.black]line-length = 100exclude = "(venv/|docs/|third_party/)"
[tool.isort]profile = "black"line_length = 100atomic = true
[tool.flake8]max-line-length = 100docstring-convention = "google"ignore = ["E203", "W503", "E402"]exclude = [".git", "__pycache__", "venv", "docs", "third_party", "scripts"]123456789101112131415161718192021222324252627282930# Core dependencies for the splatfactory training/eval package (PEP 508, no poetry).# The two CUDA extensions need a built torch + nvcc and must be installed with# --no-build-isolation, so they are NOT listed here. See the "Training" section in the README:# pip install --no-build-isolation --use-pep517 \# git+https://github.com/JoannaCCJH/gsplat.git \# git+https://github.com/rahul-goel/fused-ssim/torchtorchvisionnumpy<2einopsomegaconfhydra-coreh5pypandastqdmmatplotlibopencv-pythonalbumentationschamferdistlpipsimageio[ffmpeg]plotlysafetensorsscikit-imagescikit-learntabulatetensordictwandbhuggingface-hubpillow12345678910from pathlib import Path
root = Path(__file__).parent.parent # top-level directoryDATA_PATH = root / "data/" # datasetsCHECKPOINT_PATH = root / "weights/" # pretrained weights pathTRAINING_PATH = root / "outputs/training/" # training checkpointsEVAL_PATH = root / "outputs/results/" # evaluation resultsTHIRD_PARTY_PATH = root / "third_party/" # third-party libraries
ALLOW_PICKLE = True # allow pickle (e.g. in torch.load)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405"""Simple training launcher.
Author: Paul-Edouard Sarlin (skydes), Philipp Lindenberger (Phil26AT)
Adapted from gluefactory (https://github.com/cvg/glue-factory), Apache-2.0."""
import argparseimport datetimeimport loggingimport osimport shutilimport sysimport timefrom pathlib import Pathfrom typing import Sequence
import torchimport torch.distributed as distimport torch.multiprocessing as mpfrom omegaconf import DictConfig, OmegaConf
from splatfactory import __module_name__, get_logger, logger, settings, trainerfrom splatfactory.utils import experiments, stdout_capturing, toolsfrom splatfactory.utils.distributed import get_distributed_env, is_torchrun_launch
# Logger for init messages that should appear on all ranksinit_logger = get_logger(__name__, level=logging.INFO)
# --- Environment Variable Setup for Performance and Debugging --- (from VGGT)# Helps with memory fragmentation in PyTorch's memory allocator.os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"# Specifies the threading layer for MKL, can prevent hangs in some environments.# os.environ["MKL_THREADING_LAYER"] = "GNU"# Provides full Hydra stack traces on error for easier debugging.# os.environ["HYDRA_FULL_ERROR"] = "1"# Enables asynchronous error handling for NCCL, which can prevent hangs.os.environ["TORCH_NCCL_ASYNC_ERROR_HANDLING"] = "1"
mp.set_sharing_strategy("file_system")
def init_process_tcp(env) -> int: """Initialize distributed process group using TCP.
Args: env: Distributed environment with rank, local_rank, world_size, etc.
Returns: Device ID (local_rank) to use for this process. """ assert torch.cuda.is_available(), "Distributed training requires CUDA"
torch.distributed.init_process_group( backend="nccl", init_method=f"tcp://{env.master_addr}:{env.master_port}", world_size=env.world_size, rank=env.rank, device_id=torch.device(f"cuda:{env.local_rank}"), timeout=datetime.timedelta(minutes=120), # Increased for multi-node with slow interconnect )
init_logger.info( f"[Rank {env.rank}] Initializing distributed process group: " f"rank={env.rank}/{env.world_size}, local_rank={env.local_rank}, " f"num_nodes={env.num_nodes}, master={env.master_addr}:{env.master_port}" )
dist.barrier()
if env.rank == 0: logger.info("[OK] Distributed process group initialized successfully.")
# CRITICAL: Use local_rank for device assignment, not global rank! device = env.local_rank torch.cuda.set_device(device) return device
def create_training_dir(experiment_name: str, args: argparse.Namespace) -> Path: """Create the training output directory.""" output_dir = settings.TRAINING_PATH / experiment_name
env = get_distributed_env() if env.is_distributed and not env.is_main_process: return output_dir
if args.ablate: subdirs = [int(p.stem) for p in output_dir.glob("*/") if p.stem.isdigit()] ablate_id = max(subdirs, default=-1) + 1 output_dir = output_dir / str(ablate_id) logger.info(f"Creating ablation folder {output_dir}") # Setup output directory exist_ok = args.restore or args.overwrite or args.clean if output_dir.exists() and not exist_ok: raise FileExistsError( f"Output directory {output_dir} already exists. " "Use --restore to continue training or --overwrite to delete it." ) if output_dir.exists() and args.clean: logger.info(f"Cleaning output directory {output_dir}") shutil.rmtree(output_dir, ignore_errors=True) output_dir.mkdir(exist_ok=exist_ok, parents=True) logger.info(f"Output directory: {output_dir}") return output_dir
def compose_cli_config( output_dir: Path, args: argparse.Namespace, save_config: bool = True) -> DictConfig: """Compose configuration from command-line arguments.""" if save_config: OmegaConf.save(OmegaConf.from_cli(args.dotlist), str(output_dir / "cli_config.yaml"))
if args.conf: # Route Hydra defaults overrides (e.g. data=composed_252) to hydra.compose(), # keep regular overrides for OmegaConf merge (preserves backward compat). conf_dir = experiments.parse_config_path(args.conf).parent defaults_groups = {p.name for p in conf_dir.iterdir() if p.is_dir()}
def _is_hydra_override(arg): key = arg.split("=", 1)[0] return key in defaults_groups or "/" in key
hydra_overrides = [a for a in args.dotlist if _is_hydra_override(a)] regular_dotlist = [a for a in args.dotlist if not _is_hydra_override(a)]
conf_path, raw_conf = experiments.compose_config( args.conf, overrides=hydra_overrides or None, sweep_idx=args.sweep_idx, resolve=False, ) OmegaConf.set_struct(raw_conf, args.strict) conf = OmegaConf.merge(raw_conf, OmegaConf.from_cli(regular_dotlist)) OmegaConf.resolve(conf) if save_config: shutil.copy(conf_path, output_dir / "raw_config.yaml") else: conf = OmegaConf.from_cli(args.dotlist) if args.restore: restore_conf = OmegaConf.load(output_dir / "config.yaml") conf = OmegaConf.merge(restore_conf, conf) conf.train.load_experiment = args.experiment conf.train.load_state = True else: if conf.train.seed is None: conf.train.seed = torch.initial_seed() & (2**32 - 1)
if save_config: OmegaConf.save(conf, str(output_dir / "config.yaml")) return conf
def main_worker(conf, output_dir, args): """Main worker function for training.""" env = get_distributed_env() distributed = env.is_distributed
if env.is_main_process and not args.quiet: logger.info("Starting training with configuration:\n%s", OmegaConf.to_yaml(conf))
if distributed: # device = init_process_tcp(env) device = torch.device(f"cuda:{env.local_rank}") else: device = tools.get_device()
if env.is_main_process: with stdout_capturing.capture_outputs( output_dir / "log.log", cleanup_interval=args.cleanup_interval ): res = trainer.launch_training(output_dir, conf, device) else: res = trainer.launch_training(output_dir, conf, device)
if distributed: dist.destroy_process_group() return res
def save_code_snapshot( output_dir: Path, extra_module_names: Sequence[str] = (), compression: str | None = "zip",): """Create a snapshot of the codebase.""" for module in [__module_name__] + list(extra_module_names): mod_dir = Path(__import__(str(module)).__file__).parent if compression: shutil.make_archive(output_dir / module, compression, mod_dir) else: shutil.copytree(mod_dir, output_dir / module, dirs_exist_ok=True)
def parse_args(): """Parse command line arguments and return them.""" parser = argparse.ArgumentParser() parser.add_argument("experiment", type=str) default_config_names = experiments.list_configs(Path(__file__).parent / "configs") parser.add_argument( "--conf", type=str, help=f"Configuration path (.yaml) or one of: {default_config_names}", ) parser.add_argument( "--cleanup_interval", default=120, # Cleanup log files every 120 seconds. type=int, help="Interval in seconds to cleanup log files", ) parser.add_argument("--restore", action="store_true", help="Restore from previous experiment") parser.add_argument( "--overwrite", action="store_true", help="Overwrite existing experiment directory", ) parser.add_argument( "--clean", action="store_true", help="Delete the output directory if it exists", ) parser.add_argument( "--ablate", action="store_true", help="Create an ablation folder (/XID) that increments on each run", ) parser.add_argument( "--compress_snapshot", "--cs", type=str, default="zip", ) parser.add_argument( "--sweep_idx", "-sid", type=int, default=None, help="Index of the sweep run" ) parser.add_argument("--quiet", action="store_true", help="Mute some logging") parser.add_argument("--distributed", action="store_true", help="Run in distributed mode") parser.add_argument("--strict", action="store_true", help="Strict config merge") parser.add_argument("dotlist", nargs="*") args = parser.parse_intermixed_args() return args
def setup_experiment_distributed(args, env): """ Setup experiment directory and config for distributed training.
In multi-node SLURM jobs, only the first task (SLURM_PROCID=0) creates the directory and saves code. Other tasks wait for setup to complete.
Returns: tuple: (output_dir, conf) where output_dir is Path and conf is DictConfig """
slurm_procid = int(os.environ.get("SLURM_PROCID", "0")) slurm_nodeid = int(os.environ.get("SLURM_NODEID", "0")) is_first_task = slurm_procid == 0
logger.info( f"Setup: Task PROCID={slurm_procid}, NODEID={slurm_nodeid}, " f"is_first_task={is_first_task}" )
if is_first_task: # Only first task creates directory and saves code logger.info("Task 0: Setting up experiment directory and config") output_dir = create_training_dir(args.experiment, args) conf = compose_cli_config(output_dir, args)
# Detect GPU count conf.train.num_devices = conf.train.get("num_devices", 0) if conf.train.num_devices < 1: conf.train.num_devices = torch.cuda.device_count() assert conf.train.num_devices > 0, "No GPUs found for distributed training"
# Save code snapshot save_code_snapshot( output_dir, conf.train.get("submodules", ()), compression=args.compress_snapshot, )
# Signal to other tasks that setup is done setup_done_file = output_dir / ".setup_done" setup_done_file.touch() logger.info(f"Task 0: Setup complete, created {output_dir}") else: # Other tasks wait for first task to finish setup output_dir = settings.TRAINING_PATH / args.experiment setup_done_file = output_dir / ".setup_done"
logger.info(f"Task {slurm_procid}: Waiting for task 0 to complete setup...") max_wait = 300 # 5 minutes waited = 0 while not setup_done_file.exists() and waited < max_wait: time.sleep(1) waited += 1
if not setup_done_file.exists(): raise RuntimeError( f"Task {slurm_procid}: Timed out waiting for task 0 to setup directory" )
logger.info(f"Task {slurm_procid}: Setup complete, loading config")
# Load config created by first task conf = compose_cli_config(output_dir, args)
# Each task independently detects its GPU count conf.train.num_devices = conf.train.get("num_devices", 0) if conf.train.num_devices < 1: conf.train.num_devices = torch.cuda.device_count() assert conf.train.num_devices > 0, "No GPUs found for distributed training"
# Pass output_dir to spawned torchrun processes os.environ["SPLATFACTORY_OUTPUT_DIR"] = str(output_dir)
return output_dir, conf
def build_torchrun_command(args, conf): """Build torchrun command for distributed training.
Args: args: Parsed command-line arguments conf: Resolved configuration
Returns: List of command arguments for os.execvp() """
# Get distributed environment settings # CRITICAL: Read from SLURM first, fall back to config num_nodes = int(os.environ.get("SLURM_NNODES", conf.train.get("num_nodes", 1))) node_rank = int(os.environ.get("SLURM_NODEID", "0")) master_addr = os.environ.get("MASTER_ADDR", "localhost") master_port = os.environ.get("MASTER_PORT", "29500")
logger.info( f"Torchrun config: num_nodes={num_nodes}, node_rank={node_rank}, " f"nproc_per_node={conf.train.num_devices}, " f"master={master_addr}:{master_port}" )
# Build base torchrun command cmd = [ sys.executable, "-m", "torch.distributed.run", "--nproc_per_node", str(conf.train.num_devices), "--nnodes", str(num_nodes), "--node_rank", str(node_rank), "--master_addr", master_addr, "--master_port", master_port, "-m", "splatfactory.train", ]
# Forward all original arguments except --distributed (already handled by torchrun) # This is more robust than manually reconstructing - won't break when adding new args # Note: experiment name is already in sys.argv[1], so no need to add it separately for arg in sys.argv[1:]: if arg != "--distributed": cmd.append(arg)
return cmd
if __name__ == "__main__": # Initialize distributed env = get_distributed_env() device = init_process_tcp(env)
args = parse_args()
if env.is_main_process: logger.info("Distributed setup complete, setting up experiment directory and config")
# Load config (already created by parent process if distributed) output_dir = create_training_dir(args.experiment, args) dist.barrier()
conf = compose_cli_config(output_dir, args, save_config=env.is_main_process)
if env.is_main_process: logger.info(f"Experiment directory ready: {output_dir}")
# Update num_devices from environment if distributed if env.is_distributed: logger.info(f"Distributed: Setting num_devices to world_size={env.world_size}") conf.train.num_devices = env.world_size else: conf.train.num_devices = conf.train.get("num_devices", 0) logger.info(f"Non-distributed: num_devices={conf.train.num_devices}")
logger.info(f"Launching main_worker (rank {env.rank})") main_worker(conf, output_dir, args)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341"""A generic, flexible trainer.
Author: Philipp Lindenberger
Adapted from gluefactory (https://github.com/cvg/glue-factory), Apache-2.0."""
import collectionsimport gcimport mathimport signalfrom pathlib import Pathfrom typing import Any, TypeAlias
import matplotlib.pyplot as pltimport numpy as npimport torchimport torch.distributed as distfrom omegaconf import DictConfig, OmegaConffrom tqdm import tqdm
from splatfactory import __module_name__, datasets, eval, logger, models, settingsfrom splatfactory.models import BaseModelfrom splatfactory.models.misc import format_module_paramsfrom splatfactory.utils import experiments, mappings, toolsfrom splatfactory.utils.distributed import get_distributed_envfrom splatfactory.utils.metrics import AverageMetric, MedianMetric, PRMetric, RecallMetricfrom splatfactory.utils.summary_writer import SummaryWriter
Args: TypeAlias = DictConfigBatch: TypeAlias = AnyPredictions: TypeAlias = AnyLossMetrics: TypeAlias = dict[str, torch.Tensor]Writer: TypeAlias = SummaryWriter | None
def compose_loss(loss_dict: LossMetrics, compose_str: str) -> torch.Tensor: """Compose a loss from a string, e.g. '1.0*loss1 + 0.1*loss2'.""" loss = 0.0 for term in compose_str.split("+"): term = term.strip() if "*" in term: weight_str, key = term.split("*") weight = float(weight_str) else: weight = 1.0 key = term key = key.strip() if key not in loss_dict: raise KeyError(f"Key {key} not found in loss dict.") loss = loss + weight * loss_dict[key] return loss
def get_batch_size(loader_or_dataset) -> int: """Get the nominal batch size (for logging, not sample counting).""" if hasattr(loader_or_dataset, "max_img_per_gpu"): return loader_or_dataset.max_img_per_gpu loader = loader_or_dataset if hasattr(loader, "batch_size") and loader.batch_size is not None: return loader.batch_size elif hasattr(loader, "batch_sampler") and loader.batch_sampler is not None: return getattr(loader.batch_sampler, "max_img_per_gpu", 1) return 1
def _infer_batch_size(data: dict, fallback: int) -> int: """Infer actual batch size from a data dict. Falls back to nominal value.""" if "scene" in data: return len(data["scene"]) for key in ("context", "target"): if isinstance(data.get(key), dict): for v in data[key].values(): if hasattr(v, "shape") and len(v.shape) >= 1: return v.shape[0] return fallback
@torch.compiler.set_stance("force_eager")@torch.no_grad()def run_evaluation( model: BaseModel | torch.nn.parallel.DistributedDataParallel, loader: torch.utils.data.DataLoader, device: torch.device, conf: DictConfig, rank: int = 0, pbar: bool = True, max_iters: int | None = None, compose_loss_str: str | None = None,) -> tuple[Any, ...]: model.eval() is_ddp = isinstance(model, torch.nn.parallel.DistributedDataParallel) model = model.module if is_ddp else model # Get the original model results = {} pr_metrics = collections.defaultdict(lambda: PRMetric(distributed=is_ddp)) figures = []
# choose plot ids in first 10 batches plot_ids = np.random.choice( min(len(loader), 10), min(len(loader), conf.num_eval_plots), replace=False ) max_iters = max_iters or len(loader) max_iters = min(max_iters, len(loader)) eval_iter = iter(loader) for i in tqdm(range(len(loader)), desc="Evaluation", ascii=True, disable=not pbar): if i >= max_iters: break try: data = next(eval_iter) local_done = torch.zeros(1, device=device, dtype=torch.int32) except StopIteration: local_done = torch.ones(1, device=device, dtype=torch.int32)
if is_ddp: dist.all_reduce(local_done, op=dist.ReduceOp.MAX)
if local_done.item(): logger.info("Eval DataLoader exhausted on at least one rank, stopping.") break
data = mappings.batch_to_device(data, device, non_blocking=True) pred = model(data) losses, metrics = model.loss_metrics(pred, data) pr_metrics_i = model.pr_metrics(pred, data) losses, metrics, pr_metrics_i = [ mappings.batch_to_device(x, "cpu", non_blocking=False) for x in (losses, metrics, pr_metrics_i) ] if is_ddp: pr_metrics_i = mappings.tree_all_gather(pr_metrics_i) if compose_loss_str is not None: losses["total"] = compose_loss(losses, compose_loss_str) if i in plot_ids: figures.append(model.visualize(pred, data)) for k, (labels, preds) in pr_metrics_i.items(): pr_metrics[k].update(labels, preds) del pred, data numbers = {**metrics, **{"loss/" + k: v for k, v in losses.items()}} del losses, metrics, pr_metrics_i for k, v in numbers.items(): if k not in results: results[k] = AverageMetric(distributed=is_ddp) if k in conf.median_metrics: results[k + "_median"] = MedianMetric(distributed=is_ddp) if k in conf.recall_metrics.keys(): q = conf.recall_metrics[k] results[k + f"_recall{int(q)}"] = RecallMetric(q, distributed=is_ddp) results[k].update(v) if k in conf.median_metrics: results[k + "_median"].update(v) if k in conf.recall_metrics.keys(): q = conf.recall_metrics[k] results[k + f"_recall{int(q)}"].update(v) del numbers
del eval_iter results = {k: results[k].compute() for k in results} # Compute and reset PR metrics to free memory computed_pr = {} for k, v in pr_metrics.items(): computed_pr[k] = v.compute() v.reset() del pr_metrics return results, computed_pr, figures
class Trainer: """ Trainer class for managing the training process.
Maintains model, params and training state (optim, step, ...) """
default_conf = { "seed": "???", # training seed # Training parameters "epochs": None, # number of epochs "num_steps": None, # number of steps, overwrites epochs "eval_every_iter": None, # interval for evaluation (iteration-based) "eval_every_epoch": 1, # interval for evaluation on the validation set "mixed_precision": None, "num_devices": 0, # 0 means sequential. "detect_anomaly": False, # Enable anomaly detection "matmul_precision": None, # Set torch.matmul precision [None, highest, high, medium, low] "overfit": False, # Overfit a single batch # Optimizer parameters "optimizer": "Adam", # name of optimizer torch.optim.* e.g Adam, SGD, ... "opt_regexp": None, # regular expression to filter parameters to optimize "optimizer_options": {}, # optional arguments passed to the optimizer "lr": 0.001, # learning rate "lr_schedule": { "type": None, "start": 0, "exp_div_10": 0, "on_epoch": False, "factor": 1.0, }, "lr_scaling": {}, # learning rate scaling for parameter name patterns "clip_grad": None, "gradient_accumulation_steps": 1, # Accumulate gradients over N steps # Data parameters "train_split": "train", # split to use for training "eval_split": "val", # split to use for evaluation "test_every_epoch": 1, # interval for evaluation on the test benchmarks "benchmark_every_epoch": 1, # interval for evaluation on the test benchmarks "run_benchmarks": (), # Logging and checkpointing "writer": "tensorboard", # options: [tensorboard, wandb] "best_key": "loss/total", # key to use to select the best checkpoint "save_every_iter": 5000, # interval for saving the current checkpoint "log_every_iter": 200, # interval for logging the loss to the console "log_grad_every_iter": None, # interval for logging gradient hists "keep_last_checkpoints": 1, # keep only the last X checkpoints "median_metrics": [], # add the median of some metrics "recall_metrics": {}, # add the recall of some metrics "pr_curves": {}, # add pr curves, set labels/predictions/mask keys "num_eval_plots": 4, # Number of plots to show during evaluation (0=skip) "plot_every_iter": None, # plot figures every X iterations "stdout_metrics": ["loss/total"], # List of metrics to print to stdout (None=all) "record_memory": None, # Record memory usage during training (# record steps) "log_it": False, # Log tensorboard on iteration (default is num_samples) "print_arch": 1, # Print model architecture (None=skip, int=depth) # Restarting and loading "load_experiment": None, # initialize the model from a previous experiment "submodules": [], # Misc options "compile": None, # Compilation mode for the model. [None, default, ...] "profile": None, # Profile the training with PyTorch profiler (# prof steps) "profile_every_epoch": None, # Profile every N epochs, None means only first "ddp_find_unused_parameters": False, # DDP find_unused_parameters "stop_immediately": True, # Stop training immediately on SIGINT "debug_nan": False, # Log detailed info and raise on NaN gradients "project_name": __module_name__, # wandb project name }
def __init__( self, conf: DictConfig, model: BaseModel, optimizer: torch.optim.Optimizer, lr_scheduler: torch.optim.lr_scheduler.LambdaLR, device: torch.device | str | None = None, ): # Initialize conf, model, optimizer and LR self.default_conf = OmegaConf.create(self.default_conf) self.conf = OmegaConf.merge(self.default_conf, conf) self.model = model self.optimizer = optimizer self.lr_scheduler = lr_scheduler
self.env = get_distributed_env() self.distributed = self.env.is_distributed self.num_gpus = self.env.world_size if self.distributed else 1
# Initialize rank if self.distributed: assert dist.is_initialized(), "Torch Distributed not initialized" self.rank = self.env.rank
# Initialize device self.device = device if isinstance(device, torch.device) else torch.device(device) if self.device is None: device = ( self.rank if self.distributed else "cuda" if torch.cuda.is_available() else "cpu" ) self.device = torch.device(device)
# Initialize model params and conf self.model_conf = self.model.conf if self.conf.print_arch is not None: self.info( f"Model architecture:\n{format_module_params(self.model, self.conf.print_arch)}" )
# Setup scaler and dtype self.use_mp = self.setup_dtype_scaler(conf.mixed_precision)
# Initialize step timer self.step_timer = tools.StepTimer() self.epoch_timer = tools.EpochTimer()
# Setup counters self.epoch = 0 self.step_in_epoch = 0 self.tot_n_samples = 0 self.tot_it = 0
assert ( conf.num_steps is not None or conf.epochs is not None ), "At least one of num_steps or epochs must be specified."
# Handle KeyboardInterrupt self.setup_sigint_handler()
self.prepare_model()
# Named benchmark configs self.benchmarks = {}
# Setup torch global variables self.setup_torch()
# ------------------------------------------------------------------------ # Utility Initializers # ------------------------------------------------------------------------
@classmethod def init(cls, conf: DictConfig, model: BaseModel, **kwargs) -> "Trainer": """Create a Trainer instance from a config.""" conf = OmegaConf.merge(cls.default_conf, conf) optimizer = cls.construct_optimizer(conf, model) lr_scheduler = tools.get_lr_scheduler(optimizer=optimizer, conf=conf.lr_schedule) return cls( conf=conf, model=model, optimizer=optimizer, lr_scheduler=lr_scheduler, **kwargs, )
# ------------------------------------------------------------------------ # Setup helper functions (public) # ------------------------------------------------------------------------
def register_benchmark( self, benchmark_name: str, benchmark_conf: str, every_epoch: int | None = None ): every_epoch = every_epoch or self.conf.benchmark_every_epoch self.info(f"Registering benchmark {benchmark_name} (every={every_epoch}).") self.benchmarks[benchmark_name] = (benchmark_conf, every_epoch)
def sequential_model(self) -> BaseModel: """Get the original model (without DDP).""" return ( self.model.module if isinstance(self.model, torch.nn.parallel.DistributedDataParallel) else self.model )
def load_checkpoint( self, checkpoint: Any, strict: bool = True, load_state: bool = False, load_modelconfig: bool = False, ): if isinstance(self.model, torch.nn.parallel.DistributedDataParallel): # Fix distributed model naming checkpoint["model"] = { (k if k.startswith("module.") else "module." + k): v for k, v in checkpoint["model"].items() } missing, unexpected = self.model.load_state_dict(checkpoint["model"], strict=strict) self.info( f"state_dict loaded. Missing keys: {missing or 'None'}. Unexpected keys: {unexpected or 'None'}." ) if load_modelconfig: self.conf.model = OmegaConf.merge( OmegaConf.create(checkpoint["conf"]).model, self.conf.model ) self.info("Model config loaded.") if load_state: self.optimizer.load_state_dict(checkpoint["optimizer"]) if "lr_scheduler" in checkpoint: self.lr_scheduler.load_state_dict(checkpoint["lr_scheduler"]) self.epoch = checkpoint["epoch"] for metric in ["tot_it", "tot_n_samples"]: if metric in checkpoint: setattr(self, metric, checkpoint[metric]) self.info(f"Loaded {metric}={getattr(self, metric)} ({checkpoint[metric]})") self.info(f"Training state loaded. Resuming at epoch {self.epoch}.")
def maybe_load_checkpoint(self): if self.conf.load_experiment: if self.conf.get("load_last_checkpoint", True): self.info( "Loading last checkpoint from experiment %s", self.conf.load_experiment, ) init_cp = experiments.get_last_checkpoint(self.conf.load_experiment) else: self.info( "Loading best checkpoint from experiment %s", self.conf.load_experiment, ) init_cp = experiments.get_best_checkpoint(self.conf.load_experiment) self.info("Loading checkpoint %s", str(init_cp)) init_cp = experiments.load_checkpoint( init_cp, map_location="cpu", weights_only=self.conf.get("load_weights_only", not settings.ALLOW_PICKLE), ) self.load_checkpoint( init_cp, load_state=self.conf.get("load_state", False), load_modelconfig=self.conf.get("load_modelconfig", False), strict=self.conf.get("load_strict", True), )
def save_checkpoint( self, output_dir: Path, conf: DictConfig, # This is the full conf! results: dict | None = None, iter_i: int = 0, best_eval: float | None = None, **kwargs, ) -> float | None: """Save checkpoint and return updated best_eval value.""" if self.rank == 0: return experiments.save_experiment( self.model, self.optimizer, self.lr_scheduler, conf, results, iter_i=iter_i, epoch=self.epoch, output_dir=output_dir, custom={ "tot_it": self.tot_it, "tot_n_samples": self.tot_n_samples, }, distributed=self.distributed, best_eval=best_eval, **kwargs, ) return best_eval
# ------------------------------------------------------------------------ # Setup helper functions (internal) # ------------------------------------------------------------------------
def info(self, pattern: str, *args, **kwargs): if self.rank == 0: logger.info(pattern, *args, **kwargs)
def warn(self, pattern: str, *args, **kwargs): if self.rank == 0: logger.warning(pattern, *args, **kwargs)
def learning_rate_step(self, verbose: bool = False): old_lr = self.optimizer.param_groups[0]["lr"] self.lr_scheduler.step() if verbose: self.info(f"lr changed from {old_lr} to {self.optimizer.param_groups[0]['lr']}")
def _dump_nan_debug(self, data: Batch, pred: Predictions, loss_metrics: LossMetrics): """Dump detailed diagnostics when NaN gradients are detected (debug_nan=True).""" R = self.rank logger.error(f"[rank {R}] NaN gradients at epoch={self.epoch}, iter={self.step_in_epoch}")
# Dump batch contents (skip large tensors) try: skip_keys = {"image", "depth"}
def _dump(d, prefix=""): for k, v in d.items() if isinstance(d, dict) else []: if k in skip_keys: logger.error(f" [rank {R}] {prefix}{k}: shape={list(v.shape)}") elif isinstance(v, dict): _dump(v, prefix=f"{prefix}{k}.") elif isinstance(v, torch.Tensor): logger.error(f" [rank {R}] {prefix}{k}: {v}") else: logger.error(f" [rank {R}] {prefix}{k}: {v}")
_dump(data) except Exception as e: logger.error(f" [rank {R}] Failed to dump batch: {e}")
# Per-param non-finite grad info try: for name, p in self.model.named_parameters(): if p.grad is not None and not torch.isfinite(p.grad).all(): bad = ~torch.isfinite(p.grad) bad_frac = bad.float().mean().item() finite = p.grad[torch.isfinite(p.grad)] grad_max = finite.abs().max().item() if finite.numel() > 0 else float("nan") n_nan = torch.isnan(p.grad).sum().item() n_inf = torch.isinf(p.grad).sum().item() logger.error( f" [rank {R}] Bad grad: {name} shape={list(p.grad.shape)} " f"bad_frac={bad_frac:.3f} nan={n_nan} inf={n_inf} max_abs={grad_max:.4e}" ) except Exception as e: logger.error(f" [rank {R}] Failed to inspect gradients: {e}")
# Loss components (per-rank, before all-reduce) try: for k, v in loss_metrics.items(): if "loss" in k or "psnr" in k: logger.error(f" [rank {R}] {k}={v.item():.4e}") except Exception as e: logger.error(f" [rank {R}] Failed to dump losses: {e}")
# Save debug artifacts per rank nan_dir = self.output_dir / f"debug_nan_e{self.epoch}_it{self.step_in_epoch}" / f"rank{R}" nan_dir.mkdir(parents=True, exist_ok=True) for fname, save_fn in [ ("batch.pt", lambda: mappings.batch_to_device(data, "cpu", detach=True)), ("pred.pt", lambda: mappings.batch_to_device(pred, "cpu", detach=True)), ("loss_metrics.pt", lambda: {k: v.cpu().detach() for k, v in loss_metrics.items()}), ]: try: torch.save(save_fn(), nan_dir / fname) logger.error(f" [rank {R}] Saved {nan_dir / fname}") except Exception as e: logger.error(f" [rank {R}] Failed to save {fname}: {e}")
# Only save model once (rank 0) if R == 0: try: model_path = nan_dir.parent / "model.pt" torch.save(self.sequential_model().state_dict(), model_path) logger.error(f" [rank {R}] Saved {model_path}") except Exception as e: logger.error(f" [rank {R}] Failed to save model: {e}")
raise RuntimeError(f"[rank {R}] NaN detected in gradients (debug_nan=True)")
def _step_view_schedule(self): """Linear ramp max_views: min -> target over scheduled fraction of training.""" schedule_frac = self._view_schedule_frac if not schedule_frac or not self.conf.num_steps: return if not hasattr(self, "_view_target"): self._view_target = self._view_schedule_range[1] min_views = self._view_schedule_range[0] T = int(self.conf.num_steps * schedule_frac) t = min(self.tot_it, T) current_max = min_views + (self._view_target - min_views) * (t / T) current_max = int(round(current_max)) self._train_dataset.update_image_num_range(new_max=current_max)
def _step_query_ratio_schedule(self): """Cosine anneal query ratio_min: 1.0 -> target over scheduled fraction of training.""" model = self.model.module if self.distributed else self.model schedule_frac = getattr(model.conf, "query_ratio_schedule", 0.0) if not schedule_frac or not self.conf.num_steps: return
if not hasattr(self, "_qr_target"): self._qr_target = model.conf.query_sample_ratio[0]
T = int(self.conf.num_steps * schedule_frac) t = min(self.tot_it, T) ratio_min = self._qr_target + (1.0 - self._qr_target) * 0.5 * ( 1 + math.cos(math.pi * t / T) ) model.query_sample_ratio[0] = ratio_min
def setup_sigint_handler(self): def sigint_handler(signal, frame): logger.info("Caught keyboard interrupt signal, will terminate") if self.stop or self.conf.stop_immediately: raise KeyboardInterrupt self.stop = True
self.stop = False signal.signal(signal.SIGINT, sigint_handler)
def setup_torch(self): torch.backends.cudnn.benchmark = True if self.conf.detect_anomaly: torch.autograd.set_detect_anomaly(True) if self.conf.matmul_precision is not None: torch.set_float32_matmul_precision(self.conf.matmul_precision)
def prepare_model(self): if self.conf.compile is not None: # Compile before DDP self.model = self.model.compile(mode=self.conf.compile) if self.distributed: self.model = self.model.make_ddp( device_ids=[self.device], find_unused_parameters=self.conf.ddp_find_unused_parameters, )
def construct_profiler( self, output_dir: Path, store_raw_trace: bool = False ) -> torch.profiler.profile: return torch.profiler.profile( activities=[ torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA, ], schedule=torch.profiler.schedule( wait=5, warmup=1, active=self.conf.profile, repeat=1, skip_first=10 ), on_trace_ready=experiments.tensorboard_trace_handler( str(output_dir), use_gzip=not store_raw_trace, epoch=self.epoch ), record_shapes=False, profile_memory=False, with_stack=True, )
@classmethod def construct_optimizer(cls, conf: DictConfig, model: torch.nn.Module) -> torch.optim.Optimizer: """Construct the optimizer for training.""" optimizer_fn = getattr(torch.optim, conf.optimizer)
params = [(n, p) for n, p in model.named_parameters() if p.requires_grad] if conf.opt_regexp: params = tools.filter_parameters(params, conf.opt_regexp) lr_params = tools.pack_lr_parameters(params, conf.lr, conf.lr_scaling) optimizer = optimizer_fn(lr_params, lr=conf.lr, **conf.optimizer_options) return optimizer
def setup_dtype_scaler(self, mixed_precision: str | None) -> bool: use_mp = mixed_precision is not None self.scaler = ( torch.amp.GradScaler("cuda", enabled=use_mp) if hasattr(torch.amp, "GradScaler") else torch.cuda.amp.GradScaler(enabled=use_mp) ) self.info(f"Training with mixed_precision={mixed_precision}")
self.dtype = { "float16": torch.float16, "bfloat16": torch.bfloat16, None: torch.float32, # we disable it anyway }[mixed_precision]
return use_mp
def get_writer(self, output_dir: Path, log_conf: DictConfig) -> Writer: if self.rank == 0: writer = SummaryWriter( log_dir=output_dir, writer=self.conf.writer, project=self.conf.project_name, conf=log_conf, # WandB options run_id=self.conf.get("run_id", None), name_as_run_id=self.conf.get("name_as_run_id", False), reload_run_id=self.conf.get("reload_run_id", True), ) else: writer = None return writer
def should_stop(self, max_iters: int | None = None) -> bool: """Check if training should stop.""" if self.stop: # SIGINT handler return True
if max_iters is not None and self.step_in_epoch >= max_iters: self.info(f"Reached max iters {max_iters}, stopping epoch {self.epoch}.") return True
if self.conf.num_steps and self.tot_it >= self.conf.num_steps: self.info(f"Reached max steps {self.conf.num_steps}, stopping.") return True
if self.conf.epochs and self.epoch >= self.conf.epochs: return True
return False
def should_evaluate(self) -> bool: """Check if should run evaluation.""" # Always eval at the end of training if self.should_stop(): return True
# Iteration-based evaluation if self.conf.eval_every_iter and self.step_in_epoch % self.conf.eval_every_iter == 0: return True
# Epoch-based evaluation (at end of epoch) if self.epoch % self.conf.eval_every_epoch == 0 or self.epoch == self.conf.epochs: return True
return False
# ------------------------------------------------------------------------ # Logging functions # ------------------------------------------------------------------------
@property def current_it(self): """Get the current iteration identifier.""" return self.tot_it if self.conf.log_it else self.tot_n_samples
def record_memory(self, output_dir: Path, it: int, offset: int = 2): if it == offset: self.info( f"Recording memory usage over {self.conf.record_memory} iterations " f"(skipped first {offset} it)." ) torch.cuda.memory._record_memory_history(enabled="all") elif it == offset + self.conf.record_memory: # Record memory usage every self.conf.record_memory iterations snapshot_path = output_dir / f"memory_snapshot_epoch{self.epoch}.json" torch.cuda.memory._dump_snapshot(snapshot_path)
def log_train( self, writer: Writer, it: int, train_loss_metrics: LossMetrics, memory_used: float = 0.0, memory_total: float = 0.0, steps_per_sec: float = 0.0, ): tot_n_samples = self.current_it all_params = self.model.parameters() writer.add_scalar("l2/param_norm", tools.param_norm(all_params), tot_n_samples) loss_metrics = { k: v.compute() if hasattr(v, "compute") else v for k, v in train_loss_metrics.items() } if self.conf.stdout_metrics is None: str_loss_metrics = [f"{k} {v:.3E}" for k, v in loss_metrics.items()] else: str_loss_metrics = [ f"{k} {v:.3E}" for k, v in loss_metrics.items() if k in self.conf.stdout_metrics ]
# Progress and ETA total_steps = self.conf.num_steps or float("inf") pct = int(self.tot_it / total_steps * 100) if total_steps < float("inf") else 0 remaining_its = max(0, total_steps - self.tot_it) if total_steps < float("inf") else 0 eta_str = self.epoch_timer.format_eta(remaining_its, steps_per_sec)
# Write training losses with new format logger.info( "[E {} | it {} | {:.1f}/{:.1f} GB | {}/{} ({}%) | {:.1f} it/s | eta {}] loss {{{}}}".format( self.epoch, it, memory_used, memory_total, tools._format_count(self.tot_it), tools._format_count(int(total_steps)) if total_steps < float("inf") else "?", pct, steps_per_sec, eta_str, ", ".join(str_loss_metrics), ) ) tools.write_dict_summaries(writer, "training", loss_metrics, tot_n_samples) writer.add_scalar("training/lr", self.optimizer.param_groups[0]["lr"], tot_n_samples)
model = self.model.module if self.distributed else self.model if getattr(model.conf, "query_ratio_schedule", 0.0): writer.add_scalar( "schedule/query_ratio_min", model.query_sample_ratio[0], tot_n_samples )
if getattr(self, "_view_schedule_frac", 0.0): writer.add_scalar( "schedule/max_views", self._train_dataset.image_num_range[1], tot_n_samples, )
# Write Epoch writer.add_scalar("training/epoch", self.epoch, tot_n_samples) writer.add_scalar("training/tot_it", self.tot_it, tot_n_samples)
def log_eval(self, writer: Writer, it: int, eval_results: Any): tot_n_samples = self.current_it results, pr_metrics, figures = eval_results str_results = [f"{k} {v:.3E}" for k, v in results.items() if isinstance(v, float)] logger.info(f'[Validation] {{{", ".join(str_results)}}}') tools.write_dict_summaries(writer, "eval", results, tot_n_samples) tools.write_dict_summaries(writer, "eval", pr_metrics, tot_n_samples) if figures is not None: tools.write_image_summaries(writer, "eval", figures, tot_n_samples)
def log_time_and_memory( self, writer: Writer, it: int, batch_size: int, ) -> tuple[float, float, float]: """Log timing and memory stats. Returns (memory_used, memory_total, steps_per_sec).""" tot_n_samples = self.current_it steps_per_sec = 0.0 if self.step_timer.num_steps() > 1: self.step_timer.log_stats()
step_duration, section_times = self.step_timer.compute() steps_per_sec = 1 / step_duration writer.add_scalar("step/total", step_duration, tot_n_samples) writer.add_scalar("step/_per_sec", steps_per_sec, tot_n_samples) writer.add_scalar( "step/_samples_per_sec", steps_per_sec * batch_size * self.num_gpus, tot_n_samples, ) # Write section timings and fractions of step duration. for section_name, duration in section_times.items(): writer.add_scalar(f"step/{section_name}", duration, tot_n_samples)
writer.add_scalar( "step/io_fraction", (section_times["data"] + section_times["to_device"]) / step_duration, tot_n_samples, )
if it % (self.conf.log_every_iter * 2) == 0: # Plot at reduced frequency writer.add_figure("step/sections", self.step_timer.plot(), tot_n_samples)
# Reset the stats after logging self.step_timer.stats.clear()
# Log memory stats memory_used, memory_total = 0.0, 0.0 if torch.cuda.is_available(): device_stats = tools.collect_device_stats() memory_used = device_stats["global_used"] memory_total = device_stats["global_total"] tools.write_dict_summaries(writer, "memory", device_stats, tot_n_samples)
return memory_used, memory_total, steps_per_sec
def log_data( self, writer: Writer, it: int, loader: torch.utils.data.DataLoader, split: str ) -> str: tot_n_samples = self.current_it
name = f"{split}_data"
if hasattr(loader.dataset, "stats"): data_metrics, data_figures = loader.dataset.stats() tools.write_dict_summaries(writer, name, data_metrics, tot_n_samples) tools.write_image_summaries(writer, name, data_figures, tot_n_samples)
writer.add_scalar(f"{name}/num_batches", len(loader), tot_n_samples) writer.add_scalar( f"{name}/batch_size", get_batch_size(loader) * self.num_gpus, tot_n_samples ) writer.add_scalar( f"{name}/num_samples", len(loader) * get_batch_size(loader) * self.num_gpus, tot_n_samples, )
def log_data_stats( self, writer: Writer, it: int, scene_num_samples: dict[str, int], split: str ) -> None: if len(scene_num_samples) == 0: return
tot_n_samples = self.current_it
writer.add_scalar(f"{split}_data/num_scenes", len(scene_num_samples), tot_n_samples) writer.add_scalar( f"{split}_data/avg_frames_per_scene", np.mean(list(scene_num_samples.values())), tot_n_samples, ) writer.add_scalar( f"{split}_data/min_frames_per_scene", np.min(list(scene_num_samples.values())), tot_n_samples, )
# ------------------------------------------------------------------------ # Step functions (train, eval, visualize, ...) # ------------------------------------------------------------------------
def train_step( self, data: Batch, do_update: bool = True, log_grad_norm: bool = False ) -> tuple[Predictions, LossMetrics]: with torch.autocast(device_type=self.device.type, enabled=self.use_mp, dtype=self.dtype): data = mappings.batch_to_device(data, self.device, non_blocking=True) torch.cuda.current_stream().synchronize() # KEEP FOR DEBUGGING TIMING ISSUES self.step_timer.measure("to_device")
pred = self.model(data) self.step_timer.measure("forward")
losses, metrics = self.model.loss_metrics(pred, data) if self.conf.get("compose_loss", None) is not None: losses["total"] = compose_loss({**metrics, **losses}, self.conf.compose_loss) loss = torch.mean(losses["total"]) loss = loss / self.conf.gradient_accumulation_steps loss_metrics = {**metrics, **{"loss/" + k: v for k, v in losses.items()}} self.step_timer.measure("loss_fn")
for k, v in loss_metrics.items(): loss_metrics[k] = v.detach() self.step_timer.measure("loss_fn_sync")
do_backward = loss.requires_grad self.step_timer.measure("backward_check")
if do_backward: self.scaler.scale(loss).backward() self.step_timer.measure("backward")
if self.conf.detect_anomaly: # Check for params without any gradient which causes # problems in distributed training with checkpointing detected_anomaly = False for name, param in self.model.named_parameters(): if param.grad is None and param.requires_grad: logger.warning(f"param {name} has no gradient.") detected_anomaly = True if detected_anomaly: raise RuntimeError("Detected anomaly in training.")
if do_update: self.scaler.unscale_(self.optimizer) if self.conf.get("clip_grad", None): try: torch.nn.utils.clip_grad_norm_( self.model.parameters(), max_norm=self.conf.clip_grad, error_if_nonfinite=True, ) if log_grad_norm: loss_metrics["l2/grad_norm"] = torch.Tensor( [tools.grad_norm(self.model.parameters())] ) self.scaler.step(self.optimizer) except RuntimeError: if self.conf.debug_nan: self._dump_nan_debug(data, pred, loss_metrics) scene = data.get("name", data.get("scene", "unknown")) logger.warning( f"NaN detected in gradients. Skipping iteration. " f"scene={scene}" ) self.scaler.update() else: if log_grad_norm: loss_metrics["l2/grad_norm"] = torch.Tensor( [tools.grad_norm(self.model.parameters())] ) self.scaler.step(self.optimizer) self.scaler.update() self.optimizer.zero_grad()
self.step_timer.measure("step") if not self.conf.lr_schedule.on_epoch: self.learning_rate_step() self._step_query_ratio_schedule() self._step_view_schedule() else: self.warn("Skip iteration due to detach.")
# detach to save memory pred = mappings.batch_to_device(pred, self.device, detach=True, non_blocking=True) loss_metrics = mappings.batch_to_device( loss_metrics, self.device, detach=True, non_blocking=True ) return pred, loss_metrics
def eval_step(self, data: Batch) -> tuple[Predictions, LossMetrics]: raise NotImplementedError()
def visualize(self, data: Batch): raise NotImplementedError()
# ------------------------------------------------------------------------ # Main loops (train_epoch, eval_loop, test_loop) # ------------------------------------------------------------------------
def train_epoch( self, output_dir: Path, dataloader: torch.utils.data.DataLoader, writer: Writer, max_iters: int | None = None, ): if self.rank == 0: self.log_data(writer, 0, dataloader, "training")
do_profile = self.conf.profile if self.conf.profile_every_epoch is not None: do_profile = do_profile and ((self.epoch % self.conf.profile_every_epoch) == 0) else: do_profile = do_profile and (self.epoch == 0) profiler = self.construct_profiler(output_dir) if do_profile else None
# Setup epoch _dist = self.distributed train_loss_metrics = collections.defaultdict(lambda: AverageMetric(distributed=_dist)) pr_metrics = collections.defaultdict(lambda: PRMetric(distributed=_dist)) self.step_timer.hard_reset() self.optimizer.zero_grad() scene_num_samples = collections.defaultdict(int)
self.step_in_epoch = 0 self.output_dir = output_dir
train_iter = iter(dataloader) for it in range(len(dataloader)): self.step_in_epoch = it if self.should_stop(max_iters=max_iters): # Check for early stopping break
try: data = next(train_iter) local_done = torch.zeros(1, device=self.device, dtype=torch.int32) except StopIteration: local_done = torch.ones(1, device=self.device, dtype=torch.int32)
if self.distributed: dist.all_reduce(local_done, op=dist.ReduceOp.MAX)
if local_done.item(): self.info("Epoch ended (dataloader exhausted on at least one rank).") break
if "scene" in data: for scene_id in data["scene"]: scene_num_samples[scene_id] += 1
if self.rank == 0 and it == 0 and self.epoch == 0: # Log a single batch of data mappings.print_summary(data) self.step_timer.measure("data") nominal_bs = get_batch_size( self._train_dataset if hasattr(self, "_train_dataset") else dataloader ) actual_bs = _infer_batch_size(data, nominal_bs) self.tot_n_samples += actual_bs * self.num_gpus self.tot_it += 1
self.model.train()
# Perform gradient accumulation do_update = ((it + 1) % self.conf.gradient_accumulation_steps) == 0
do_log = it % self.conf.log_every_iter == 0 pred, loss_metrics = self.train_step(data, do_update=do_update, log_grad_norm=do_log) if pred is None: continue # skip iteration due to NaN
# All ranks accumulate (distributed compute() needs all ranks) for k, val in loss_metrics.items(): train_loss_metrics[k].update(val) for k, labels_preds in self.model.pr_metrics(pred, data).items(): pr_metrics[k].update(*labels_preds)
# Run profiler (stack trace, ...) if profiler is not None: profiler.step()
# Record memory usage if self.conf.record_memory: self.record_memory(output_dir, it)
# Log training metrics (loss, ...) and hardware usage if do_log: # All ranks must call compute() for distributed allreduce computed_metrics = {k: v.compute() for k, v in train_loss_metrics.items()} computed_metrics.update({k: v.compute() for k, v in pr_metrics.items()}) train_loss_metrics.clear() pr_metrics.clear()
if self.rank == 0: mem_used, mem_total, its_per_sec = self.log_time_and_memory( writer, it, get_batch_size(dataloader) ) self.log_train( writer, it, computed_metrics, memory_used=mem_used, memory_total=mem_total, steps_per_sec=its_per_sec, ) self.log_data_stats(writer, it, scene_num_samples, split="training")
# Make plots of training steps if self.conf.plot_every_iter is not None: if it % self.conf.plot_every_iter == 0 and self.rank == 0: with torch.no_grad(): figures = self.model.visualize(pred, data)
tools.write_image_summaries(writer, "training", figures, self.current_it) del figures
# Log gradients if self.conf.log_grad_every_iter is not None: raise NotImplementedError()
del pred, data, loss_metrics if it == 0: torch.cuda.empty_cache() # should be cleared at the first iter
self.step_timer.measure("end") self.step_timer.reset() self.optimizer.zero_grad()
del train_loss_metrics, train_iter gc.collect() if self.distributed: dist.barrier()
def eval_loop( self, output_dir: Path, loader: torch.utils.data.DataLoader, max_iters: int | None = None, ): """Run evaluation loop.""" self.model.eval() with torch.no_grad(): with tools.fork_rng(seed=self.conf.seed): results, pr_metrics, figures = run_evaluation( self.model, loader, self.device, self.conf, self.rank, pbar=(self.rank == 0), max_iters=max_iters, compose_loss_str=self.conf.get("compose_loss", None), ) return results, pr_metrics, figures
@torch.compiler.set_stance("force_eager") def test_loop( self, output_dir: Path, benchmark_name: str, benchmark_conf: str, writer: SummaryWriter | None = None, ): """Interface for test loop.""" logger.info(f"Running eval on {benchmark_name}") model = self.sequential_model() # no DDP self.info("Configuration: \n%s", OmegaConf.to_yaml(benchmark_conf)) eval_dir = output_dir / f"test_{self.epoch}" / benchmark_name with tools.fork_rng(seed=self.conf.seed): summaries, figures, _ = eval.run_benchmark( benchmark_name, benchmark_conf, eval_dir, model.eval(), ) # Create symlink to eval_dir at head symlink_dir = output_dir / benchmark_name symlink_dir.unlink(missing_ok=True) symlink_dir.symlink_to(eval_dir) str_summaries = [f"{k} {v:.3E}" for k, v in summaries.items() if isinstance(v, float)] logger.info(f'[{benchmark_name}] {{{", ".join(str_summaries)}}}') if writer is not None: step = self.current_it tools.write_dict_summaries(writer, f"test_{benchmark_name}", summaries, step) tools.write_image_summaries(writer, f"test_{benchmark_name}", figures, step) del figures return summaries
def run_all_benchmarks(self, output_dir: Path, writer: Writer = None, force: bool = False): epoch = 0 if force else self.epoch for bench_name, (bench_conf, every_epoch) in self.benchmarks.items(): if epoch % every_epoch == 0 and self.rank == 0: # TODO: Make benchmarks distributed! self.test_loop(output_dir, bench_name, bench_conf, writer) if self.distributed: dist.barrier()
def run_eval( self, output_dir: Path, val_dataset: datasets.BaseDataset, writer: Writer = None, max_iters: int | None = None, ) -> tuple[Any, ...]: eval_loader = val_dataset.get_loader( distributed=self.distributed, pinned=True, ) if self.rank == 0 and writer is not None: self.log_data(writer, 0, eval_loader, "eval") self.info(f"Evaluation loader has {len(eval_loader)} batches") eval_results = self.eval_loop(output_dir, eval_loader, max_iters=max_iters) del eval_loader if self.rank == 0 and writer is not None: self.log_eval(writer, 0, eval_results) # Free eval figures/tensors before returning (only keep scalar results) results = eval_results[0] del eval_results gc.collect() plt.close("all") return results, None, None
# ------------------------------------------------------------------------ # Run full training on dataset (train multiple epochs + validation + test) # ------------------------------------------------------------------------
def train_loop( self, output_dir: Path, train_dataset: datasets.BaseDataset, val_dataset: datasets.BaseDataset | None = None, writer: Writer = None, ): """The main function.""" self._train_dataset = train_dataset self._val_dataset = val_dataset
# Initialize writer full_conf = OmegaConf.create( {"data": train_dataset.conf, "model": self.model_conf, "train": self.conf} )
if writer is None: writer = self.get_writer(output_dir, full_conf)
if self.conf.get("eval_init", False) and val_dataset is not None: self.run_eval(output_dir, val_dataset, writer) self.run_all_benchmarks(output_dir, writer, force=True)
# Cache view schedule params self._view_schedule_frac = train_dataset.conf.get("view_schedule", 0.0) self._view_schedule_range = list(train_dataset.image_num_range)
# Apply view schedule before first loader so epoch 0 workers get correct range self._step_view_schedule()
best_eval = None
# Start Loop while not self.should_stop(): self.info(f"Starting epoch {self.epoch}") self.epoch_timer.start_epoch()
# Re-seed epoch tools.set_seed(self.conf.seed + self.epoch)
# Recreate loader each epoch so forkserver workers get updated state train_dataset.set_epoch(self.epoch) train_loader = train_dataset.get_loader( distributed=self.distributed, pinned=True, )
if self.conf.lr_schedule.on_epoch and self.epoch > 0: self.learning_rate_step(verbose=True)
self.info("Start training") self.train_epoch(output_dir, train_loader, writer) self.epoch_timer.measure("train")
self.epoch += 1
# Eval before checkpoint so timeout during eval doesn't skip it on resume eval_results = None if self.should_evaluate() and val_dataset is not None: eval_results, _, _ = self.run_eval(output_dir, val_dataset, writer) self.epoch_timer.measure("eval")
# Checkpointing with eval results and best tracking best_eval = self.save_checkpoint( output_dir, full_conf, results=eval_results, best_eval=best_eval ) self.epoch_timer.measure("ckpt")
# Run test loops self.run_all_benchmarks(output_dir, writer) self.epoch_timer.measure("bench")
# Log epoch summary and finalize self.epoch_timer.log_epoch_summary(self.epoch - 1) self.epoch_timer.end_epoch()
if self.distributed: dist.barrier() # Sync before next epoch del train_loader gc.collect() plt.close("all")
# Final evals if val_dataset is not None: self.run_eval(output_dir, val_dataset, writer) self.run_all_benchmarks(output_dir, writer, force=True)
if writer is not None: writer.close()
def scale_by_device_count( data_conf: DictConfig, num_gpus: int, batch_size_per_gpu: bool | None = None) -> DictConfig: """Scale data conf by device count (Maybe).""" batch_size_per_gpu = ( batch_size_per_gpu if batch_size_per_gpu is not None else data_conf.get("batch_size_per_gpu", False) ) # adjust batch size and num of workers since these are per GPU if "batch_size" in data_conf and not batch_size_per_gpu: data_conf.batch_size = int(data_conf.batch_size / num_gpus)
logger.info( f"Batch size: global={data_conf.batch_size * num_gpus}, per-device={data_conf.batch_size}" ) if "train_batch_size" in data_conf and not batch_size_per_gpu: data_conf.train_batch_size = int(data_conf.train_batch_size / num_gpus)
return data_conf
def launch_training(output_dir: Path, conf: DictConfig, device: torch.device): tools.set_seed(conf.train.seed) data_conf = scale_by_device_count(conf.data, conf.train.num_devices or 1)
# Create separate dataset instances for train and val splits DatasetClass = datasets.get_dataset(data_conf.name) train_dataset = DatasetClass(data_conf, split="train") val_dataset = DatasetClass(data_conf, split="val")
if conf.train.get("reload_model"): assert conf.train.load_experiment is not None pretrain_dir = settings.TRAINING_PATH / conf.train.load_experiment logger.info(f"Finetuning: Loading model config from {pretrain_dir}.") pretrain_conf = OmegaConf.load(pretrain_dir / "config.yaml") conf.model = OmegaConf.merge(pretrain_conf.model, conf.model) model = models.get_model(conf.model.name)(conf.model).to(device) if conf.get("lazy_init", True): logger.info("Running dummy forward pass to initialize lazy modules.") dummy_batch = train_dataset.get_dummy_batch() dummy_batch = mappings.batch_to_device(dummy_batch, device, non_blocking=False) with torch.no_grad(): model(dummy_batch) del dummy_batch logger.info("Dummy forward pass completed.") trainer = Trainer.init(conf.train, model, device=device)
# Register benchmarks (e.g. MegaDepth1500) for bench in conf.train.get("run_benchmarks", ()): bench_name, every_epoch = (bench, None) if isinstance(bench, str) else bench eval.get_benchmark(bench_name) # Check if benchmark exists bench_conf = {} if conf.get("benchmarks") is None else conf.benchmarks.get(bench_name, {}) bench_conf = OmegaConf.merge({"eval": conf.get("eval", {})}, OmegaConf.create(bench_conf)) trainer.register_benchmark(bench_name, bench_conf, every_epoch=every_epoch) # Maybe load experiment trainer.maybe_load_checkpoint()
# Run actual training loop trainer.train_loop(output_dir, train_dataset, val_dataset)123456789101112131415161718192021222324252627"""ZipSplat — feed-forward 3DGS from multi-view images.
Author: Alexander Veicht"""
import logging
from zipsplat.camera import Camerafrom zipsplat.gaussians import Gaussiansfrom zipsplat.pose import Posefrom zipsplat.predictor import ZipSplatfrom zipsplat.utils import load_image, load_video
__all__ = ["ZipSplat", "Camera", "Pose", "Gaussians", "load_image", "load_video"]
formatter = logging.Formatter( fmt="[%(asctime)s %(name)s %(levelname)s] %(message)s", datefmt="%m/%d/%Y %H:%M:%S",)handler = logging.StreamHandler()handler.setFormatter(formatter)handler.setLevel(logging.INFO)
logger = logging.getLogger(__name__)logger.setLevel(logging.INFO)logger.addHandler(handler)logger.propagate = False123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422"""Depth-Anything-V3 ViT backbone with multi-view alternating local/global attention.
Vendored and trimmed from: - DINOv2 ViT (© Meta Platforms, Apache-2.0) - DA3 multi-view extensions and camera-prior encoder (© 2025 ByteDance Ltd., Apache-2.0; Lin et al. "Depth Anything 3", 2025)
Includes the optional camera-prior encoder (`CameraEnc`) that injects pose + intrinsics as a tokenat the `alt_start` layer, replacing the model's learned camera token.
Author: Alexander Veicht"""
import mathfrom functools import partialfrom typing import List, Optional, Sequence, Tuple
import torchimport torch.nn as nnfrom einops import rearrangefrom torch import Tensorfrom zipsplat import modulesfrom zipsplat.camera import Camerafrom zipsplat.pose import Pose
# ---------------------------------------------------------------------------# Camera prior encoder# ---------------------------------------------------------------------------
class CameraEnc(nn.Module): """Encodes (Pose, Camera) into per-view tokens injected at the ViT's `alt_start` layer.
Pose encoding is derived from world-to-cam (DA3 training convention): [t_w2c (3), quat_xyzw_w2c (4), vfov, hfov]. """
def __init__( self, dim_out: int = 1024, dim_in: int = 9, trunk_depth: int = 4, num_heads: int = 16, mlp_ratio: float = 4.0, init_values: float = 0.01, ) -> None: super().__init__() self.trunk = nn.Sequential( *[ modules.SelfAttentionBlock( dim=dim_out, num_heads=num_heads, mlp_ratio=mlp_ratio, init_values=init_values ) for _ in range(trunk_depth) ] ) self.token_norm = nn.LayerNorm(dim_out) self.trunk_norm = nn.LayerNorm(dim_out) self.pose_branch = modules.Mlp( in_features=dim_in, hidden_features=dim_out // 2, out_features=dim_out )
def forward(self, pose: Pose, camera: Camera) -> Tensor: w2c = pose.inv() quat_xyzw = w2c.quat[..., [1, 2, 3, 0]] fov = torch.stack([camera.vfov, camera.hfov], dim=-1) encoding = torch.cat([w2c.t, quat_xyzw, fov], dim=-1).float() return self.trunk_norm(self.trunk(self.token_norm(self.pose_branch(encoding))))
# ---------------------------------------------------------------------------# DA3 ViT# ---------------------------------------------------------------------------
_FFN_LAYERS = { "mlp": modules.Mlp, "swiglufused": modules.SwiGLUFFNFused, "swiglu": modules.SwiGLUFFN,}
class DAV3DinoVisionTransformer(nn.Module): """DA3 DINO Vision Transformer with multi-view alternating local/global attention."""
def __init__( self, img_size: int = 518, patch_size: int = 14, in_chans: int = 3, embed_dim: int = 384, depth: int = 12, num_heads: int = 6, mlp_ratio: float = 4.0, qkv_bias: bool = True, ffn_bias: bool = True, proj_bias: bool = True, init_values: float = 1.0, ffn_layer: str = "mlp", num_register_tokens: int = 0, interpolate_antialias: bool = False, interpolate_offset: float = 0.1, alt_start: int = -1, qknorm_start: int = -1, rope_start: int = -1, rope_freq: float = 100.0, out_layers: Sequence[int] = (5, 7, 9, 11), cat_token: bool = True, patch_start_idx: int = 1, ) -> None: super().__init__() norm_layer = partial(nn.LayerNorm, eps=1e-6)
self.embed_dim = embed_dim self.num_features = embed_dim self.patch_size = patch_size self.num_register_tokens = num_register_tokens self.interpolate_antialias = interpolate_antialias self.interpolate_offset = interpolate_offset self.alt_start = alt_start self.qknorm_start = qknorm_start self.rope_start = rope_start self.rope_freq = rope_freq self.cat_token = cat_token self.out_layers = list(out_layers) self.patch_start_idx = patch_start_idx self.num_tokens = 1
self.patch_embed = modules.PatchEmbed( img_size=img_size, patch_size=patch_size, in_chans=in_chans, embed_dim=embed_dim ) num_patches = self.patch_embed.num_patches
self.cls_token = nn.Parameter(torch.zeros(1, 1, embed_dim)) if alt_start != -1: self.camera_token = nn.Parameter(torch.randn(1, 2, embed_dim)) self.pos_embed = nn.Parameter(torch.zeros(1, num_patches + self.num_tokens, embed_dim)) self.register_tokens = ( nn.Parameter(torch.zeros(1, num_register_tokens, embed_dim)) if num_register_tokens else None )
if ffn_layer not in _FFN_LAYERS: raise ValueError(f"Unknown ffn_layer={ffn_layer!r}") ffn_class = _FFN_LAYERS[ffn_layer]
if rope_start != -1: self.rope = modules.RotaryPositionEmbedding2D(frequency=rope_freq) self.position_getter = modules.PositionGetter() else: self.rope = None self.position_getter = None
self.blocks = nn.ModuleList( [ modules.SelfAttentionBlock( dim=embed_dim, num_heads=num_heads, mlp_ratio=mlp_ratio, qkv_bias=qkv_bias, proj_bias=proj_bias, ffn_bias=ffn_bias, norm_layer=norm_layer, ffn_layer=ffn_class, init_values=init_values, qk_norm=(i >= qknorm_start) if qknorm_start != -1 else False, rope=self.rope if (i >= rope_start and rope_start != -1) else None, ) for i in range(depth) ] ) self.norm = norm_layer(embed_dim)
def interpolate_pos_encoding(self, x: Tensor, w: int, h: int) -> Tensor: previous_dtype = x.dtype npatch = x.shape[1] - 1 N = self.pos_embed.shape[1] - 1 if npatch == N and w == h: return self.pos_embed pos_embed = self.pos_embed.float() class_pos_embed = pos_embed[:, 0] patch_pos_embed = pos_embed[:, 1:] dim = x.shape[-1] w0 = w // self.patch_size h0 = h // self.patch_size M = int(math.sqrt(N)) assert N == M * M kwargs = {} if self.interpolate_offset: kwargs["scale_factor"] = ( (w0 + self.interpolate_offset) / M, (h0 + self.interpolate_offset) / M, ) else: kwargs["size"] = (w0, h0) patch_pos_embed = nn.functional.interpolate( patch_pos_embed.reshape(1, M, M, dim).permute(0, 3, 1, 2), mode="bicubic", antialias=self.interpolate_antialias, **kwargs, ) assert (w0, h0) == patch_pos_embed.shape[-2:] patch_pos_embed = patch_pos_embed.permute(0, 2, 3, 1).view(1, -1, dim) return torch.cat((class_pos_embed.unsqueeze(0), patch_pos_embed), dim=1).to(previous_dtype)
def prepare_tokens(self, x: Tensor) -> Tensor: B, S, _, w, h = x.shape x = rearrange(x, "b s c h w -> (b s) c h w") x = self.patch_embed(x) cls_token = self.cls_token.expand(B * S, -1, -1) x = torch.cat((cls_token, x), dim=1) x = x + self.interpolate_pos_encoding(x, w, h) if self.register_tokens is not None: x = torch.cat( (x[:, :1], self.register_tokens.expand(x.shape[0], -1, -1), x[:, 1:]), dim=1 ) return rearrange(x, "(b s) n c -> b s n c", b=B, s=S)
def _prepare_rope( self, B: int, S: int, H: int, W: int, device: torch.device ) -> Tuple[Optional[Tensor], Optional[Tensor]]: """Build RoPE positions for local (`pos`) and global (`pos_nodiff`) attention.
For global attention, positions are constant within a view so RoPE acts as a view-id rather than a spatial encoding. Special (CLS) tokens get position 0. """ if self.rope is None: return None, None h_p, w_p = H // self.patch_size, W // self.patch_size pos = self.position_getter(B * S, h_p, w_p, device=device) pos = rearrange(pos, "(b s) n c -> b s n c", b=B) + 1 pos_nodiff = torch.ones_like(pos) if self.patch_start_idx > 0: zeros = torch.zeros(B, S, self.patch_start_idx, 2, device=device, dtype=pos.dtype) pos = torch.cat([zeros, pos], dim=2) pos_nodiff = torch.cat([zeros, pos_nodiff], dim=2) return pos, pos_nodiff
@staticmethod def _process_attention( x: Tensor, block: nn.Module, is_global: bool, pos: Optional[Tensor] ) -> Tensor: """Run a block under either per-view local or cross-view global attention.""" b, s, n = x.shape[:3] if is_global: x = rearrange(x, "b s n c -> b (s n) c") pos = rearrange(pos, "b s n c -> b (s n) c") if pos is not None else None x = block(x, pos=pos) return rearrange(x, "b (s n) c -> b s n c", b=b, s=s, n=n) x = rearrange(x, "b s n c -> (b s) n c") pos = rearrange(pos, "b s n c -> (b s) n c") if pos is not None else None x = block(x, pos=pos) return rearrange(x, "(b s) n c -> b s n c", b=b, s=s)
def _default_cam_token(self, B: int, S: int) -> Tensor: """Build the learned (ref + src) camera-token bank when no priors are provided.""" ref = self.camera_token[:, :1].expand(B, -1, -1) src = self.camera_token[:, 1:].expand(B, S - 1, -1) return torch.cat([ref, src], dim=1)
def _apply_norm(self, x: Tensor) -> Tensor: """Final LN. With `cat_token`, only the global half is normed (DA3 convention).""" if not self.cat_token: return self.norm(x) D = self.embed_dim return torch.cat([x[..., :D], self.norm(x[..., D:])], dim=-1)
def forward( self, x: Tensor, cam_token: Optional[Tensor] = None ) -> Tuple[Tuple[Tensor, Tensor], ...]: """Run blocks and return per-output-layer (full_features, camera_token).
Args: x: (B, S, 3, H, W) input. cam_token: optional (B, S, embed_dim) tensor injected at `alt_start` to override the learned camera token (used by the prior path).
Returns: Tuple of (output, camera_token) per layer in `self.out_layers`. `output` shape is (B, S, T, D) or (B, S, T, 2D) when `cat_token=True`. """ B, S, _, H, W = x.shape x = self.prepare_tokens(x) pos, pos_nodiff = self._prepare_rope(B, S, H, W, x.device) outputs: List[Tuple[Tensor, Tensor]] = [] local_x: Optional[Tensor] = None
for i, blk in enumerate(self.blocks): if i == self.alt_start: x[:, :, 0] = cam_token if cam_token is not None else self._default_cam_token(B, S)
is_global = self.alt_start != -1 and i >= self.alt_start and i % 2 == 1 rope_active = self.rope is not None and i >= self.rope_start blk_pos = (pos_nodiff if is_global else pos) if rope_active else None x = self._process_attention(x, blk, is_global=is_global, pos=blk_pos)
if not is_global: local_x = x
if i in self.out_layers: out_x = torch.cat([local_x, x], dim=-1) if self.cat_token else x outputs.append((out_x[:, :, 0], out_x))
strip = 1 + self.num_register_tokens return tuple((self._apply_norm(full)[..., strip:, :], cam_tok) for cam_tok, full in outputs)
# ---------------------------------------------------------------------------# DA3 variant factories# ---------------------------------------------------------------------------
def vit_small(out_layers: Sequence[int] = (5, 7, 9, 11), **kwargs) -> DAV3DinoVisionTransformer: return DAV3DinoVisionTransformer( embed_dim=384, depth=12, num_heads=6, out_layers=out_layers, alt_start=4, qknorm_start=4, rope_start=4, ffn_layer="mlp", **kwargs, )
def vit_base(out_layers: Sequence[int] = (5, 7, 9, 11), **kwargs) -> DAV3DinoVisionTransformer: return DAV3DinoVisionTransformer( embed_dim=768, depth=12, num_heads=12, out_layers=out_layers, alt_start=4, qknorm_start=4, rope_start=4, ffn_layer="mlp", **kwargs, )
def vit_large(out_layers: Sequence[int] = (11, 15, 19, 23), **kwargs) -> DAV3DinoVisionTransformer: return DAV3DinoVisionTransformer( embed_dim=1024, depth=24, num_heads=16, out_layers=out_layers, alt_start=8, qknorm_start=8, rope_start=8, ffn_layer="mlp", **kwargs, )
def vit_giant2(out_layers: Sequence[int] = (19, 27, 33, 39), **kwargs) -> DAV3DinoVisionTransformer: return DAV3DinoVisionTransformer( embed_dim=1536, depth=40, num_heads=24, out_layers=out_layers, alt_start=13, qknorm_start=13, rope_start=13, ffn_layer="swiglufused", **kwargs, )
_VARIANT_FACTORIES = { "vits": vit_small, "vitb": vit_base, "vitl": vit_large, "vitg": vit_giant2,}
# ---------------------------------------------------------------------------# DA3 encoder (backbone + optional camera prior path)# ---------------------------------------------------------------------------
class DAV3Encoder(nn.Module): """DA3 backbone with an optional camera-prior token encoder.
When `pose` and `intrinsics` are passed to forward and `with_camera_enc=True`, the `CameraEnc` encodes them into per-view tokens that override the model's learned camera token at `alt_start`. """
def __init__( self, vit_name: str = "vitg", out_layers: Sequence[int] = (19, 29, 39), with_camera_enc: bool = True, **vit_kwargs, ) -> None: super().__init__() if vit_name not in _VARIANT_FACTORIES: raise ValueError( f"Unknown vit_name={vit_name!r}; choose from {list(_VARIANT_FACTORIES)}" ) self.backbone = _VARIANT_FACTORIES[vit_name](out_layers=out_layers, **vit_kwargs) self.embed_dim = self.backbone.embed_dim self.cam_enc = CameraEnc(dim_out=self.embed_dim) if with_camera_enc else None
def forward( self, image: Tensor, pose: Optional[Pose] = None, camera: Optional[Camera] = None ) -> Tuple[Tuple[Tensor, Tensor], ...]: """Run the backbone, optionally injecting camera priors.
Args: image: (B, S, 3, H, W) float input in [0, 1]. pose: cam-to-world Pose with batch shape (B, S) for prior injection. Optional. camera: Camera with matching batch shape for prior injection. Optional.
Returns: Tuple of (output, camera_token) per output layer. """ cam_token = None if pose is not None and camera is not None and self.cam_enc is not None: cam_token = self.cam_enc(pose, camera) return self.backbone(image, cam_token=cam_token)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138"""Pinhole camera intrinsics, packed as [w, h, fx, fy, cx, cy].
Author: Alexander Veicht"""
from typing import Optional, Tuple, Union
import torchfrom zipsplat.utils import TensorWrapper
def _focal_from_fov(fov: torch.Tensor, size: torch.Tensor) -> torch.Tensor: return size / (2 * torch.tan(fov / 2))
def _fov_from_focal(focal: torch.Tensor, size: torch.Tensor) -> torch.Tensor: return 2 * torch.atan(size / (2 * focal))
class Camera(TensorWrapper): """Pinhole camera. data_ packs [w, h, fx, fy, cx, cy]."""
def __init__(self, data_: torch.Tensor): assert data_.shape[-1] == 6 self.data_ = data_ super().__post_init__()
@classmethod def from_K(cls, K: torch.Tensor, w: int, h: int) -> "Camera": """Build from a 3x3 intrinsics matrix and image size (w, h).""" K = torch.as_tensor(K, dtype=torch.float32) fx, fy = K[..., 0, 0], K[..., 1, 1] cx, cy = K[..., 0, 2], K[..., 1, 2] w_t = torch.full_like(fx, float(w)) h_t = torch.full_like(fy, float(h)) return cls(torch.stack([w_t, h_t, fx, fy, cx, cy], -1))
@classmethod def from_focal( cls, fx: torch.Tensor, fy: Optional[torch.Tensor] = None, *, w: int, h: int, cx: Optional[torch.Tensor] = None, cy: Optional[torch.Tensor] = None, ) -> "Camera": """Build from focal length(s) and image size.
fy defaults to fx (square pixels); principal point defaults to image center. """ fx = torch.as_tensor(fx, dtype=torch.float32) fy = fx if fy is None else torch.as_tensor(fy, dtype=torch.float32) w_t = torch.full_like(fx, float(w)) h_t = torch.full_like(fy, float(h)) cx_t = torch.full_like(fx, 0.5 * w) if cx is None else torch.as_tensor(cx, dtype=fx.dtype) cy_t = torch.full_like(fy, 0.5 * h) if cy is None else torch.as_tensor(cy, dtype=fy.dtype) return cls(torch.stack([w_t, h_t, fx, fy, cx_t, cy_t], -1))
@classmethod def from_fov( cls, fov_x: torch.Tensor, fov_y: Optional[torch.Tensor] = None, *, w: int, h: int, ) -> "Camera": """Build from FOV(s) in radians and image size.
fov_y defaults to fov_x; principal point at image center. """ fov_x = torch.as_tensor(fov_x, dtype=torch.float32) fov_y = fov_x if fov_y is None else torch.as_tensor(fov_y, dtype=torch.float32) w_t = torch.full_like(fov_x, float(w)) h_t = torch.full_like(fov_y, float(h)) fx = _focal_from_fov(fov_x, w_t) fy = _focal_from_fov(fov_y, h_t) return cls(torch.stack([w_t, h_t, fx, fy, 0.5 * w_t, 0.5 * h_t], -1))
@property def K(self) -> torch.Tensor: """3x3 intrinsics matrix, shape (..., 3, 3).""" K = torch.zeros(*self.shape, 3, 3, device=self.device, dtype=self.dtype) K[..., 0, 0] = self.data_[..., 2] K[..., 1, 1] = self.data_[..., 3] K[..., 0, 2] = self.data_[..., 4] K[..., 1, 2] = self.data_[..., 5] K[..., 2, 2] = 1.0 return K
@property def size(self) -> torch.Tensor: """Image size (w, h), shape (..., 2).""" return self.data_[..., :2]
@property def f(self) -> torch.Tensor: """Focal lengths (fx, fy), shape (..., 2).""" return self.data_[..., 2:4]
@property def c(self) -> torch.Tensor: """Principal point (cx, cy), shape (..., 2).""" return self.data_[..., 4:6]
@property def hfov(self) -> torch.Tensor: """Horizontal FOV in radians.""" return _fov_from_focal(self.f[..., 0], self.size[..., 0])
@property def vfov(self) -> torch.Tensor: """Vertical FOV in radians.""" return _fov_from_focal(self.f[..., 1], self.size[..., 1])
def scale(self, factor: Union[float, Tuple[float, float], torch.Tensor]) -> "Camera": """Scale intrinsics + image size (for image resize).""" if isinstance(factor, (int, float)): factor = (float(factor), float(factor)) s = torch.as_tensor(factor, dtype=self.dtype, device=self.device) return self.__class__(torch.cat([self.size * s, self.f * s, self.c * s], -1))
def crop(self, pad: Union[Tuple[float, float], torch.Tensor]) -> "Camera": """Update camera after symmetric pad/crop of (dw, dh). Negative pad = crop.""" pad = torch.as_tensor(pad, dtype=self.dtype, device=self.device) size = self.size + pad c = self.c + pad / 2 return self.__class__(torch.cat([size, self.f, c], -1))
def __str__(self): if self.shape == (): w, h, fx, fy, cx, cy = self.data_.tolist() return ( f"Camera(w={w:.0f}, h={h:.0f}, fx={fx:.2f}, fy={fy:.2f}, cx={cx:.2f}, cy={cy:.2f})" ) return f"Camera({tuple(self.shape)} {self.dtype} {self.device})"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178"""SE(3) cam-to-world pose, packed as flatten(R, 3x3) + t = [r00..r22, tx, ty, tz] (size 12).
OpenCV convention: x-right, y-down, z-forward. `t` is the camera origin in world coords.
Author: Alexander Veicht"""
from typing import Tuple, Union
import torchfrom zipsplat.utils import TensorWrapper
class Pose(TensorWrapper): """SE(3) cam-to-world pose."""
def __init__(self, data_: torch.Tensor): assert data_.shape[-1] == 12 self.data_ = data_ super().__post_init__()
@classmethod def from_Rt(cls, R: torch.Tensor, t: torch.Tensor) -> "Pose": """Build from cam-to-world rotation (..., 3, 3) and translation (..., 3).""" R = torch.as_tensor(R, dtype=torch.float32) t = torch.as_tensor(t, dtype=torch.float32) assert R.shape[-2:] == (3, 3) assert t.shape[-1] == 3 assert R.shape[:-2] == t.shape[:-1] return cls(torch.cat([R.flatten(start_dim=-2), t], -1))
@classmethod def from_4x4mat(cls, T: torch.Tensor) -> "Pose": """Build from a 4x4 cam-to-world matrix.""" T = torch.as_tensor(T, dtype=torch.float32) assert T.shape[-2:] == (4, 4) return cls.from_Rt(T[..., :3, :3], T[..., :3, 3])
@classmethod def identity(cls, batch_shape: Tuple[int, ...] = (), device=None, dtype=None) -> "Pose": """Identity pose, optionally batched.""" R = torch.eye(3, device=device, dtype=dtype).expand(*batch_shape, 3, 3) t = torch.zeros(*batch_shape, 3, device=device, dtype=dtype) return cls.from_Rt(R, t)
@property def R(self) -> torch.Tensor: """Rotation matrix, shape (..., 3, 3).""" return self.data_[..., :9].reshape(*self.shape, 3, 3)
@property def t(self) -> torch.Tensor: """Translation, shape (..., 3).""" return self.data_[..., 9:]
@property def quat(self) -> torch.Tensor: """Rotation as wxyz quaternion, shape (..., 4).""" return Pose.matrix_to_quaternion(self.R)
@staticmethod def matrix_to_quaternion(matrix: torch.Tensor) -> torch.Tensor: """3x3 rotation matrix → wxyz quaternion. Shape (..., 3, 3) → (..., 4).""" if matrix.size(-1) != 3 or matrix.size(-2) != 3: raise ValueError(f"Invalid rotation matrix shape {matrix.shape}.") batch_dim = matrix.shape[:-2] m00, m01, m02, m10, m11, m12, m20, m21, m22 = torch.unbind( matrix.reshape(batch_dim + (9,)), dim=-1 ) q2 = torch.stack( [ 1.0 + m00 + m11 + m22, 1.0 + m00 - m11 - m22, 1.0 - m00 + m11 - m22, 1.0 - m00 - m11 + m22, ], dim=-1, ) q_abs = torch.where(q2 > 0, torch.sqrt(q2), torch.zeros_like(q2)) quat_by_rijk = torch.stack( [ torch.stack([q_abs[..., 0] ** 2, m21 - m12, m02 - m20, m10 - m01], dim=-1), torch.stack([m21 - m12, q_abs[..., 1] ** 2, m10 + m01, m02 + m20], dim=-1), torch.stack([m02 - m20, m10 + m01, q_abs[..., 2] ** 2, m12 + m21], dim=-1), torch.stack([m10 - m01, m20 + m02, m21 + m12, q_abs[..., 3] ** 2], dim=-1), ], dim=-2, ) flr = torch.tensor(0.1, dtype=q_abs.dtype, device=q_abs.device) quat_candidates = quat_by_rijk / (2.0 * q_abs[..., None].max(flr)) indices = q_abs.argmax(dim=-1, keepdim=True) gather_indices = indices.unsqueeze(-1).expand(list(batch_dim) + [1, 4]) out = torch.gather(quat_candidates, -2, gather_indices).squeeze(-2) return torch.where(out[..., 0:1] < 0, -out, out)
@property def Rt(self) -> torch.Tensor: """4x4 cam-to-world matrix.""" T = torch.zeros(*self.shape, 4, 4, dtype=self.dtype, device=self.device) T[..., :3, :3] = self.R T[..., :3, 3] = self.t T[..., 3, 3] = 1 return T
@property def Rt_inv(self) -> torch.Tensor: """4x4 world-to-cam matrix (gsplat viewmats convention).""" return self.inv().Rt
def inv(self) -> "Pose": """Invert the pose.""" R = self.R.transpose(-1, -2) t = -(R @ self.t.unsqueeze(-1)).squeeze(-1) return self.__class__.from_Rt(R, t)
def compose(self, other: "Pose") -> "Pose": """Chain poses: T_B2C.compose(T_A2B) -> T_A2C.""" R = self.R @ other.R t = self.t + (self.R @ other.t.unsqueeze(-1)).squeeze(-1) return self.__class__.from_Rt(R, t)
def transform(self, p3d: torch.Tensor) -> torch.Tensor: """Transform 3D points (..., N, 3).""" p3d = torch.as_tensor(p3d, dtype=self.dtype, device=self.device) assert p3d.shape[-1] == 3 return p3d @ self.R.transpose(-1, -2) + self.t.unsqueeze(-2)
def __matmul__(self, other: Union["Pose", torch.Tensor]) -> Union["Pose", torch.Tensor]: """`pose @ other_pose` -> compose; `pose @ p3d` -> transform points.""" if isinstance(other, self.__class__): return self.compose(other) return self.transform(other)
@classmethod def orbit( cls, center: torch.Tensor, radius: float, azimuths: torch.Tensor, elevations: torch.Tensor, ) -> "Pose": """Camera poses on a sphere looking at `center`. OpenCV convention.
Args: center: scene center, shape (3,). radius: distance from center. azimuths: azimuth angles in degrees, shape (N,). elevations: elevation angles in degrees, shape (N,). """ center = torch.as_tensor(center, dtype=torch.float32) device, dtype = center.device, center.dtype az = torch.deg2rad(torch.as_tensor(azimuths, dtype=dtype, device=device)) el = torch.deg2rad(torch.as_tensor(elevations, dtype=dtype, device=device)) up = torch.tensor([0.0, -1.0, 0.0], device=device, dtype=dtype)
cos_el, sin_el = torch.cos(el), torch.sin(el) cos_az, sin_az = torch.cos(az), torch.sin(az) positions = ( torch.stack( [radius * cos_el * sin_az, -radius * sin_el, -radius * cos_el * cos_az], dim=-1, ) + center )
forward = center - positions forward = forward / forward.norm(dim=-1, keepdim=True) right = torch.linalg.cross(forward, up.expand_as(forward)) right_norm = right.norm(dim=-1, keepdim=True) fallback = torch.tensor([1.0, 0.0, 0.0], device=device, dtype=dtype).expand_as(right) right = torch.where(right_norm < 1e-6, fallback, right / right_norm) down = torch.linalg.cross(forward, right) down = down / down.norm(dim=-1, keepdim=True) Rs = torch.stack([right, down, forward], dim=-1) return cls.from_Rt(Rs, positions)
def __str__(self): return f"Pose({tuple(self.shape)} {self.dtype} {self.device})"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136"""ZipSplat wrapper: weight loading + clean inference API.
Author: Alexander Veicht"""
import loggingfrom pathlib import Pathfrom typing import Any, Dict, List, Optional, Tuple, Union
import torchimport torch.nn as nnfrom torch import Tensorfrom zipsplat.camera import Camerafrom zipsplat.gaussians import Gaussiansfrom zipsplat.pose import Posefrom zipsplat.utils import IMAGE_SIZE, to_squarefrom zipsplat.zipsplat import ZipSplat as Model
logger = logging.getLogger(__name__)
# Registry of pre-trained checkpoints (HuggingFace Hub resolve URLs)._WEIGHTS_URLS: Dict[str, str] = { "zipsplat": "https://huggingface.co/veichta/zipsplat/resolve/main/zipsplat-da3g-252p.tar",}
def _load_state_dict(weights: str) -> Dict[str, Any]: """Resolve `weights` (registry name / path / URL) to a model state dict.
Loads `.tar` checkpoints and returns their "model" entry. Uses weights_only=False, so only load trusted checkpoints. """ if weights in _WEIGHTS_URLS: weights = _WEIGHTS_URLS[weights] if weights.startswith(("http://", "https://")): ckpt = torch.hub.load_state_dict_from_url( weights, model_dir=f"{torch.hub.get_dir()}/zipsplat", map_location="cpu", file_name=Path(weights).name, weights_only=False, ) elif Path(weights).exists(): ckpt = torch.load(weights, map_location="cpu", weights_only=False) else: raise ValueError(f"Invalid weights {weights!r}: not a registry name, path, or URL.") return ckpt["model"] if isinstance(ckpt, dict) and "model" in ckpt else ckpt
class ZipSplat(nn.Module): """Feed-forward 3DGS predictor.
Loads pre-trained weights from a registry shortname, local path, or http(s) URL.
Example: >>> import math, torch >>> from zipsplat import ZipSplat, Camera, Pose, load_image, viz >>> model = ZipSplat(weights="zipsplat").cuda().eval() >>> images = [load_image(p) for p in paths] # raw images, any size >>> gaussians = model(images)[0] >>> >>> camera = Camera.from_fov(math.radians(60), w=512, h=512) >>> pose = Pose.from_Rt(torch.eye(3), torch.zeros(3)) # identity pose >>> rgb, info = gaussians.render(camera, pose) >>> >>> viz.turntable(gaussians, "turntable.mp4", sweep_deg=None) # wiggle orbit video """
def __init__(self, weights: str = "zipsplat") -> None: super().__init__() self.model = Model() self.model.flexible_load(_load_state_dict(weights))
def _prepare_inputs( self, images: Union[Tensor, List[Tensor]], cameras: Optional[Camera], poses: Optional[Pose], ) -> Tuple[Tensor, Optional[Camera], Optional[Pose]]: """Stack/batch views, square-resize to 252 (adjust priors), move to the model device.""" if isinstance(images, (list, tuple)): assert cameras is None and poses is None, ( "list input is for pose-free use; pass a (V, 3, H, W) tensor when supplying " "cameras / poses." ) images = torch.stack([to_square(im) for im in images])
if images.ndim == 4: images = images.unsqueeze(0) if cameras is not None: cameras = cameras[None] if poses is not None: poses = poses[None]
h, w = images.shape[-2:] if cameras is not None: side = min(h, w) cameras = cameras.crop((side - w, side - h)).scale(IMAGE_SIZE / side) images = to_square(images)
device = next(self.model.parameters()).device images = images.to(device) if cameras is not None: cameras = cameras.to(device) if poses is not None: poses = poses.to(device) return images, cameras, poses
@torch.no_grad() def forward( self, images: Union[Tensor, List[Tensor]], cameras: Optional[Camera] = None, poses: Optional[Pose] = None, use_priors: bool = False, compression: float = 1.0, ) -> Gaussians: """Predict Gaussians from multi-view images.
Args: images: list of (3, H, W) views (any size) or a (V, 3, H, W) / (B, V, 3, H, W) tensor in [0, 1]. cameras / poses: priors with batch shape (V,) or (B, V); required when use_priors=True (pass a tensor, not a list, of images). use_priors: inject pose + intrinsics tokens into the backbone. compression: query-sampling ratio in (0, 1]; 1.0 disables k-means.
Returns: Gaussians with batch shape (B, N_gaussians). """ if not use_priors and (cameras is not None or poses is not None): logger.warning("cameras / poses are ignored when use_priors=False.") images, cameras, poses = self._prepare_inputs(images, cameras, poses) return self.model( images, cameras=cameras, poses=poses, use_priors=use_priors, compression=compression )123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239"""TensorWrapper base for batched per-tensor packed types (Camera, Pose, Gaussians),plus shared utilities (k-means clustering, image loading).
Author: Alexander Veicht"""
from pathlib import Pathfrom typing import List, Optional, Tuple
import imageio.v2 as imageioimport numpy as npimport torchfrom PIL import Image
class TensorWrapper: """Single-tensor wrapper. Subclasses pack their parameters into a ``[..., D]`` tensor and expose named views over the trailing dimension; all leading dimensions are batch dims.
The leading ``data_.shape[:-1]`` is the batch shape (``self.shape``). Indexing, dtype/device moves, and ``torch.cat`` / ``torch.stack`` operate on the batch dims and rewrap the result. """
data_: torch.Tensor
def __init__(self, data_: torch.Tensor): self.data_ = data_ self.__post_init__()
def __post_init__(self) -> None: self.batch_size = self.data_.shape[:-1]
# ------------------------- shape / dtype / device -------------------------
@property def shape(self) -> torch.Size: """Batch shape (everything but the trailing packed dimension).""" return self.data_.shape[:-1]
@property def device(self) -> torch.device: return self.data_.device
@property def dtype(self) -> torch.dtype: return self.data_.dtype
def __len__(self) -> int: return self.shape[0]
# ------------------------- indexing / device moves -------------------------
def __getitem__(self, idx) -> "TensorWrapper": """Index the batch dims (int, slice, tensor, or ``None`` to add a dim).""" return self.__class__(self.data_[idx])
def to(self, *args, **kwargs) -> "TensorWrapper": return self.__class__(self.data_.to(*args, **kwargs))
def cpu(self) -> "TensorWrapper": return self.__class__(self.data_.cpu())
def cuda(self, *args, **kwargs) -> "TensorWrapper": return self.__class__(self.data_.cuda(*args, **kwargs))
def clone(self) -> "TensorWrapper": return self.__class__(self.data_.clone())
def detach(self) -> "TensorWrapper": return self.__class__(self.data_.detach())
# ------------------------- torch dispatch -------------------------
@classmethod def __torch_function__(cls, func, types, args=(), kwargs=None): """Make ``torch.cat`` / ``torch.stack`` / ``torch.concat`` over a sequence of wrappers rewrap the underlying ``data_`` (any ``dim`` arg is a batch dim, not the packed dim).""" kwargs = kwargs or {} if ( func in (torch.cat, torch.concat, torch.stack) and args and isinstance(args[0], (list, tuple)) and all(isinstance(x, cls) for x in args[0]) ): return cls(func([x.data_ for x in args[0]], *args[1:], **kwargs)) return NotImplemented
def __repr__(self) -> str: return str(self)
def kmeans( x: torch.Tensor, K: int, n_iters: int = 5, chunk_size: int = 2048) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: """Hard k-means with chunked distance computation (memory-efficient).
Uses chunked cdist + scatter_add to avoid materializing full [N, K] matrices. Peak memory: O(chunk x K) instead of O(N x K). Centroids are uniformly initialized via linspace over the input tokens.
Args: x: [B, N, D] input features. K: number of clusters. n_iters: number of iterations (converges in 2-3; 5 leaves headroom). chunk_size: tokens per chunk for the distance computation.
Returns: centroids: [B, K, D]. nearest_idx: [B, K] index of the nearest original token per centroid. assignments: [B, N] cluster assignment per token from the last iteration. """ B, N, D = x.shape idx = torch.linspace(0, N - 1, K, device=x.device).round().long().unsqueeze(0).expand(B, -1) batch_idx = torch.arange(B, device=x.device).unsqueeze(1).expand(-1, K) centroids = x[batch_idx, idx] ones = torch.ones(B, N, 1, device=x.device, dtype=x.dtype)
for _ in range(n_iters): assignments = torch.empty(B, N, dtype=torch.long, device=x.device) for s in range(0, N, chunk_size): e = min(s + chunk_size, N) dists = torch.cdist(x[:, s:e], centroids) assignments[:, s:e] = dists.argmin(dim=-1) del dists
new_centroids = torch.zeros_like(centroids) new_centroids.scatter_add_(1, assignments.unsqueeze(-1).expand(-1, -1, D), x) counts = torch.zeros(B, K, 1, device=x.device, dtype=x.dtype) counts.scatter_add_(1, assignments.unsqueeze(-1), ones) centroids = new_centroids / counts.clamp(min=1)
nearest_idx = torch.empty(B, K, dtype=torch.long, device=x.device) for s in range(0, K, chunk_size): e = min(s + chunk_size, K) dists = torch.cdist(centroids[:, s:e], x) nearest_idx[:, s:e] = dists.argmin(dim=-1) del dists
return centroids, nearest_idx, assignments
def load_image(path: Path) -> torch.Tensor: """Load an image to a (3, H, W) float tensor in [0, 1].""" return to_tensor(Image.open(path).convert("RGB"))
def load_video( path: Path, num_frames: Optional[int] = 8, stride: Optional[int] = None) -> List[torch.Tensor]: """Load video frames as a list of (3, H, W) float tensors in [0, 1].
By default evenly samples `num_frames` frames across the whole clip (widest baseline). Pass `stride` to take every Nth frame instead. Returns all frames when the clip is shorter than requested. Note: frame seeking is approximate for some codecs. """ reader = imageio.get_reader(str(path)) try: total = reader.count_frames() if stride is not None: indices = list(range(0, total, stride)) else: n = min(num_frames, total) indices = torch.linspace(0, total - 1, n).round().long().tolist() frames = [to_tensor(reader.get_data(i)) for i in indices] except Exception: # Unreliable frame count / seeking: stream all frames, then subsample. frames = [to_tensor(f) for f in reader] if stride is not None: frames = frames[::stride] elif len(frames) > num_frames: idx = torch.linspace(0, len(frames) - 1, num_frames).round().long().tolist() frames = [frames[i] for i in idx] finally: reader.close() return frames
def to_tensor(image) -> torch.Tensor: """Convert HWC image (uint8 or float in [0, 1]) to (3, H, W) float in [0, 1].""" arr = np.asarray(image) arr = arr.astype(np.float32) / 255.0 if arr.dtype == np.uint8 else arr.astype(np.float32) return chw_from_hwc(torch.from_numpy(arr)).contiguous()
def resize_image(image: torch.Tensor, h: int, w: int) -> torch.Tensor: """Resize image (..., 3, H, W) to exactly (h, w) using PIL LANCZOS.""" *batch, C, H, W = image.shape if (H, W) == (h, w): return image flat = image.reshape(-1, C, H, W) out = [] for i in range(flat.shape[0]): arr = (hwc_from_chw(flat[i]).cpu().numpy() * 255).clip(0, 255).astype(np.uint8) pil = Image.fromarray(arr).resize((w, h), Image.LANCZOS) out.append(chw_from_hwc(torch.from_numpy(np.asarray(pil, dtype=np.float32) / 255.0))) return torch.stack(out).reshape(*batch, C, h, w).to(device=image.device, dtype=image.dtype)
def crop_to_ar(image: torch.Tensor, ar: float) -> torch.Tensor: """Center-crop image (..., 3, H, W) to aspect ratio `ar` (= w/h).
ar > 1 = landscape, ar < 1 = portrait, ar = 1 = square. Whichever dimension exceeds the target is cropped; never resizes. """ H, W = image.shape[-2:] target_w = round(H * ar) if target_w <= W: new_h, new_w = H, target_w top, left = 0, (W - target_w) // 2 else: target_h = round(W / ar) new_h, new_w = target_h, W top, left = (H - target_h) // 2, 0 if (new_h, new_w) == (H, W): return image return image[..., top : top + new_h, left : left + new_w]
# Native model resolution (square), divisible by the DA3 patch size (14).IMAGE_SIZE = 252
def to_square(image: torch.Tensor, size: int = IMAGE_SIZE) -> torch.Tensor: """Center-crop image (..., 3, H, W) to square and resize to (size, size).""" return resize_image(crop_to_ar(image, 1.0), size, size)
def chw_from_hwc(x): """...HWC → ...CHW (works on numpy arrays and torch tensors).""" if isinstance(x, np.ndarray): return np.moveaxis(x, -1, -3) return x.transpose(-2, -1).transpose(-3, -2)
def hwc_from_chw(x): """...CHW → ...HWC (works on numpy arrays and torch tensors).""" if isinstance(x, np.ndarray): return np.moveaxis(x, -3, -1) return x.transpose(-3, -2).transpose(-2, -1)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115"""Interactive viser viewer for ZipSplat — live compression slider + token-coloring toggle.
Requires the optional viewer dependencies: ``pip install "zipsplat[viewer]"`` (viser + nerfview).
Usage: python -m zipsplat.viewer path/to/images/ # a directory of images python -m zipsplat.viewer "scene/*.jpg" # a glob of images python -m zipsplat.viewer pan.mp4 --num-frames 24 # a video clip
Author: Alexander Veicht"""
import timefrom pathlib import Pathfrom typing import List
import numpy as npimport torchimport viserfrom nerfview import Viewerfrom zipsplat.camera import Camerafrom zipsplat.pose import Posefrom zipsplat.predictor import ZipSplatfrom zipsplat.utils import load_image, load_video
_VIDEO_SUFFIXES = {".mp4", ".mov", ".avi", ".mkv", ".webm"}_IMAGE_SUFFIXES = {".jpg", ".jpeg", ".png", ".bmp", ".webp"}
def run(model: ZipSplat, images: List[torch.Tensor], port: int = 8080) -> None: """Launch the viewer on the given model and input views.""" group_size = model.model.conf["gaussians_per_token"] state = {"gaussians": None, "colored": None, "by_token": False}
def recompute(compression: float) -> None: g = model(images, compression=compression)[0] state["gaussians"], state["colored"] = g, g.color_by_group(group_size)
recompute(1.0)
server = viser.ViserServer(port=port, verbose=False) gs_count = server.gui.add_number("Gaussians", 0, disabled=True) compression = server.gui.add_slider( "Compression", min=0.05, max=1.0, step=0.05, initial_value=1.0 ) color_toggle = server.gui.add_checkbox("Color by token", initial_value=False)
@torch.no_grad() def render_fn(camera_state, render_tab_state): w, h = render_tab_state.viewer_width, render_tab_state.viewer_height K = torch.from_numpy(camera_state.get_K((w, h))).float() c2w = torch.from_numpy(camera_state.c2w).float() scene = state["colored"] if state["by_token"] else state["gaussians"] rgb, _ = scene.render(Camera.from_K(K, w=w, h=h), Pose.from_4x4mat(c2w), mode="RGB") gs_count.value = scene.num_gaussians return rgb[0].clamp(0, 1).moveaxis(0, -1).cpu().numpy() # (H, W, 3)
viewer = Viewer(server, render_fn, output_dir=None, mode="rendering")
@server.on_client_connect def _(client: viser.ClientHandle): # start at the identity pose (reference view) client.camera.wxyz = np.array([1.0, 0.0, 0.0, 0.0]) client.camera.position = np.array([0.0, 0.0, 0.0])
@compression.on_update def _(_): recompute(compression.value) # re-runs the model viewer.rerender(None)
@color_toggle.on_update def _(_): state["by_token"] = color_toggle.value viewer.rerender(None)
print(f"Viewer running at http://localhost:{port} — Ctrl+C to exit.") try: while True: time.sleep(1) except KeyboardInterrupt: server.stop()
def _load_inputs(path: str, num_frames: int) -> List[torch.Tensor]: """Load a directory of images, an image glob, or a video into a list of (3, H, W) tensors.""" p = Path(path) if p.is_file() and p.suffix.lower() in _VIDEO_SUFFIXES: return load_video(p, num_frames=num_frames) files = ( sorted(f for f in p.iterdir() if p.is_dir() and f.suffix.lower() in _IMAGE_SUFFIXES) if p.is_dir() else sorted(Path().glob(path)) ) if not files: raise ValueError(f"No images/video found at {path!r}.") return [load_image(f) for f in files]
def main() -> None: import argparse
ap = argparse.ArgumentParser(description="Interactive ZipSplat viewer.") ap.add_argument("input", help="Directory of images, an image glob, or a video file.") ap.add_argument("--weights", default="zipsplat", help="Registry name, local path, or URL.") ap.add_argument("--num-frames", type=int, default=24, help="Frames to sample from a video.") ap.add_argument("--port", type=int, default=8080) args = ap.parse_args()
images = _load_inputs(args.input, args.num_frames) print(f"Loaded {len(images)} view(s).") model = ZipSplat(weights=args.weights).cuda().eval() run(model, images, port=args.port)
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152"""Turntable / orbit video rendering for ZipSplat Gaussians.
Pose-free: the orbit geometry is derived from the predicted Gaussian cloud alone (center =median of means, radius = a high quantile of the spread). The trajectory orbits the canonicalfront view using the prediction frame's own up direction (OpenCV y-down, so up = (0, -1, 0)).Provide a `Camera` for the render intrinsics.
Author: Alexander Veicht"""
import mathfrom pathlib import Pathfrom typing import Optional, Tuple, Union
import imageio.v2 as imageioimport numpy as npimport torchfrom zipsplat.camera import Camerafrom zipsplat.gaussians import Gaussiansfrom zipsplat.pose import Pose
def scene_center_radius( gaussians: Gaussians, quantile: float = 0.9, margin: float = 1.2) -> Tuple[torch.Tensor, float]: """Scene center and radius from the Gaussian positions alone (no poses needed).
center = median(means); radius = quantile(||means - center||) * margin. """ means = gaussians.means.detach() center = means.median(dim=0).values radius = float((means - center).norm(dim=-1).quantile(quantile) * margin) return center, radius
def orbit_poses( center: torch.Tensor, radius: float, num_frames: int, *, sweep_deg: Optional[float] = 360.0, base_azimuth_deg: float = 0.0, elevation_deg: float = 0.0, azimuth_amp_deg: float = 16.0, elevation_amp_deg: float = 4.0,) -> Pose: """Orbit trajectory around `center` at `radius` (up = (0, -1, 0), OpenCV y-down frame).
azimuth/elevation 0 places the camera on the canonical front (-z side, looking toward +z), matching the reference-view orientation of the prediction frame.
Args: center: orbit pivot, shape (3,). radius: distance from the pivot. num_frames: number of poses along the path. sweep_deg: if set, sweep this many degrees of azimuth (e.g. 360 = full turntable). If ``None``, use an amplitude-limited wiggle instead (better for sparse, front-facing scenes where a full revolution would expose empty backsides). base_azimuth_deg / elevation_deg: starting azimuth and (constant) elevation. azimuth_amp_deg / elevation_amp_deg: wiggle amplitudes (only used when sweep_deg is None). """ t = torch.linspace(0.0, 1.0, num_frames) if sweep_deg is None: azimuths = base_azimuth_deg + azimuth_amp_deg * torch.sin(2 * math.pi * t) elevations = elevation_deg + elevation_amp_deg * torch.sin(4 * math.pi * t) * 0.5 else: azimuths = base_azimuth_deg + sweep_deg * t elevations = torch.full_like(t, float(elevation_deg)) center = torch.as_tensor(center, dtype=torch.float32).detach().cpu() return Pose.orbit(center, radius=radius, azimuths=azimuths, elevations=elevations)
def render_video( gaussians: Gaussians, cameras: Camera, poses: Pose, *, bg: Tuple[float, float, float] = (1.0, 1.0, 1.0), chunk: int = 16,) -> np.ndarray: """Render a camera path through gsplat. Returns (T, H, W, 3) uint8 frames.
`cameras` and `poses` must share batch shape (T,). Rendering is chunked over frames to bound memory; all frames are assumed to share the same image size. """ device = gaussians.device cameras, poses = cameras.to(device), poses.to(device) T = poses.shape[0] bg_t = torch.tensor(bg, device=device, dtype=torch.float32) out = [] for s in range(0, T, chunk): e = min(s + chunk, T) rgb, _ = gaussians.render( cameras[s:e], poses[s:e], mode="RGB", backgrounds=bg_t.expand(e - s, 3) ) rgb = rgb.float().clamp(0, 1).cpu() # (n, 3, H, W) out.append((rgb.permute(0, 2, 3, 1).numpy() * 255).astype(np.uint8)) return np.concatenate(out, 0)
def save_video( frames: Union[np.ndarray, torch.Tensor], path: Union[str, Path], fps: int = 30) -> None: """Write (T, H, W, 3) frames (uint8, or float in [0, 1]) to an mp4 (libx264, yuv420p).""" if isinstance(frames, torch.Tensor): frames = frames.detach().cpu().numpy() if frames.dtype != np.uint8: frames = (np.clip(frames, 0.0, 1.0) * 255).astype(np.uint8) Path(path).parent.mkdir(parents=True, exist_ok=True) with imageio.get_writer( str(path), fps=fps, codec="libx264", pixelformat="yuv420p", macro_block_size=1 ) as writer: for frame in frames: writer.append_data(frame)
def turntable( gaussians: Gaussians, path: Union[str, Path], *, fov_deg: float = 55.0, render_size: int = 512, num_frames: int = 180, fps: int = 30, sweep_deg: Optional[float] = 360.0, elevation_deg: float = 0.0, bg: Tuple[float, float, float] = (1.0, 1.0, 1.0), chunk: int = 16,) -> np.ndarray: """Render and save a turntable mp4 orbiting the predicted scene; returns the frames.
Args: gaussians: unbatched predicted scene (shape (N,)). path: output mp4 path. fov_deg: horizontal field of view of the render camera, in degrees. render_size: output frame size in pixels (square). num_frames / fps: trajectory length and playback rate. sweep_deg: azimuth sweep (360 = full turntable); None = amplitude-limited wiggle. elevation_deg: constant elevation of the orbit. bg: background RGB in [0, 1]. chunk: frames rendered per gsplat call. """ fov = torch.tensor(math.radians(fov_deg)) camera = Camera.from_fov(fov, w=render_size, h=render_size).to(gaussians.device) center, radius = scene_center_radius(gaussians) poses = orbit_poses( center, radius, num_frames, sweep_deg=sweep_deg, elevation_deg=elevation_deg ) cameras = Camera(camera.data_.unsqueeze(0).expand(num_frames, -1).clone()) frames = render_video(gaussians, cameras, poses, bg=bg, chunk=chunk) save_video(frames, path, fps=fps) return frames123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243"""ZipSplat model: feed-forward 3DGS from multi-view images.
Pipeline: backbone features → optional k-means clustering → cross/self-attentionover scene-tokens → color skip → Gaussian head.
Author: Alexander Veicht"""
import loggingfrom typing import Any, Dict, List, Optional
import torchimport torch.nn as nnimport torch.nn.functional as Ffrom einops import rearrangefrom torch import Tensor
from zipsplat import modulesfrom zipsplat.backbone import DAV3Encoderfrom zipsplat.camera import Camerafrom zipsplat.gaussians import Gaussiansfrom zipsplat.pose import Posefrom zipsplat.utils import kmeans
logger = logging.getLogger(__name__)
def _inverse_log_transform(y: Tensor) -> Tensor: """sign(y) * (exp(|y|) - 1) — expand 'log-space' position predictions.""" return torch.sign(y) * torch.expm1(torch.abs(y))
class _GaussianHead(nn.Module): """Mlp + Linear stack producing packed Gaussian parameters and decoding to a Gaussians scene.
The inner `self.gaussian_head` Sequential matches the splatfactory checkpoint structure (`gaussian_head.gaussian_head.{0,1}.*`). """
def __init__(self, head_dim: int, gaussians_per_token: int, sh_degree: int) -> None: super().__init__() self.gaussians_per_token = gaussians_per_token self.num_sh_coeffs = (sh_degree + 1) ** 2 self.params_per_gaussian = 3 + 3 + 4 + 1 + self.num_sh_coeffs * 3 self.gaussian_head = nn.Sequential( modules.Mlp(in_features=head_dim, hidden_features=2 * head_dim, out_features=head_dim), nn.Linear(head_dim, gaussians_per_token * self.params_per_gaussian), )
def forward(self, tokens: Tensor) -> Gaussians: """Project tokens to packed Gaussian params, activate, return a Gaussians scene.""" params = self.gaussian_head(tokens) # (B, N, G * params_per_g) params = rearrange( params, "B N (G C) -> B (N G) C", G=self.gaussians_per_token, C=self.params_per_gaussian, ) means = _inverse_log_transform(params[..., 0:3].clamp(-5.0, 5.0)) scales = F.softplus(params[..., 3:6] - 4.0).clamp(1e-6, 15.0) quats = F.normalize(params[..., 6:10], dim=-1) opacities = params[..., 10].sigmoid() sh_coeffs = rearrange(params[..., 11:], "B N (K C) -> B N K C", K=self.num_sh_coeffs, C=3) return Gaussians.from_parameters( means=means, scales=scales, quats=quats, opacities=opacities, sh_coeffs=sh_coeffs )
class ZipSplat(nn.Module): """Feed-forward 3DGS model: images → Gaussians (DA3-Giant variant)."""
# Defaults match the released DA3-Giant checkpoint. default_conf = { # backbone "vit_name": "vitg", "patch_size": 14, "out_layers": (19, 29, 39), # gaussian head "gaussians_per_token": 32, "sh_degree": 1, # color skip "color_skip_dim": 128, "color_mlp_ratio": 1.0, }
def __init__(self, **conf) -> None: super().__init__() self.conf = {**self.default_conf, **conf}
self.backbone = DAV3Encoder( vit_name=self.conf["vit_name"], out_layers=self.conf["out_layers"], with_camera_enc=True, patch_size=self.conf["patch_size"], ) D = self.backbone.embed_dim L = len(self.conf["out_layers"])
# Per-layer prep: LN(local) + LN(global) + Linear(2D→D) + skip residual self.pre_norm_local = nn.ModuleList([nn.LayerNorm(D) for _ in range(L)]) self.pre_norm_global = nn.ModuleList([nn.LayerNorm(D) for _ in range(L)]) self.downscale = nn.ModuleList([nn.Linear(2 * D, D) for _ in range(L)])
# Geometry CA + SA stack (delta mode: CA returns gated delta only) self.cross_attention = nn.ModuleList( [ modules.CrossAttentionBlock( dim=D, num_heads=D // 64, mlp_ratio=4.0, qk_norm=True, init_values=0.01 ) for _ in range(L) ] ) self.self_attention = nn.ModuleList( [ modules.SelfAttentionBlock( dim=D, num_heads=D // 64, mlp_ratio=4.0, qk_norm=True, init_values=0.01 ) for _ in range(L) ] )
# Color skip: PatchEmbed → CA in color_skip_dim (4th symmetric layer) self.color_embed = modules.PatchEmbed( img_size=252, patch_size=self.conf["patch_size"], in_chans=3, embed_dim=self.conf["color_skip_dim"], ) self.color_cross_attention = modules.CrossAttentionBlock( dim=self.conf["color_skip_dim"], num_heads=max(1, self.conf["color_skip_dim"] // 64), mlp_ratio=self.conf["color_mlp_ratio"], qk_norm=True, init_values=0.01, )
# Gaussian head: tokens → packed params → activate → Gaussians self.gaussian_head = _GaussianHead( head_dim=D + self.conf["color_skip_dim"], gaussians_per_token=self.conf["gaussians_per_token"], sh_degree=self.conf["sh_degree"], )
def flexible_load(self, state_dict: Dict[str, Any]) -> None: """Load a state dict tolerantly: strip DDP `module.` prefix, non-strict, warn on diffs.""" if any(k.startswith("module.") for k in state_dict): state_dict = {k.removeprefix("module."): v for k, v in state_dict.items()} missing, unexpected = self.load_state_dict(state_dict, strict=False) unexpected = [ k for k in unexpected if "running" not in k and "num_batches_tracked" not in k ] if missing: logger.warning("missing %d keys (e.g. %s)", len(missing), list(missing)[:3]) if unexpected: logger.warning("unexpected %d keys (e.g. %s)", len(unexpected), list(unexpected)[:3])
# ------------------------- per-stage helpers -------------------------
def _backbone_features( self, images: Tensor, cameras: Optional[Camera], poses: Optional[Pose] ) -> List[Tensor]: """Run backbone, reverse so features[0] = deepest layer, drop camera token.""" feats = self.backbone(images, pose=poses, camera=cameras) return [t[0] for t in feats[::-1]]
def _prepare(self, features: List[Tensor]) -> List[Tensor]: """Per-layer pre_norm + downscale + fuse_skip (always on).""" D = self.backbone.embed_dim out = [] for l, raw in enumerate(features): # raw: (B, V, T, 2D) local = self.pre_norm_local[l](raw[..., :D]) global_ = self.pre_norm_global[l](raw[..., D:]) tok = self.downscale[l](torch.cat([local, global_], dim=-1)) + (local + global_) / 2 out.append(tok) return out
def _cluster(self, tokens: Tensor, compression: float) -> Tensor: """K-means on the deepest layer; returns nearest-token indices [B, K].
At compression=1.0 returns torch.arange(V*T) — k-means is skipped. """ B, V, T, _ = tokens.shape VT = V * T K = max(1, int(VT * compression)) if K >= VT: return torch.arange(VT, device=tokens.device).unsqueeze(0).expand(B, -1) flat = rearrange(tokens, "B V T D -> B (V T) D") with torch.no_grad(), torch.autocast(tokens.device.type, dtype=torch.bfloat16): _, nearest_idx, _ = kmeans(flat, K) return nearest_idx
def _fuse(self, layer_tokens: List[Tensor], nearest_idx: Tensor) -> Tensor: """Iterative scene_tokens stream: gather + CA delta + SA per layer.""" D = self.backbone.embed_dim idx = nearest_idx.unsqueeze(-1).expand(-1, -1, D) # Initialize scene from the deepest layer's gathered tokens scene = torch.gather(rearrange(layer_tokens[0], "B V T D -> B (V T) D"), 1, idx) for l, blk_ca in enumerate(self.cross_attention): keys = rearrange(layer_tokens[l], "B V T D -> B (V T) D") queries = torch.gather(keys, 1, idx) scene = scene + blk_ca(queries, keys, return_delta=True) scene = self.self_attention[l](scene) return scene
def _color(self, images: Tensor, nearest_idx: Tensor) -> Tensor: """Color skip: PatchEmbed all views, gather at shared k-means indices, CA in color_skip_dim.""" B = images.shape[0] flat_imgs = rearrange(images, "B V C H W -> (B V) C H W") color_tokens = rearrange(self.color_embed(flat_imgs), "(B V) T D -> B (V T) D", B=B) D_c = color_tokens.shape[-1] idx = nearest_idx.unsqueeze(-1).expand(-1, -1, D_c) return self.color_cross_attention(torch.gather(color_tokens, 1, idx), color_tokens)
# ------------------------- public forward -------------------------
def forward( self, images: Tensor, cameras: Optional[Camera] = None, poses: Optional[Pose] = None, use_priors: bool = False, compression: float = 1.0, ) -> Gaussians: """Predict Gaussians from multi-view images.
Args: images: (B, V, 3, H, W) float in [0, 1]. cameras: (B, V) Camera. Required when `use_priors=True`. poses: (B, V) Pose. Required when `use_priors=True`. use_priors: if True, inject pose+intrinsics tokens at the backbone's `alt_start`. compression: query-sampling ratio in (0, 1]. 1.0 disables k-means (all tokens used).
Returns: Gaussians with batch shape (B, N_gaussians). """ prior_pose, prior_camera = (poses, cameras) if use_priors else (None, None) features = self._backbone_features(images, prior_camera, prior_pose) layer_tokens = self._prepare(features) # K-means runs on the deepest (last) layer. nearest_idx = self._cluster(layer_tokens[0], compression) scene = self._fuse(layer_tokens, nearest_idx) color_feats = self._color(images, nearest_idx) return self.gaussian_head(torch.cat([scene, color_feats], dim=-1))LICENSEAdded+190
LICENSES/CC-BY-NC-4.0.txtAdded+408
LICENSES/THIRD-PARTY-NOTICES.mdAdded+108
LICENSES/ZipSplat-Apache-2.0.txtAdded+190
README.mdAdded+347
environment.ymlAdded+26
evaluation/make_tables.pyAdded+97
evaluation/paired_stats.pyAdded+112
manifest.jsonAdded
pipeline/README.mdAdded+307
pipeline/arm_lib.pyAdded+411
pipeline/calibration_gate.pyAdded+267
pipeline/config.pyAdded+285
pipeline/episodes.txtAdded+114
pipeline/episodes_eligible.txtAdded+225
pipeline/extract_frames.pyAdded+67
pipeline/gate_expected.jsonAdded+3609
pipeline/geometry_probe.pyAdded+167
pipeline/intrinsics.jsonAdded
pipeline/photometric_eval.pyAdded+295
pipeline/probe_lib.pyAdded+260
pipeline/pw_extrinsics.pyAdded+88
pipeline/query_points.pyAdded+96
pipeline/release_reconstruction.pyAdded+117
pipeline/run_diagnostics.pyAdded+601
pipeline/run_pipeline.pyAdded+189
pipeline/stereo_lib.pyAdded+101
reproduction.jsonAdded+1900
requirements.txtAdded+29
third_party/ZipSplat/LICENSEAdded+190
third_party/ZipSplat/README.mdAdded+460
third_party/ZipSplat/pyproject.tomlAdded+47
third_party/ZipSplat/requirements.txtAdded+8
third_party/ZipSplat/splatfactory/__init__.pyAdded+39
third_party/ZipSplat/splatfactory/gaussians.pyAdded+395
third_party/ZipSplat/splatfactory/pyproject.tomlAdded+44
third_party/ZipSplat/splatfactory/requirements.txtAdded+30
third_party/ZipSplat/splatfactory/settings.pyAdded+10
third_party/ZipSplat/splatfactory/train.pyAdded+405
third_party/ZipSplat/splatfactory/trainer.pyAdded+1341
third_party/ZipSplat/zipsplat/__init__.pyAdded+27
third_party/ZipSplat/zipsplat/backbone.pyAdded+422
third_party/ZipSplat/zipsplat/camera.pyAdded+138
third_party/ZipSplat/zipsplat/pose.pyAdded+178
third_party/ZipSplat/zipsplat/predictor.pyAdded+136
third_party/ZipSplat/zipsplat/utils.pyAdded+239
third_party/ZipSplat/zipsplat/viewer.pyAdded+115
third_party/ZipSplat/zipsplat/viz.pyAdded+152
third_party/ZipSplat/zipsplat/zipsplat.pyAdded+243