Edward Beeching commited on
Commit
24709f5
1 Parent(s): 6808de2

Added object assets

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
.gitattributes CHANGED
@@ -29,3 +29,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zst filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zst filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
32
+ *.glb filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ venv/
Bunny.obj ADDED
The diff for this file is too large to render. See raw diff
 
Duck.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65bf938f54d6073e619e76e007820bbf980cdc3dc0daec0d94830ffc4ae54ab5
3
+ size 120484
__pycache__/app.cpython-38.pyc ADDED
Binary file (3.42 kB). View file
 
airplane/0.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51c7ef2dbcf38c9a64240409524615a607510175a0ae39a4f99359e753544414
3
+ size 3833784
airplane/1.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a79b6754a5fa31b63e55872b53f2522b9ac4ac291a19b9a97659fbcefca44a5
3
+ size 286304
airplane/2.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f50ace50aed22f1768e93a04de527cfc1c7199bb2e70521b37604437ba8b55e2
3
+ size 459936
airplane/3.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f2f5a630b945046671999c684134fa3dd96d3b9294e045f5eb8944917916504
3
+ size 3203900
airplane/4.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcbff2ce3f2b9e6606402b31da8168c7949e3e73a354d810d0aa2b25f717c169
3
+ size 1461988
airplane/5.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd47a1fa1bd06d9703225b5131660909467d45642dd81024cf8d9d2553164602
3
+ size 1247540
airplane/6.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b45046237eac655b4ea599ee48ba381c2dbb110b0aaf2c07b973bc946befb30b
3
+ size 1548908
airplane/7.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bf9254dbbc02e222472d4f0d466f5927c657853b4689608eb6ea46ee5a5927b
3
+ size 69900
app.py ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+ import gradio as gr
3
+ import os
4
+
5
+ import numpy as np
6
+ from PIL import Image
7
+ import math
8
+
9
+ import os
10
+ from huggingface_hub import HfApi
11
+
12
+
13
+ def greet(name):
14
+ return "Hello " + name + "!"
15
+
16
+
17
+ def get_dataset_classes():
18
+ return {
19
+ "airplane": [
20
+ "airplane/0.glb",
21
+ "airplane/1.glb",
22
+ "airplane/2.glb",
23
+ "airplane/3.glb",
24
+ "airplane/4.glb",
25
+ "airplane/5.glb",
26
+ "airplane/6.glb",
27
+ "airplane/7.glb",
28
+ ],
29
+ "bench": [
30
+ "bench/0.glb",
31
+ "bench/1.glb",
32
+ "bench/10.glb",
33
+ "bench/11.glb",
34
+ "bench/12.glb",
35
+ "bench/13.glb",
36
+ "bench/14.glb",
37
+ "bench/2.glb",
38
+ "bench/3.glb",
39
+ "bench/4.glb",
40
+ "bench/5.glb",
41
+ "bench/6.glb",
42
+ "bench/7.glb",
43
+ "bench/8.glb",
44
+ "bench/9.glb",
45
+ ],
46
+ "camera": [
47
+ "camera/0.glb",
48
+ "camera/1.glb",
49
+ "camera/2.glb",
50
+ "camera/3.glb",
51
+ "camera/4.glb",
52
+ "camera/5.glb",
53
+ "camera/6.glb",
54
+ "camera/7.glb",
55
+ ],
56
+ "dishwasher": [
57
+ "dishwasher/0.glb",
58
+ "dishwasher/1.glb",
59
+ "dishwasher/10.glb",
60
+ "dishwasher/11.glb",
61
+ "dishwasher/2.glb",
62
+ "dishwasher/3.glb",
63
+ "dishwasher/4.glb",
64
+ "dishwasher/5.glb",
65
+ "dishwasher/6.glb",
66
+ "dishwasher/7.glb",
67
+ "dishwasher/8.glb",
68
+ "dishwasher/9.glb",
69
+ ],
70
+ "jar": [
71
+ "jar/0.glb",
72
+ "jar/1.glb",
73
+ "jar/2.glb",
74
+ "jar/3.glb",
75
+ "jar/4.glb",
76
+ "jar/5.glb",
77
+ "jar/6.glb",
78
+ "jar/7.glb",
79
+ "jar/8.glb",
80
+ ],
81
+ "motorcycle": [
82
+ "motorcycle/0.glb",
83
+ "motorcycle/1.glb",
84
+ "motorcycle/10.glb",
85
+ "motorcycle/2.glb",
86
+ "motorcycle/3.glb",
87
+ "motorcycle/4.glb",
88
+ "motorcycle/5.glb",
89
+ "motorcycle/6.glb",
90
+ "motorcycle/7.glb",
91
+ "motorcycle/8.glb",
92
+ "motorcycle/9.glb",
93
+ ],
94
+ "printer": [
95
+ "printer/0.glb",
96
+ "printer/1.glb",
97
+ "printer/10.glb",
98
+ "printer/11.glb",
99
+ "printer/2.glb",
100
+ "printer/3.glb",
101
+ "printer/4.glb",
102
+ "printer/5.glb",
103
+ "printer/6.glb",
104
+ "printer/7.glb",
105
+ "printer/8.glb",
106
+ "printer/9.glb",
107
+ ],
108
+ "sofa": [
109
+ "sofa/0.glb",
110
+ "sofa/1.glb",
111
+ "sofa/10.glb",
112
+ "sofa/11.glb",
113
+ "sofa/12.glb",
114
+ "sofa/2.glb",
115
+ "sofa/3.glb",
116
+ "sofa/4.glb",
117
+ "sofa/5.glb",
118
+ "sofa/6.glb",
119
+ "sofa/7.glb",
120
+ "sofa/8.glb",
121
+ "sofa/9.glb",
122
+ ],
123
+ "washer": [
124
+ "washer/0.glb",
125
+ "washer/1.glb",
126
+ "washer/10.glb",
127
+ "washer/11.glb",
128
+ "washer/2.glb",
129
+ "washer/3.glb",
130
+ "washer/4.glb",
131
+ "washer/5.glb",
132
+ "washer/6.glb",
133
+ "washer/7.glb",
134
+ "washer/8.glb",
135
+ "washer/9.glb",
136
+ ],
137
+ }
138
+ dataset_dict = get_dataset_classes()
139
+ dataset_classes = list(dataset_dict.keys())
140
+ default_models = dataset_dict[dataset_classes[0]]
141
+
142
+
143
+ def load_mesh(mesh_file_name):
144
+ return mesh_file_name, mesh_file_name
145
+
146
+ def update(model_name):
147
+ # wget the glb file from the datasets repo
148
+ print(model_name)
149
+ return f"{model_name}/0.glb"
150
+
151
+ def update_model_list(choice_class):
152
+ print(f"inp1 changed {choice_class}")
153
+ return {"choices":dataset_dict[choice_class]}
154
+
155
+
156
+ with gr.Blocks() as demo:
157
+ with gr.Row():
158
+ with gr.Column():
159
+ inp = gr.Dropdown(choices=dataset_classes, interactive=True, label="3D Model Class", value=dataset_classes[0])
160
+ out1 = gr.Dropdown(choices=default_models, interactive=True, label="3D Model", value=default_models[0])
161
+
162
+
163
+ out2 = gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model")
164
+
165
+ inp.change(fn=update, inputs=inp, outputs=out2)
166
+ # with gr.Row():
167
+ # btn = gr.Button("Load model")
168
+ # btn.click(fn=update, inputs=inp, outputs=out2)
169
+
170
+
171
+ # demo = gr.Interface(
172
+ # fn=load_mesh,
173
+ # inputs=gr.Model3D(),
174
+ # outputs=[
175
+ # gr.Model3D(
176
+ # clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model"),
177
+ # gr.File(label="Download 3D Model")
178
+ # ],
179
+ # examples=[
180
+ # ],
181
+
182
+
183
+ demo.launch()
184
+
bench/0.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31f77e6ce5f4bd9bffcc41348f5437d3fd23cfde0c1799d8157637aaa2db7b24
3
+ size 24308
bench/1.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18975082c8941c0d3398f579a0945a6793bc56dd93e392f7582052d5ad253715
3
+ size 2038992
bench/10.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34d69b479da008e45bc7ea32c767750be7cee33d01daf33539f3711c717784a3
3
+ size 876368
bench/11.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ae4296b30f306742f303373142b078a1406313c471cb8427f8bd6f71acc788f
3
+ size 648952
bench/12.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fd8360d90795a3ce4512cb0d33998989050bedb84b645f428828689bba2089b
3
+ size 132716
bench/13.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c65fa66dfc6a5e816dc15d46c6f48c0c24caa6a78311de84686fb561daf3cd3
3
+ size 552452
bench/14.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9731270136f93e23d1bc8220410a16910f7d7a3eb2e0316d8f2032ce29c405e
3
+ size 1347888
bench/2.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:921a235944f311ac64228c2cc4ca4930416263e41223cc6c6175f98e7be1e62d
3
+ size 46888
bench/3.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a9ceb3eb255091654f9ec9ec52c3a4505bee4bacf6b5bcff8579797f3a05c4f
3
+ size 45840
bench/4.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d54b1ba05e6cba5d58310650bf46ebe6f7731cab2ade2ae5ce2e3e3ce85a4330
3
+ size 37792
bench/5.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eed13005f7a911c5f619078a1818742151a923eccb7c7bbf1d43d3141c72cc22
3
+ size 110044
bench/6.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b5ec7e892cab48e246e0cabd1e0664590afa75312f0c35ec1e167678ed9684c
3
+ size 1855288
bench/7.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4771270c3f837edd33b652988b45f0e6855424c25a3f76ab42cf9ad45b9a5c3c
3
+ size 258152
bench/8.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1784638a2d15c6cc45ee1971895d44fe00969c40afbbaf86c9d719532a167441
3
+ size 893512
bench/9.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92bb0b3f6fb8e69079a5eed69991f89059d83ab2a5044a0f9b6a9e0364f88a44
3
+ size 38424
camera/0.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef31e44d62cbbd3c5b21b9516c93ae1e6656707fef7210711dc47b94c5d25a0f
3
+ size 265408
camera/1.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a123e3046129400d5d5fec2cc16fa36fad3cbcef2044cfb87093af843c282a10
3
+ size 211236
camera/2.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:422250ab19b0d9bd1f40cafc53450528de1f6d61a178a61a25e451e246899ca1
3
+ size 205948
camera/3.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d083dec06494bcfcef5c99282e334b46f6f770e3e27312068f27b472f1cff5
3
+ size 1919820
camera/4.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:138569f89b53bfd9b2ec90ac42cfbbb9391f611c8b6d43f77c6342844847ded5
3
+ size 753680
camera/5.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8f466d93e0b649e3639f9abe2648eb6fcced5a35c08ebeac2aa0438d0600c09
3
+ size 47636
camera/6.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4657be4f2651330274d66eaaff635b4c46d8523a0c68aafe04e2cf0d40d3ccf1
3
+ size 30124
camera/7.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e47c9af473410d1926d406d8dbcdac29cd8a4904c46b8c11c7353aa1f8b1306c
3
+ size 105324
dishwasher/0.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74544ab88936454f1ed409d9c49bc535b672142ac585e7e66d9289c9d0317111
3
+ size 283724
dishwasher/1.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1161b54d879f1f6b365f628ae7cd168460d6cf20662f219f45f6b9b2d8b998ab
3
+ size 78244
dishwasher/10.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef3f619540d3e7b60dd10544f8d0f30e70f6c3528a6a04f19e0bc537660f873c
3
+ size 183036
dishwasher/11.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f545c0a411c509e3f1776c76402c39e26c91d607e74433c566bd8ac79e02aa93
3
+ size 296284
dishwasher/2.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:788fc7865e62361f18b91b2269d9f74f9e3f76f802370fca7f25e444213a4ac3
3
+ size 141608
dishwasher/3.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb76b13b723fe2413b9b55a50bd2944682c72fb8430980cfdd02cad25ad885db
3
+ size 25308
dishwasher/4.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd98ec918c853b66c6445d88cc0d7885812cd097998ad5f0056d7abf889882c1
3
+ size 1804216
dishwasher/5.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b9577c3efd8e67e68607119d08bc92b3e878a31f6c0eddad57b9dc0d2bfaa5d
3
+ size 231448
dishwasher/6.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6da35d42ec14423b0f9cae3a9ac9dc2ad4f2aff8eee5f64bc4ee722c00f9555b
3
+ size 128972
dishwasher/7.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b9280dc9fa4a17b956f89a9db78ecbfc022afbedd5b83c6a15c73c5d91ec8b6
3
+ size 260124
dishwasher/8.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0041ed26a8ff9cfeecde36cb27ccde481d9ca602b3b5bdd9aa849e1e9fa126bf
3
+ size 97560
dishwasher/9.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68b0434703924d3d088d407e01c19a196cd393aad5695c10d2e7a0e8b6c4dcb1
3
+ size 150620
jar/0.glb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99a1647443fcdae05a3aa570eb8b255377ac840e56d39de9c3fa5f9e2e489584
3
+ size 1653652