faneggg commited on
Commit
dc269e0
·
1 Parent(s): 123719b
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. submodules/mast3r/.gitignore +132 -0
  2. submodules/mast3r/.gitmodules +4 -0
  3. submodules/mast3r/CHECKPOINTS_NOTICE +1376 -0
  4. submodules/mast3r/LICENSE +7 -0
  5. submodules/mast3r/NOTICE +103 -0
  6. submodules/mast3r/assets/NLE_tower/01D90321-69C8-439F-B0B0-E87E7634741C-83120-000041DAE419D7AE.jpg +0 -0
  7. submodules/mast3r/assets/NLE_tower/1AD85EF5-B651-4291-A5C0-7BDB7D966384-83120-000041DADF639E09.jpg +0 -0
  8. submodules/mast3r/assets/NLE_tower/2679C386-1DC0-4443-81B5-93D7EDE4AB37-83120-000041DADB2EA917.jpg +0 -0
  9. submodules/mast3r/assets/NLE_tower/28EDBB63-B9F9-42FB-AC86-4852A33ED71B-83120-000041DAF22407A1.jpg +0 -0
  10. submodules/mast3r/assets/NLE_tower/91E9B685-7A7D-42D7-B933-23A800EE4129-83120-000041DAE12C8176.jpg +0 -0
  11. submodules/mast3r/assets/NLE_tower/CDBBD885-54C3-4EB4-9181-226059A60EE0-83120-000041DAE0C3D612.jpg +0 -0
  12. submodules/mast3r/assets/NLE_tower/FF5599FD-768B-431A-AB83-BDA5FB44CB9D-83120-000041DADDE35483.jpg +0 -0
  13. submodules/mast3r/assets/demo.jpg +0 -0
  14. submodules/mast3r/assets/examples.jpg +0 -0
  15. submodules/mast3r/assets/mast3r.jpg +0 -0
  16. submodules/mast3r/assets/mast3r_archi.jpg +0 -0
  17. submodules/mast3r/assets/matching.jpg +0 -0
  18. submodules/mast3r/checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth +1 -0
  19. submodules/mast3r/checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth +1 -0
  20. submodules/mast3r/colmap_from_mast3r.py +224 -0
  21. submodules/mast3r/command +33 -0
  22. submodules/mast3r/demo.py +54 -0
  23. submodules/mast3r/demo_dust3r_ga.py +65 -0
  24. submodules/mast3r/docker/docker-compose-cpu.yml +16 -0
  25. submodules/mast3r/docker/docker-compose-cuda.yml +23 -0
  26. submodules/mast3r/docker/files/cpu.Dockerfile +39 -0
  27. submodules/mast3r/docker/files/cuda.Dockerfile +29 -0
  28. submodules/mast3r/docker/files/entrypoint.sh +8 -0
  29. submodules/mast3r/docker/run.sh +68 -0
  30. submodules/mast3r/dust3r/.gitignore +132 -0
  31. submodules/mast3r/dust3r/.gitmodules +3 -0
  32. submodules/mast3r/dust3r/LICENSE +7 -0
  33. submodules/mast3r/dust3r/NOTICE +12 -0
  34. submodules/mast3r/dust3r/assets/demo.jpg +0 -0
  35. submodules/mast3r/dust3r/assets/dust3r.jpg +0 -0
  36. submodules/mast3r/dust3r/assets/dust3r_archi.jpg +0 -0
  37. submodules/mast3r/dust3r/assets/matching.jpg +0 -0
  38. submodules/mast3r/dust3r/assets/pipeline1.jpg +0 -0
  39. submodules/mast3r/dust3r/croco/LICENSE +52 -0
  40. submodules/mast3r/dust3r/croco/NOTICE +21 -0
  41. submodules/mast3r/dust3r/croco/README.MD +124 -0
  42. submodules/mast3r/dust3r/croco/assets/Chateau1.png +0 -0
  43. submodules/mast3r/dust3r/croco/assets/Chateau2.png +0 -0
  44. submodules/mast3r/dust3r/croco/assets/arch.jpg +0 -0
  45. submodules/mast3r/dust3r/croco/croco-stereo-flow-demo.ipynb +191 -0
  46. submodules/mast3r/dust3r/croco/datasets/__init__.py +0 -0
  47. submodules/mast3r/dust3r/croco/datasets/crops/README.MD +104 -0
  48. submodules/mast3r/dust3r/croco/datasets/crops/extract_crops_from_images.py +159 -0
  49. submodules/mast3r/dust3r/croco/datasets/habitat_sim/README.MD +76 -0
  50. submodules/mast3r/dust3r/croco/datasets/habitat_sim/__init__.py +0 -0
