scenezoo 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scenezoo-0.1.0/LICENSE +201 -0
- scenezoo-0.1.0/PKG-INFO +270 -0
- scenezoo-0.1.0/README.md +228 -0
- scenezoo-0.1.0/pyproject.toml +83 -0
- scenezoo-0.1.0/setup.cfg +4 -0
- scenezoo-0.1.0/src/scenezoo/__init__.py +43 -0
- scenezoo-0.1.0/src/scenezoo/config.py +6 -0
- scenezoo-0.1.0/src/scenezoo/dataset/__init__.py +52 -0
- scenezoo-0.1.0/src/scenezoo/dataset/base.py +247 -0
- scenezoo-0.1.0/src/scenezoo/dataset/builtins.py +320 -0
- scenezoo-0.1.0/src/scenezoo/dataset/check.py +307 -0
- scenezoo-0.1.0/src/scenezoo/dataset/registry.py +297 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/__init__.py +38 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/_ase_store.py +186 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/_structured3d_store.py +124 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/arkitscenes.py +1047 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/ase.py +1039 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/matterport3d.py +1404 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/multiscan.py +823 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/s3dis.py +536 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/scannet.py +706 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/scannetpp.py +1237 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/scenenn.py +190 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/structured3d.py +1413 -0
- scenezoo-0.1.0/src/scenezoo/dataset/scene/threerscan.py +744 -0
- scenezoo-0.1.0/src/scenezoo/dataset/spec.py +95 -0
- scenezoo-0.1.0/src/scenezoo/dataset/types.py +223 -0
- scenezoo-0.1.0/src/scenezoo/io/__init__.py +44 -0
- scenezoo-0.1.0/src/scenezoo/io/archive.py +66 -0
- scenezoo-0.1.0/src/scenezoo/io/cache.py +98 -0
- scenezoo-0.1.0/src/scenezoo/io/camera.py +162 -0
- scenezoo-0.1.0/src/scenezoo/io/compression.py +112 -0
- scenezoo-0.1.0/src/scenezoo/io/image.py +46 -0
- scenezoo-0.1.0/src/scenezoo/io/rio.py +93 -0
- scenezoo-0.1.0/src/scenezoo/io/sens.py +251 -0
- scenezoo-0.1.0/src/scenezoo/io/video.py +232 -0
- scenezoo-0.1.0/src/scenezoo/metadata/3rscan_semantic_mapping.csv +531 -0
- scenezoo-0.1.0/src/scenezoo/metadata/fixed_arkitscenes_direction.csv +869 -0
- scenezoo-0.1.0/src/scenezoo/metadata/multiscan_direction.csv +28 -0
- scenezoo-0.1.0/src/scenezoo/metadata/multiscan_object_semantic_label_map.csv +57 -0
- scenezoo-0.1.0/src/scenezoo/metadata/multiscan_part_semantic_label_map.csv +8 -0
- scenezoo-0.1.0/src/scenezoo/metadata/multiscan_scans_split.csv +274 -0
- scenezoo-0.1.0/src/scenezoo/metadata/scannetv2_test.txt +100 -0
- scenezoo-0.1.0/src/scenezoo/metadata/scannetv2_train.txt +1201 -0
- scenezoo-0.1.0/src/scenezoo/metadata/scannetv2_val.txt +312 -0
- scenezoo-0.1.0/src/scenezoo/metadata/structured3d_errata.txt +99 -0
- scenezoo-0.1.0/src/scenezoo/metadata/structured3d_labelids.txt +40 -0
- scenezoo-0.1.0/src/scenezoo/metadata/structured3d_room_types.txt +16 -0
- scenezoo-0.1.0/src/scenezoo/ops/__init__.py +43 -0
- scenezoo-0.1.0/src/scenezoo/ops/annotation.py +173 -0
- scenezoo-0.1.0/src/scenezoo/ops/frame.py +335 -0
- scenezoo-0.1.0/src/scenezoo/ops/geometry.py +160 -0
- scenezoo-0.1.0/src/scenezoo/rendering.py +134 -0
- scenezoo-0.1.0/src/scenezoo.egg-info/PKG-INFO +270 -0
- scenezoo-0.1.0/src/scenezoo.egg-info/SOURCES.txt +76 -0
- scenezoo-0.1.0/src/scenezoo.egg-info/dependency_links.txt +1 -0
- scenezoo-0.1.0/src/scenezoo.egg-info/requires.txt +17 -0
- scenezoo-0.1.0/src/scenezoo.egg-info/top_level.txt +1 -0
- scenezoo-0.1.0/test/test_3rscan.py +147 -0
- scenezoo-0.1.0/test/test_adapter_frames.py +268 -0
- scenezoo-0.1.0/test/test_annotation.py +86 -0
- scenezoo-0.1.0/test/test_arkitscenes.py +369 -0
- scenezoo-0.1.0/test/test_ase.py +223 -0
- scenezoo-0.1.0/test/test_cache.py +120 -0
- scenezoo-0.1.0/test/test_core.py +239 -0
- scenezoo-0.1.0/test/test_dataset_checks.py +100 -0
- scenezoo-0.1.0/test/test_dataset_docs.py +100 -0
- scenezoo-0.1.0/test/test_frame_ops.py +120 -0
- scenezoo-0.1.0/test/test_geometry.py +23 -0
- scenezoo-0.1.0/test/test_integration.py +550 -0
- scenezoo-0.1.0/test/test_matterport3d.py +368 -0
- scenezoo-0.1.0/test/test_multiscan.py +237 -0
- scenezoo-0.1.0/test/test_s3dis.py +176 -0
- scenezoo-0.1.0/test/test_scannet_frames.py +312 -0
- scenezoo-0.1.0/test/test_scannetpp_sources.py +179 -0
- scenezoo-0.1.0/test/test_static_adapters.py +72 -0
- scenezoo-0.1.0/test/test_structured3d.py +288 -0
- scenezoo-0.1.0/test/test_video.py +210 -0
scenezoo-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
scenezoo-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: scenezoo
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Read 3D indoor-scene datasets (ScanNet, ScanNet++, ARKitScenes, Matterport3D, ...) through one Python API.
|
|
5
|
+
Author: Yiming Zhang
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/eamonn-zh/scenezoo
|
|
8
|
+
Project-URL: Repository, https://github.com/eamonn-zh/scenezoo
|
|
9
|
+
Project-URL: Documentation, https://scenezoo.readthedocs.io/en/latest/
|
|
10
|
+
Project-URL: Issues, https://github.com/eamonn-zh/scenezoo/issues
|
|
11
|
+
Keywords: 3D vision,3D scenes,datasets,RGB-D,point clouds,ScanNet
|
|
12
|
+
Classifier: Natural Language :: English
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: fsspec[http]>=2023.1
|
|
27
|
+
Requires-Dist: numpy>=1.23
|
|
28
|
+
Requires-Dist: av>=15
|
|
29
|
+
Requires-Dist: cachetools>=5.3
|
|
30
|
+
Requires-Dist: lz4>=3.1
|
|
31
|
+
Requires-Dist: open3d>=0.19.0
|
|
32
|
+
Requires-Dist: plyfile
|
|
33
|
+
Requires-Dist: pandas>=2.0
|
|
34
|
+
Requires-Dist: Pillow>=9.1
|
|
35
|
+
Requires-Dist: scipy>=1.9
|
|
36
|
+
Provides-Extra: render
|
|
37
|
+
Requires-Dist: torch; extra == "render"
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff<0.13,>=0.12; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# scenezoo
|
|
44
|
+
|
|
45
|
+
[](https://pypi.org/project/scenezoo/)
|
|
46
|
+
[](https://scenezoo.readthedocs.io/en/latest/)
|
|
47
|
+
[](https://github.com/eamonn-zh/scenezoo/actions/workflows/ci.yml)
|
|
48
|
+
|
|
49
|
+
**scenezoo** reads popular 3D indoor-scene datasets through one Python API.
|
|
50
|
+
Point it at a dataset you have downloaded, and get meshes, point clouds,
|
|
51
|
+
segmentation labels, 3D boxes, and synchronized RGB-D frames with cameras as
|
|
52
|
+
NumPy arrays and Open3D objects, without writing a new loader for every
|
|
53
|
+
dataset.
|
|
54
|
+
|
|
55
|
+
**Documentation: <https://scenezoo.readthedocs.io/en/latest/>.** Start with the [quick start](https://scenezoo.readthedocs.io/en/latest/get_started/quickstart.html),
|
|
56
|
+
browse the [examples](https://scenezoo.readthedocs.io/en/latest/examples/index.html), or look up a
|
|
57
|
+
[dataset](https://scenezoo.readthedocs.io/en/latest/datasets/index.html).
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
scenezoo supports Python 3.10 to 3.14.
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
pip install scenezoo
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
For development, clone the repository and install it in editable mode with the
|
|
68
|
+
test tools:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
git clone https://github.com/eamonn-zh/scenezoo.git
|
|
72
|
+
cd scenezoo
|
|
73
|
+
pip install -e ".[dev]"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Video frame sources (ARKitScenes MOV, MultiScan, and ScanNet++ iPhone captures)
|
|
77
|
+
are decoded frame-exactly with [PyAV](https://github.com/PyAV-Org/PyAV), whose
|
|
78
|
+
wheels bundle FFmpeg; no system `ffmpeg` installation is needed.
|
|
79
|
+
|
|
80
|
+
## Unified API
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from scenezoo import get_dataset, get_dataset_info, list_datasets
|
|
84
|
+
|
|
85
|
+
dataset = get_dataset("scannetv2", "/path/to/scannet")
|
|
86
|
+
scene_id = dataset.get_ids("val")[0]
|
|
87
|
+
|
|
88
|
+
if dataset.supports("mesh"):
|
|
89
|
+
mesh = dataset.get_mesh(scene_id)
|
|
90
|
+
|
|
91
|
+
if dataset.supports("points"):
|
|
92
|
+
points = dataset.get_points(scene_id)
|
|
93
|
+
|
|
94
|
+
if dataset.supports("segmentation"):
|
|
95
|
+
segmentation = dataset.get_segmentation(scene_id)
|
|
96
|
+
print(segmentation.domain, segmentation.labels.shape)
|
|
97
|
+
|
|
98
|
+
if dataset.supports("boxes"):
|
|
99
|
+
boxes_by_id, id_to_name = dataset.get_boxes(scene_id)
|
|
100
|
+
|
|
101
|
+
if dataset.supports("frames"):
|
|
102
|
+
frames = dataset.get_frames(
|
|
103
|
+
scene_id,
|
|
104
|
+
step=30,
|
|
105
|
+
items=("rgb", "depth", "rgb_intrinsics", "world_to_camera"),
|
|
106
|
+
output_size=(640, 480),
|
|
107
|
+
center_crop=True,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
print(list_datasets())
|
|
111
|
+
print(get_dataset_info("scannetv2")) # canonical release metadata
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
`list_datasets()` and `get_dataset_info()` use a static built-in catalog, so
|
|
115
|
+
they do not import Open3D, OpenCV, video decoders, or adapter modules. Inspect
|
|
116
|
+
`get_dataset_info(name).spec` for operations, mesh/box/label variants, and frame
|
|
117
|
+
sources. Accessing `.dataset_class` or calling `get_dataset()` intentionally
|
|
118
|
+
loads only the selected adapter. The `scenezoo.io` and `scenezoo.ops`
|
|
119
|
+
namespaces also resolve re-exported helpers lazily, so importing cache or frame
|
|
120
|
+
utilities does not initialize unrelated video, annotation, or geometry runtimes.
|
|
121
|
+
|
|
122
|
+
The seven common dataset calls are:
|
|
123
|
+
|
|
124
|
+
- `check(*, sample_ids=None, require_complete=False, raise_on_error=False)`
|
|
125
|
+
- `get_ids(split)`
|
|
126
|
+
- `get_mesh(sample_id, *, mesh_type=None)`
|
|
127
|
+
- `get_points(sample_id)`
|
|
128
|
+
- `get_segmentation(sample_id)`
|
|
129
|
+
- `get_boxes(sample_id, *, box_type=...)`
|
|
130
|
+
- `get_frames(sample_id, *, indices=None, step=1, items=..., output_size=None, center_crop=False, rotate_to_up=True)`
|
|
131
|
+
|
|
132
|
+
Unsupported operations and unsupported frame items raise
|
|
133
|
+
`UnsupportedOperationError`. Unknown operation names, frame item names, and
|
|
134
|
+
invalid argument combinations raise `ValueError`.
|
|
135
|
+
|
|
136
|
+
## Check a download before using it
|
|
137
|
+
|
|
138
|
+
Dataset checking is explicit and never runs during construction or normal data
|
|
139
|
+
access. It checks paths and file groups without decoding meshes, images, or
|
|
140
|
+
videos:
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
dataset = get_dataset("scannetv2", "/path/to/scannet", offline=True)
|
|
144
|
+
report = dataset.check()
|
|
145
|
+
print(report)
|
|
146
|
+
|
|
147
|
+
# Check only the scenes a job is about to use. Missing requested IDs are errors.
|
|
148
|
+
focused = dataset.check(sample_ids=("scene0000_00", "scene0001_00"))
|
|
149
|
+
|
|
150
|
+
# Treat every missing ID from the official splits as an error and raise once.
|
|
151
|
+
dataset.check(require_complete=True, raise_on_error=True)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`DatasetCheckReport` exposes `ok`, `errors`, `warnings`, `issues`, and `stats`.
|
|
155
|
+
Each `CheckIssue` contains a severity, stable code, explanation, relevant path,
|
|
156
|
+
expected layout, and suggested action. An intentionally partial download reports
|
|
157
|
+
missing split scenes as warnings by default; explicitly requested scenes are
|
|
158
|
+
always required. `raise_on_error=True` raises `DatasetCheckError` carrying the
|
|
159
|
+
same report.
|
|
160
|
+
|
|
161
|
+
The checkers understand each release's archive policy. ScanNet, ScanNet++,
|
|
162
|
+
ARKitScenes, MultiScan, ASE, Matterport3D, Structured3D, S3DIS, and SceneNN need
|
|
163
|
+
their download archives extracted. ScanNet keeps its official 2D annotation
|
|
164
|
+
ZIPs, while 3RScan keeps each native `sequence.zip` sensor stream compressed.
|
|
165
|
+
|
|
166
|
+
## Return semantics
|
|
167
|
+
|
|
168
|
+
`get_points()` returns a `PointBatch`. Its `xyz` array is always `float32` with
|
|
169
|
+
shape `(N, 3)`; optional RGB, normals, semantic/instance labels, and source-view
|
|
170
|
+
provenance are row-aligned. Call `to_point_cloud()` only when an Open3D object
|
|
171
|
+
is needed.
|
|
172
|
+
|
|
173
|
+
`get_segmentation()` returns `Segmentation3D` with `labels`, `id_to_name`,
|
|
174
|
+
`domain` (`"point"`, `"vertex"`, or `"face"`), and `invalid_id`.
|
|
175
|
+
|
|
176
|
+
`get_boxes()` always returns `(boxes_by_id, id_to_name)`.
|
|
177
|
+
|
|
178
|
+
`get_frames()` returns a slot-based `FrameBatch`. `indices` are original video
|
|
179
|
+
frame numbers (or stable source positions for filename-only captures), and
|
|
180
|
+
`frame_keys` retains source names such as DSLR filenames. `source_frame_count`
|
|
181
|
+
is the source sequence length. Every requested per-frame field has `N` as its
|
|
182
|
+
first dimension, including constant intrinsics, which are expanded to
|
|
183
|
+
`(N, 3, 3)`.
|
|
184
|
+
|
|
185
|
+
The frame conventions are intentionally strict:
|
|
186
|
+
|
|
187
|
+
- depth is `float32` in metres; missing, negative, and non-finite values are `0.0`;
|
|
188
|
+
- extrinsics are OpenCV-style `world_to_camera` matrices with shape `(N, 4, 4)`;
|
|
189
|
+
- pixel coordinates follow OpenCV: integer coordinates are pixel centres;
|
|
190
|
+
- RGB, albedo, depth, normal/instance/semantic/confidence maps, and intrinsics use the same resize/crop transform;
|
|
191
|
+
- `rotate_to_up=True` rotates pixels by a right angle and applies the equivalent camera roll to `world_to_camera`, so intrinsics always stay upper-triangular pinhole matrices;
|
|
192
|
+
- RGB uses high-quality interpolation, while depth and discrete maps use nearest-neighbor;
|
|
193
|
+
- explicit `indices` preserve the requested order and cannot be combined with `step != 1`;
|
|
194
|
+
- default sampling filters frames with invalid camera matrices before applying `step`.
|
|
195
|
+
|
|
196
|
+
Adapters for non-pinhole captures additionally return `camera_model`,
|
|
197
|
+
`distortion`, and `image_sizes`. ScanNet++ uses these fields for its
|
|
198
|
+
`OPENCV_FISHEYE`, `OPENCV`, `PINHOLE`, and `EQUIRECTANGULAR` sources instead of
|
|
199
|
+
discarding the source camera model.
|
|
200
|
+
|
|
201
|
+
## Built-in datasets
|
|
202
|
+
|
|
203
|
+
| Canonical name | Aliases | Mesh | Points | Segmentation | Boxes | Frames |
|
|
204
|
+
| --- | --- | :---: | :---: | :---: | :---: | :---: |
|
|
205
|
+
| [`scannetv2`](https://scenezoo.readthedocs.io/en/latest/datasets/scannet.html) | `scannet` | raw/decimated/semantic | no | instance + NYU40, vertex | yes | RGB-D, camera, 2D labels, timestamps, IMU |
|
|
206
|
+
| [`scannetppv2`](https://scenezoo.readthedocs.io/en/latest/datasets/scannetpp.html) | `scannet++`, `scannetpp`, `scannet++v2` | yes | laser scan | vertex, multilabel | yes | iPhone, DSLR, panorama |
|
|
207
|
+
| [`arkitscenes`](https://scenezoo.readthedocs.io/en/latest/datasets/arkitscenes.html) | — | yes | no | vertex (box-derived) | yes | multi-source RGB-D, confidence |
|
|
208
|
+
| [`multiscan`](https://scenezoo.readthedocs.io/en/latest/datasets/multiscan.html) | — | PLY/textured | no | object/part instance + semantic, face | yes | RGB-D, confidence, camera metadata |
|
|
209
|
+
| [`ase`](https://scenezoo.readthedocs.io/en/latest/datasets/ase.html) | `aria-ase`, `aria-synthetic-environments` | no | semi-dense SLAM points | no | wall/door/window layout OBB | fisheye RGB, ray-depth, instances, poses |
|
|
210
|
+
| [`3rscan`](https://scenezoo.readthedocs.io/en/latest/datasets/3rscan.html) | `threerscan` | textured/instance | no | instance + Global/NYU40/Eigen13/RIO27/RIO7, vertex | yes | RGB-D and camera |
|
|
211
|
+
| [`s3dis`](https://scenezoo.readthedocs.io/en/latest/datasets/s3dis.html) | `stanford3d`, `stanford-3d` | no | XYZRGB + labels | instance + 13-class semantic, point | yes | no |
|
|
212
|
+
| [`matterport3d`](https://scenezoo.readthedocs.io/en/latest/datasets/matterport3d.html) | — | textured/house/region/Poisson | no | instance + semantic, face | official OBB | raw + undistorted RGB-D |
|
|
213
|
+
| [`scenenn`](https://scenezoo.readthedocs.io/en/latest/datasets/scenenn.html) | — | yes | no | vertex | no | no |
|
|
214
|
+
| [`structured3d`](https://scenezoo.readthedocs.io/en/latest/datasets/structured3d.html) | `structure3d` | reconstructed room layout | RGB-D fusion | semantic + instance, point | official OBB | perspective + panorama RGB-D and labels |
|
|
215
|
+
|
|
216
|
+
Each dataset page linked above documents the expected download layout,
|
|
217
|
+
dataset-specific options (label spaces, capture sources, region and room
|
|
218
|
+
selectors), and extra methods such as calibration, IMU, and scene metadata.
|
|
219
|
+
|
|
220
|
+
## Registering an adapter
|
|
221
|
+
|
|
222
|
+
Registration is atomic: the canonical name and all aliases are checked for
|
|
223
|
+
conflicts before any entry is added.
|
|
224
|
+
|
|
225
|
+
```python
|
|
226
|
+
from scenezoo import Dataset, register_dataset
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
@register_dataset("my-scenes", aliases=("mine",))
|
|
230
|
+
class MyScenes(Dataset):
|
|
231
|
+
def _load_splits(self):
|
|
232
|
+
return {"train": ["scene-001"]}
|
|
233
|
+
|
|
234
|
+
def _load_metadata(self):
|
|
235
|
+
return {"coordinate_system": "z-up"}
|
|
236
|
+
|
|
237
|
+
def get_mesh(self, sample_id, *, mesh_type=None):
|
|
238
|
+
return load_my_mesh(self.root_dir / sample_id)
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
`splits` and `metadata` are lazy `cached_property` values. Implement only the
|
|
242
|
+
standard methods backed reliably by the dataset; `supports()` detects overridden
|
|
243
|
+
methods automatically. Adapter constructors should use explicit keyword
|
|
244
|
+
parameters rather than a catch-all `**kwargs`. Custom adapters may override the
|
|
245
|
+
protected `_check()` hook to add source-specific layout diagnostics; normal users
|
|
246
|
+
call only `dataset.check()`.
|
|
247
|
+
|
|
248
|
+
## Cache and offline mode
|
|
249
|
+
|
|
250
|
+
Remote split and metadata files are cached under `SCENEZOO_CACHE_DIR` (or
|
|
251
|
+
`~/.cache/scenezoo`). Pass `offline=True` to forbid network access while allowing
|
|
252
|
+
previously cached remote files to be reused.
|
|
253
|
+
|
|
254
|
+
## Development
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
pip install -e ".[dev]" -r docs/requirements.txt
|
|
258
|
+
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest
|
|
259
|
+
ruff check src test && ruff format --check src test
|
|
260
|
+
python -m sphinx -W -b html docs docs/_build/html
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Real-data integration tests are opt-in through `SCENEZOO_TEST_*_ROOT` environment
|
|
264
|
+
variables; no dataset path is embedded in the test suite. The
|
|
265
|
+
documentation is built from [`docs/`](https://github.com/eamonn-zh/scenezoo/tree/main/docs) and published at
|
|
266
|
+
<https://scenezoo.readthedocs.io/en/latest/>.
|
|
267
|
+
|
|
268
|
+
## License
|
|
269
|
+
|
|
270
|
+
See [LICENSE](https://github.com/eamonn-zh/scenezoo/blob/main/LICENSE).
|