submodules/mast3r/.gitignore ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ pip-wheel-metadata/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py,cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # Jupyter Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # IPython
81
+ profile_default/
82
+ ipython_config.py
83
+
84
+ # pyenv
85
+ .python-version
86
+
87
+ # pipenv
88
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
90
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
91
+ # install all needed dependencies.
92
+ #Pipfile.lock
93
+
94
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
95
+ __pypackages__/
96
+
97
+ # Celery stuff
98
+ celerybeat-schedule
99
+ celerybeat.pid
100
+
101
+ # SageMath parsed files
102
+ *.sage.py
103
+
104
+ # Environments
105
+ .env
106
+ .venv
107
+ env/
108
+ venv/
109
+ ENV/
110
+ env.bak/
111
+ venv.bak/
112
+
113
+ # Spyder project settings
114
+ .spyderproject
115
+ .spyproject
116
+
117
+ # Rope project settings
118
+ .ropeproject
119
+
120
+ # mkdocs documentation
121
+ /site
122
+
123
+ # mypy
124
+ .mypy_cache/
125
+ .dmypy.json
126
+ dmypy.json
127
+
128
+ # Pyre type checker
129
+ .pyre/
130
+
131
+ # checkpoints/
132
+ curope.cpython-311-x86_64-linux-gnu.so
submodules/mast3r/.gitmodules ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ [submodule "dust3r"]
2
+ path = dust3r
3
+ url = https://github.com/naver/dust3r
4
+ branch = cvpr
submodules/mast3r/CHECKPOINTS_NOTICE ADDED
@@ -0,0 +1,1376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MASt3R
2
+ Copyright 2024-present NAVER Corp.
3
+
4
+ This project's checkpoints were trained on datasets with separate license terms.
5
+ Your use of theses checkpoints is subject to the terms and conditions of the following licenses.
6
+
7
+ ===
8
+ pretrained model:
9
+ DUSt3R: DUSt3R_ViTLarge_BaseDecoder_512_dpt
10
+ https://github.com/naver/dust3r
11
+
12
+ In particular, from the croco training set:
13
+
14
+ 3D_Street_View
15
+ https://github.com/amir32002/3D_Street_View/blob/master/LICENSE
16
+ This dataset is made freely available to academic and non-academic entities for non-commercial purposes such as academic research, teaching, scientific publications, or personal experimentation. Permission is granted to use the data given that you agree:
17
+
18
+ 1. That the dataset comes "AS IS", without express or implied warranty. Although every effort has been made to ensure accuracy, we do not accept any responsibility for errors or omissions.
19
+
20
+ 2. That you include a reference to the Dataset in any work that makes use of the dataset. For research papers, cite our publication as listed on our website.
21
+
22
+ 3. That you do not distribute this dataset or modified versions. It is permissible to distribute derivative works in as far as they are abstract representations of this dataset (such as models trained on it or additional annotations that do not directly include any of our data) and do not allow to recover the dataset or something similar in character.
23
+
24
+ 4. That you may not use the dataset or any derivative work for commercial purposes as, for example, licensing or selling the data, or using the data with a purpose to procure a commercial gain.
25
+ That all rights not expressly granted to you are reserved by us.
26
+
27
+ In addition, using the dataset is subject to the following standard terms:
28
+
29
+
30
+ Apache License
31
+ Version 2.0, January 2004
32
+ http://www.apache.org/licenses/
33
+
34
+ Indoor Visual Localization datasets (IndoorVL)
35
+ https://challenge.naverlabs.com/kapture/GangnamStation_LICENSE.txt
36
+ https://challenge.naverlabs.com/kapture/HyundaiDepartmentStore_LICENSE.txt
37
+
38
+ LICENSE.txt
39
+ Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 (modified ver.)
40
+ International Public License
41
+
42
+ By exercising the Licensed Rights (defined below), You accept and agree
43
+ to be bound by the terms and conditions of this Creative Commons
44
+ Attribution-NonCommercial-NoDerivatives 4.0 International Public
45
+ License ("Public License"). To the extent this Public License may be
46
+ interpreted as a contract, You are granted the Licensed Rights in
47
+ consideration of Your acceptance of these terms and conditions, and the
48
+ Licensor grants You such rights in consideration of benefits the
49
+ Licensor receives from making the Licensed Material available under
50
+ these terms and conditions.
51
+
52
+
53
+ Section 1 -- Definitions.
54
+
55
+ a. Adapted Material means material subject to Copyright and Similar
56
+ Rights that is derived from or based upon the Licensed Material
57
+ and in which the Licensed Material is translated, altered,
58
+ arranged, transformed, or otherwise modified in a manner requiring
59
+ permission under the Copyright and Similar Rights held by the
60
+ Licensor. For purposes of this Public License, where the Licensed
61
+ Material is a musical work, performance, or sound recording,
62
+ Adapted Material is always produced where the Licensed Material is
63
+ synched in timed relation with a moving image.
64
+
65
+ b. Copyright and Similar Rights means copyright and/or similar rights
66
+ closely related to copyright including, without limitation,
67
+ performance, broadcast, sound recording, and Sui Generis Database
68
+ Rights, without regard to how the rights are labeled or
69
+ categorized. For purposes of this Public License, the rights
70
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
71
+ Rights.
72
+
73
+ c. Effective Technological Measures means those measures that, in the
74
+ absence of proper authority, may not be circumvented under laws
75
+ fulfilling obligations under Article 11 of the WIPO Copyright
76
+ Treaty adopted on December 20, 1996, and/or similar international
77
+ agreements.
78
+
79
+ d. Exceptions and Limitations means fair use, fair dealing, and/or
80
+ any other exception or limitation to Copyright and Similar Rights
81
+ that applies to Your use of the Licensed Material.
82
+
83
+ e. Licensed Material means the artistic or literary work, database,
84
+ or other material to which the Licensor applied this Public
85
+ License.
86
+
87
+ f. Licensed Rights means the rights granted to You subject to the
88
+ terms and conditions of this Public License, which are limited to
89
+ all Copyright and Similar Rights that apply to Your use of the
90
+ Licensed Material and that the Licensor has authority to license.
91
+
92
+ g. Licensor means the individual(s) or entity(ies) granting rights
93
+ under this Public License.
94
+
95
+ h. NonCommercial means not primarily intended for or directed towards
96
+ commercial advantage or monetary compensation. For purposes of
97
+ this Public License, the exchange of the Licensed Material for
98
+ other material subject to Copyright and Similar Rights by digital
99
+ file-sharing or similar means is NonCommercial provided there is
100
+ no payment of monetary compensation in connection with the
101
+ exchange.
102
+
103
+ i. Share means to provide material to the public by any means or
104
+ process that requires permission under the Licensed Rights, such
105
+ as reproduction, public display, public performance, distribution,
106
+ dissemination, communication, or importation, and to make material
107
+ available to the public including in ways that members of the
108
+ public may access the material from a place and at a time
109
+ individually chosen by them.
110
+
111
+ j. Sui Generis Database Rights means rights other than copyright
112
+ resulting from Directive 96/9/EC of the European Parliament and of
113
+ the Council of 11 March 1996 on the legal protection of databases,
114
+ as amended and/or succeeded, as well as other essentially
115
+ equivalent rights anywhere in the world.
116
+
117
+ k. You means the individual or entity exercising the Licensed Rights
118
+ under this Public License. Your has a corresponding meaning.
119
+
120
+ l. Research purpose means to publish research achievements in a research paper
121
+
122
+
123
+ Section 2 -- Scope.
124
+
125
+ a. License grant.
126
+
127
+ 1. Subject to the terms and conditions of this Public License,
128
+ the Licensor hereby grants You a worldwide, royalty-free,
129
+ non-sublicensable, non-exclusive, irrevocable license to
130
+ exercise the Licensed Rights in the Licensed Material to:
131
+
132
+ a. reproduce and Share the Licensed Material, in whole or
133
+ in part, for NonCommercial purposes only; and
134
+
135
+ b. produce and reproduce, but not Share, Adapted Material
136
+ for NonCommercial purposes only.
137
+
138
+ c. reproduce and share the Adapted Matrerial, in part,
139
+ for Research purposes only.
140
+
141
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
142
+ Exceptions and Limitations apply to Your use, this Public
143
+ License does not apply, and You do not need to comply with
144
+ its terms and conditions.
145
+
146
+ 3. Term. The term of this Public License is specified in Section
147
+ 6(a).
148
+
149
+ 4. Media and formats; technical modifications allowed. The
150
+ Licensor authorizes You to exercise the Licensed Rights in
151
+ all media and formats whether now known or hereafter created,
152
+ and to make technical modifications necessary to do so. The
153
+ Licensor waives and/or agrees not to assert any right or
154
+ authority to forbid You from making technical modifications
155
+ necessary to exercise the Licensed Rights, including
156
+ technical modifications necessary to circumvent Effective
157
+ Technological Measures. For purposes of this Public License,
158
+ simply making modifications authorized by this Section 2(a)
159
+ (4) never produces Adapted Material.
160
+
161
+ 5. Downstream recipients.
162
+
163
+ a. Offer from the Licensor -- Licensed Material. Every
164
+ recipient of the Licensed Material automatically
165
+ receives an offer from the Licensor to exercise the
166
+ Licensed Rights under the terms and conditions of this
167
+ Public License.
168
+
169
+ b. No downstream restrictions. You may not offer or impose
170
+ any additional or different terms or conditions on, or
171
+ apply any Effective Technological Measures to, the
172
+ Licensed Material if doing so restricts exercise of the
173
+ Licensed Rights by any recipient of the Licensed
174
+ Material.
175
+
176
+ 6. No endorsement. Nothing in this Public License constitutes or
177
+ may be construed as permission to assert or imply that You
178
+ are, or that Your use of the Licensed Material is, connected
179
+ with, or sponsored, endorsed, or granted official status by,
180
+ the Licensor or others designated to receive attribution as
181
+ provided in Section 3(a)(1)(A)(i).
182
+
183
+ b. Other rights.
184
+
185
+ 1. Moral rights, such as the right of integrity, are not
186
+ licensed under this Public License, nor are publicity,
187
+ privacy, and/or other similar personality rights; however, to
188
+ the extent possible, the Licensor waives and/or agrees not to
189
+ assert any such rights held by the Licensor to the limited
190
+ extent necessary to allow You to exercise the Licensed
191
+ Rights, but not otherwise.
192
+
193
+ 2. Patent and trademark rights are not licensed under this
194
+ Public License.
195
+
196
+ 3. To the extent possible, the Licensor waives any right to
197
+ collect royalties from You for the exercise of the Licensed
198
+ Rights, whether directly or through a collecting society
199
+ under any voluntary or waivable statutory or compulsory
200
+ licensing scheme. In all other cases the Licensor expressly
201
+ reserves any right to collect such royalties, including when
202
+ the Licensed Material is used other than for NonCommercial
203
+ purposes.
204
+
205
+
206
+ Section 3 -- License Conditions.
207
+
208
+ Your exercise of the Licensed Rights is expressly made subject to the
209
+ following conditions.
210
+
211
+ a. Attribution.
212
+
213
+ 1. If You Share the Licensed Material(including in a research paper),
214
+ You must:
215
+
216
+ a. retain the following if it is supplied by the Licensor
217
+ with the Licensed Material:
218
+
219
+ i. identification of the creator(s) of the Licensed
220
+ Material and any others designated to receive
221
+ attribution, in any reasonable manner requested by
222
+ the Licensor (including by pseudonym if
223
+ designated);
224
+
225
+ ii. a copyright notice;
226
+
227
+ iii. a notice that refers to this Public License;
228
+
229
+ iv. a notice that refers to the disclaimer of
230
+ warranties;
231
+
232
+ v. a URI or hyperlink to the Licensed Material to the
233
+ extent reasonably practicable;
234
+
235
+ b. indicate if You modified the Licensed Material and
236
+ retain an indication of any previous modifications; and
237
+
238
+ c. indicate the Licensed Material is licensed under this
239
+ Public License, and include the text of, or the URI or
240
+ hyperlink to, this Public License.
241
+
242
+ For the avoidance of doubt, You do not have permission under
243
+ this Public License to Share Adapted Material.
244
+
245
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
246
+ reasonable manner based on the medium, means, and context in
247
+ which You Share the Licensed Material. For example, it may be
248
+ reasonable to satisfy the conditions by providing a URI or
249
+ hyperlink to a resource that includes the required
250
+ information.
251
+
252
+ 3. If requested by the Licensor, You must remove any of the
253
+ information required by Section 3(a)(1)(A) to the extent
254
+ reasonably practicable.
255
+
256
+
257
+ Section 4 -- Sui Generis Database Rights.
258
+
259
+ Where the Licensed Rights include Sui Generis Database Rights that
260
+ apply to Your use of the Licensed Material:
261
+
262
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
263
+ to extract, reuse, reproduce, and Share all or a substantial
264
+ portion of the contents of the database for NonCommercial purposes
265
+ only and provided You do not Share Adapted Material;
266
+
267
+ b. if You include all or a substantial portion of the database
268
+ contents in a database in which You have Sui Generis Database
269
+ Rights, then the database in which You have Sui Generis Database
270
+ Rights (but not its individual contents) is Adapted Material; and
271
+
272
+ c. You must comply with the conditions in Section 3(a) if You Share
273
+ all or a substantial portion of the contents of the database.
274
+
275
+ For the avoidance of doubt, this Section 4 supplements and does not
276
+ replace Your obligations under this Public License where the Licensed
277
+ Rights include other Copyright and Similar Rights.
278
+
279
+
280
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
281
+
282
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
283
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
284
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
285
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
286
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
287
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
288
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
289
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
290
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
291
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
292
+
293
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
294
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
295
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
296
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
297
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
298
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
299
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
300
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
301
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
302
+
303
+ c. The disclaimer of warranties and limitation of liability provided
304
+ above shall be interpreted in a manner that, to the extent
305
+ possible, most closely approximates an absolute disclaimer and
306
+ waiver of all liability.
307
+
308
+
309
+ Section 6 -- Term and Termination.
310
+
311
+ a. This Public License applies for the term of the Copyright and
312
+ Similar Rights licensed here. However, if You fail to comply with
313
+ this Public License, then Your rights under this Public License
314
+ terminate automatically.
315
+
316
+ b. Where Your right to use the Licensed Material has terminated under
317
+ Section 6(a), it reinstates:
318
+
319
+ 1. automatically as of the date the violation is cured, provided
320
+ it is cured within 30 days of Your discovery of the
321
+ violation; or
322
+
323
+ 2. upon express reinstatement by the Licensor.
324
+
325
+ For the avoidance of doubt, this Section 6(b) does not affect any
326
+ right the Licensor may have to seek remedies for Your violations
327
+ of this Public License.
328
+
329
+ c. For the avoidance of doubt, the Licensor may also offer the
330
+ Licensed Material under separate terms or conditions or stop
331
+ distributing the Licensed Material at any time; however, doing so
332
+ will not terminate this Public License.
333
+
334
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
335
+ License.
336
+
337
+
338
+ Section 7 -- Other Terms and Conditions.
339
+
340
+ a. The Licensor shall not be bound by any additional or different
341
+ terms or conditions communicated by You unless expressly agreed.
342
+
343
+ b. Any arrangements, understandings, or agreements regarding the
344
+ Licensed Material not stated herein are separate from and
345
+ independent of the terms and conditions of this Public License.
346
+
347
+
348
+ Section 8 -- Interpretation.
349
+
350
+ a. For the avoidance of doubt, this Public License does not, and
351
+ shall not be interpreted to, reduce, limit, restrict, or impose
352
+ conditions on any use of the Licensed Material that could lawfully
353
+ be made without permission under this Public License.
354
+
355
+ b. To the extent possible, if any provision of this Public License is
356
+ deemed unenforceable, it shall be automatically reformed to the
357
+ minimum extent necessary to make it enforceable. If the provision
358
+ cannot be reformed, it shall be severed from this Public License
359
+ without affecting the enforceability of the remaining terms and
360
+ conditions.
361
+
362
+ c. No term or condition of this Public License will be waived and no
363
+ failure to comply consented to unless expressly agreed to by the
364
+ Licensor.
365
+
366
+ d. Nothing in this Public License constitutes or may be interpreted
367
+ as a limitation upon, or waiver of, any privileges and immunities
368
+ that apply to the Licensor or You, including from the legal
369
+ processes of any jurisdiction or authority.
370
+
371
+ ===
372
+ CO3Dv2
373
+
374
+ Creative Commons Attribution-NonCommercial 4.0 International Public
375
+ License
376
+
377
+ By exercising the Licensed Rights (defined below), You accept and agree
378
+ to be bound by the terms and conditions of this Creative Commons
379
+ Attribution-NonCommercial 4.0 International Public License ("Public
380
+ License"). To the extent this Public License may be interpreted as a
381
+ contract, You are granted the Licensed Rights in consideration of Your
382
+ acceptance of these terms and conditions, and the Licensor grants You
383
+ such rights in consideration of benefits the Licensor receives from
384
+ making the Licensed Material available under these terms and
385
+ conditions.
386
+
387
+ Section 1 -- Definitions.
388
+
389
+ a. Adapted Material means material subject to Copyright and Similar
390
+ Rights that is derived from or based upon the Licensed Material
391
+ and in which the Licensed Material is translated, altered,
392
+ arranged, transformed, or otherwise modified in a manner requiring
393
+ permission under the Copyright and Similar Rights held by the
394
+ Licensor. For purposes of this Public License, where the Licensed
395
+ Material is a musical work, performance, or sound recording,
396
+ Adapted Material is always produced where the Licensed Material is
397
+ synched in timed relation with a moving image.
398
+
399
+ b. Adapter's License means the license You apply to Your Copyright
400
+ and Similar Rights in Your contributions to Adapted Material in
401
+ accordance with the terms and conditions of this Public License.
402
+
403
+ c. Copyright and Similar Rights means copyright and/or similar rights
404
+ closely related to copyright including, without limitation,
405
+ performance, broadcast, sound recording, and Sui Generis Database
406
+ Rights, without regard to how the rights are labeled or
407
+ categorized. For purposes of this Public License, the rights
408
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
409
+ Rights.
410
+ d. Effective Technological Measures means those measures that, in the
411
+ absence of proper authority, may not be circumvented under laws
412
+ fulfilling obligations under Article 11 of the WIPO Copyright
413
+ Treaty adopted on December 20, 1996, and/or similar international
414
+ agreements.
415
+
416
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
417
+ any other exception or limitation to Copyright and Similar Rights
418
+ that applies to Your use of the Licensed Material.
419
+
420
+ f. Licensed Material means the artistic or literary work, database,
421
+ or other material to which the Licensor applied this Public
422
+ License.
423
+
424
+ g. Licensed Rights means the rights granted to You subject to the
425
+ terms and conditions of this Public License, which are limited to
426
+ all Copyright and Similar Rights that apply to Your use of the
427
+ Licensed Material and that the Licensor has authority to license.
428
+
429
+ h. Licensor means the individual(s) or entity(ies) granting rights
430
+ under this Public License.
431
+
432
+ i. NonCommercial means not primarily intended for or directed towards
433
+ commercial advantage or monetary compensation. For purposes of
434
+ this Public License, the exchange of the Licensed Material for
435
+ other material subject to Copyright and Similar Rights by digital
436
+ file-sharing or similar means is NonCommercial provided there is
437
+ no payment of monetary compensation in connection with the
438
+ exchange.
439
+
440
+ j. Share means to provide material to the public by any means or
441
+ process that requires permission under the Licensed Rights, such
442
+ as reproduction, public display, public performance, distribution,
443
+ dissemination, communication, or importation, and to make material
444
+ available to the public including in ways that members of the
445
+ public may access the material from a place and at a time
446
+ individually chosen by them.
447
+
448
+ k. Sui Generis Database Rights means rights other than copyright
449
+ resulting from Directive 96/9/EC of the European Parliament and of
450
+ the Council of 11 March 1996 on the legal protection of databases,
451
+ as amended and/or succeeded, as well as other essentially
452
+ equivalent rights anywhere in the world.
453
+
454
+ l. You means the individual or entity exercising the Licensed Rights
455
+ under this Public License. Your has a corresponding meaning.
456
+
457
+ Section 2 -- Scope.
458
+
459
+ a. License grant.
460
+
461
+ 1. Subject to the terms and conditions of this Public License,
462
+ the Licensor hereby grants You a worldwide, royalty-free,
463
+ non-sublicensable, non-exclusive, irrevocable license to
464
+ exercise the Licensed Rights in the Licensed Material to:
465
+
466
+ a. reproduce and Share the Licensed Material, in whole or
467
+ in part, for NonCommercial purposes only; and
468
+
469
+ b. produce, reproduce, and Share Adapted Material for
470
+ NonCommercial purposes only.
471
+
472
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
473
+ Exceptions and Limitations apply to Your use, this Public
474
+ License does not apply, and You do not need to comply with
475
+ its terms and conditions.
476
+
477
+ 3. Term. The term of this Public License is specified in Section
478
+ 6(a).
479
+
480
+ 4. Media and formats; technical modifications allowed. The
481
+ Licensor authorizes You to exercise the Licensed Rights in
482
+ all media and formats whether now known or hereafter created,
483
+ and to make technical modifications necessary to do so. The
484
+ Licensor waives and/or agrees not to assert any right or
485
+ authority to forbid You from making technical modifications
486
+ necessary to exercise the Licensed Rights, including
487
+ technical modifications necessary to circumvent Effective
488
+ Technological Measures. For purposes of this Public License,
489
+ simply making modifications authorized by this Section 2(a)
490
+ (4) never produces Adapted Material.
491
+
492
+ 5. Downstream recipients.
493
+
494
+ a. Offer from the Licensor -- Licensed Material. Every
495
+ recipient of the Licensed Material automatically
496
+ receives an offer from the Licensor to exercise the
497
+ Licensed Rights under the terms and conditions of this
498
+ Public License.
499
+
500
+ b. No downstream restrictions. You may not offer or impose
501
+ any additional or different terms or conditions on, or
502
+ apply any Effective Technological Measures to, the
503
+ Licensed Material if doing so restricts exercise of the
504
+ Licensed Rights by any recipient of the Licensed
505
+ Material.
506
+
507
+ 6. No endorsement. Nothing in this Public License constitutes or
508
+ may be construed as permission to assert or imply that You
509
+ are, or that Your use of the Licensed Material is, connected
510
+ with, or sponsored, endorsed, or granted official status by,
511
+ the Licensor or others designated to receive attribution as
512
+ provided in Section 3(a)(1)(A)(i).
513
+
514
+ b. Other rights.
515
+
516
+ 1. Moral rights, such as the right of integrity, are not
517
+ licensed under this Public License, nor are publicity,
518
+ privacy, and/or other similar personality rights; however, to
519
+ the extent possible, the Licensor waives and/or agrees not to
520
+ assert any such rights held by the Licensor to the limited
521
+ extent necessary to allow You to exercise the Licensed
522
+ Rights, but not otherwise.
523
+
524
+ 2. Patent and trademark rights are not licensed under this
525
+ Public License.
526
+
527
+ 3. To the extent possible, the Licensor waives any right to
528
+ collect royalties from You for the exercise of the Licensed
529
+ Rights, whether directly or through a collecting society
530
+ under any voluntary or waivable statutory or compulsory
531
+ licensing scheme. In all other cases the Licensor expressly
532
+ reserves any right to collect such royalties, including when
533
+ the Licensed Material is used other than for NonCommercial
534
+ purposes.
535
+
536
+ Section 3 -- License Conditions.
537
+
538
+ Your exercise of the Licensed Rights is expressly made subject to the
539
+ following conditions.
540
+
541
+ a. Attribution.
542
+
543
+ 1. If You Share the Licensed Material (including in modified
544
+ form), You must:
545
+
546
+ a. retain the following if it is supplied by the Licensor
547
+ with the Licensed Material:
548
+
549
+ i. identification of the creator(s) of the Licensed
550
+ Material and any others designated to receive
551
+ attribution, in any reasonable manner requested by
552
+ the Licensor (including by pseudonym if
553
+ designated);
554
+
555
+ ii. a copyright notice;
556
+
557
+ iii. a notice that refers to this Public License;
558
+
559
+ iv. a notice that refers to the disclaimer of
560
+ warranties;
561
+
562
+ v. a URI or hyperlink to the Licensed Material to the
563
+ extent reasonably practicable;
564
+
565
+ b. indicate if You modified the Licensed Material and
566
+ retain an indication of any previous modifications; and
567
+
568
+ c. indicate the Licensed Material is licensed under this
569
+ Public License, and include the text of, or the URI or
570
+ hyperlink to, this Public License.
571
+
572
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
573
+ reasonable manner based on the medium, means, and context in
574
+ which You Share the Licensed Material. For example, it may be
575
+ reasonable to satisfy the conditions by providing a URI or
576
+ hyperlink to a resource that includes the required
577
+ information.
578
+
579
+ 3. If requested by the Licensor, You must remove any of the
580
+ information required by Section 3(a)(1)(A) to the extent
581
+ reasonably practicable.
582
+
583
+ 4. If You Share Adapted Material You produce, the Adapter's
584
+ License You apply must not prevent recipients of the Adapted
585
+ Material from complying with this Public License.
586
+
587
+ Section 4 -- Sui Generis Database Rights.
588
+
589
+ Where the Licensed Rights include Sui Generis Database Rights that
590
+ apply to Your use of the Licensed Material:
591
+
592
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
593
+ to extract, reuse, reproduce, and Share all or a substantial
594
+ portion of the contents of the database for NonCommercial purposes
595
+ only;
596
+
597
+ b. if You include all or a substantial portion of the database
598
+ contents in a database in which You have Sui Generis Database
599
+ Rights, then the database in which You have Sui Generis Database
600
+ Rights (but not its individual contents) is Adapted Material; and
601
+
602
+ c. You must comply with the conditions in Section 3(a) if You Share
603
+ all or a substantial portion of the contents of the database.
604
+
605
+ For the avoidance of doubt, this Section 4 supplements and does not
606
+ replace Your obligations under this Public License where the Licensed
607
+ Rights include other Copyright and Similar Rights.
608
+
609
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
610
+
611
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
612
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
613
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
614
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
615
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
616
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
617
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
618
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
619
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
620
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
621
+
622
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
623
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
624
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
625
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
626
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
627
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
628
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
629
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
630
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
631
+
632
+ c. The disclaimer of warranties and limitation of liability provided
633
+ above shall be interpreted in a manner that, to the extent
634
+ possible, most closely approximates an absolute disclaimer and
635
+ waiver of all liability.
636
+
637
+ Section 6 -- Term and Termination.
638
+
639
+ a. This Public License applies for the term of the Copyright and
640
+ Similar Rights licensed here. However, if You fail to comply with
641
+ this Public License, then Your rights under this Public License
642
+ terminate automatically.
643
+
644
+ b. Where Your right to use the Licensed Material has terminated under
645
+ Section 6(a), it reinstates:
646
+
647
+ 1. automatically as of the date the violation is cured, provided
648
+ it is cured within 30 days of Your discovery of the
649
+ violation; or
650
+
651
+ 2. upon express reinstatement by the Licensor.
652
+
653
+ For the avoidance of doubt, this Section 6(b) does not affect any
654
+ right the Licensor may have to seek remedies for Your violations
655
+ of this Public License.
656
+
657
+ c. For the avoidance of doubt, the Licensor may also offer the
658
+ Licensed Material under separate terms or conditions or stop
659
+ distributing the Licensed Material at any time; however, doing so
660
+ will not terminate this Public License.
661
+
662
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
663
+ License.
664
+
665
+ Section 7 -- Other Terms and Conditions.
666
+
667
+ a. The Licensor shall not be bound by any additional or different
668
+ terms or conditions communicated by You unless expressly agreed.
669
+
670
+ b. Any arrangements, understandings, or agreements regarding the
671
+ Licensed Material not stated herein are separate from and
672
+ independent of the terms and conditions of this Public License.
673
+
674
+ Section 8 -- Interpretation.
675
+
676
+ a. For the avoidance of doubt, this Public License does not, and
677
+ shall not be interpreted to, reduce, limit, restrict, or impose
678
+ conditions on any use of the Licensed Material that could lawfully
679
+ be made without permission under this Public License.
680
+
681
+ b. To the extent possible, if any provision of this Public License is
682
+ deemed unenforceable, it shall be automatically reformed to the
683
+ minimum extent necessary to make it enforceable. If the provision
684
+ cannot be reformed, it shall be severed from this Public License
685
+ without affecting the enforceability of the remaining terms and
686
+ conditions.
687
+
688
+ c. No term or condition of this Public License will be waived and no
689
+ failure to comply consented to unless expressly agreed to by the
690
+ Licensor.
691
+
692
+ d. Nothing in this Public License constitutes or may be interpreted
693
+ as a limitation upon, or waiver of, any privileges and immunities
694
+ that apply to the Licensor or You, including from the legal
695
+ processes of any jurisdiction or authority.
696
+
697
+ ===
698
+ ARKitScenes
699
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0: https://creativecommons.org/licenses/by-nc-sa/4.0/
700
+
701
+ ===
702
+ ScanNet++
703
+ https://kaldir.vc.in.tum.de/scannetpp/static/scannetpp-terms-of-use.pdf
704
+
705
+ ===
706
+ BlendedMVS
707
+ Creative Commons Attribution 4.0 International: http://creativecommons.org/licenses/by/4.0/
708
+
709
+ ===
710
+ Habitat-Sim
711
+ HM3D
712
+ https://matterport.com/fr/legal/matterport-end-user-license-agreement-academic-use-model-data
713
+
714
+ ScanNet
715
+ https://kaldir.vc.in.tum.de/scannet/ScanNet_TOS.pdf
716
+
717
+ Replica
718
+ Before Facebook Technologies, LLC (“FB”) is able to offer you (“Researcher” or
719
+ “You”) access to the Replica Dataset (the “Dataset”), please read the following
720
+ agreement (“Agreement”).
721
+
722
+ By accessing, and in exchange for receiving permission to access, the Dataset,
723
+ Researcher hereby agrees to the following terms and conditions:
724
+ 1. Researcher may use, modify, improve and/or publish the Dataset only in
725
+ connection with a research or educational purpose that is non-commercial or
726
+ not-for-profit in nature, and not for any other purpose.
727
+ 1. Researcher may provide research associates and colleagues with access to the
728
+ Dataset provided that they first agree to be bound by these terms and
729
+ conditions.
730
+ 1. Researcher may use the Dataset in the scope of their employment at a
731
+ for-profit or commercial entity provided that Researcher complies with Section 1
732
+ of this Agreement. If Researcher is employed by a for-profit or commercial
733
+ entity, Researcher's employer shall also be bound by these terms and conditions,
734
+ and Researcher hereby represents that they are fully authorized to enter into
735
+ this agreement on behalf of such employer.
736
+ 1. THE DATASET IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
737
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
738
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FB OR ANY
739
+ CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
740
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
741
+ WITH THE DATASET OR THE USE OR OTHER DEALINGS IN THE DATASET.
742
+ 1. The law of the State of California shall apply to all disputes related to
743
+ this Dataset.
744
+
745
+ ReplicaCAD
746
+ Creative Commons Attribution 4.0 International (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/
747
+
748
+ habitat-sim
749
+ MIT License
750
+
751
+ Copyright (c) Meta Platforms, Inc. and its affiliates.
752
+
753
+ Permission is hereby granted, free of charge, to any person obtaining a copy
754
+ of this software and associated documentation files (the "Software"), to deal
755
+ in the Software without restriction, including without limitation the rights
756
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
757
+ copies of the Software, and to permit persons to whom the Software is
758
+ furnished to do so, subject to the following conditions:
759
+
760
+ The above copyright notice and this permission notice shall be included in all
761
+ copies or substantial portions of the Software.
762
+
763
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
764
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
765
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
766
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
767
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
768
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
769
+ SOFTWARE.
770
+ ===
771
+ MegaDepth
772
+ MIT License
773
+
774
+ Copyright (c) 2018 Zhengqi Li
775
+
776
+ Permission is hereby granted, free of charge, to any person obtaining a copy
777
+ of this software and associated documentation files (the "Software"), to deal
778
+ in the Software without restriction, including without limitation the rights
779
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
780
+ copies of the Software, and to permit persons to whom the Software is
781
+ furnished to do so, subject to the following conditions:
782
+
783
+ The above copyright notice and this permission notice shall be included in all
784
+ copies or substantial portions of the Software.
785
+
786
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
787
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
788
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
789
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
790
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
791
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
792
+ SOFTWARE.
793
+
794
+ ===
795
+ StaticThings3D
796
+ Apache License
797
+ Version 2.0, January 2004
798
+ http://www.apache.org/licenses/
799
+
800
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
801
+
802
+ 1. Definitions.
803
+
804
+ "License" shall mean the terms and conditions for use, reproduction,
805
+ and distribution as defined by Sections 1 through 9 of this document.
806
+
807
+ "Licensor" shall mean the copyright owner or entity authorized by
808
+ the copyright owner that is granting the License.
809
+
810
+ "Legal Entity" shall mean the union of the acting entity and all
811
+ other entities that control, are controlled by, or are under common
812
+ control with that entity. For the purposes of this definition,
813
+ "control" means (i) the power, direct or indirect, to cause the
814
+ direction or management of such entity, whether by contract or
815
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
816
+ outstanding shares, or (iii) beneficial ownership of such entity.
817
+
818
+ "You" (or "Your") shall mean an individual or Legal Entity
819
+ exercising permissions granted by this License.
820
+
821
+ "Source" form shall mean the preferred form for making modifications,
822
+ including but not limited to software source code, documentation
823
+ source, and configuration files.
824
+
825
+ "Object" form shall mean any form resulting from mechanical
826
+ transformation or translation of a Source form, including but
827
+ not limited to compiled object code, generated documentation,
828
+ and conversions to other media types.
829
+
830
+ "Work" shall mean the work of authorship, whether in Source or
831
+ Object form, made available under the License, as indicated by a
832
+ copyright notice that is included in or attached to the work
833
+ (an example is provided in the Appendix below).
834
+
835
+ "Derivative Works" shall mean any work, whether in Source or Object
836
+ form, that is based on (or derived from) the Work and for which the
837
+ editorial revisions, annotations, elaborations, or other modifications
838
+ represent, as a whole, an original work of authorship. For the purposes
839
+ of this License, Derivative Works shall not include works that remain
840
+ separable from, or merely link (or bind by name) to the interfaces of,
841
+ the Work and Derivative Works thereof.
842
+
843
+ "Contribution" shall mean any work of authorship, including
844
+ the original version of the Work and any modifications or additions
845
+ to that Work or Derivative Works thereof, that is intentionally
846
+ submitted to Licensor for inclusion in the Work by the copyright owner
847
+ or by an individual or Legal Entity authorized to submit on behalf of
848
+ the copyright owner. For the purposes of this definition, "submitted"
849
+ means any form of electronic, verbal, or written communication sent
850
+ to the Licensor or its representatives, including but not limited to
851
+ communication on electronic mailing lists, source code control systems,
852
+ and issue tracking systems that are managed by, or on behalf of, the
853
+ Licensor for the purpose of discussing and improving the Work, but
854
+ excluding communication that is conspicuously marked or otherwise
855
+ designated in writing by the copyright owner as "Not a Contribution."
856
+
857
+ "Contributor" shall mean Licensor and any individual or Legal Entity
858
+ on behalf of whom a Contribution has been received by Licensor and
859
+ subsequently incorporated within the Work.
860
+
861
+ 2. Grant of Copyright License. Subject to the terms and conditions of
862
+ this License, each Contributor hereby grants to You a perpetual,
863
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
864
+ copyright license to reproduce, prepare Derivative Works of,
865
+ publicly display, publicly perform, sublicense, and distribute the
866
+ Work and such Derivative Works in Source or Object form.
867
+
868
+ 3. Grant of Patent License. Subject to the terms and conditions of
869
+ this License, each Contributor hereby grants to You a perpetual,
870
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
871
+ (except as stated in this section) patent license to make, have made,
872
+ use, offer to sell, sell, import, and otherwise transfer the Work,
873
+ where such license applies only to those patent claims licensable
874
+ by such Contributor that are necessarily infringed by their
875
+ Contribution(s) alone or by combination of their Contribution(s)
876
+ with the Work to which such Contribution(s) was submitted. If You
877
+ institute patent litigation against any entity (including a
878
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
879
+ or a Contribution incorporated within the Work constitutes direct
880
+ or contributory patent infringement, then any patent licenses
881
+ granted to You under this License for that Work shall terminate
882
+ as of the date such litigation is filed.
883
+
884
+ 4. Redistribution. You may reproduce and distribute copies of the
885
+ Work or Derivative Works thereof in any medium, with or without
886
+ modifications, and in Source or Object form, provided that You
887
+ meet the following conditions:
888
+
889
+ (a) You must give any other recipients of the Work or
890
+ Derivative Works a copy of this License; and
891
+
892
+ (b) You must cause any modified files to carry prominent notices
893
+ stating that You changed the files; and
894
+
895
+ (c) You must retain, in the Source form of any Derivative Works
896
+ that You distribute, all copyright, patent, trademark, and
897
+ attribution notices from the Source form of the Work,
898
+ excluding those notices that do not pertain to any part of
899
+ the Derivative Works; and
900
+
901
+ (d) If the Work includes a "NOTICE" text file as part of its
902
+ distribution, then any Derivative Works that You distribute must
903
+ include a readable copy of the attribution notices contained
904
+ within such NOTICE file, excluding those notices that do not
905
+ pertain to any part of the Derivative Works, in at least one
906
+ of the following places: within a NOTICE text file distributed
907
+ as part of the Derivative Works; within the Source form or
908
+ documentation, if provided along with the Derivative Works; or,
909
+ within a display generated by the Derivative Works, if and
910
+ wherever such third-party notices normally appear. The contents
911
+ of the NOTICE file are for informational purposes only and
912
+ do not modify the License. You may add Your own attribution
913
+ notices within Derivative Works that You distribute, alongside
914
+ or as an addendum to the NOTICE text from the Work, provided
915
+ that such additional attribution notices cannot be construed
916
+ as modifying the License.
917
+
918
+ You may add Your own copyright statement to Your modifications and
919
+ may provide additional or different license terms and conditions
920
+ for use, reproduction, or distribution of Your modifications, or
921
+ for any such Derivative Works as a whole, provided Your use,
922
+ reproduction, and distribution of the Work otherwise complies with
923
+ the conditions stated in this License.
924
+
925
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
926
+ any Contribution intentionally submitted for inclusion in the Work
927
+ by You to the Licensor shall be under the terms and conditions of
928
+ this License, without any additional terms or conditions.
929
+ Notwithstanding the above, nothing herein shall supersede or modify
930
+ the terms of any separate license agreement you may have executed
931
+ with Licensor regarding such Contributions.
932
+
933
+ 6. Trademarks. This License does not grant permission to use the trade
934
+ names, trademarks, service marks, or product names of the Licensor,
935
+ except as required for reasonable and customary use in describing the
936
+ origin of the Work and reproducing the content of the NOTICE file.
937
+
938
+ 7. Disclaimer of Warranty. Unless required by applicable law or
939
+ agreed to in writing, Licensor provides the Work (and each
940
+ Contributor provides its Contributions) on an "AS IS" BASIS,
941
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
942
+ implied, including, without limitation, any warranties or conditions
943
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
944
+ PARTICULAR PURPOSE. You are solely responsible for determining the
945
+ appropriateness of using or redistributing the Work and assume any
946
+ risks associated with Your exercise of permissions under this License.
947
+
948
+ 8. Limitation of Liability. In no event and under no legal theory,
949
+ whether in tort (including negligence), contract, or otherwise,
950
+ unless required by applicable law (such as deliberate and grossly
951
+ negligent acts) or agreed to in writing, shall any Contributor be
952
+ liable to You for damages, including any direct, indirect, special,
953
+ incidental, or consequential damages of any character arising as a
954
+ result of this License or out of the use or inability to use the
955
+ Work (including but not limited to damages for loss of goodwill,
956
+ work stoppage, computer failure or malfunction, or any and all
957
+ other commercial damages or losses), even if such Contributor
958
+ has been advised of the possibility of such damages.
959
+
960
+ 9. Accepting Warranty or Additional Liability. While redistributing
961
+ the Work or Derivative Works thereof, You may choose to offer,
962
+ and charge a fee for, acceptance of support, warranty, indemnity,
963
+ or other liability obligations and/or rights consistent with this
964
+ License. However, in accepting such obligations, You may act only
965
+ on Your own behalf and on Your sole responsibility, not on behalf
966
+ of any other Contributor, and only if You agree to indemnify,
967
+ defend, and hold each Contributor harmless for any liability
968
+ incurred by, or claims asserted against, such Contributor by reason
969
+ of your accepting any such warranty or additional liability.
970
+
971
+ ===
972
+ WildRGB-D
973
+ https://github.com/wildrgbd/wildrgbd/
974
+ MIT License
975
+
976
+ Copyright (c) 2024 rowdataset
977
+
978
+ Permission is hereby granted, free of charge, to any person obtaining a copy
979
+ of this software and associated documentation files (the "Software"), to deal
980
+ in the Software without restriction, including without limitation the rights
981
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
982
+ copies of the Software, and to permit persons to whom the Software is
983
+ furnished to do so, subject to the following conditions:
984
+
985
+ The above copyright notice and this permission notice shall be included in all
986
+ copies or substantial portions of the Software.
987
+
988
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
989
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
990
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
991
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
992
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
993
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
994
+ SOFTWARE.
995
+
996
+ ===
997
+ TartanAir
998
+ Creative Commons Attribution 4.0 International License: http://creativecommons.org/licenses/by/4.0/
999
+
1000
+ ===
1001
+ UnrealStereo4K
1002
+ https://github.com/fabiotosi92/SMD-Nets
1003
+ MIT License
1004
+
1005
+ Copyright (c) 2021 Fabio Tosi
1006
+
1007
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1008
+ of this software and associated documentation files (the "Software"), to deal
1009
+ in the Software without restriction, including without limitation the rights
1010
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1011
+ copies of the Software, and to permit persons to whom the Software is
1012
+ furnished to do so, subject to the following conditions:
1013
+
1014
+ The above copyright notice and this permission notice shall be included in all
1015
+ copies or substantial portions of the Software.
1016
+
1017
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1018
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1019
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1020
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1021
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1022
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1023
+ SOFTWARE.
1024
+
1025
+ ===
1026
+ Virtual KITTI 2
1027
+ Creative Commons Attribution-NonCommercial-ShareAlike 3.0: http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode
1028
+
1029
+ ===
1030
+ DL3DV
1031
+ DL3DV-10K Term of use and Creative Commons Attribution-NonCommercial 4.0 International License.
1032
+
1033
+ Terms of Use
1034
+
1035
+ Researcher shall use the Dataset only for non-commercial research and educational purposes.
1036
+ DL3DV-10K organization makes no representations or warranties regarding the dataset, including but not limited to warranties of non-infringement or fitness for a particular purpose.
1037
+ Researcher accepts full responsibility for his/her/their use of the Dataset and shall defend and indemnify DL3DV-10K organization, including its members, employees, Trustees, officers and agents, against any and all claims arising from Researcher's use of the Dataset, including but not limited to Researcher's use of any copies of copyrighted 3D models that he/she/they may create from the dataset.
1038
+ Researcher may provide research associates and colleagues with access to the Dataset, after receiving entity has also agreed to and signed these terms and conditions. Sharing the data otherwise is strictly prohibited.
1039
+ Following General Data Protection Regulation, Researcher must ensure that they can delete all person-specific data upon request.
1040
+ DL3DV-10K organization reserves the right to terminate Researcher's access to the Dataset at any time.
1041
+ If Researcher is employed by a for-profit, commercial entity, Researcher's employer shall also be bound by these terms and conditions, and Researcher hereby represents that he/she/they is/are fully authorized to enter into this agreement on behalf of such employer.
1042
+ The law of the Indiana State shall apply to all disputes under this agreement.
1043
+
1044
+ Creative Commons Attribution-NonCommercial 4.0 International Public License
1045
+
1046
+ By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
1047
+
1048
+ Section 1 -- Definitions.
1049
+
1050
+ 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.
1051
+
1052
+ 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.
1053
+
1054
+ 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.
1055
+
1056
+ 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.
1057
+
1058
+ f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
1059
+
1060
+ 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.
1061
+
1062
+ h. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
1063
+
1064
+ 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.
1065
+
1066
+ 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.
1067
+
1068
+ 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.
1069
+
1070
+ l. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
1071
+
1072
+ Section 2 -- Scope.
1073
+
1074
+ a. License grant.
1075
+
1076
+ 1. Subject to the terms and conditions of this Public License,
1077
+ the Licensor hereby grants You a worldwide, royalty-free,
1078
+ non-sublicensable, non-exclusive, irrevocable license to
1079
+ exercise the Licensed Rights in the Licensed Material to:
1080
+
1081
+ a. reproduce and Share the Licensed Material, in whole or
1082
+ in part, for NonCommercial purposes only; and
1083
+
1084
+ b. produce, reproduce, and Share Adapted Material for
1085
+ NonCommercial purposes only.
1086
+
1087
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
1088
+ Exceptions and Limitations apply to Your use, this Public
1089
+ License does not apply, and You do not need to comply with
1090
+ its terms and conditions.
1091
+
1092
+ 3. Term. The term of this Public License is specified in Section
1093
+ 6(a).
1094
+
1095
+ 4. Media and formats; technical modifications allowed. The
1096
+ Licensor authorizes You to exercise the Licensed Rights in
1097
+ all media and formats whether now known or hereafter created,
1098
+ and to make technical modifications necessary to do so. The
1099
+ Licensor waives and/or agrees not to assert any right or
1100
+ authority to forbid You from making technical modifications
1101
+ necessary to exercise the Licensed Rights, including
1102
+ technical modifications necessary to circumvent Effective
1103
+ Technological Measures. For purposes of this Public License,
1104
+ simply making modifications authorized by this Section 2(a)
1105
+ (4) never produces Adapted Material.
1106
+
1107
+ 5. Downstream recipients.
1108
+
1109
+ a. Offer from the Licensor -- Licensed Material. Every
1110
+ recipient of the Licensed Material automatically
1111
+ receives an offer from the Licensor to exercise the
1112
+ Licensed Rights under the terms and conditions of this
1113
+ Public License.
1114
+
1115
+ b. No downstream restrictions. You may not offer or impose
1116
+ any additional or different terms or conditions on, or
1117
+ apply any Effective Technological Measures to, the
1118
+ Licensed Material if doing so restricts exercise of the
1119
+ Licensed Rights by any recipient of the Licensed
1120
+ Material.
1121
+
1122
+ 6. No endorsement. Nothing in this Public License constitutes or
1123
+ may be construed as permission to assert or imply that You
1124
+ are, or that Your use of the Licensed Material is, connected
1125
+ with, or sponsored, endorsed, or granted official status by,
1126
+ the Licensor or others designated to receive attribution as
1127
+ provided in Section 3(a)(1)(A)(i).
1128
+
1129
+ b. Other rights.
1130
+
1131
+ 1. Moral rights, such as the right of integrity, are not
1132
+ licensed under this Public License, nor are publicity,
1133
+ privacy, and/or other similar personality rights; however, to
1134
+ the extent possible, the Licensor waives and/or agrees not to
1135
+ assert any such rights held by the Licensor to the limited
1136
+ extent necessary to allow You to exercise the Licensed
1137
+ Rights, but not otherwise.
1138
+
1139
+ 2. Patent and trademark rights are not licensed under this
1140
+ Public License.
1141
+
1142
+ 3. To the extent possible, the Licensor waives any right to
1143
+ collect royalties from You for the exercise of the Licensed
1144
+ Rights, whether directly or through a collecting society
1145
+ under any voluntary or waivable statutory or compulsory
1146
+ licensing scheme. In all other cases the Licensor expressly
1147
+ reserves any right to collect such royalties, including when
1148
+ the Licensed Material is used other than for NonCommercial
1149
+ purposes.
1150
+
1151
+ Section 3 -- License Conditions.
1152
+
1153
+ Your exercise of the Licensed Rights is expressly made subject to the following conditions.
1154
+
1155
+ a. Attribution.
1156
+
1157
+ 1. If You Share the Licensed Material (including in modified
1158
+ form), You must:
1159
+
1160
+ a. retain the following if it is supplied by the Licensor
1161
+ with the Licensed Material:
1162
+
1163
+ i. identification of the creator(s) of the Licensed
1164
+ Material and any others designated to receive
1165
+ attribution, in any reasonable manner requested by
1166
+ the Licensor (including by pseudonym if
1167
+ designated);
1168
+
1169
+ ii. a copyright notice;
1170
+
1171
+ iii. a notice that refers to this Public License;
1172
+
1173
+ iv. a notice that refers to the disclaimer of
1174
+ warranties;
1175
+
1176
+ v. a URI or hyperlink to the Licensed Material to the
1177
+ extent reasonably practicable;
1178
+
1179
+ b. indicate if You modified the Licensed Material and
1180
+ retain an indication of any previous modifications; and
1181
+
1182
+ c. indicate the Licensed Material is licensed under this
1183
+ Public License, and include the text of, or the URI or
1184
+ hyperlink to, this Public License.
1185
+
1186
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
1187
+ reasonable manner based on the medium, means, and context in
1188
+ which You Share the Licensed Material. For example, it may be
1189
+ reasonable to satisfy the conditions by providing a URI or
1190
+ hyperlink to a resource that includes the required
1191
+ information.
1192
+
1193
+ 3. If requested by the Licensor, You must remove any of the
1194
+ information required by Section 3(a)(1)(A) to the extent
1195
+ reasonably practicable.
1196
+
1197
+ 4. If You Share Adapted Material You produce, the Adapter's
1198
+ License You apply must not prevent recipients of the Adapted
1199
+ Material from complying with this Public License.
1200
+
1201
+ Section 4 -- Sui Generis Database Rights.
1202
+
1203
+ Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
1204
+
1205
+ 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;
1206
+
1207
+ 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
1208
+
1209
+ 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.
1210
+
1211
+ For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
1212
+
1213
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
1214
+
1215
+ 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.
1216
+
1217
+ 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.
1218
+
1219
+ 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.
1220
+
1221
+ Section 6 -- Term and Termination.
1222
+
1223
+ 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.
1224
+
1225
+ b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1226
+
1227
+ 1. automatically as of the date the violation is cured, provided
1228
+ it is cured within 30 days of Your discovery of the
1229
+ violation; or
1230
+
1231
+ 2. upon express reinstatement by the Licensor.
1232
+
1233
+ For the avoidance of doubt, this Section 6(b) does not affect any
1234
+ right the Licensor may have to seek remedies for Your violations
1235
+ of this Public License.
1236
+
1237
+ 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.
1238
+
1239
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
1240
+
1241
+ Section 7 -- Other Terms and Conditions.
1242
+
1243
+ a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
1244
+
1245
+ 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.
1246
+
1247
+ Section 8 -- Interpretation.
1248
+
1249
+ 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.
1250
+
1251
+ 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.
1252
+
1253
+ 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.
1254
+
1255
+ 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.
1256
+
1257
+ ===
1258
+ Niantic Map Free Relocalization Dataset License Agreement
1259
+ This Niantic Map Free Relocalization Dataset License Agreement ("Agreement") is an agreement between you and Niantic, Inc. (“Niantic” or “we”). By downloading or otherwise using Niantic’s Map-Free Relocalization dataset or dataset-derived materials (collectively, the "Dataset") you agree to:
1260
+
1261
+ 1. Purpose and Restrictions. You may only use the Dataset only for non-commercial purposes, such as academic research at educational and not-for-profit research institutions, teaching, public demonstrations, and personal experimentation. Non-commercial use expressly excludes any profit-making or commercial activities, including without limitation sale, license, manufacture or development of commercial products, use in commercially-sponsored research, use at a laboratory or other facility owned or controlled (whether in whole or in part) by a commercial entity, provision of consulting service, use for or on behalf of any commercial entity, and use in consulting service, use for or on behalf of any commercial entity, use in research where a commercial party obtains rights to research results or any other benefit. Notwithstanding the foregoing restrictions, you can use this Dataset for publishing comparison results for academic papers, including retraining your models on this Dataset.
1262
+
1263
+ 2. License. Subject to this Agreement, Niantic grants you a non-exclusive, non-transferable, non-sublicensable right to download and use the Dataset for the purpose stated in Section 1 of this Agreement. All rights not expressly granted to you in this Agreement are reserved.
1264
+
1265
+ 3. Condition of Use. You must not use the Dataset in a way that could diminish, tarnish, or in any way harm Niantic’s reputation or image.
1266
+
1267
+ 4. No Warranties. The Dataset comes “as is”, and you will use it at your own risk. Niantic makes no representations or warranties regarding the Dataset, including but not limited to warranties of non-infringement or fitness for a particular purpose. Neither Niantic nor any contributor to the Dataset will be liable for any damages related to the Dataset or this Agreement, including direct, indirect, special, consequential or incidental damages, to the maximum extent the law permits, no matter what legal theory they are based on. We are not obligated to (and will not) provide technical support for the Dataset.
1268
+
1269
+ 5. Indemnity. You accept full responsibility for your use of the Dataset and shall defend and indemnify Niantic, including its employees, officers and agents, against any and all claims arising from your use of the Dataset.
1270
+
1271
+ 6. Removal. Niantic reserves the right to remove access to the Dataset at any time without cause. If you have downloaded a copy of the Dataset prior to such removal, you may use such a copy subject to this Agreement, but you may not distribute your copy.
1272
+
1273
+ 7. Termination. This Agreement will terminate immediately upon your commercial use of the Dataset.
1274
+
1275
+ 8. Authorized Representative. If you are employed by a for-profit, commercial entity, your employer shall also be bound by the terms and conditions of this Agreement, and you hereby represent that you are fully authorized to enter into this Agreement on behalf of such employer.
1276
+
1277
+ 9. Survivability. Sections 2, 4, 5, 6, 7, 8, 9, and 10 of this Agreement survive the termination of this Agreement.
1278
+
1279
+ 10. Misc. This Agreement is governed and construed in all respects in accordance with the laws of the State of California, USA without regard to conflicts of law. If any provision of this Agreement is deemed unenforceable or contrary to law, the rest of this Agreement shall remain in full effect and enforceable. If you do not agree to this Agreement, do not download or use the Dataset. The Dataset is protected by copyright and other intellectual property laws and is licensed, not sold.
1280
+
1281
+ ===
1282
+ NVIDIA Source Code License for SegFormer
1283
+
1284
+ 1. Definitions
1285
+
1286
+ “Licensor” means any person or entity that distributes its Work.
1287
+
1288
+ “Software” means the original work of authorship made available under this License.
1289
+
1290
+ “Work” means the Software and any additions to or derivative works of the Software that are made available under
1291
+ this License.
1292
+
1293
+ The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under
1294
+ U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include
1295
+ works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work.
1296
+
1297
+ Works, including the Software, are “made available” under this License by including in or with the Work either
1298
+ (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License.
1299
+
1300
+ 2. License Grant
1301
+
1302
+ 2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual,
1303
+ worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative works of, publicly
1304
+ display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form.
1305
+
1306
+ 3. Limitations
1307
+
1308
+ 3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, (b) you
1309
+ include a complete copy of this License with your distribution, and (c) you retain without modification any
1310
+ copyright, patent, trademark, or attribution notices that are present in the Work.
1311
+
1312
+ 3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and
1313
+ distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use
1314
+ limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works
1315
+ that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution
1316
+ requirements in Section 3.1) will continue to apply to the Work itself.
1317
+
1318
+ 3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use
1319
+ non-commercially. Notwithstanding the foregoing, NVIDIA and its affiliates may use the Work and any derivative
1320
+ works commercially. As used herein, “non-commercially” means for research or evaluation purposes only.
1321
+
1322
+ 3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim,
1323
+ cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then
1324
+ your rights under this License from such Licensor (including the grant in Section 2.1) will terminate immediately.
1325
+
1326
+ 3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos,
1327
+ or trademarks, except as necessary to reproduce the notices described in this License.
1328
+
1329
+ 3.6 Termination. If you violate any term of this License, then your rights under this License (including the
1330
+ grant in Section 2.1) will terminate immediately.
1331
+
1332
+ 4. Disclaimer of Warranty.
1333
+
1334
+ THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
1335
+ WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU
1336
+ BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE.
1337
+
1338
+ 5. Limitation of Liability.
1339
+
1340
+ EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING
1341
+ NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
1342
+ INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR
1343
+ INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR
1344
+ DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN
1345
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
1346
+
1347
+ ===
1348
+ CosXL License Agreement
1349
+
1350
+
1351
+ STABILITY AI NON-COMMERCIAL RESEARCH COMMUNITY LICENSE AGREEMENT Dated: April 7th, 2024
1352
+ By clicking “I Accept” below or by using or distributing any portion or element of the Models, Software, Software Products or Derivative Works, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to use the Software Products or Derivative Works through this License, and you must immediately cease using the Software Products or Derivative Works. If you are agreeing to be bound by the terms of this License on behalf of your employer or other entity, you represent and warrant to Stability AI that you have full legal authority to bind your employer or such entity to this License. If you do not have the requisite authority, you may not accept the License or access the Software Products or Derivative Works on behalf of your employer or other entity.
1353
+ "Agreement" means this Stable Non-Commercial Research Community License Agreement.
1354
+ “AUP” means the Stability AI Acceptable Use Policy available at https://stability.ai/use-policy, as may be updated from time to time.
1355
+ "Derivative Work(s)” means (a) any derivative work of the Software Products as recognized by U.S. copyright laws and (b) any modifications to a Model, and any other model created which is based on or derived from the Model or the Model’s output. For clarity, Derivative Works do not include the output of any Model.
1356
+ “Documentation” means any specifications, manuals, documentation, and other written information provided by Stability AI related to the Software.
1357
+ "Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity's behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
1358
+ “Model(s)" means, collectively, Stability AI’s proprietary models and algorithms, including machine-learning models, trained model weights and other elements of the foregoing, made available under this Agreement.
1359
+ “Non-Commercial Uses” means exercising any of the rights granted herein for the purpose of research or non-commercial purposes. Non-Commercial Uses does not include any production use of the Software Products or any Derivative Works.
1360
+ "Stability AI" or "we" means Stability AI Ltd. and its affiliates.
1361
+
1362
+ "Software" means Stability AI’s proprietary software made available under this Agreement.
1363
+ “Software Products” means the Models, Software and Documentation, individually or in any combination.
1364
+
1365
+ License Rights and Redistribution.
1366
+ a. Subject to your compliance with this Agreement, the AUP (which is hereby incorporated herein by reference), and the Documentation, Stability AI grants you a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, royalty free and limited license under Stability AI’s intellectual property or other rights owned or controlled by Stability AI embodied in the Software Products to use, reproduce, distribute, and create Derivative Works of, the Software Products, in each case for Non-Commercial Uses only.
1367
+ b. You may not use the Software Products or Derivative Works to enable third parties to use the Software Products or Derivative Works as part of your hosted service or via your APIs, whether you are adding substantial additional functionality thereto or not. Merely distributing the Software Products or Derivative Works for download online without offering any related service (ex. by distributing the Models on HuggingFace) is not a violation of this subsection. If you wish to use the Software Products or any Derivative Works for commercial or production use or you wish to make the Software Products or any Derivative Works available to third parties via your hosted service or your APIs, contact Stability AI at https://stability.ai/contact.
1368
+ c. If you distribute or make the Software Products, or any Derivative Works thereof, available to a third party, the Software Products, Derivative Works, or any portion thereof, respectively, will remain subject to this Agreement and you must (i) provide a copy of this Agreement to such third party, and (ii) retain the following attribution notice within a "Notice" text file distributed as a part of such copies: "This Stability AI Model is licensed under the Stability AI Non-Commercial Research Community License, Copyright (c) Stability AI Ltd. All Rights Reserved.” If you create a Derivative Work of a Software Product, you may add your own attribution notices to the Notice file included with the Software Product, provided that you clearly indicate which attributions apply to the Software Product and you must state in the NOTICE file that you changed the Software Product and how it was modified.
1369
+ Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE SOFTWARE PRODUCTS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE SOFTWARE PRODUCTS, DERIVATIVE WORKS OR ANY OUTPUT OR RESULTS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE SOFTWARE PRODUCTS, DERIVATIVE WORKS AND ANY OUTPUT AND RESULTS. 3. Limitation of Liability. IN NO EVENT WILL STABILITY AI OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF STABILITY AI OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING. 4. Intellectual Property.
1370
+ a. No trademark licenses are granted under this Agreement, and in connection with the Software Products or Derivative Works, neither Stability AI nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Software Products or Derivative Works.
1371
+ b. Subject to Stability AI’s ownership of the Software Products and Derivative Works made by or for Stability AI, with respect to any Derivative Works that are made by you, as between you and Stability AI, you are and will be the owner of such Derivative Works
1372
+ c. If you institute litigation or other proceedings against Stability AI (including a cross-claim or counterclaim in a lawsuit) alleging that the Software Products, Derivative Works or associated outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Stability AI from and against any claim by any third party arising out of or related to your use or distribution of the Software Products or Derivative Works in violation of this Agreement.
1373
+ Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Software Products and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Stability AI may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of any Software Products or Derivative Works. Sections 2-4 shall survive the termination of this Agreement.
1374
+ Governing Law. This Agreement will be governed by and construed in accordance with the laws of the United States and the State of California without regard to choice of law
1375
+ principles.
1376
+
submodules/mast3r/LICENSE ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ DUSt3R, Copyright (c) 2024-present Naver Corporation, is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license.
2
+
3
+ A summary of the CC BY-NC-SA 4.0 license is located here:
4
+ https://creativecommons.org/licenses/by-nc-sa/4.0/
5
+
6
+ The CC BY-NC-SA 4.0 license is located here:
7
+ https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
submodules/mast3r/NOTICE ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MASt3R
2
+ Copyright 2024-present NAVER Corp.
3
+
4
+ This project contains subcomponents with separate copyright notices and license terms.
5
+ Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses.
6
+
7
+ ====
8
+
9
+ naver/dust3r
10
+ https://github.com/naver/dust3r/
11
+
12
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0
13
+
14
+ ====
15
+
16
+ naver/croco
17
+ https://github.com/naver/croco/
18
+
19
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0
20
+
21
+ ====
22
+
23
+ pytorch/pytorch
24
+ https://github.com/pytorch/pytorch
25
+
26
+ From PyTorch:
27
+
28
+ Copyright (c) 2016- Facebook, Inc (Adam Paszke)
29
+ Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
30
+ Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
31
+ Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
32
+ Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
33
+ Copyright (c) 2011-2013 NYU (Clement Farabet)
34
+ Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston)
35
+ Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
36
+ Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz)
37
+
38
+ From Caffe2:
39
+
40
+ Copyright (c) 2016-present, Facebook Inc. All rights reserved.
41
+
42
+ All contributions by Facebook:
43
+ Copyright (c) 2016 Facebook Inc.
44
+
45
+ All contributions by Google:
46
+ Copyright (c) 2015 Google Inc.
47
+ All rights reserved.
48
+
49
+ All contributions by Yangqing Jia:
50
+ Copyright (c) 2015 Yangqing Jia
51
+ All rights reserved.
52
+
53
+ All contributions by Kakao Brain:
54
+ Copyright 2019-2020 Kakao Brain
55
+
56
+ All contributions by Cruise LLC:
57
+ Copyright (c) 2022 Cruise LLC.
58
+ All rights reserved.
59
+
60
+ All contributions from Caffe:
61
+ Copyright(c) 2013, 2014, 2015, the respective contributors
62
+ All rights reserved.
63
+
64
+ All other contributions:
65
+ Copyright(c) 2015, 2016 the respective contributors
66
+ All rights reserved.
67
+
68
+ Caffe2 uses a copyright model similar to Caffe: each contributor holds
69
+ copyright over their contributions to Caffe2. The project versioning records
70
+ all such contribution and copyright details. If a contributor wants to further
71
+ mark their specific copyright on a particular contribution, they should
72
+ indicate their copyright solely in the commit message of the change when it is
73
+ committed.
74
+
75
+ All rights reserved.
76
+
77
+ Redistribution and use in source and binary forms, with or without
78
+ modification, are permitted provided that the following conditions are met:
79
+
80
+ 1. Redistributions of source code must retain the above copyright
81
+ notice, this list of conditions and the following disclaimer.
82
+
83
+ 2. Redistributions in binary form must reproduce the above copyright
84
+ notice, this list of conditions and the following disclaimer in the
85
+ documentation and/or other materials provided with the distribution.
86
+
87
+ 3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America
88
+ and IDIAP Research Institute nor the names of its contributors may be
89
+ used to endorse or promote products derived from this software without
90
+ specific prior written permission.
91
+
92
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
93
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
94
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
95
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
96
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
97
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
98
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
99
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
100
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
101
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
102
+ POSSIBILITY OF SUCH DAMAGE.
103
+
submodules/mast3r/assets/NLE_tower/01D90321-69C8-439F-B0B0-E87E7634741C-83120-000041DAE419D7AE.jpg ADDED
submodules/mast3r/assets/NLE_tower/1AD85EF5-B651-4291-A5C0-7BDB7D966384-83120-000041DADF639E09.jpg ADDED
submodules/mast3r/assets/NLE_tower/2679C386-1DC0-4443-81B5-93D7EDE4AB37-83120-000041DADB2EA917.jpg ADDED
submodules/mast3r/assets/NLE_tower/28EDBB63-B9F9-42FB-AC86-4852A33ED71B-83120-000041DAF22407A1.jpg ADDED
submodules/mast3r/assets/NLE_tower/91E9B685-7A7D-42D7-B933-23A800EE4129-83120-000041DAE12C8176.jpg ADDED
submodules/mast3r/assets/NLE_tower/CDBBD885-54C3-4EB4-9181-226059A60EE0-83120-000041DAE0C3D612.jpg ADDED
submodules/mast3r/assets/NLE_tower/FF5599FD-768B-431A-AB83-BDA5FB44CB9D-83120-000041DADDE35483.jpg ADDED
submodules/mast3r/assets/demo.jpg ADDED
submodules/mast3r/assets/examples.jpg ADDED
submodules/mast3r/assets/mast3r.jpg ADDED
submodules/mast3r/assets/mast3r_archi.jpg ADDED
submodules/mast3r/assets/matching.jpg ADDED
submodules/mast3r/checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth ADDED
@@ -0,0 +1 @@
 
 
1
+ /amax/workspace/chenyue/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth
submodules/mast3r/checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth ADDED
@@ -0,0 +1 @@
 
 
1
+ /amax/workspace/chenyue/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth
submodules/mast3r/colmap_from_mast3r.py ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import matplotlib
2
+ matplotlib.use('Agg')
3
+
4
+ import sys
5
+ import argparse
6
+ import torch
7
+ import numpy as np
8
+ import os
9
+ import re
10
+ import cv2
11
+ import trimesh
12
+ from pathlib import Path
13
+ from PIL import Image
14
+ from typing import NamedTuple, Optional
15
+
16
+ current_dir = os.getcwd()
17
+ sys.path.append(os.path.join(current_dir, 'mast3r'))
18
+ from mast3r.model import AsymmetricMASt3R
19
+ from mast3r.cloud_opt.sparse_ga import sparse_global_alignment
20
+ from mast3r.cloud_opt.tsdf_optimizer import TSDFPostProcess
21
+ import mast3r.utils.path_to_dust3r
22
+
23
+ from dust3r.utils.image import load_images
24
+ from dust3r.utils.device import to_numpy
25
+ from dust3r.image_pairs import make_pairs
26
+
27
+ from plyfile import PlyData, PlyElement
28
+
29
+ from utils.dust3r_utils import visualizer, pca, upsampler
30
+
31
+ class BasicPointCloud(NamedTuple):
32
+ points: np.array
33
+ colors: np.array
34
+ normals: np.array
35
+
36
+ def invert_matrix(mat):
37
+ """Invert a torch or numpy matrix."""
38
+ if isinstance(mat, torch.Tensor):
39
+ return torch.linalg.inv(mat)
40
+ if isinstance(mat, np.ndarray):
41
+ return np.linalg.inv(mat)
42
+ raise ValueError(f'Unsupported matrix type: {type(mat)}')
43
+
44
+ def fov2focal(fov, pixels):
45
+ return pixels / (2 * math.tan(fov / 2))
46
+
47
+ def focal2fov(focal, pixels):
48
+ return 2 * math.atan(pixels / (2 * focal))
49
+
50
+ def rotmat2qvec(R):
51
+ Rxx, Ryx, Rzx, Rxy, Ryy, Rzy, Rxz, Ryz, Rzz = R.flat
52
+ K = np.array([
53
+ [Rxx - Ryy - Rzz, 0, 0, 0],
54
+ [Ryx + Rxy, Ryy - Rxx - Rzz, 0, 0],
55
+ [Rzx + Rxz, Rzy + Ryz, Rzz - Rxx - Ryy, 0],
56
+ [Ryz - Rzy, Rzx - Rxz, Rxy - Ryx, Rxx + Ryy + Rzz]]) / 3.0
57
+ eigvals, eigvecs = np.linalg.eigh(K)
58
+ qvec = eigvecs[[3, 0, 1, 2], np.argmax(eigvals)]
59
+ if qvec[0] < 0:
60
+ qvec *= -1
61
+ return qvec
62
+
63
+ def storePly(path, xyz, rgb):
64
+ # Define the dtype for the structured array
65
+ dtype = [('x', 'f4'), ('y', 'f4'), ('z', 'f4'),
66
+ ('nx', 'f4'), ('ny', 'f4'), ('nz', 'f4'),
67
+ ('red', 'u1'), ('green', 'u1'), ('blue', 'u1')]
68
+
69
+ normals = np.zeros_like(xyz)
70
+
71
+ elements = np.empty(xyz.shape[0], dtype=dtype)
72
+ attributes = np.concatenate((xyz, normals, rgb), axis=1)
73
+ elements[:] = list(map(tuple, attributes))
74
+
75
+ # Create the PlyData object and write to file
76
+ vertex_element = PlyElement.describe(elements, 'vertex')
77
+ ply_data = PlyData([vertex_element])
78
+ ply_data.write(path)
79
+
80
+ # Ensure save directories exist
81
+ def init_filestructure(save_path):
82
+ save_path.mkdir(exist_ok=True, parents=True)
83
+ images_path = save_path / 'images'
84
+ masks_path = save_path / 'masks'
85
+ sparse_path = save_path / 'sparse/0'
86
+ images_path.mkdir(exist_ok=True, parents=True)
87
+ masks_path.mkdir(exist_ok=True, parents=True)
88
+ sparse_path.mkdir(exist_ok=True, parents=True)
89
+ return save_path, images_path, masks_path, sparse_path
90
+
91
+ # Save images and masks
92
+ def save_images_and_masks(imgs, masks, images_path, img_files, masks_path):
93
+ for i, (image, name, mask) in enumerate(zip(imgs, img_files, masks)):
94
+ imgname = Path(name).stem
95
+ image_save_path = images_path / f"{imgname}.png"
96
+ mask_save_path = masks_path / f"{imgname}.png"
97
+ rgb_image = cv2.cvtColor(image * 255, cv2.COLOR_BGR2RGB)
98
+ cv2.imwrite(str(image_save_path), rgb_image)
99
+ mask = np.repeat(np.expand_dims(mask, -1), 3, axis=2) * 255
100
+ Image.fromarray(mask.astype(np.uint8)).save(mask_save_path)
101
+
102
+ # Save camera information
103
+ def save_cameras(focals, principal_points, sparse_path, imgs_shape):
104
+ cameras_file = sparse_path / 'cameras.txt'
105
+ with open(cameras_file, 'w') as f:
106
+ f.write("# Camera list with one line of data per camera:\n")
107
+ f.write("# CAMERA_ID, MODEL, WIDTH, HEIGHT, PARAMS[]\n")
108
+ for i, (focal, pp) in enumerate(zip(focals, principal_points)):
109
+ f.write(f"{i} PINHOLE {imgs_shape[2]} {imgs_shape[1]} {focal} {focal} {pp[0]} {pp[1]}\n")
110
+
111
+ # Save image transformations
112
+ def save_images_txt(world2cam, img_files, sparse_path):
113
+ images_file = sparse_path / 'images.txt'
114
+ with open(images_file, 'w') as f:
115
+ f.write("# Image list with two lines of data per image:\n")
116
+ f.write("# IMAGE_ID, QW, QX, QY, QZ, TX, TY, TZ, CAMERA_ID, NAME\n")
117
+ f.write("# POINTS2D[] as (X, Y, POINT3D_ID)\n")
118
+ for i in range(world2cam.shape[0]):
119
+ name = Path(img_files[i]).stem
120
+ rotation_matrix = world2cam[i, :3, :3]
121
+ qw, qx, qy, qz = rotmat2qvec(rotation_matrix)
122
+ tx, ty, tz = world2cam[i, :3, 3]
123
+ f.write(f"{i} {qw} {qx} {qy} {qz} {tx} {ty} {tz} {i} {name}.png\n\n")
124
+
125
+ # Save point cloud with normals
126
+ def save_pointcloud_with_normals(imgs, pts3d, masks, sparse_path):
127
+ pc = get_point_cloud(imgs, pts3d, masks)
128
+ default_normal = [0, 1, 0]
129
+ vertices = pc.vertices
130
+ colors = pc.colors
131
+ normals = np.tile(default_normal, (vertices.shape[0], 1))
132
+ save_path = sparse_path / 'points3D.ply'
133
+ header = """ply
134
+ format ascii 1.0
135
+ element vertex {}
136
+ property float x
137
+ property float y
138
+ property float z
139
+ property uchar red
140
+ property uchar green
141
+ property uchar blue
142
+ property float nx
143
+ property float ny
144
+ property float nz
145
+ end_header
146
+ """.format(len(vertices))
147
+ with open(save_path, 'w') as f:
148
+ f.write(header)
149
+ for vertex, color, normal in zip(vertices, colors, normals):
150
+ f.write(f"{vertex[0]} {vertex[1]} {vertex[2]} {int(color[0])} {int(color[1])} {int(color[2])} {normal[0]} {normal[1]} {normal[2]}\n")
151
+
152
+ # Generate point cloud
153
+ def get_point_cloud(imgs, pts3d, mask):
154
+ imgs = to_numpy(imgs)
155
+ pts3d = to_numpy(pts3d)
156
+ mask = to_numpy(mask)
157
+ pts = np.concatenate([p[m] for p, m in zip(pts3d, mask.reshape(mask.shape[0], -1))])
158
+ col = np.concatenate([p[m] for p, m in zip(imgs, mask)])
159
+ pts = pts.reshape(-1, 3)[::3]
160
+ col = col.reshape(-1, 3)[::3]
161
+ normals = np.tile([0, 1, 0], (pts.shape[0], 1))
162
+ pct = trimesh.PointCloud(pts, colors=col)
163
+ pct.vertices_normal = normals
164
+ return pct
165
+
166
+ def main(image_dir, save_dir, model_path, device, batch_size, image_size, schedule, lr, niter, min_conf_thr, tsdf_thresh):
167
+ # Load model and images
168
+ model = AsymmetricMASt3R.from_pretrained(model_path).to(device)
169
+ image_files = sorted([str(x) for x in Path(image_dir).iterdir() if x.suffix in ['.png', '.jpg']],
170
+ key=lambda x: int(re.search(r'\d+', Path(x).stem).group()))
171
+ images = load_images(image_files, size=image_size)
172
+
173
+ # Generate pairs and run inference
174
+ pairs = make_pairs(images, scene_graph='complete', prefilter=None, symmetrize=True)
175
+
176
+ cache_dir = os.path.join(save_dir, 'cache')
177
+ if os.path.exists(cache_dir):
178
+ os.system(f'rm -rf {cache_dir}')
179
+ scene = sparse_global_alignment(image_files, pairs, cache_dir,
180
+ model, lr1=0.07, niter1=500, lr2=0.014, niter2=200, device=device,
181
+ opt_depth='depth' in 'refine', shared_intrinsics=False,
182
+ matching_conf_thr=5.)
183
+
184
+ # Extract scene information
185
+ world2cam = invert_matrix(scene.get_im_poses().detach()).cpu().numpy()
186
+ principal_points = scene.get_principal_points().detach().cpu().numpy()
187
+ focals = scene.get_focals().detach().cpu().numpy()
188
+ imgs = np.array(scene.imgs)
189
+
190
+ tsdf = TSDFPostProcess(scene, TSDF_thresh=tsdf_thresh)
191
+ pts3d, _, confs = to_numpy(tsdf.get_dense_pts3d(clean_depth=True))
192
+ masks = np.array(to_numpy([c > min_conf_thr for c in confs]))
193
+
194
+ _, H, W, _ = imgs.shape
195
+ feat_dim = 64
196
+ projected_feat = pca(scene.stacked_feat, feat_dim)
197
+ upsampled_feat = upsampler(projected_feat, H, W)
198
+ visualizer(upsampled_feat, images, save_dir)
199
+
200
+ # Main execution
201
+ save_path, images_path, masks_path, sparse_path = init_filestructure(Path(save_dir))
202
+ save_images_and_masks(imgs, masks, images_path, image_files, masks_path)
203
+ save_cameras(focals, principal_points, sparse_path, imgs_shape=imgs.shape)
204
+ save_images_txt(world2cam, image_files, sparse_path)
205
+ save_pointcloud_with_normals(imgs, pts3d, masks, save_dir)
206
+
207
+ print(f'[INFO] Mast3R Reconstruction is successfully converted to COLMAP files in: {str(sparse_path)}')
208
+
209
+ if __name__ == "__main__":
210
+ parser = argparse.ArgumentParser(description='Process images and save results.')
211
+ parser.add_argument('--image_dir', type=str, required=True, help='Directory containing images')
212
+ parser.add_argument('--save_dir', type=str, required=True, help='Directory to save the results')
213
+ parser.add_argument('--model_path', type=str, required=True, help='Path to the model checkpoint')
214
+ parser.add_argument('--device', type=str, default='cuda', help='Device to use for inference')
215
+ parser.add_argument('--batch_size', type=int, default=1, help='Batch size for processing images')
216
+ parser.add_argument('--image_size', type=int, default=512, help='Size to resize images')
217
+ parser.add_argument('--schedule', type=str, default='cosine', help='Learning rate schedule')
218
+ parser.add_argument('--lr', type=float, default=0.01, help='Learning rate')
219
+ parser.add_argument('--niter', type=int, default=300, help='Number of iterations')
220
+ parser.add_argument('--min_conf_thr', type=float, default=1.5, help='Minimum confidence threshold')
221
+ parser.add_argument('--tsdf_thresh', type=float, default=0.0, help='TSDF threshold')
222
+
223
+ args = parser.parse_args()
224
+ main(args.image_dir, args.save_dir, args.model_path, args.device, args.batch_size, args.image_size, args.schedule, args.lr, args.niter, args.min_conf_thr, args.tsdf_thresh)
submodules/mast3r/command ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ conda activate wildgaussian
2
+ cd Feat2GS/submodules/mast3r/
3
+
4
+ CUDA_VISIBLE_DEVICES=6 python3 demo.py \
5
+ --weights checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth \
6
+ --local_network --server_port 7002
7
+
8
+ --model_name MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric
9
+
10
+ # Use --weights to load a checkpoint from a local file, eg --weights checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth
11
+ # Use --local_network to make it accessible on the local network, or --server_name to specify the url manually
12
+ # Use --server_port to change the port, by default it will search for an available port starting at 7860
13
+ # Use --device to use a different device, by default it's "cuda"
14
+
15
+
16
+ CUDA_VISIBLE_DEVICES=7 python3 demo_dust3r_ga.py \
17
+ --weights checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth \
18
+ --local_network --server_port 7003 \
19
+ --tmp_dir /home/chenyue/tmp/temp/
20
+
21
+
22
+ --model_name DUSt3R_ViTLarge_BaseDecoder_512_dpt
23
+
24
+ # Use --weights to load a checkpoint from a local file, eg --weights checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth
25
+ # Use --image_size to select the correct resolution for the selected checkpoint. 512 (default) or 224
26
+ # Use --local_network to make it accessible on the local network, or --server_name to specify the url manually
27
+ # Use --server_port to change the port, by default it will search for an available port starting at 7860
28
+ # Use --device to use a different device, by default it's "cuda"
29
+
30
+ python colmap_from_mast3r.py \
31
+ --image_dir /home/chenyue/Feat2GS/data/casual/turtle/3_views/images \
32
+ --save_dir /home/chenyue/Feat2GS/data/casual/turtle/3_views \
33
+ --model_path /home/chenyue/Feat2GS/submodules/mast3r/checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth
submodules/mast3r/demo.py ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Copyright (C) 2024-present Naver Corporation. All rights reserved.
3
+ # Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
4
+ #
5
+ # --------------------------------------------------------
6
+ # gradio demo executable
7
+ # --------------------------------------------------------
8
+ import matplotlib
9
+ matplotlib.use('Agg')
10
+
11
+ import os
12
+ import torch
13
+ import tempfile
14
+ from contextlib import nullcontext
15
+
16
+ from mast3r.demo import get_args_parser, main_demo
17
+
18
+ from mast3r.model import AsymmetricMASt3R
19
+ from mast3r.utils.misc import hash_md5
20
+
21
+ import mast3r.utils.path_to_dust3r # noqa
22
+ from dust3r.demo import set_print_with_timestamp
23
+
24
+ import matplotlib.pyplot as pl
25
+ pl.ion()
26
+
27
+ torch.backends.cuda.matmul.allow_tf32 = True # for gpu >= Ampere and pytorch >= 1.12
28
+
29
+ if __name__ == '__main__':
30
+ parser = get_args_parser()
31
+ args = parser.parse_args()
32
+ set_print_with_timestamp()
33
+
34
+ if args.server_name is not None:
35
+ server_name = args.server_name
36
+ else:
37
+ server_name = '0.0.0.0' if args.local_network else '127.0.0.1'
38
+
39
+ if args.weights is not None:
40
+ weights_path = args.weights
41
+ else:
42
+ weights_path = "naver/" + args.model_name
43
+
44
+ model = AsymmetricMASt3R.from_pretrained(weights_path).to(args.device)
45
+ chkpt_tag = hash_md5(weights_path)
46
+
47
+ def get_context(tmp_dir):
48
+ return tempfile.TemporaryDirectory(suffix='_mast3r_gradio_demo') if tmp_dir is None \
49
+ else nullcontext(tmp_dir)
50
+ with get_context(args.tmp_dir) as tmpdirname:
51
+ cache_path = os.path.join(tmpdirname, chkpt_tag)
52
+ os.makedirs(cache_path, exist_ok=True)
53
+ main_demo(cache_path, model, args.device, args.image_size, server_name, args.server_port, silent=args.silent,
54
+ share=args.share, gradio_delete_cache=args.gradio_delete_cache)
submodules/mast3r/demo_dust3r_ga.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Copyright (C) 2024-present Naver Corporation. All rights reserved.
3
+ # Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
4
+ #
5
+ # --------------------------------------------------------
6
+ # mast3r gradio demo executable
7
+ # --------------------------------------------------------
8
+ import os
9
+ import torch
10
+ import tempfile
11
+
12
+ import mast3r.utils.path_to_dust3r # noqa
13
+ from dust3r.model import AsymmetricCroCo3DStereo
14
+ from mast3r.model import AsymmetricMASt3R
15
+ from dust3r.demo import get_args_parser as dust3r_get_args_parser
16
+ from dust3r.demo import main_demo, set_print_with_timestamp
17
+
18
+ import matplotlib.pyplot as pl
19
+ pl.ion()
20
+
21
+ torch.backends.cuda.matmul.allow_tf32 = True # for gpu >= Ampere and pytorch >= 1.12
22
+
23
+
24
+ def get_args_parser():
25
+ parser = dust3r_get_args_parser()
26
+
27
+ actions = parser._actions
28
+ for action in actions:
29
+ if action.dest == 'model_name':
30
+ action.choices.append('MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric')
31
+ # change defaults
32
+ parser.prog = 'mast3r demo'
33
+ return parser
34
+
35
+
36
+ if __name__ == '__main__':
37
+ parser = get_args_parser()
38
+ args = parser.parse_args()
39
+ set_print_with_timestamp()
40
+
41
+ if args.tmp_dir is not None:
42
+ tmp_path = args.tmp_dir
43
+ os.makedirs(tmp_path, exist_ok=True)
44
+ tempfile.tempdir = tmp_path
45
+
46
+ if args.server_name is not None:
47
+ server_name = args.server_name
48
+ else:
49
+ server_name = '0.0.0.0' if args.local_network else '127.0.0.1'
50
+
51
+ if args.weights is not None:
52
+ weights_path = args.weights
53
+ else:
54
+ weights_path = "naver/" + args.model_name
55
+
56
+ try:
57
+ model = AsymmetricMASt3R.from_pretrained(weights_path).to(args.device)
58
+ except Exception as e:
59
+ model = AsymmetricCroCo3DStereo.from_pretrained(weights_path).to(args.device)
60
+
61
+ # dust3r will write the 3D model inside tmpdirname
62
+ with tempfile.TemporaryDirectory(suffix='dust3r_gradio_demo') as tmpdirname:
63
+ if not args.silent:
64
+ print('Outputing stuff in', tmpdirname)
65
+ main_demo(tmpdirname, model, args.device, args.image_size, server_name, args.server_port, silent=args.silent)
submodules/mast3r/docker/docker-compose-cpu.yml ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+ services:
3
+ mast3r-demo:
4
+ build:
5
+ context: ./files
6
+ dockerfile: cpu.Dockerfile
7
+ ports:
8
+ - "7860:7860"
9
+ volumes:
10
+ - ./files/checkpoints:/mast3r/checkpoints
11
+ environment:
12
+ - DEVICE=cpu
13
+ - MODEL=${MODEL:-MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth}
14
+ cap_add:
15
+ - IPC_LOCK
16
+ - SYS_RESOURCE
submodules/mast3r/docker/docker-compose-cuda.yml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+ services:
3
+ mast3r-demo:
4
+ build:
5
+ context: ./files
6
+ dockerfile: cuda.Dockerfile
7
+ ports:
8
+ - "7860:7860"
9
+ environment:
10
+ - DEVICE=cuda
11
+ - MODEL=${MODEL:-MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth}
12
+ volumes:
13
+ - ./files/checkpoints:/mast3r/checkpoints
14
+ cap_add:
15
+ - IPC_LOCK
16
+ - SYS_RESOURCE
17
+ deploy:
18
+ resources:
19
+ reservations:
20
+ devices:
21
+ - driver: nvidia
22
+ count: 1
23
+ capabilities: [gpu]
submodules/mast3r/docker/files/cpu.Dockerfile ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ LABEL description="Docker container for MASt3R with dependencies installed. CPU VERSION"
4
+
5
+ ENV DEVICE="cpu"
6
+ ENV MODEL="MASt3R_ViTLarge_BaseDecoder_512_dpt.pth"
7
+ ARG DEBIAN_FRONTEND=noninteractive
8
+
9
+ RUN apt-get update && apt-get install -y \
10
+ git \
11
+ libgl1-mesa-glx \
12
+ libegl1-mesa \
13
+ libxrandr2 \
14
+ libxrandr2 \
15
+ libxss1 \
16
+ libxcursor1 \
17
+ libxcomposite1 \
18
+ libasound2 \
19
+ libxi6 \
20
+ libxtst6 \
21
+ libglib2.0-0 \
22
+ && apt-get clean \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ RUN git clone --recursive https://github.com/naver/mast3r /mast3r
26
+ WORKDIR /mast3r/dust3r
27
+
28
+ RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
29
+ RUN pip install -r requirements.txt
30
+ RUN pip install -r requirements_optional.txt
31
+ RUN pip install opencv-python==4.8.0.74
32
+
33
+ WORKDIR /mast3r
34
+ RUN pip install -r requirements.txt
35
+
36
+ COPY entrypoint.sh /entrypoint.sh
37
+ RUN chmod +x /entrypoint.sh
38
+
39
+ ENTRYPOINT ["/entrypoint.sh"]
submodules/mast3r/docker/files/cuda.Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvcr.io/nvidia/pytorch:24.01-py3
2
+
3
+ LABEL description="Docker container for MASt3R with dependencies installed. CUDA VERSION"
4
+ ENV DEVICE="cuda"
5
+ ENV MODEL="MASt3R_ViTLarge_BaseDecoder_512_dpt.pth"
6
+ ARG DEBIAN_FRONTEND=noninteractive
7
+
8
+ RUN apt-get update && apt-get install -y \
9
+ git=1:2.34.1-1ubuntu1.10 \
10
+ libglib2.0-0=2.72.4-0ubuntu2.2 \
11
+ && apt-get clean \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ RUN git clone --recursive https://github.com/naver/mast3r /mast3r
15
+ WORKDIR /mast3r/dust3r
16
+ RUN pip install -r requirements.txt
17
+ RUN pip install -r requirements_optional.txt
18
+ RUN pip install opencv-python==4.8.0.74
19
+
20
+ WORKDIR /mast3r/dust3r/croco/models/curope/
21
+ RUN python setup.py build_ext --inplace
22
+
23
+ WORKDIR /mast3r
24
+ RUN pip install -r requirements.txt
25
+
26
+ COPY entrypoint.sh /entrypoint.sh
27
+ RUN chmod +x /entrypoint.sh
28
+
29
+ ENTRYPOINT ["/entrypoint.sh"]
submodules/mast3r/docker/files/entrypoint.sh ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ set -eux
4
+
5
+ DEVICE=${DEVICE:-cuda}
6
+ MODEL=${MODEL:-MASt3R_ViTLarge_BaseDecoder_512_dpt.pth}
7
+
8
+ exec python3 demo.py --weights "checkpoints/$MODEL" --device "$DEVICE" --local_network "$@"
submodules/mast3r/docker/run.sh ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ set -eux
4
+
5
+ # Default model name
6
+ model_name="MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth"
7
+
8
+ check_docker() {
9
+ if ! command -v docker &>/dev/null; then
10
+ echo "Docker could not be found. Please install Docker and try again."
11
+ exit 1
12
+ fi
13
+ }
14
+
15
+ download_model_checkpoint() {
16
+ if [ -f "./files/checkpoints/${model_name}" ]; then
17
+ echo "Model checkpoint ${model_name} already exists. Skipping download."
18
+ return
19
+ fi
20
+ echo "Downloading model checkpoint ${model_name}..."
21
+ wget "https://download.europe.naverlabs.com/ComputerVision/MASt3R/${model_name}" -P ./files/checkpoints
22
+ }
23
+
24
+ set_dcomp() {
25
+ if command -v docker-compose &>/dev/null; then
26
+ dcomp="docker-compose"
27
+ elif command -v docker &>/dev/null && docker compose version &>/dev/null; then
28
+ dcomp="docker compose"
29
+ else
30
+ echo "Docker Compose could not be found. Please install Docker Compose and try again."
31
+ exit 1
32
+ fi
33
+ }
34
+
35
+ run_docker() {
36
+ export MODEL=${model_name}
37
+ if [ "$with_cuda" -eq 1 ]; then
38
+ $dcomp -f docker-compose-cuda.yml up --build
39
+ else
40
+ $dcomp -f docker-compose-cpu.yml up --build
41
+ fi
42
+ }
43
+
44
+ with_cuda=0
45
+ for arg in "$@"; do
46
+ case $arg in
47
+ --with-cuda)
48
+ with_cuda=1
49
+ ;;
50
+ --model_name=*)
51
+ model_name="${arg#*=}.pth"
52
+ ;;
53
+ *)
54
+ echo "Unknown parameter passed: $arg"
55
+ exit 1
56
+ ;;
57
+ esac
58
+ done
59
+
60
+
61
+ main() {
62
+ check_docker
63
+ download_model_checkpoint
64
+ set_dcomp
65
+ run_docker
66
+ }
67
+
68
+ main
submodules/mast3r/dust3r/.gitignore ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ data/
2
+ # checkpoints/
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[cod]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ pip-wheel-metadata/
27
+ share/python-wheels/
28
+ *.egg-info/
29
+ .installed.cfg
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # IPython
84
+ profile_default/
85
+ ipython_config.py
86
+
87
+ # pyenv
88
+ .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
98
+ __pypackages__/
99
+
100
+ # Celery stuff
101
+ celerybeat-schedule
102
+ celerybeat.pid
103
+
104
+ # SageMath parsed files
105
+ *.sage.py
106
+
107
+ # Environments
108
+ .env
109
+ .venv
110
+ env/
111
+ venv/
112
+ ENV/
113
+ env.bak/
114
+ venv.bak/
115
+
116
+ # Spyder project settings
117
+ .spyderproject
118
+ .spyproject
119
+
120
+ # Rope project settings
121
+ .ropeproject
122
+
123
+ # mkdocs documentation
124
+ /site
125
+
126
+ # mypy
127
+ .mypy_cache/
128
+ .dmypy.json
129
+ dmypy.json
130
+
131
+ # Pyre type checker
132
+ .pyre/
submodules/mast3r/dust3r/.gitmodules ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ [submodule "croco"]
2
+ path = croco
3
+ url = https://github.com/naver/croco
submodules/mast3r/dust3r/LICENSE ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ DUSt3R, Copyright (c) 2024-present Naver Corporation, is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license.
2
+
3
+ A summary of the CC BY-NC-SA 4.0 license is located here:
4
+ https://creativecommons.org/licenses/by-nc-sa/4.0/
5
+
6
+ The CC BY-NC-SA 4.0 license is located here:
7
+ https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
submodules/mast3r/dust3r/NOTICE ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ DUSt3R
2
+ Copyright 2024-present NAVER Corp.
3
+
4
+ This project contains subcomponents with separate copyright notices and license terms.
5
+ Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses.
6
+
7
+ ====
8
+
9
+ naver/croco
10
+ https://github.com/naver/croco/
11
+
12
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0
submodules/mast3r/dust3r/assets/demo.jpg ADDED
submodules/mast3r/dust3r/assets/dust3r.jpg ADDED
submodules/mast3r/dust3r/assets/dust3r_archi.jpg ADDED
submodules/mast3r/dust3r/assets/matching.jpg ADDED
submodules/mast3r/dust3r/assets/pipeline1.jpg ADDED
submodules/mast3r/dust3r/croco/LICENSE ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CroCo, Copyright (c) 2022-present Naver Corporation, is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 license.
2
+
3
+ A summary of the CC BY-NC-SA 4.0 license is located here:
4
+ https://creativecommons.org/licenses/by-nc-sa/4.0/
5
+
6
+ The CC BY-NC-SA 4.0 license is located here:
7
+ https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
8
+
9
+
10
+ SEE NOTICE BELOW WITH RESPECT TO THE FILE: models/pos_embed.py, models/blocks.py
11
+
12
+ ***************************
13
+
14
+ NOTICE WITH RESPECT TO THE FILE: models/pos_embed.py
15
+
16
+ This software is being redistributed in a modifiled form. The original form is available here:
17
+
18
+ https://github.com/facebookresearch/mae/blob/main/util/pos_embed.py
19
+
20
+ This software in this file incorporates parts of the following software available here:
21
+
22
+ Transformer: https://github.com/tensorflow/models/blob/master/official/legacy/transformer/model_utils.py
23
+ available under the following license: https://github.com/tensorflow/models/blob/master/LICENSE
24
+
25
+ MoCo v3: https://github.com/facebookresearch/moco-v3
26
+ available under the following license: https://github.com/facebookresearch/moco-v3/blob/main/LICENSE
27
+
28
+ DeiT: https://github.com/facebookresearch/deit
29
+ available under the following license: https://github.com/facebookresearch/deit/blob/main/LICENSE
30
+
31
+
32
+ ORIGINAL COPYRIGHT NOTICE AND PERMISSION NOTICE AVAILABLE HERE IS REPRODUCE BELOW:
33
+
34
+ https://github.com/facebookresearch/mae/blob/main/LICENSE
35
+
36
+ Attribution-NonCommercial 4.0 International
37
+
38
+ ***************************
39
+
40
+ NOTICE WITH RESPECT TO THE FILE: models/blocks.py
41
+
42
+ This software is being redistributed in a modifiled form. The original form is available here:
43
+
44
+ https://github.com/rwightman/pytorch-image-models
45
+
46
+ ORIGINAL COPYRIGHT NOTICE AND PERMISSION NOTICE AVAILABLE HERE IS REPRODUCE BELOW:
47
+
48
+ https://github.com/rwightman/pytorch-image-models/blob/master/LICENSE
49
+
50
+ Apache License
51
+ Version 2.0, January 2004
52
+ http://www.apache.org/licenses/
submodules/mast3r/dust3r/croco/NOTICE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ CroCo
2
+ Copyright 2022-present NAVER Corp.
3
+
4
+ This project contains subcomponents with separate copyright notices and license terms.
5
+ Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses.
6
+
7
+ ====
8
+
9
+ facebookresearch/mae
10
+ https://github.com/facebookresearch/mae
11
+
12
+ Attribution-NonCommercial 4.0 International
13
+
14
+ ====
15
+
16
+ rwightman/pytorch-image-models
17
+ https://github.com/rwightman/pytorch-image-models
18
+
19
+ Apache License
20
+ Version 2.0, January 2004
21
+ http://www.apache.org/licenses/
submodules/mast3r/dust3r/croco/README.MD ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CroCo + CroCo v2 / CroCo-Stereo / CroCo-Flow
2
+
3
+ [[`CroCo arXiv`](https://arxiv.org/abs/2210.10716)] [[`CroCo v2 arXiv`](https://arxiv.org/abs/2211.10408)] [[`project page and demo`](https://croco.europe.naverlabs.com/)]
4
+
5
+ This repository contains the code for our CroCo model presented in our NeurIPS'22 paper [CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion](https://openreview.net/pdf?id=wZEfHUM5ri) and its follow-up extension published at ICCV'23 [Improved Cross-view Completion Pre-training for Stereo Matching and Optical Flow](https://openaccess.thecvf.com/content/ICCV2023/html/Weinzaepfel_CroCo_v2_Improved_Cross-view_Completion_Pre-training_for_Stereo_Matching_and_ICCV_2023_paper.html), refered to as CroCo v2:
6
+
7
+ ![image](assets/arch.jpg)
8
+
9
+ ```bibtex
10
+ @inproceedings{croco,
11
+ title={{CroCo: Self-Supervised Pre-training for 3D Vision Tasks by Cross-View Completion}},
12
+ author={{Weinzaepfel, Philippe and Leroy, Vincent and Lucas, Thomas and Br\'egier, Romain and Cabon, Yohann and Arora, Vaibhav and Antsfeld, Leonid and Chidlovskii, Boris and Csurka, Gabriela and Revaud J\'er\^ome}},
13
+ booktitle={{NeurIPS}},
14
+ year={2022}
15
+ }
16
+
17
+ @inproceedings{croco_v2,
18
+ title={{CroCo v2: Improved Cross-view Completion Pre-training for Stereo Matching and Optical Flow}},
19
+ author={Weinzaepfel, Philippe and Lucas, Thomas and Leroy, Vincent and Cabon, Yohann and Arora, Vaibhav and Br{\'e}gier, Romain and Csurka, Gabriela and Antsfeld, Leonid and Chidlovskii, Boris and Revaud, J{\'e}r{\^o}me},
20
+ booktitle={ICCV},
21
+ year={2023}
22
+ }
23
+ ```
24
+
25
+ ## License
26
+
27
+ The code is distributed under the CC BY-NC-SA 4.0 License. See [LICENSE](LICENSE) for more information.
28
+ Some components are based on code from [MAE](https://github.com/facebookresearch/mae) released under the CC BY-NC-SA 4.0 License and [timm](https://github.com/rwightman/pytorch-image-models) released under the Apache 2.0 License.
29
+ Some components for stereo matching and optical flow are based on code from [unimatch](https://github.com/autonomousvision/unimatch) released under the MIT license.
30
+
31
+ ## Preparation
32
+
33
+ 1. Install dependencies on a machine with a NVidia GPU using e.g. conda. Note that `habitat-sim` is required only for the interactive demo and the synthetic pre-training data generation. If you don't plan to use it, you can ignore the line installing it and use a more recent python version.
34
+
35
+ ```bash
36
+ conda create -n croco python=3.7 cmake=3.14.0
37
+ conda activate croco
38
+ conda install habitat-sim headless -c conda-forge -c aihabitat
39
+ conda install pytorch torchvision -c pytorch
40
+ conda install notebook ipykernel matplotlib
41
+ conda install ipywidgets widgetsnbextension
42
+ conda install scikit-learn tqdm quaternion opencv # only for pretraining / habitat data generation
43
+
44
+ ```
45
+
46
+ 2. Compile cuda kernels for RoPE
47
+
48
+ CroCo v2 relies on RoPE positional embeddings for which you need to compile some cuda kernels.
49
+ ```bash
50
+ cd models/curope/
51
+ python setup.py build_ext --inplace
52
+ cd ../../
53
+ ```
54
+
55
+ This can be a bit long as we compile for all cuda architectures, feel free to update L9 of `models/curope/setup.py` to compile for specific architectures only.
56
+ You might also need to set the environment `CUDA_HOME` in case you use a custom cuda installation.
57
+
58
+ In case you cannot provide, we also provide a slow pytorch version, which will be automatically loaded.
59
+
60
+ 3. Download pre-trained model
61
+
62
+ We provide several pre-trained models:
63
+
64
+ | modelname | pre-training data | pos. embed. | Encoder | Decoder |
65
+ |------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------|---------|---------|
66
+ | [`CroCo.pth`](https://download.europe.naverlabs.com/ComputerVision/CroCo/CroCo.pth) | Habitat | cosine | ViT-B | Small |
67
+ | [`CroCo_V2_ViTBase_SmallDecoder.pth`](https://download.europe.naverlabs.com/ComputerVision/CroCo/CroCo_V2_ViTBase_SmallDecoder.pth) | Habitat + real | RoPE | ViT-B | Small |
68
+ | [`CroCo_V2_ViTBase_BaseDecoder.pth`](https://download.europe.naverlabs.com/ComputerVision/CroCo/CroCo_V2_ViTBase_BaseDecoder.pth) | Habitat + real | RoPE | ViT-B | Base |
69
+ | [`CroCo_V2_ViTLarge_BaseDecoder.pth`](https://download.europe.naverlabs.com/ComputerVision/CroCo/CroCo_V2_ViTLarge_BaseDecoder.pth) | Habitat + real | RoPE | ViT-L | Base |
70
+
71
+ To download a specific model, i.e., the first one (`CroCo.pth`)
72
+ ```bash
73
+ mkdir -p pretrained_models/
74
+ wget https://download.europe.naverlabs.com/ComputerVision/CroCo/CroCo.pth -P pretrained_models/
75
+ ```
76
+
77
+ ## Reconstruction example
78
+
79
+ Simply run after downloading the `CroCo_V2_ViTLarge_BaseDecoder` pretrained model (or update the corresponding line in `demo.py`)
80
+ ```bash
81
+ python demo.py
82
+ ```
83
+
84
+ ## Interactive demonstration of cross-view completion reconstruction on the Habitat simulator
85
+
86
+ First download the test scene from Habitat:
87
+ ```bash
88
+ python -m habitat_sim.utils.datasets_download --uids habitat_test_scenes --data-path habitat-sim-data/
89
+ ```
90
+
91
+ Then, run the Notebook demo `interactive_demo.ipynb`.
92
+
93
+ In this demo, you should be able to sample a random reference viewpoint from an [Habitat](https://github.com/facebookresearch/habitat-sim) test scene. Use the sliders to change viewpoint and select a masked target view to reconstruct using CroCo.
94
+ ![croco_interactive_demo](https://user-images.githubusercontent.com/1822210/200516576-7937bc6a-55f8-49ed-8618-3ddf89433ea4.jpg)
95
+
96
+ ## Pre-training
97
+
98
+ ### CroCo
99
+
100
+ To pre-train CroCo, please first generate the pre-training data from the Habitat simulator, following the instructions in [datasets/habitat_sim/README.MD](datasets/habitat_sim/README.MD) and then run the following command:
101
+ ```
102
+ torchrun --nproc_per_node=4 pretrain.py --output_dir ./output/pretraining/
103
+ ```
104
+
105
+ Our CroCo pre-training was launched on a single server with 4 GPUs.
106
+ It should take around 10 days with A100 or 15 days with V100 to do the 400 pre-training epochs, but decent performances are obtained earlier in training.
107
+ Note that, while the code contains the same scaling rule of the learning rate as MAE when changing the effective batch size, we did not experimented if it is valid in our case.
108
+ The first run can take a few minutes to start, to parse all available pre-training pairs.
109
+
110
+ ### CroCo v2
111
+
112
+ For CroCo v2 pre-training, in addition to the generation of the pre-training data from the Habitat simulator above, please pre-extract the crops from the real datasets following the instructions in [datasets/crops/README.MD](datasets/crops/README.MD).
113
+ Then, run the following command for the largest model (ViT-L encoder, Base decoder):
114
+ ```
115
+ torchrun --nproc_per_node=8 pretrain.py --model "CroCoNet(enc_embed_dim=1024, enc_depth=24, enc_num_heads=16, dec_embed_dim=768, dec_num_heads=12, dec_depth=12, pos_embed='RoPE100')" --dataset "habitat_release+ARKitScenes+MegaDepth+3DStreetView+IndoorVL" --warmup_epochs 12 --max_epoch 125 --epochs 250 --amp 0 --keep_freq 5 --output_dir ./output/pretraining_crocov2/
116
+ ```
117
+
118
+ Our CroCo v2 pre-training was launched on a single server with 8 GPUs for the largest model, and on a single server with 4 GPUs for the smaller ones, keeping a batch size of 64 per gpu in all cases.
119
+ The largest model should take around 12 days on A100.
120
+ Note that, while the code contains the same scaling rule of the learning rate as MAE when changing the effective batch size, we did not experimented if it is valid in our case.
121
+
122
+ ## Stereo matching and Optical flow downstream tasks
123
+
124
+ For CroCo-Stereo and CroCo-Flow, please refer to [stereoflow/README.MD](stereoflow/README.MD).
submodules/mast3r/dust3r/croco/assets/Chateau1.png ADDED
submodules/mast3r/dust3r/croco/assets/Chateau2.png ADDED
submodules/mast3r/dust3r/croco/assets/arch.jpg ADDED
submodules/mast3r/dust3r/croco/croco-stereo-flow-demo.ipynb ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "id": "9bca0f41",
6
+ "metadata": {},
7
+ "source": [
8
+ "# Simple inference example with CroCo-Stereo or CroCo-Flow"
9
+ ]
10
+ },
11
+ {
12
+ "cell_type": "code",
13
+ "execution_count": null,
14
+ "id": "80653ef7",
15
+ "metadata": {},
16
+ "outputs": [],
17
+ "source": [
18
+ "# Copyright (C) 2022-present Naver Corporation. All rights reserved.\n",
19
+ "# Licensed under CC BY-NC-SA 4.0 (non-commercial use only)."
20
+ ]
21
+ },
22
+ {
23
+ "cell_type": "markdown",
24
+ "id": "4f033862",
25
+ "metadata": {},
26
+ "source": [
27
+ "First download the model(s) of your choice by running\n",
28
+ "```\n",
29
+ "bash stereoflow/download_model.sh crocostereo.pth\n",
30
+ "bash stereoflow/download_model.sh crocoflow.pth\n",
31
+ "```"
32
+ ]
33
+ },
34
+ {
35
+ "cell_type": "code",
36
+ "execution_count": null,
37
+ "id": "1fb2e392",
38
+ "metadata": {},
39
+ "outputs": [],
40
+ "source": [
41
+ "import torch\n",
42
+ "use_gpu = torch.cuda.is_available() and torch.cuda.device_count()>0\n",
43
+ "device = torch.device('cuda:0' if use_gpu else 'cpu')\n",
44
+ "import matplotlib.pylab as plt"
45
+ ]
46
+ },
47
+ {
48
+ "cell_type": "code",
49
+ "execution_count": null,
50
+ "id": "e0e25d77",
51
+ "metadata": {},
52
+ "outputs": [],
53
+ "source": [
54
+ "from stereoflow.test import _load_model_and_criterion\n",
55
+ "from stereoflow.engine import tiled_pred\n",
56
+ "from stereoflow.datasets_stereo import img_to_tensor, vis_disparity\n",
57
+ "from stereoflow.datasets_flow import flowToColor\n",
58
+ "tile_overlap=0.7 # recommended value, higher value can be slightly better but slower"
59
+ ]
60
+ },
61
+ {
62
+ "cell_type": "markdown",
63
+ "id": "86a921f5",
64
+ "metadata": {},
65
+ "source": [
66
+ "### CroCo-Stereo example"
67
+ ]
68
+ },
69
+ {
70
+ "cell_type": "code",
71
+ "execution_count": null,
72
+ "id": "64e483cb",
73
+ "metadata": {},
74
+ "outputs": [],
75
+ "source": [
76
+ "image1 = np.asarray(Image.open('<path_to_left_image>'))\n",
77
+ "image2 = np.asarray(Image.open('<path_to_right_image>'))"
78
+ ]
79
+ },
80
+ {
81
+ "cell_type": "code",
82
+ "execution_count": null,
83
+ "id": "f0d04303",
84
+ "metadata": {},
85
+ "outputs": [],
86
+ "source": [
87
+ "model, _, cropsize, with_conf, task, tile_conf_mode = _load_model_and_criterion('stereoflow_models/crocostereo.pth', None, device)\n"
88
+ ]
89
+ },
90
+ {
91
+ "cell_type": "code",
92
+ "execution_count": null,
93
+ "id": "47dc14b5",
94
+ "metadata": {},
95
+ "outputs": [],
96
+ "source": [
97
+ "im1 = img_to_tensor(image1).to(device).unsqueeze(0)\n",
98
+ "im2 = img_to_tensor(image2).to(device).unsqueeze(0)\n",
99
+ "with torch.inference_mode():\n",
100
+ " pred, _, _ = tiled_pred(model, None, im1, im2, None, conf_mode=tile_conf_mode, overlap=tile_overlap, crop=cropsize, with_conf=with_conf, return_time=False)\n",
101
+ "pred = pred.squeeze(0).squeeze(0).cpu().numpy()"
102
+ ]
103
+ },
104
+ {
105
+ "cell_type": "code",
106
+ "execution_count": null,
107
+ "id": "583b9f16",
108
+ "metadata": {},
109
+ "outputs": [],
110
+ "source": [
111
+ "plt.imshow(vis_disparity(pred))\n",
112
+ "plt.axis('off')"
113
+ ]
114
+ },
115
+ {
116
+ "cell_type": "markdown",
117
+ "id": "d2df5d70",
118
+ "metadata": {},
119
+ "source": [
120
+ "### CroCo-Flow example"
121
+ ]
122
+ },
123
+ {
124
+ "cell_type": "code",
125
+ "execution_count": null,
126
+ "id": "9ee257a7",
127
+ "metadata": {},
128
+ "outputs": [],
129
+ "source": [
130
+ "image1 = np.asarray(Image.open('<path_to_first_image>'))\n",
131
+ "image2 = np.asarray(Image.open('<path_to_second_image>'))"
132
+ ]
133
+ },
134
+ {
135
+ "cell_type": "code",
136
+ "execution_count": null,
137
+ "id": "d5edccf0",
138
+ "metadata": {},
139
+ "outputs": [],
140
+ "source": [
141
+ "model, _, cropsize, with_conf, task, tile_conf_mode = _load_model_and_criterion('stereoflow_models/crocoflow.pth', None, device)\n"
142
+ ]
143
+ },
144
+ {
145
+ "cell_type": "code",
146
+ "execution_count": null,
147
+ "id": "b19692c3",
148
+ "metadata": {},
149
+ "outputs": [],
150
+ "source": [
151
+ "im1 = img_to_tensor(image1).to(device).unsqueeze(0)\n",
152
+ "im2 = img_to_tensor(image2).to(device).unsqueeze(0)\n",
153
+ "with torch.inference_mode():\n",
154
+ " pred, _, _ = tiled_pred(model, None, im1, im2, None, conf_mode=tile_conf_mode, overlap=tile_overlap, crop=cropsize, with_conf=with_conf, return_time=False)\n",
155
+ "pred = pred.squeeze(0).permute(1,2,0).cpu().numpy()"
156
+ ]
157
+ },
158
+ {
159
+ "cell_type": "code",
160
+ "execution_count": null,
161
+ "id": "26f79db3",
162
+ "metadata": {},
163
+ "outputs": [],
164
+ "source": [
165
+ "plt.imshow(flowToColor(pred))\n",
166
+ "plt.axis('off')"
167
+ ]
168
+ }
169
+ ],
170
+ "metadata": {
171
+ "kernelspec": {
172
+ "display_name": "Python 3 (ipykernel)",
173
+ "language": "python",
174
+ "name": "python3"
175
+ },
176
+ "language_info": {
177
+ "codemirror_mode": {
178
+ "name": "ipython",
179
+ "version": 3
180
+ },
181
+ "file_extension": ".py",
182
+ "mimetype": "text/x-python",
183
+ "name": "python",
184
+ "nbconvert_exporter": "python",
185
+ "pygments_lexer": "ipython3",
186
+ "version": "3.9.7"
187
+ }
188
+ },
189
+ "nbformat": 4,
190
+ "nbformat_minor": 5
191
+ }
submodules/mast3r/dust3r/croco/datasets/__init__.py ADDED
File without changes
submodules/mast3r/dust3r/croco/datasets/crops/README.MD ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Generation of crops from the real datasets
2
+
3
+ The instructions below allow to generate the crops used for pre-training CroCo v2 from the following real-world datasets: ARKitScenes, MegaDepth, 3DStreetView and IndoorVL.
4
+
5
+ ### Download the metadata of the crops to generate
6
+
7
+ First, download the metadata and put them in `./data/`:
8
+ ```
9
+ mkdir -p data
10
+ cd data/
11
+ wget https://download.europe.naverlabs.com/ComputerVision/CroCo/data/crop_metadata.zip
12
+ unzip crop_metadata.zip
13
+ rm crop_metadata.zip
14
+ cd ..
15
+ ```
16
+
17
+ ### Prepare the original datasets
18
+
19
+ Second, download the original datasets in `./data/original_datasets/`.
20
+ ```
21
+ mkdir -p data/original_datasets
22
+ ```
23
+
24
+ ##### ARKitScenes
25
+
26
+ Download the `raw` dataset from https://github.com/apple/ARKitScenes/blob/main/DATA.md and put it in `./data/original_datasets/ARKitScenes/`.
27
+ The resulting file structure should be like:
28
+ ```
29
+ ./data/original_datasets/ARKitScenes/
30
+ └───Training
31
+ └───40753679
32
+ │ │ ultrawide
33
+ │ │ ...
34
+ └───40753686
35
+
36
+ ...
37
+ ```
38
+
39
+ ##### MegaDepth
40
+
41
+ Download `MegaDepth v1 Dataset` from https://www.cs.cornell.edu/projects/megadepth/ and put it in `./data/original_datasets/MegaDepth/`.
42
+ The resulting file structure should be like:
43
+
44
+ ```
45
+ ./data/original_datasets/MegaDepth/
46
+ └───0000
47
+ │ └───images
48
+ │ │ │ 1000557903_87fa96b8a4_o.jpg
49
+ │ │ └ ...
50
+ │ └─── ...
51
+ └───0001
52
+ │ │
53
+ │ └ ...
54
+ └─── ...
55
+ ```
56
+
57
+ ##### 3DStreetView
58
+
59
+ Download `3D_Street_View` dataset from https://github.com/amir32002/3D_Street_View and put it in `./data/original_datasets/3DStreetView/`.
60
+ The resulting file structure should be like:
61
+
62
+ ```
63
+ ./data/original_datasets/3DStreetView/
64
+ └───dataset_aligned
65
+ │ └───0002
66
+ │ │ │ 0000002_0000001_0000002_0000001.jpg
67
+ │ │ └ ...
68
+ │ └─── ...
69
+ └───dataset_unaligned
70
+ │ └───0003
71
+ │ │ │ 0000003_0000001_0000002_0000001.jpg
72
+ │ │ └ ...
73
+ │ └─── ...
74
+ ```
75
+
76
+ ##### IndoorVL
77
+
78
+ Download the `IndoorVL` datasets using [Kapture](https://github.com/naver/kapture).
79
+
80
+ ```
81
+ pip install kapture
82
+ mkdir -p ./data/original_datasets/IndoorVL
83
+ cd ./data/original_datasets/IndoorVL
84
+ kapture_download_dataset.py update
85
+ kapture_download_dataset.py install "HyundaiDepartmentStore_*"
86
+ kapture_download_dataset.py install "GangnamStation_*"
87
+ cd -
88
+ ```
89
+
90
+ ### Extract the crops
91
+
92
+ Now, extract the crops for each of the dataset:
93
+ ```
94
+ for dataset in ARKitScenes MegaDepth 3DStreetView IndoorVL;
95
+ do
96
+ python3 datasets/crops/extract_crops_from_images.py --crops ./data/crop_metadata/${dataset}/crops_release.txt --root-dir ./data/original_datasets/${dataset}/ --output-dir ./data/${dataset}_crops/ --imsize 256 --nthread 8 --max-subdir-levels 5 --ideal-number-pairs-in-dir 500;
97
+ done
98
+ ```
99
+
100
+ ##### Note for IndoorVL
101
+
102
+ Due to some legal issues, we can only release 144,228 pairs out of the 1,593,689 pairs used in the paper.
103
+ To account for it in terms of number of pre-training iterations, the pre-training command in this repository uses 125 training epochs including 12 warm-up epochs and learning rate cosine schedule of 250, instead of 100, 10 and 200 respectively.
104
+ The impact on the performance is negligible.
submodules/mast3r/dust3r/croco/datasets/crops/extract_crops_from_images.py ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2022-present Naver Corporation. All rights reserved.
2
+ # Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
3
+ #
4
+ # --------------------------------------------------------
5
+ # Extracting crops for pre-training
6
+ # --------------------------------------------------------
7
+
8
+ import os
9
+ import argparse
10
+ from tqdm import tqdm
11
+ from PIL import Image
12
+ import functools
13
+ from multiprocessing import Pool
14
+ import math
15
+
16
+
17
+ def arg_parser():
18
+ parser = argparse.ArgumentParser('Generate cropped image pairs from image crop list')
19
+
20
+ parser.add_argument('--crops', type=str, required=True, help='crop file')
21
+ parser.add_argument('--root-dir', type=str, required=True, help='root directory')
22
+ parser.add_argument('--output-dir', type=str, required=True, help='output directory')
23
+ parser.add_argument('--imsize', type=int, default=256, help='size of the crops')
24
+ parser.add_argument('--nthread', type=int, required=True, help='number of simultaneous threads')
25
+ parser.add_argument('--max-subdir-levels', type=int, default=5, help='maximum number of subdirectories')
26
+ parser.add_argument('--ideal-number-pairs-in-dir', type=int, default=500, help='number of pairs stored in a dir')
27
+ return parser
28
+
29
+
30
+ def main(args):
31
+ listing_path = os.path.join(args.output_dir, 'listing.txt')
32
+
33
+ print(f'Loading list of crops ... ({args.nthread} threads)')
34
+ crops, num_crops_to_generate = load_crop_file(args.crops)
35
+
36
+ print(f'Preparing jobs ({len(crops)} candidate image pairs)...')
37
+ num_levels = min(math.ceil(math.log(num_crops_to_generate, args.ideal_number_pairs_in_dir)), args.max_subdir_levels)
38
+ num_pairs_in_dir = math.ceil(num_crops_to_generate ** (1/num_levels))
39
+
40
+ jobs = prepare_jobs(crops, num_levels, num_pairs_in_dir)
41
+ del crops
42
+
43
+ os.makedirs(args.output_dir, exist_ok=True)
44
+ mmap = Pool(args.nthread).imap_unordered if args.nthread > 1 else map
45
+ call = functools.partial(save_image_crops, args)
46
+
47
+ print(f"Generating cropped images to {args.output_dir} ...")
48
+ with open(listing_path, 'w') as listing:
49
+ listing.write('# pair_path\n')
50
+ for results in tqdm(mmap(call, jobs), total=len(jobs)):
51
+ for path in results:
52
+ listing.write(f'{path}\n')
53
+ print('Finished writing listing to', listing_path)
54
+
55
+
56
+ def load_crop_file(path):
57
+ data = open(path).read().splitlines()
58
+ pairs = []
59
+ num_crops_to_generate = 0
60
+ for line in tqdm(data):
61
+ if line.startswith('#'):
62
+ continue
63
+ line = line.split(', ')
64
+ if len(line) < 8:
65
+ img1, img2, rotation = line
66
+ pairs.append((img1, img2, int(rotation), []))
67
+ else:
68
+ l1, r1, t1, b1, l2, r2, t2, b2 = map(int, line)
69
+ rect1, rect2 = (l1, t1, r1, b1), (l2, t2, r2, b2)
70
+ pairs[-1][-1].append((rect1, rect2))
71
+ num_crops_to_generate += 1
72
+ return pairs, num_crops_to_generate
73
+
74
+
75
+ def prepare_jobs(pairs, num_levels, num_pairs_in_dir):
76
+ jobs = []
77
+ powers = [num_pairs_in_dir**level for level in reversed(range(num_levels))]
78
+
79
+ def get_path(idx):
80
+ idx_array = []
81
+ d = idx
82
+ for level in range(num_levels - 1):
83
+ idx_array.append(idx // powers[level])
84
+ idx = idx % powers[level]
85
+ idx_array.append(d)
86
+ return '/'.join(map(lambda x: hex(x)[2:], idx_array))
87
+
88
+ idx = 0
89
+ for pair_data in tqdm(pairs):
90
+ img1, img2, rotation, crops = pair_data
91
+ if -60 <= rotation and rotation <= 60:
92
+ rotation = 0 # most likely not a true rotation
93
+ paths = [get_path(idx + k) for k in range(len(crops))]
94
+ idx += len(crops)
95
+ jobs.append(((img1, img2), rotation, crops, paths))
96
+ return jobs
97
+
98
+
99
+ def load_image(path):
100
+ try:
101
+ return Image.open(path).convert('RGB')
102
+ except Exception as e:
103
+ print('skipping', path, e)
104
+ raise OSError()
105
+
106
+
107
+ def save_image_crops(args, data):
108
+ # load images
109
+ img_pair, rot, crops, paths = data
110
+ try:
111
+ img1, img2 = [load_image(os.path.join(args.root_dir, impath)) for impath in img_pair]
112
+ except OSError as e:
113
+ return []
114
+
115
+ def area(sz):
116
+ return sz[0] * sz[1]
117
+
118
+ tgt_size = (args.imsize, args.imsize)
119
+
120
+ def prepare_crop(img, rect, rot=0):
121
+ # actual crop
122
+ img = img.crop(rect)
123
+
124
+ # resize to desired size
125
+ interp = Image.Resampling.LANCZOS if area(img.size) > 4*area(tgt_size) else Image.Resampling.BICUBIC
126
+ img = img.resize(tgt_size, resample=interp)
127
+
128
+ # rotate the image
129
+ rot90 = (round(rot/90) % 4) * 90
130
+ if rot90 == 90:
131
+ img = img.transpose(Image.Transpose.ROTATE_90)
132
+ elif rot90 == 180:
133
+ img = img.transpose(Image.Transpose.ROTATE_180)
134
+ elif rot90 == 270:
135
+ img = img.transpose(Image.Transpose.ROTATE_270)
136
+ return img
137
+
138
+ results = []
139
+ for (rect1, rect2), path in zip(crops, paths):
140
+ crop1 = prepare_crop(img1, rect1)
141
+ crop2 = prepare_crop(img2, rect2, rot)
142
+
143
+ fullpath1 = os.path.join(args.output_dir, path+'_1.jpg')
144
+ fullpath2 = os.path.join(args.output_dir, path+'_2.jpg')
145
+ os.makedirs(os.path.dirname(fullpath1), exist_ok=True)
146
+
147
+ assert not os.path.isfile(fullpath1), fullpath1
148
+ assert not os.path.isfile(fullpath2), fullpath2
149
+ crop1.save(fullpath1)
150
+ crop2.save(fullpath2)
151
+ results.append(path)
152
+
153
+ return results
154
+
155
+
156
+ if __name__ == '__main__':
157
+ args = arg_parser().parse_args()
158
+ main(args)
159
+
submodules/mast3r/dust3r/croco/datasets/habitat_sim/README.MD ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Generation of synthetic image pairs using Habitat-Sim
2
+
3
+ These instructions allow to generate pre-training pairs from the Habitat simulator.
4
+ As we did not save metadata of the pairs used in the original paper, they are not strictly the same, but these data use the same setting and are equivalent.
5
+
6
+ ### Download Habitat-Sim scenes
7
+ Download Habitat-Sim scenes:
8
+ - Download links can be found here: https://github.com/facebookresearch/habitat-sim/blob/main/DATASETS.md
9
+ - We used scenes from the HM3D, habitat-test-scenes, Replica, ReplicaCad and ScanNet datasets.
10
+ - Please put the scenes under `./data/habitat-sim-data/scene_datasets/` following the structure below, or update manually paths in `paths.py`.
11
+ ```
12
+ ./data/
13
+ └──habitat-sim-data/
14
+ └──scene_datasets/
15
+ ├──hm3d/
16
+ ├──gibson/
17
+ ├──habitat-test-scenes/
18
+ ├──replica_cad_baked_lighting/
19
+ ├──replica_cad/
20
+ ├──ReplicaDataset/
21
+ └──scannet/
22
+ ```
23
+
24
+ ### Image pairs generation
25
+ We provide metadata to generate reproducible images pairs for pretraining and validation.
26
+ Experiments described in the paper used similar data, but whose generation was not reproducible at the time.
27
+
28
+ Specifications:
29
+ - 256x256 resolution images, with 60 degrees field of view .
30
+ - Up to 1000 image pairs per scene.
31
+ - Number of scenes considered/number of images pairs per dataset:
32
+ - Scannet: 1097 scenes / 985 209 pairs
33
+ - HM3D:
34
+ - hm3d/train: 800 / 800k pairs
35
+ - hm3d/val: 100 scenes / 100k pairs
36
+ - hm3d/minival: 10 scenes / 10k pairs
37
+ - habitat-test-scenes: 3 scenes / 3k pairs
38
+ - replica_cad_baked_lighting: 13 scenes / 13k pairs
39
+
40
+ - Scenes from hm3d/val and hm3d/minival pairs were not used for the pre-training but kept for validation purposes.
41
+
42
+ Download metadata and extract it:
43
+ ```bash
44
+ mkdir -p data/habitat_release_metadata/
45
+ cd data/habitat_release_metadata/
46
+ wget https://download.europe.naverlabs.com/ComputerVision/CroCo/data/habitat_release_metadata/multiview_habitat_metadata.tar.gz
47
+ tar -xvf multiview_habitat_metadata.tar.gz
48
+ cd ../..
49
+ # Location of the metadata
50
+ METADATA_DIR="./data/habitat_release_metadata/multiview_habitat_metadata"
51
+ ```
52
+
53
+ Generate image pairs from metadata:
54
+ - The following command will print a list of commandlines to generate image pairs for each scene:
55
+ ```bash
56
+ # Target output directory
57
+ PAIRS_DATASET_DIR="./data/habitat_release/"
58
+ python datasets/habitat_sim/generate_from_metadata_files.py --input_dir=$METADATA_DIR --output_dir=$PAIRS_DATASET_DIR
59
+ ```
60
+ - One can launch multiple of such commands in parallel e.g. using GNU Parallel:
61
+ ```bash
62
+ python datasets/habitat_sim/generate_from_metadata_files.py --input_dir=$METADATA_DIR --output_dir=$PAIRS_DATASET_DIR | parallel -j 16
63
+ ```
64
+
65
+ ## Metadata generation
66
+
67
+ Image pairs were randomly sampled using the following commands, whose outputs contain randomness and are thus not exactly reproducible:
68
+ ```bash
69
+ # Print commandlines to generate image pairs from the different scenes available.
70
+ PAIRS_DATASET_DIR=MY_CUSTOM_PATH
71
+ python datasets/habitat_sim/generate_multiview_images.py --list_commands --output_dir=$PAIRS_DATASET_DIR
72
+
73
+ # Once a dataset is generated, pack metadata files for reproducibility.
74
+ METADATA_DIR=MY_CUSTON_PATH
75
+ python datasets/habitat_sim/pack_metadata_files.py $PAIRS_DATASET_DIR $METADATA_DIR
76
+ ```
submodules/mast3r/dust3r/croco/datasets/habitat_sim/__init__.py ADDED
File without changes