prithivMLmods commited on
Commit
a78bfe2
·
verified ·
1 Parent(s): ae2d6f2

update app

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +195 -0
  2. .gitignore +1 -0
  3. CODE_OF_CONDUCT.md +80 -0
  4. CONTRIBUTING.md +39 -0
  5. LICENSE +52 -0
  6. checkpoints/.gitignore +2 -0
  7. demo.py +21 -0
  8. doc/arch.png +3 -0
  9. doc/intro.png +3 -0
  10. doc/kidsroom_transparent.gif +3 -0
  11. doc/setup.md +58 -0
  12. environments/default.yml +216 -0
  13. notebook/demo_3db_mesh_alignment.ipynb +149 -0
  14. notebook/demo_multi_object.ipynb +162 -0
  15. notebook/demo_single_object.ipynb +164 -0
  16. notebook/gaussians/multi/.gitignore +2 -0
  17. notebook/gaussians/single/.gitignore +2 -0
  18. notebook/images/137444513_Livingroom-graphic81/0.png +3 -0
  19. notebook/images/137444513_Livingroom-graphic81/1.png +3 -0
  20. notebook/images/137444513_Livingroom-graphic81/10.png +3 -0
  21. notebook/images/137444513_Livingroom-graphic81/11.png +3 -0
  22. notebook/images/137444513_Livingroom-graphic81/12.png +3 -0
  23. notebook/images/137444513_Livingroom-graphic81/13.png +3 -0
  24. notebook/images/137444513_Livingroom-graphic81/14.png +3 -0
  25. notebook/images/137444513_Livingroom-graphic81/15.png +3 -0
  26. notebook/images/137444513_Livingroom-graphic81/2.png +3 -0
  27. notebook/images/137444513_Livingroom-graphic81/3.png +3 -0
  28. notebook/images/137444513_Livingroom-graphic81/4.png +3 -0
  29. notebook/images/137444513_Livingroom-graphic81/5.png +3 -0
  30. notebook/images/137444513_Livingroom-graphic81/6.png +3 -0
  31. notebook/images/137444513_Livingroom-graphic81/7.png +3 -0
  32. notebook/images/137444513_Livingroom-graphic81/8.png +3 -0
  33. notebook/images/137444513_Livingroom-graphic81/9.png +3 -0
  34. notebook/images/137444513_Livingroom-graphic81/image.png +3 -0
  35. notebook/images/2560px-David_-_The_Death_of_Socrates/0.png +0 -0
  36. notebook/images/2560px-David_-_The_Death_of_Socrates/1.png +0 -0
  37. notebook/images/2560px-David_-_The_Death_of_Socrates/10.png +0 -0
  38. notebook/images/2560px-David_-_The_Death_of_Socrates/11.png +3 -0
  39. notebook/images/2560px-David_-_The_Death_of_Socrates/12.png +0 -0
  40. notebook/images/2560px-David_-_The_Death_of_Socrates/13.png +3 -0
  41. notebook/images/2560px-David_-_The_Death_of_Socrates/14.png +3 -0
  42. notebook/images/2560px-David_-_The_Death_of_Socrates/15.png +3 -0
  43. notebook/images/2560px-David_-_The_Death_of_Socrates/16.png +0 -0
  44. notebook/images/2560px-David_-_The_Death_of_Socrates/17.png +0 -0
  45. notebook/images/2560px-David_-_The_Death_of_Socrates/18.png +0 -0
  46. notebook/images/2560px-David_-_The_Death_of_Socrates/19.png +0 -0
  47. notebook/images/2560px-David_-_The_Death_of_Socrates/2.png +0 -0
  48. notebook/images/2560px-David_-_The_Death_of_Socrates/20.png +0 -0
  49. notebook/images/2560px-David_-_The_Death_of_Socrates/21.png +0 -0
  50. notebook/images/2560px-David_-_The_Death_of_Socrates/22.png +0 -0
.gitattributes CHANGED
@@ -33,3 +33,198 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ doc/arch.png filter=lfs diff=lfs merge=lfs -text
37
+ doc/intro.png filter=lfs diff=lfs merge=lfs -text
38
+ doc/kidsroom_transparent.gif filter=lfs diff=lfs merge=lfs -text
39
+ notebook/images/137444513_Livingroom-graphic81/0.png filter=lfs diff=lfs merge=lfs -text
40
+ notebook/images/137444513_Livingroom-graphic81/1.png filter=lfs diff=lfs merge=lfs -text
41
+ notebook/images/137444513_Livingroom-graphic81/10.png filter=lfs diff=lfs merge=lfs -text
42
+ notebook/images/137444513_Livingroom-graphic81/11.png filter=lfs diff=lfs merge=lfs -text
43
+ notebook/images/137444513_Livingroom-graphic81/12.png filter=lfs diff=lfs merge=lfs -text
44
+ notebook/images/137444513_Livingroom-graphic81/13.png filter=lfs diff=lfs merge=lfs -text
45
+ notebook/images/137444513_Livingroom-graphic81/14.png filter=lfs diff=lfs merge=lfs -text
46
+ notebook/images/137444513_Livingroom-graphic81/15.png filter=lfs diff=lfs merge=lfs -text
47
+ notebook/images/137444513_Livingroom-graphic81/2.png filter=lfs diff=lfs merge=lfs -text
48
+ notebook/images/137444513_Livingroom-graphic81/3.png filter=lfs diff=lfs merge=lfs -text
49
+ notebook/images/137444513_Livingroom-graphic81/4.png filter=lfs diff=lfs merge=lfs -text
50
+ notebook/images/137444513_Livingroom-graphic81/5.png filter=lfs diff=lfs merge=lfs -text
51
+ notebook/images/137444513_Livingroom-graphic81/6.png filter=lfs diff=lfs merge=lfs -text
52
+ notebook/images/137444513_Livingroom-graphic81/7.png filter=lfs diff=lfs merge=lfs -text
53
+ notebook/images/137444513_Livingroom-graphic81/8.png filter=lfs diff=lfs merge=lfs -text
54
+ notebook/images/137444513_Livingroom-graphic81/9.png filter=lfs diff=lfs merge=lfs -text
55
+ notebook/images/137444513_Livingroom-graphic81/image.png filter=lfs diff=lfs merge=lfs -text
56
+ notebook/images/2560px-David_-_The_Death_of_Socrates/11.png filter=lfs diff=lfs merge=lfs -text
57
+ notebook/images/2560px-David_-_The_Death_of_Socrates/13.png filter=lfs diff=lfs merge=lfs -text
58
+ notebook/images/2560px-David_-_The_Death_of_Socrates/14.png filter=lfs diff=lfs merge=lfs -text
59
+ notebook/images/2560px-David_-_The_Death_of_Socrates/15.png filter=lfs diff=lfs merge=lfs -text
60
+ notebook/images/2560px-David_-_The_Death_of_Socrates/3.png filter=lfs diff=lfs merge=lfs -text
61
+ notebook/images/2560px-David_-_The_Death_of_Socrates/4.png filter=lfs diff=lfs merge=lfs -text
62
+ notebook/images/2560px-David_-_The_Death_of_Socrates/6.png filter=lfs diff=lfs merge=lfs -text
63
+ notebook/images/2560px-David_-_The_Death_of_Socrates/7.png filter=lfs diff=lfs merge=lfs -text
64
+ notebook/images/2560px-David_-_The_Death_of_Socrates/9.png filter=lfs diff=lfs merge=lfs -text
65
+ notebook/images/2560px-David_-_The_Death_of_Socrates/image.png filter=lfs diff=lfs merge=lfs -text
66
+ notebook/images/edited_id14_032207032-scenes-traffic-rome-12-12_processed/image.png filter=lfs diff=lfs merge=lfs -text
67
+ notebook/images/edited_id15_shutterstock_1105318669_processed/4.png filter=lfs diff=lfs merge=lfs -text
68
+ notebook/images/edited_id15_shutterstock_1105318669_processed/7.png filter=lfs diff=lfs merge=lfs -text
69
+ notebook/images/edited_id15_shutterstock_1105318669_processed/9.png filter=lfs diff=lfs merge=lfs -text
70
+ notebook/images/edited_id15_shutterstock_1105318669_processed/image.png filter=lfs diff=lfs merge=lfs -text
71
+ notebook/images/edited_id32_307354001_H264HD1080_processed/22.png filter=lfs diff=lfs merge=lfs -text
72
+ notebook/images/edited_id32_307354001_H264HD1080_processed/image.png filter=lfs diff=lfs merge=lfs -text
73
+ notebook/images/edited_id37_203733676_Programmers_Computer_Monitors_H264HD1080_processed/image.png filter=lfs diff=lfs merge=lfs -text
74
+ notebook/images/human_object/image.png filter=lfs diff=lfs merge=lfs -text
75
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/0.png filter=lfs diff=lfs merge=lfs -text
76
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/1.png filter=lfs diff=lfs merge=lfs -text
77
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/10.png filter=lfs diff=lfs merge=lfs -text
78
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/11.png filter=lfs diff=lfs merge=lfs -text
79
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/12.png filter=lfs diff=lfs merge=lfs -text
80
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/13.png filter=lfs diff=lfs merge=lfs -text
81
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/14.png filter=lfs diff=lfs merge=lfs -text
82
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/15.png filter=lfs diff=lfs merge=lfs -text
83
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/16.png filter=lfs diff=lfs merge=lfs -text
84
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/17.png filter=lfs diff=lfs merge=lfs -text
85
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/18.png filter=lfs diff=lfs merge=lfs -text
86
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/19.png filter=lfs diff=lfs merge=lfs -text
87
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/2.png filter=lfs diff=lfs merge=lfs -text
88
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/3.png filter=lfs diff=lfs merge=lfs -text
89
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/4.png filter=lfs diff=lfs merge=lfs -text
90
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/5.png filter=lfs diff=lfs merge=lfs -text
91
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/6.png filter=lfs diff=lfs merge=lfs -text
92
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/7.png filter=lfs diff=lfs merge=lfs -text
93
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/8.png filter=lfs diff=lfs merge=lfs -text
94
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/9.png filter=lfs diff=lfs merge=lfs -text
95
+ notebook/images/id3_shutterstock_WildAnimal_Waterhole_2010559391/image.png filter=lfs diff=lfs merge=lfs -text
96
+ notebook/images/kid_box/0.png filter=lfs diff=lfs merge=lfs -text
97
+ notebook/images/kid_box/1.png filter=lfs diff=lfs merge=lfs -text
98
+ notebook/images/kid_box/10.png filter=lfs diff=lfs merge=lfs -text
99
+ notebook/images/kid_box/11.png filter=lfs diff=lfs merge=lfs -text
100
+ notebook/images/kid_box/12.png filter=lfs diff=lfs merge=lfs -text
101
+ notebook/images/kid_box/13.png filter=lfs diff=lfs merge=lfs -text
102
+ notebook/images/kid_box/14.png filter=lfs diff=lfs merge=lfs -text
103
+ notebook/images/kid_box/15.png filter=lfs diff=lfs merge=lfs -text
104
+ notebook/images/kid_box/16.png filter=lfs diff=lfs merge=lfs -text
105
+ notebook/images/kid_box/17.png filter=lfs diff=lfs merge=lfs -text
106
+ notebook/images/kid_box/2.png filter=lfs diff=lfs merge=lfs -text
107
+ notebook/images/kid_box/3.png filter=lfs diff=lfs merge=lfs -text
108
+ notebook/images/kid_box/4.png filter=lfs diff=lfs merge=lfs -text
109
+ notebook/images/kid_box/6.png filter=lfs diff=lfs merge=lfs -text
110
+ notebook/images/kid_box/7.png filter=lfs diff=lfs merge=lfs -text
111
+ notebook/images/kid_box/8.png filter=lfs diff=lfs merge=lfs -text
112
+ notebook/images/kid_box/9.png filter=lfs diff=lfs merge=lfs -text
113
+ notebook/images/kid_box/image.png filter=lfs diff=lfs merge=lfs -text
114
+ notebook/images/pond5_080554841-two-professional-fencers-show-/0.png filter=lfs diff=lfs merge=lfs -text
115
+ notebook/images/pond5_080554841-two-professional-fencers-show-/1.png filter=lfs diff=lfs merge=lfs -text
116
+ notebook/images/pond5_080554841-two-professional-fencers-show-/2.png filter=lfs diff=lfs merge=lfs -text
117
+ notebook/images/pond5_080554841-two-professional-fencers-show-/3.png filter=lfs diff=lfs merge=lfs -text
118
+ notebook/images/pond5_080554841-two-professional-fencers-show-/4.png filter=lfs diff=lfs merge=lfs -text
119
+ notebook/images/pond5_080554841-two-professional-fencers-show-/5.png filter=lfs diff=lfs merge=lfs -text
120
+ notebook/images/pond5_080554841-two-professional-fencers-show-/image.png filter=lfs diff=lfs merge=lfs -text
121
+ notebook/images/shutterstock_1243680295/0.png filter=lfs diff=lfs merge=lfs -text
122
+ notebook/images/shutterstock_1243680295/1.png filter=lfs diff=lfs merge=lfs -text
123
+ notebook/images/shutterstock_1243680295/2.png filter=lfs diff=lfs merge=lfs -text
124
+ notebook/images/shutterstock_1243680295/3.png filter=lfs diff=lfs merge=lfs -text
125
+ notebook/images/shutterstock_1243680295/4.png filter=lfs diff=lfs merge=lfs -text
126
+ notebook/images/shutterstock_1243680295/image.png filter=lfs diff=lfs merge=lfs -text
127
+ notebook/images/shutterstock_1980085646/0.png filter=lfs diff=lfs merge=lfs -text
128
+ notebook/images/shutterstock_1980085646/1.png filter=lfs diff=lfs merge=lfs -text
129
+ notebook/images/shutterstock_1980085646/10.png filter=lfs diff=lfs merge=lfs -text
130
+ notebook/images/shutterstock_1980085646/11.png filter=lfs diff=lfs merge=lfs -text
131
+ notebook/images/shutterstock_1980085646/12.png filter=lfs diff=lfs merge=lfs -text
132
+ notebook/images/shutterstock_1980085646/13.png filter=lfs diff=lfs merge=lfs -text
133
+ notebook/images/shutterstock_1980085646/14.png filter=lfs diff=lfs merge=lfs -text
134
+ notebook/images/shutterstock_1980085646/15.png filter=lfs diff=lfs merge=lfs -text
135
+ notebook/images/shutterstock_1980085646/16.png filter=lfs diff=lfs merge=lfs -text
136
+ notebook/images/shutterstock_1980085646/17.png filter=lfs diff=lfs merge=lfs -text
137
+ notebook/images/shutterstock_1980085646/18.png filter=lfs diff=lfs merge=lfs -text
138
+ notebook/images/shutterstock_1980085646/19.png filter=lfs diff=lfs merge=lfs -text
139
+ notebook/images/shutterstock_1980085646/2.png filter=lfs diff=lfs merge=lfs -text
140
+ notebook/images/shutterstock_1980085646/20.png filter=lfs diff=lfs merge=lfs -text
141
+ notebook/images/shutterstock_1980085646/21.png filter=lfs diff=lfs merge=lfs -text
142
+ notebook/images/shutterstock_1980085646/22.png filter=lfs diff=lfs merge=lfs -text
143
+ notebook/images/shutterstock_1980085646/23.png filter=lfs diff=lfs merge=lfs -text
144
+ notebook/images/shutterstock_1980085646/24.png filter=lfs diff=lfs merge=lfs -text
145
+ notebook/images/shutterstock_1980085646/25.png filter=lfs diff=lfs merge=lfs -text
146
+ notebook/images/shutterstock_1980085646/3.png filter=lfs diff=lfs merge=lfs -text
147
+ notebook/images/shutterstock_1980085646/4.png filter=lfs diff=lfs merge=lfs -text
148
+ notebook/images/shutterstock_1980085646/5.png filter=lfs diff=lfs merge=lfs -text
149
+ notebook/images/shutterstock_1980085646/6.png filter=lfs diff=lfs merge=lfs -text
150
+ notebook/images/shutterstock_1980085646/7.png filter=lfs diff=lfs merge=lfs -text
151
+ notebook/images/shutterstock_1980085646/8.png filter=lfs diff=lfs merge=lfs -text
152
+ notebook/images/shutterstock_1980085646/9.png filter=lfs diff=lfs merge=lfs -text
153
+ notebook/images/shutterstock_1980085646/image.png filter=lfs diff=lfs merge=lfs -text
154
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/0.png filter=lfs diff=lfs merge=lfs -text
155
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/1.png filter=lfs diff=lfs merge=lfs -text
156
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/10.png filter=lfs diff=lfs merge=lfs -text
157
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/11.png filter=lfs diff=lfs merge=lfs -text
158
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/12.png filter=lfs diff=lfs merge=lfs -text
159
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/13.png filter=lfs diff=lfs merge=lfs -text
160
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/14.png filter=lfs diff=lfs merge=lfs -text
161
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/15.png filter=lfs diff=lfs merge=lfs -text
162
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/16.png filter=lfs diff=lfs merge=lfs -text
163
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/17.png filter=lfs diff=lfs merge=lfs -text
164
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/18.png filter=lfs diff=lfs merge=lfs -text
165
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/19.png filter=lfs diff=lfs merge=lfs -text
166
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/2.png filter=lfs diff=lfs merge=lfs -text
167
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/20.png filter=lfs diff=lfs merge=lfs -text
168
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/21.png filter=lfs diff=lfs merge=lfs -text
169
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/22.png filter=lfs diff=lfs merge=lfs -text
170
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/23.png filter=lfs diff=lfs merge=lfs -text
171
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/24.png filter=lfs diff=lfs merge=lfs -text
172
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/25.png filter=lfs diff=lfs merge=lfs -text
173
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/26.png filter=lfs diff=lfs merge=lfs -text
174
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/27.png filter=lfs diff=lfs merge=lfs -text
175
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/28.png filter=lfs diff=lfs merge=lfs -text
176
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/29.png filter=lfs diff=lfs merge=lfs -text
177
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/3.png filter=lfs diff=lfs merge=lfs -text
178
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/30.png filter=lfs diff=lfs merge=lfs -text
179
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/31.png filter=lfs diff=lfs merge=lfs -text
180
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/32.png filter=lfs diff=lfs merge=lfs -text
181
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/33.png filter=lfs diff=lfs merge=lfs -text
182
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/34.png filter=lfs diff=lfs merge=lfs -text
183
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/35.png filter=lfs diff=lfs merge=lfs -text
184
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/36.png filter=lfs diff=lfs merge=lfs -text
185
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/37.png filter=lfs diff=lfs merge=lfs -text
186
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/38.png filter=lfs diff=lfs merge=lfs -text
187
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/39.png filter=lfs diff=lfs merge=lfs -text
188
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/4.png filter=lfs diff=lfs merge=lfs -text
189
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/40.png filter=lfs diff=lfs merge=lfs -text
190
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/41.png filter=lfs diff=lfs merge=lfs -text
191
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/42.png filter=lfs diff=lfs merge=lfs -text
192
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/43.png filter=lfs diff=lfs merge=lfs -text
193
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/44.png filter=lfs diff=lfs merge=lfs -text
194
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/45.png filter=lfs diff=lfs merge=lfs -text
195
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/5.png filter=lfs diff=lfs merge=lfs -text
196
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/6.png filter=lfs diff=lfs merge=lfs -text
197
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/7.png filter=lfs diff=lfs merge=lfs -text
198
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/8.png filter=lfs diff=lfs merge=lfs -text
199
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/9.png filter=lfs diff=lfs merge=lfs -text
200
+ notebook/images/shutterstock_modern_colorful_Interior_2620125197/image.png filter=lfs diff=lfs merge=lfs -text
201
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/0.png filter=lfs diff=lfs merge=lfs -text
202
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/1.png filter=lfs diff=lfs merge=lfs -text
203
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/10.png filter=lfs diff=lfs merge=lfs -text
204
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/11.png filter=lfs diff=lfs merge=lfs -text
205
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/12.png filter=lfs diff=lfs merge=lfs -text
206
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/13.png filter=lfs diff=lfs merge=lfs -text
207
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/14.png filter=lfs diff=lfs merge=lfs -text
208
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/15.png filter=lfs diff=lfs merge=lfs -text
209
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/16.png filter=lfs diff=lfs merge=lfs -text
210
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/17.png filter=lfs diff=lfs merge=lfs -text
211
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/18.png filter=lfs diff=lfs merge=lfs -text
212
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/19.png filter=lfs diff=lfs merge=lfs -text
213
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/2.png filter=lfs diff=lfs merge=lfs -text
214
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/20.png filter=lfs diff=lfs merge=lfs -text
215
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/21.png filter=lfs diff=lfs merge=lfs -text
216
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/22.png filter=lfs diff=lfs merge=lfs -text
217
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/23.png filter=lfs diff=lfs merge=lfs -text
218
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/24.png filter=lfs diff=lfs merge=lfs -text
219
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/25.png filter=lfs diff=lfs merge=lfs -text
220
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/26.png filter=lfs diff=lfs merge=lfs -text
221
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/3.png filter=lfs diff=lfs merge=lfs -text
222
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/4.png filter=lfs diff=lfs merge=lfs -text
223
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/5.png filter=lfs diff=lfs merge=lfs -text
224
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/6.png filter=lfs diff=lfs merge=lfs -text
225
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/7.png filter=lfs diff=lfs merge=lfs -text
226
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/8.png filter=lfs diff=lfs merge=lfs -text
227
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/9.png filter=lfs diff=lfs merge=lfs -text
228
+ notebook/images/shutterstock_stylish_kidsroom_1640806567/image.png filter=lfs diff=lfs merge=lfs -text
229
+ notebook/meshes/human_object/3DB_results/human.ply filter=lfs diff=lfs merge=lfs -text
230
+ notebook/meshes/human_object/3Dfy_results/0.glb filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ __pycache__
CODE_OF_CONDUCT.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to make participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies within all project spaces, and it also applies when
49
+ an individual is representing the project or its community in public spaces.
50
+ Examples of representing a project or community include using an official
51
+ project e-mail address, posting via an official social media account, or acting
52
+ as an appointed representative at an online or offline event. Representation of
53
+ a project may be further defined and clarified by project maintainers.
54
+
55
+ This Code of Conduct also applies outside the project spaces when there is a
56
+ reasonable belief that an individual's behavior may have a negative impact on
57
+ the project or its community.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported by contacting the project team at <[email protected]>. All
63
+ complaints will be reviewed and investigated and will result in a response that
64
+ is deemed necessary and appropriate to the circumstances. The project team is
65
+ obligated to maintain confidentiality with regard to the reporter of an incident.
66
+ Further details of specific enforcement policies may be posted separately.
67
+
68
+ Project maintainers who do not follow or enforce the Code of Conduct in good
69
+ faith may face temporary or permanent repercussions as determined by other
70
+ members of the project's leadership.
71
+
72
+ ## Attribution
73
+
74
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
76
+
77
+ [homepage]: https://www.contributor-covenant.org
78
+
79
+ For answers to common questions about this code of conduct, see
80
+ https://www.contributor-covenant.org/faq
CONTRIBUTING.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to sam-3d-objects
2
+ We want to make contributing to this project as easy and transparent as
3
+ possible.
4
+
5
+ ## Our Development Process
6
+ ... (in particular how this is synced with internal changes to the project)
7
+
8
+ ## Pull Requests
9
+ We actively welcome your pull requests.
10
+
11
+ 1. Fork the repo and create your branch from `main`.
12
+ 2. If you've added code that should be tested, add tests.
13
+ 3. If you've changed APIs, update the documentation.
14
+ 4. Ensure the test suite passes.
15
+ 5. Make sure your code lints.
16
+ 6. If you haven't already, complete the Contributor License Agreement ("CLA").
17
+
18
+ ## Contributor License Agreement ("CLA")
19
+ In order to accept your pull request, we need you to submit a CLA. You only need
20
+ to do this once to work on any of Meta's open source projects.
21
+
22
+ Complete your CLA here: <https://code.facebook.com/cla>
23
+
24
+ ## Issues
25
+ We use GitHub issues to track public bugs. Please ensure your description is
26
+ clear and has sufficient instructions to be able to reproduce the issue.
27
+
28
+ Meta has a [bounty program](https://bugbounty.meta.com/) for the safe
29
+ disclosure of security bugs. In those cases, please go through the process
30
+ outlined on that page and do not file a public issue.
31
+
32
+ ## Coding Style
33
+ * 2 spaces for indentation rather than tabs
34
+ * 80 character line length
35
+ * ...
36
+
37
+ ## License
38
+ By contributing to sam-3d-objects, you agree that your contributions will be licensed
39
+ under the LICENSE file in the root directory of this source tree.
LICENSE ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SAM License
2
+ Last Updated: November 19, 2025
3
+
4
+ “Agreement” means the terms and conditions for use, reproduction, distribution and modification of the SAM Materials set forth herein.
5
+
6
+ “SAM Materials” means, collectively, Documentation and the models, software and algorithms, including machine-learning model code, trained model weights, inference-enabling code, training-enabling code, fine-tuning enabling code, and other elements of the foregoing distributed by Meta and made available under this Agreement.
7
+
8
+ “Documentation” means the specifications, manuals and documentation accompanying
9
+ SAM Materials distributed by Meta.
10
+
11
+ “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.
12
+
13
+ “Meta” or “we” means Meta Platforms Ireland Limited (if you are located in or, if you are an entity, your principal place of business is in the EEA or Switzerland) or Meta Platforms, Inc. (if you are located outside of the EEA or Switzerland).
14
+
15
+ “Sanctions” means any economic or trade sanctions or restrictions administered or enforced by the United States (including the Office of Foreign Assets Control of the U.S. Department of the Treasury (“OFAC”), the U.S. Department of State and the U.S. Department of Commerce), the United Nations, the European Union, or the United Kingdom.
16
+
17
+ “Trade Controls” means any of the following: Sanctions and applicable export and import controls.
18
+
19
+ By using or distributing any portion or element of the SAM Materials, you agree to be bound by this Agreement.
20
+
21
+ 1. License Rights and Redistribution.
22
+
23
+ a. Grant of Rights. You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Meta’s intellectual property or other rights owned by Meta embodied in the SAM Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the SAM Materials.
24
+
25
+ i. Grant of Patent License. Subject to the terms and conditions of this License, you are granted a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by Meta that are necessarily infringed alone or by combination of their contribution(s) with the SAM 3 Materials. If you institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the SAM 3 Materials incorporated within the work constitutes direct or contributory patent infringement, then any patent licenses granted to you under this License for that work shall terminate as of the date such litigation is filed.
26
+
27
+ b. Redistribution and Use.
28
+
29
+ i. Distribution of SAM Materials, and any derivative works thereof, are subject to the terms of this Agreement. If you distribute or make the SAM Materials, or any derivative works thereof, available to a third party, you may only do so under the terms of this Agreement and you shall provide a copy of this Agreement with any such SAM Materials.
30
+
31
+ ii. If you submit for publication the results of research you perform on, using, or otherwise in connection with SAM Materials, you must acknowledge the use of SAM Materials in your publication.
32
+
33
+ iii. Your use of the SAM Materials must comply with applicable laws and regulations, including Trade Control Laws and applicable privacy and data protection laws.
34
+ iv. Your use of the SAM Materials will not involve or encourage others to reverse engineer, decompile or discover the underlying components of the SAM Materials.
35
+ v. You are not the target of Trade Controls and your use of SAM Materials must comply with Trade Controls. You agree not to use, or permit others to use, SAM Materials for any activities subject to the International Traffic in Arms Regulations (ITAR) or end uses prohibited by Trade Controls, including those related to military or warfare purposes, nuclear industries or applications, espionage, or the development or use of guns or illegal weapons.
36
+ 2. User Support. Your use of the SAM Materials is done at your own discretion; Meta does not process any information nor provide any service in relation to such use. Meta is under no obligation to provide any support services for the SAM Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
37
+
38
+ 3. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE SAM MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OF ANY KIND, AND META DISCLAIMS ALL WARRANTIES OF ANY KIND, BOTH EXPRESS AND 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 SAM MATERIALS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE SAM MATERIALS AND ANY OUTPUT AND RESULTS.
39
+
40
+ 4. Limitation of Liability. IN NO EVENT WILL META 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 OR INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF META OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
41
+
42
+ 5. Intellectual Property.
43
+
44
+ a. Subject to Meta’s ownership of SAM Materials and derivatives made by or for Meta, with respect to any derivative works and modifications of the SAM Materials that are made by you, as between you and Meta, you are and will be the owner of such derivative works and modifications.
45
+
46
+ b. If you institute litigation or other proceedings against Meta or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the SAM Materials, 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 Meta from and against any claim by any third party arising out of or related to your use or distribution of the SAM Materials.
47
+
48
+ 6. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the SAM Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Meta 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 the SAM Materials. Sections 3, 4 and 7 shall survive the termination of this Agreement.
49
+
50
+ 7. Governing Law and Jurisdiction. This Agreement will be governed and construed under the laws of the State of California without regard to choice of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. The courts of California shall have exclusive jurisdiction of any dispute arising out of this Agreement.
51
+
52
+ 8. Modifications and Amendments. Meta may modify this Agreement from time to time; provided that they are similar in spirit to the current version of the Agreement, but may differ in detail to address new problems or concerns. All such changes will be effective immediately. Your continued use of the SAM Materials after any modification to this Agreement constitutes your agreement to such modification. Except as provided in this Agreement, no modification or addition to any provision of this Agreement will be binding unless it is in writing and signed by an authorized representative of both you and Meta.
checkpoints/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
demo.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+
3
+ # import inference code
4
+ sys.path.append("notebook")
5
+ from inference import Inference, load_image, load_single_mask
6
+
7
+ # load model
8
+ tag = "hf"
9
+ config_path = f"checkpoints/{tag}/pipeline.yaml"
10
+ inference = Inference(config_path, compile=False)
11
+
12
+ # load image (RGBA only, mask is embedded in the alpha channel)
13
+ image = load_image("notebook/images/shutterstock_stylish_kidsroom_1640806567/image.png")
14
+ mask = load_single_mask("notebook/images/shutterstock_stylish_kidsroom_1640806567", index=14)
15
+
16
+ # run model
17
+ output = inference(image, mask, seed=42)
18
+
19
+ # export gaussian splat
20
+ output["gs"].save_ply(f"splat.ply")
21
+ print("Your reconstruction has been saved to splat.ply")
doc/arch.png ADDED

Git LFS Details

  • SHA256: 59468933f3e24dfe37d286db290d8af1c5d027cd3f105f9f05049ec83a42152f
  • Pointer size: 131 Bytes
  • Size of remote file: 276 kB
doc/intro.png ADDED

Git LFS Details

  • SHA256: f0dc7f15c24357a15a988623ed22b366393af7205b1ca6b5d3e15a84f7bfbfa3
  • Pointer size: 131 Bytes
  • Size of remote file: 783 kB
doc/kidsroom_transparent.gif ADDED

Git LFS Details

  • SHA256: 9b40aa1bf732c91c87dc68ebbe29be67117822dba29f74896bacfbf5e453a678
  • Pointer size: 132 Bytes
  • Size of remote file: 7.77 MB
doc/setup.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Setup
2
+
3
+ ## Prerequisites
4
+
5
+ * A linux 64-bits architecture (i.e. `linux-64` platform in `mamba info`).
6
+ * A NVIDIA GPU with at least 32 Gb of VRAM.
7
+
8
+ ## 1. Setup Python Environment
9
+
10
+ The following will install the default environment. If you use `conda` instead of `mamba`, replace its name in the first two lines. Note that you may have to build the environment on a compute node with GPU (e.g., you may get a `RuntimeError: Not compiled with GPU support` error when running certain parts of the code that use Pytorch3D).
11
+
12
+ ```bash
13
+ # create sam3d-objects environment
14
+ mamba env create -f environments/default.yml
15
+ mamba activate sam3d-objects
16
+
17
+ # for pytorch/cuda dependencies
18
+ export PIP_EXTRA_INDEX_URL="https://pypi.ngc.nvidia.com https://download.pytorch.org/whl/cu121"
19
+
20
+ # install sam3d-objects and core dependencies
21
+ pip install -e '.[dev]'
22
+ pip install -e '.[p3d]' # pytorch3d dependency on pytorch is broken, this 2-step approach solves it
23
+
24
+ # for inference
25
+ export PIP_FIND_LINKS="https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu121.html"
26
+ pip install -e '.[inference]'
27
+
28
+ # patch things that aren't yet in official pip packages
29
+ ./patching/hydra # https://github.com/facebookresearch/hydra/pull/2863
30
+ ```
31
+
32
+ ## 2. Getting Checkpoints
33
+
34
+ ### From HuggingFace
35
+
36
+ ⚠️ Before using SAM 3D Objects, please request access to the checkpoints on the SAM 3D Objects
37
+ Hugging Face [repo](https://huggingface.co/facebook/sam-3d-objects). Once accepted, you
38
+ need to be authenticated to download the checkpoints. You can do this by running
39
+ the following [steps](https://huggingface.co/docs/huggingface_hub/en/quick-start#authentication)
40
+ (e.g. `hf auth login` after generating an access token).
41
+
42
+ ⚠️ SAM 3D Objects is available via HuggingFace globally, **except** in comprehensively sanctioned jurisdictions.
43
+ Sanctioned jurisdiction will result in requests being **rejected**.
44
+
45
+ ```bash
46
+ pip install 'huggingface-hub[cli]<1.0'
47
+
48
+ TAG=hf
49
+ hf download \
50
+ --repo-type model \
51
+ --local-dir checkpoints/${TAG}-download \
52
+ --max-workers 1 \
53
+ facebook/sam-3d-objects
54
+ mv checkpoints/${TAG}-download/checkpoints checkpoints/${TAG}
55
+ rm -rf checkpoints/${TAG}-download
56
+ ```
57
+
58
+
environments/default.yml ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: sam3d-objects
2
+ channels:
3
+ - conda-forge
4
+ dependencies:
5
+ - _libgcc_mutex=0.1=conda_forge
6
+ - _openmp_mutex=4.5=2_gnu
7
+ - alsa-lib=1.2.13=hb9d3cd8_0
8
+ - attr=2.5.1=h166bdaf_1
9
+ - binutils=2.43=h4852527_4
10
+ - binutils_impl_linux-64=2.43=h4bf12b8_4
11
+ - binutils_linux-64=2.43=h4852527_4
12
+ - bzip2=1.0.8=h4bc722e_7
13
+ - c-compiler=1.7.0=hd590300_1
14
+ - ca-certificates=2025.1.31=hbcca054_0
15
+ - cairo=1.18.0=h3faef2a_0
16
+ - cuda-cccl=12.1.109=ha770c72_0
17
+ - cuda-cccl-impl=2.0.1=ha770c72_1
18
+ - cuda-cccl_linux-64=12.1.109=ha770c72_0
19
+ - cuda-command-line-tools=12.1.1=ha770c72_0
20
+ - cuda-compiler=12.1.1=hbad6d8a_0
21
+ - cuda-cudart=12.1.105=hd3aeb46_0
22
+ - cuda-cudart-dev=12.1.105=hd3aeb46_0
23
+ - cuda-cudart-dev_linux-64=12.1.105=h59595ed_0
24
+ - cuda-cudart-static=12.1.105=hd3aeb46_0
25
+ - cuda-cudart-static_linux-64=12.1.105=h59595ed_0
26
+ - cuda-cudart_linux-64=12.1.105=h59595ed_0
27
+ - cuda-cuobjdump=12.1.111=h59595ed_0
28
+ - cuda-cupti=12.1.105=h59595ed_0
29
+ - cuda-cupti-dev=12.1.105=h59595ed_0
30
+ - cuda-cuxxfilt=12.1.105=h59595ed_0
31
+ - cuda-driver-dev=12.1.105=hd3aeb46_0
32
+ - cuda-driver-dev_linux-64=12.1.105=h59595ed_0
33
+ - cuda-gdb=12.1.105=hd47b8d6_0
34
+ - cuda-libraries=12.1.1=ha770c72_0
35
+ - cuda-libraries-dev=12.1.1=ha770c72_0
36
+ - cuda-nsight=12.1.105=ha770c72_0
37
+ - cuda-nvcc=12.1.105=hcdd1206_1
38
+ - cuda-nvcc-dev_linux-64=12.1.105=ha770c72_0
39
+ - cuda-nvcc-impl=12.1.105=hd3aeb46_0
40
+ - cuda-nvcc-tools=12.1.105=hd3aeb46_0
41
+ - cuda-nvcc_linux-64=12.1.105=h8a487aa_1
42
+ - cuda-nvdisasm=12.1.105=h59595ed_0
43
+ - cuda-nvml-dev=12.1.105=h59595ed_0
44
+ - cuda-nvprof=12.1.105=h59595ed_0
45
+ - cuda-nvprune=12.1.105=h59595ed_0
46
+ - cuda-nvrtc=12.1.105=hd3aeb46_0
47
+ - cuda-nvrtc-dev=12.1.105=hd3aeb46_0
48
+ - cuda-nvtx=12.1.105=h59595ed_0
49
+ - cuda-nvvp=12.1.105=h59595ed_0
50
+ - cuda-opencl=12.1.105=h59595ed_0
51
+ - cuda-opencl-dev=12.1.105=h59595ed_0
52
+ - cuda-profiler-api=12.1.105=ha770c72_0
53
+ - cuda-sanitizer-api=12.1.105=h59595ed_0
54
+ - cuda-toolkit=12.1.1=ha804496_0
55
+ - cuda-tools=12.1.1=ha770c72_0
56
+ - cuda-version=12.1=h1d6eff3_3
57
+ - cuda-visual-tools=12.1.1=ha770c72_0
58
+ - cxx-compiler=1.7.0=h00ab1b0_1
59
+ - dbus=1.13.6=h5008d03_3
60
+ - expat=2.6.4=h5888daf_0
61
+ - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
62
+ - font-ttf-inconsolata=3.000=h77eed37_0
63
+ - font-ttf-source-code-pro=2.038=h77eed37_0
64
+ - font-ttf-ubuntu=0.83=h77eed37_3
65
+ - fontconfig=2.15.0=h7e30c49_1
66
+ - fonts-conda-ecosystem=1=0
67
+ - fonts-conda-forge=1=0
68
+ - freetype=2.13.3=h48d6fc4_0
69
+ - gcc=12.4.0=h236703b_2
70
+ - gcc_impl_linux-64=12.4.0=h26ba24d_2
71
+ - gcc_linux-64=12.4.0=h6b7512a_8
72
+ - gds-tools=1.6.1.9=hd3aeb46_0
73
+ - gettext=0.23.1=h5888daf_0
74
+ - gettext-tools=0.23.1=h5888daf_0
75
+ - glib=2.82.2=h07242d1_1
76
+ - glib-tools=2.82.2=h4833e2c_1
77
+ - gmp=6.3.0=hac33072_2
78
+ - graphite2=1.3.13=h59595ed_1003
79
+ - gst-plugins-base=1.24.4=h9ad1361_0
80
+ - gstreamer=1.24.4=haf2f30d_0
81
+ - gxx=12.4.0=h236703b_2
82
+ - gxx_impl_linux-64=12.4.0=h3ff227c_2
83
+ - gxx_linux-64=12.4.0=h8489865_8
84
+ - harfbuzz=8.5.0=hfac3d4d_0
85
+ - icu=73.2=h59595ed_0
86
+ - kernel-headers_linux-64=3.10.0=he073ed8_18
87
+ - keyutils=1.6.1=h166bdaf_0
88
+ - krb5=1.21.3=h659f571_0
89
+ - lame=3.100=h166bdaf_1003
90
+ - ld_impl_linux-64=2.43=h712a8e2_4
91
+ - libasprintf=0.23.1=h8e693c7_0
92
+ - libasprintf-devel=0.23.1=h8e693c7_0
93
+ - libcap=2.75=h39aace5_0
94
+ - libclang-cpp15=15.0.7=default_h127d8a8_5
95
+ - libclang13=19.1.2=default_h9c6a7e4_1
96
+ - libcublas=12.1.3.1=hd3aeb46_0
97
+ - libcublas-dev=12.1.3.1=hd3aeb46_0
98
+ - libcufft=11.0.2.54=hd3aeb46_0
99
+ - libcufft-dev=11.0.2.54=hd3aeb46_0
100
+ - libcufile=1.6.1.9=hd3aeb46_0
101
+ - libcufile-dev=1.6.1.9=hd3aeb46_0
102
+ - libcups=2.3.3=h4637d8d_4
103
+ - libcurand=10.3.2.106=hd3aeb46_0
104
+ - libcurand-dev=10.3.2.106=hd3aeb46_0
105
+ - libcusolver=11.4.5.107=hd3aeb46_0
106
+ - libcusolver-dev=11.4.5.107=hd3aeb46_0
107
+ - libcusparse=12.1.0.106=hd3aeb46_0
108
+ - libcusparse-dev=12.1.0.106=hd3aeb46_0
109
+ - libedit=3.1.20250104=pl5321h7949ede_0
110
+ - libevent=2.1.12=hf998b51_1
111
+ - libexpat=2.6.4=h5888daf_0
112
+ - libffi=3.4.6=h2dba641_0
113
+ - libflac=1.4.3=h59595ed_0
114
+ - libgcc=14.2.0=h767d61c_2
115
+ - libgcc-devel_linux-64=12.4.0=h1762d19_102
116
+ - libgcc-ng=14.2.0=h69a702a_2
117
+ - libgcrypt-lib=1.11.0=hb9d3cd8_2
118
+ - libgettextpo=0.23.1=h5888daf_0
119
+ - libgettextpo-devel=0.23.1=h5888daf_0
120
+ - libglib=2.82.2=h2ff4ddf_1
121
+ - libgomp=14.2.0=h767d61c_2
122
+ - libgpg-error=1.51=hbd13f7d_1
123
+ - libiconv=1.18=h4ce23a2_1
124
+ - libjpeg-turbo=3.0.0=hd590300_1
125
+ - libllvm15=15.0.7=hb3ce162_4
126
+ - libllvm19=19.1.2=ha7bfdaf_0
127
+ - liblzma=5.6.4=hb9d3cd8_0
128
+ - liblzma-devel=5.6.4=hb9d3cd8_0
129
+ - libnpp=12.1.0.40=hd3aeb46_0
130
+ - libnpp-dev=12.1.0.40=hd3aeb46_0
131
+ - libnsl=2.0.1=hd590300_0
132
+ - libnuma=2.0.18=h4ab18f5_2
133
+ - libnvjitlink=12.1.105=hd3aeb46_0
134
+ - libnvjitlink-dev=12.1.105=hd3aeb46_0
135
+ - libnvjpeg=12.2.0.2=h59595ed_0
136
+ - libnvjpeg-dev=12.2.0.2=ha770c72_0
137
+ - libogg=1.3.5=h4ab18f5_0
138
+ - libopus=1.3.1=h7f98852_1
139
+ - libpng=1.6.47=h943b412_0
140
+ - libpq=16.8=h87c4ccc_0
141
+ - libsanitizer=12.4.0=ha732cd4_2
142
+ - libsndfile=1.2.2=hc60ed4a_1
143
+ - libsqlite=3.49.1=hee588c1_2
144
+ - libstdcxx=14.2.0=h8f9b012_2
145
+ - libstdcxx-devel_linux-64=12.4.0=h1762d19_102
146
+ - libstdcxx-ng=14.2.0=h4852527_2
147
+ - libsystemd0=257.4=h4e0b6ca_1
148
+ - libuuid=2.38.1=h0b41bf4_0
149
+ - libvorbis=1.3.7=h9c3ff4c_0
150
+ - libxcb=1.15=h0b41bf4_0
151
+ - libxkbcommon=1.7.0=h662e7e4_0
152
+ - libxkbfile=1.1.0=h166bdaf_1
153
+ - libxml2=2.12.7=h4c95cb1_3
154
+ - libzlib=1.3.1=hb9d3cd8_2
155
+ - lz4-c=1.10.0=h5888daf_1
156
+ - mpg123=1.32.9=hc50e24c_0
157
+ - mysql-common=8.3.0=h70512c7_5
158
+ - mysql-libs=8.3.0=ha479ceb_5
159
+ - ncurses=6.5=h2d0b736_3
160
+ - nsight-compute=2023.1.1.4=h3718151_0
161
+ - nspr=4.36=h5888daf_0
162
+ - nss=3.108=h159eef7_0
163
+ - ocl-icd=2.3.2=hb9d3cd8_2
164
+ - opencl-headers=2024.10.24=h5888daf_0
165
+ - openssl=3.4.1=h7b32b05_0
166
+ - packaging=24.2=pyhd8ed1ab_2
167
+ - pcre2=10.44=hba22ea6_2
168
+ - pip=25.0.1=pyh8b19718_0
169
+ - pixman=0.44.2=h29eaf8c_0
170
+ - pthread-stubs=0.4=hb9d3cd8_1002
171
+ - pulseaudio-client=17.0=hb77b528_0
172
+ - python=3.11.0=he550d4f_1_cpython
173
+ - qt-main=5.15.8=hc9dc06e_21
174
+ - readline=8.2=h8c095d6_2
175
+ - setuptools=75.8.2=pyhff2d567_0
176
+ - sysroot_linux-64=2.17=h0157908_18
177
+ - tk=8.6.13=noxft_h4845f30_101
178
+ - tzdata=2025b=h78e105d_0
179
+ - wayland=1.23.1=h3e06ad9_0
180
+ - wheel=0.45.1=pyhd8ed1ab_1
181
+ - xcb-util=0.4.0=hd590300_1
182
+ - xcb-util-image=0.4.0=h8ee46fc_1
183
+ - xcb-util-keysyms=0.4.0=h8ee46fc_1
184
+ - xcb-util-renderutil=0.3.9=hd590300_1
185
+ - xcb-util-wm=0.4.1=h8ee46fc_1
186
+ - xkeyboard-config=2.42=h4ab18f5_0
187
+ - xorg-compositeproto=0.4.2=hb9d3cd8_1002
188
+ - xorg-damageproto=1.2.1=hb9d3cd8_1003
189
+ - xorg-fixesproto=5.0=hb9d3cd8_1003
190
+ - xorg-inputproto=2.3.2=hb9d3cd8_1003
191
+ - xorg-kbproto=1.0.7=hb9d3cd8_1003
192
+ - xorg-libice=1.1.2=hb9d3cd8_0
193
+ - xorg-libsm=1.2.6=he73a12e_0
194
+ - xorg-libx11=1.8.9=h8ee46fc_0
195
+ - xorg-libxau=1.0.12=hb9d3cd8_0
196
+ - xorg-libxcomposite=0.4.6=h0b41bf4_1
197
+ - xorg-libxdamage=1.1.5=h7f98852_1
198
+ - xorg-libxdmcp=1.1.5=hb9d3cd8_0
199
+ - xorg-libxext=1.3.4=h0b41bf4_2
200
+ - xorg-libxfixes=5.0.3=h7f98852_1004
201
+ - xorg-libxi=1.7.10=h4bc722e_1
202
+ - xorg-libxrandr=1.5.2=h7f98852_1
203
+ - xorg-libxrender=0.9.11=hd590300_0
204
+ - xorg-libxtst=1.2.5=h4bc722e_0
205
+ - xorg-randrproto=1.5.0=hb9d3cd8_1002
206
+ - xorg-recordproto=1.14.2=hb9d3cd8_1003
207
+ - xorg-renderproto=0.11.1=hb9d3cd8_1003
208
+ - xorg-util-macros=1.20.2=hb9d3cd8_0
209
+ - xorg-xextproto=7.3.0=hb9d3cd8_1004
210
+ - xorg-xf86vidmodeproto=2.3.1=hb9d3cd8_1005
211
+ - xorg-xproto=7.0.31=hb9d3cd8_1008
212
+ - xz=5.6.4=hbcc6ac9_0
213
+ - xz-gpl-tools=5.6.4=hbcc6ac9_0
214
+ - xz-tools=5.6.4=hb9d3cd8_0
215
+ - zlib=1.3.1=hb9d3cd8_2
216
+ - zstd=1.5.7=hb8e6e7a_2
notebook/demo_3db_mesh_alignment.ipynb ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "# SAM 3D Body (3DB) Mesh Alignment to SAM 3D Object Scale\n",
8
+ "\n",
9
+ "This notebook processes a single 3DB mesh and aligns it to the SAM 3D Objects scale.\n",
10
+ "\n",
11
+ "**Input Data:**\n",
12
+ "- `images/human_object/image.jpg` - Input image for MoGe\n",
13
+ "- `meshes/human_object/3DB_results/mask_human.png` - Human mask\n",
14
+ "- `meshes/human_object/3DB_results/human.ply` - Single 3DB mesh in OpenGL coordinates\n",
15
+ "- `meshes/human_object/3DB_results/focal_length.json` - 3DB focal length\n",
16
+ "\n",
17
+ "**Output:**\n",
18
+ "- `meshes/human_object/aligned_meshes/human_aligned.ply` - Aligned 3DB mesh in OpenGL coordinates"
19
+ ]
20
+ },
21
+ {
22
+ "cell_type": "code",
23
+ "execution_count": null,
24
+ "metadata": {},
25
+ "outputs": [],
26
+ "source": [
27
+ "import os\n",
28
+ "import torch\n",
29
+ "import matplotlib.pyplot as plt\n",
30
+ "from PIL import Image\n",
31
+ "from mesh_alignment import process_and_save_alignment\n",
32
+ "\n",
33
+ "device = 'cuda' if torch.cuda.is_available() else 'cpu'\n",
34
+ "print(f\"Using device: {device}\")\n",
35
+ "PATH = os.getcwd()\n",
36
+ "print(f\"Current working directory: {PATH}\")\n",
37
+ "\n",
38
+ "# Please inference the SAM 3D Body (3DB) Repo (https://github.com/facebookresearch/sam-3d-body) to get the 3DB Results\n",
39
+ "image_path = f\"{PATH}/images/human_object/image.png\"\n",
40
+ "mask_path = f\"{PATH}/meshes/human_object/3DB_results/mask_human.png\"\n",
41
+ "mesh_path = f\"{PATH}/meshes/human_object/3DB_results/human.ply\"\n",
42
+ "focal_length_json_path = f\"{PATH}/meshes/human_object/3DB_results/focal_length.json\"\n",
43
+ "output_dir = f\"{PATH}/meshes/human_object/aligned_meshes\"\n",
44
+ "os.makedirs(output_dir, exist_ok=True)\n"
45
+ ]
46
+ },
47
+ {
48
+ "cell_type": "markdown",
49
+ "metadata": {},
50
+ "source": [
51
+ "## 1. Load and Display Input Data"
52
+ ]
53
+ },
54
+ {
55
+ "cell_type": "code",
56
+ "execution_count": null,
57
+ "metadata": {},
58
+ "outputs": [],
59
+ "source": [
60
+ "input_image = Image.open(image_path)\n",
61
+ "mask = Image.open(mask_path).convert('L')\n",
62
+ "fig, axes = plt.subplots(1, 2, figsize=(10, 5))\n",
63
+ "axes[0].imshow(input_image)\n",
64
+ "axes[0].set_title('Input Image')\n",
65
+ "axes[0].axis('off')\n",
66
+ "axes[1].imshow(mask, cmap='gray')\n",
67
+ "axes[1].set_title('Mask')\n",
68
+ "axes[1].axis('off')\n",
69
+ "plt.tight_layout()\n",
70
+ "plt.show()"
71
+ ]
72
+ },
73
+ {
74
+ "cell_type": "markdown",
75
+ "metadata": {},
76
+ "source": [
77
+ "## 2. Process and Save Aligned Mesh"
78
+ ]
79
+ },
80
+ {
81
+ "cell_type": "code",
82
+ "execution_count": null,
83
+ "metadata": {},
84
+ "outputs": [],
85
+ "source": [
86
+ "\n",
87
+ "success, output_mesh_path, result = process_and_save_alignment(\n",
88
+ " mesh_path=mesh_path,\n",
89
+ " mask_path=mask_path,\n",
90
+ " image_path=image_path,\n",
91
+ " output_dir=output_dir,\n",
92
+ " device=device,\n",
93
+ " focal_length_json_path=focal_length_json_path\n",
94
+ ")\n",
95
+ "\n",
96
+ "if success:\n",
97
+ " print(f\"Alignment completed successfully! Output: {output_mesh_path}\")\n",
98
+ "else:\n",
99
+ " print(\"Alignment failed!\")"
100
+ ]
101
+ },
102
+ {
103
+ "cell_type": "markdown",
104
+ "metadata": {},
105
+ "source": [
106
+ "## 3. Interactive 3D Visualization\n"
107
+ ]
108
+ },
109
+ {
110
+ "cell_type": "code",
111
+ "execution_count": null,
112
+ "metadata": {},
113
+ "outputs": [],
114
+ "source": [
115
+ "from mesh_alignment import visualize_meshes_interactive\n",
116
+ "\n",
117
+ "aligned_mesh_path = f\"{PATH}/meshes/human_object/aligned_meshes/human_aligned.ply\"\n",
118
+ "dfy_mesh_path = f\"{PATH}/meshes/human_object/3Dfy_results/0.glb\"\n",
119
+ "\n",
120
+ "demo, combined_glb_path = visualize_meshes_interactive(\n",
121
+ " aligned_mesh_path=aligned_mesh_path,\n",
122
+ " dfy_mesh_path=dfy_mesh_path,\n",
123
+ " share=True\n",
124
+ ")"
125
+ ]
126
+ }
127
+ ],
128
+ "metadata": {
129
+ "kernelspec": {
130
+ "display_name": "sam3d_objects-3dfy",
131
+ "language": "python",
132
+ "name": "python3"
133
+ },
134
+ "language_info": {
135
+ "codemirror_mode": {
136
+ "name": "ipython",
137
+ "version": 3
138
+ },
139
+ "file_extension": ".py",
140
+ "mimetype": "text/x-python",
141
+ "name": "python",
142
+ "nbconvert_exporter": "python",
143
+ "pygments_lexer": "ipython3",
144
+ "version": "3.11.0"
145
+ }
146
+ },
147
+ "nbformat": 4,
148
+ "nbformat_minor": 4
149
+ }
notebook/demo_multi_object.ipynb ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "# Copyright (c) Meta Platforms, Inc. and affiliates."
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "markdown",
14
+ "metadata": {},
15
+ "source": [
16
+ "## 1. Imports and Model Loading"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": null,
22
+ "metadata": {},
23
+ "outputs": [],
24
+ "source": [
25
+ "import os\n",
26
+ "import uuid\n",
27
+ "import imageio\n",
28
+ "import numpy as np\n",
29
+ "from IPython.display import Image as ImageDisplay\n",
30
+ "\n",
31
+ "from inference import Inference, ready_gaussian_for_video_rendering, load_image, load_masks, display_image, make_scene, render_video, interactive_visualizer"
32
+ ]
33
+ },
34
+ {
35
+ "cell_type": "code",
36
+ "execution_count": null,
37
+ "metadata": {},
38
+ "outputs": [],
39
+ "source": [
40
+ "PATH = os.getcwd()\n",
41
+ "TAG = \"hf\"\n",
42
+ "config_path = f\"{PATH}/../checkpoints/{TAG}/pipeline.yaml\"\n",
43
+ "inference = Inference(config_path, compile=False)"
44
+ ]
45
+ },
46
+ {
47
+ "cell_type": "markdown",
48
+ "metadata": {},
49
+ "source": [
50
+ "## 2. Load input image to lift to 3D (multiple objects)"
51
+ ]
52
+ },
53
+ {
54
+ "cell_type": "code",
55
+ "execution_count": null,
56
+ "metadata": {},
57
+ "outputs": [],
58
+ "source": [
59
+ "IMAGE_PATH = f\"{PATH}/images/shutterstock_stylish_kidsroom_1640806567/image.png\"\n",
60
+ "IMAGE_NAME = os.path.basename(os.path.dirname(IMAGE_PATH))\n",
61
+ "\n",
62
+ "image = load_image(IMAGE_PATH)\n",
63
+ "masks = load_masks(os.path.dirname(IMAGE_PATH), extension=\".png\")\n",
64
+ "display_image(image, masks)"
65
+ ]
66
+ },
67
+ {
68
+ "cell_type": "markdown",
69
+ "metadata": {},
70
+ "source": [
71
+ "## 3. Generate Gaussian Splats"
72
+ ]
73
+ },
74
+ {
75
+ "cell_type": "code",
76
+ "execution_count": null,
77
+ "metadata": {},
78
+ "outputs": [],
79
+ "source": [
80
+ "outputs = [inference(image, mask, seed=42) for mask in masks]"
81
+ ]
82
+ },
83
+ {
84
+ "cell_type": "markdown",
85
+ "metadata": {},
86
+ "source": [
87
+ "## 4. Visualize Gaussian Splat of the Scene\n",
88
+ "### a. Animated Gif"
89
+ ]
90
+ },
91
+ {
92
+ "cell_type": "code",
93
+ "execution_count": null,
94
+ "metadata": {},
95
+ "outputs": [],
96
+ "source": [
97
+ "scene_gs = make_scene(*outputs)\n",
98
+ "scene_gs = ready_gaussian_for_video_rendering(scene_gs)\n",
99
+ "\n",
100
+ "# export gaussian splatting (as point cloud)\n",
101
+ "scene_gs.save_ply(f\"{PATH}/gaussians/multi/{IMAGE_NAME}.ply\")\n",
102
+ "\n",
103
+ "video = render_video(\n",
104
+ " scene_gs,\n",
105
+ " r=1,\n",
106
+ " fov=60,\n",
107
+ " resolution=512,\n",
108
+ ")[\"color\"]\n",
109
+ "\n",
110
+ "# save video as gif\n",
111
+ "imageio.mimsave(\n",
112
+ " os.path.join(f\"{PATH}/gaussians/multi/{IMAGE_NAME}.gif\"),\n",
113
+ " video,\n",
114
+ " format=\"GIF\",\n",
115
+ " duration=1000 / 30, # default assuming 30fps from the input MP4\n",
116
+ " loop=0, # 0 means loop indefinitely\n",
117
+ ")\n",
118
+ "\n",
119
+ "# notebook display\n",
120
+ "ImageDisplay(url=f\"gaussians/multi/{IMAGE_NAME}.gif?cache_invalidator={uuid.uuid4()}\",)"
121
+ ]
122
+ },
123
+ {
124
+ "cell_type": "markdown",
125
+ "metadata": {},
126
+ "source": [
127
+ "### b. Interactive Visualizer"
128
+ ]
129
+ },
130
+ {
131
+ "cell_type": "code",
132
+ "execution_count": null,
133
+ "metadata": {},
134
+ "outputs": [],
135
+ "source": [
136
+ "# might take a while to load (black screen)\n",
137
+ "interactive_visualizer(f\"{PATH}/gaussians/multi/{IMAGE_NAME}.ply\")"
138
+ ]
139
+ }
140
+ ],
141
+ "metadata": {
142
+ "kernelspec": {
143
+ "display_name": "sam3d-objects",
144
+ "language": "python",
145
+ "name": "python3"
146
+ },
147
+ "language_info": {
148
+ "codemirror_mode": {
149
+ "name": "ipython",
150
+ "version": 3
151
+ },
152
+ "file_extension": ".py",
153
+ "mimetype": "text/x-python",
154
+ "name": "python",
155
+ "nbconvert_exporter": "python",
156
+ "pygments_lexer": "ipython3",
157
+ "version": "3.11.0"
158
+ }
159
+ },
160
+ "nbformat": 4,
161
+ "nbformat_minor": 2
162
+ }
notebook/demo_single_object.ipynb ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": null,
6
+ "metadata": {},
7
+ "outputs": [],
8
+ "source": [
9
+ "# Copyright (c) Meta Platforms, Inc. and affiliates."
10
+ ]
11
+ },
12
+ {
13
+ "cell_type": "markdown",
14
+ "metadata": {},
15
+ "source": [
16
+ "## 1. Imports and Model Loading"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": null,
22
+ "metadata": {},
23
+ "outputs": [],
24
+ "source": [
25
+ "import os\n",
26
+ "import imageio\n",
27
+ "import uuid\n",
28
+ "from IPython.display import Image as ImageDisplay\n",
29
+ "from inference import Inference, ready_gaussian_for_video_rendering, render_video, load_image, load_single_mask, display_image, make_scene, interactive_visualizer"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": null,
35
+ "metadata": {},
36
+ "outputs": [],
37
+ "source": [
38
+ "PATH = os.getcwd()\n",
39
+ "TAG = \"hf\"\n",
40
+ "config_path = f\"{PATH}/../checkpoints/{TAG}/pipeline.yaml\"\n",
41
+ "inference = Inference(config_path, compile=False)"
42
+ ]
43
+ },
44
+ {
45
+ "cell_type": "markdown",
46
+ "metadata": {},
47
+ "source": [
48
+ "## 2. Load input image to lift to 3D (single object)"
49
+ ]
50
+ },
51
+ {
52
+ "cell_type": "code",
53
+ "execution_count": null,
54
+ "metadata": {},
55
+ "outputs": [],
56
+ "source": [
57
+ "IMAGE_PATH = f\"{PATH}/images/shutterstock_stylish_kidsroom_1640806567/image.png\"\n",
58
+ "IMAGE_NAME = os.path.basename(os.path.dirname(IMAGE_PATH))\n",
59
+ "\n",
60
+ "image = load_image(IMAGE_PATH)\n",
61
+ "mask = load_single_mask(os.path.dirname(IMAGE_PATH), index=14)\n",
62
+ "display_image(image, masks=[mask])"
63
+ ]
64
+ },
65
+ {
66
+ "cell_type": "markdown",
67
+ "metadata": {},
68
+ "source": [
69
+ "## 3. Generate Gaussian Splat"
70
+ ]
71
+ },
72
+ {
73
+ "cell_type": "code",
74
+ "execution_count": null,
75
+ "metadata": {},
76
+ "outputs": [],
77
+ "source": [
78
+ "# run model\n",
79
+ "output = inference(image, mask, seed=42)\n",
80
+ "\n",
81
+ "# export gaussian splat (as point cloud)\n",
82
+ "output[\"gs\"].save_ply(f\"{PATH}/gaussians/single/{IMAGE_NAME}.ply\")"
83
+ ]
84
+ },
85
+ {
86
+ "cell_type": "markdown",
87
+ "metadata": {},
88
+ "source": [
89
+ "## 4. Visualize Gaussian Splat\n",
90
+ "### a. Animated Gif"
91
+ ]
92
+ },
93
+ {
94
+ "cell_type": "code",
95
+ "execution_count": null,
96
+ "metadata": {},
97
+ "outputs": [],
98
+ "source": [
99
+ "# render gaussian splat\n",
100
+ "scene_gs = make_scene(output)\n",
101
+ "scene_gs = ready_gaussian_for_video_rendering(scene_gs)\n",
102
+ "\n",
103
+ "video = render_video(\n",
104
+ " scene_gs,\n",
105
+ " r=1,\n",
106
+ " fov=60,\n",
107
+ " pitch_deg=15,\n",
108
+ " yaw_start_deg=-45,\n",
109
+ " resolution=512,\n",
110
+ ")[\"color\"]\n",
111
+ "\n",
112
+ "# save video as gif\n",
113
+ "imageio.mimsave(\n",
114
+ " os.path.join(f\"{PATH}/gaussians/single/{IMAGE_NAME}.gif\"),\n",
115
+ " video,\n",
116
+ " format=\"GIF\",\n",
117
+ " duration=1000 / 30, # default assuming 30fps from the input MP4\n",
118
+ " loop=0, # 0 means loop indefinitely\n",
119
+ ")\n",
120
+ "\n",
121
+ "# notebook display\n",
122
+ "ImageDisplay(url=f\"gaussians/single/{IMAGE_NAME}.gif?cache_invalidator={uuid.uuid4()}\")"
123
+ ]
124
+ },
125
+ {
126
+ "cell_type": "markdown",
127
+ "metadata": {},
128
+ "source": [
129
+ "### b. Interactive Visualizer"
130
+ ]
131
+ },
132
+ {
133
+ "cell_type": "code",
134
+ "execution_count": null,
135
+ "metadata": {},
136
+ "outputs": [],
137
+ "source": [
138
+ "# might take a while to load (black screen)\n",
139
+ "interactive_visualizer(f\"{PATH}/gaussians/single/{IMAGE_NAME}.ply\")"
140
+ ]
141
+ }
142
+ ],
143
+ "metadata": {
144
+ "kernelspec": {
145
+ "display_name": "sam3d_objects-3dfy",
146
+ "language": "python",
147
+ "name": "python3"
148
+ },
149
+ "language_info": {
150
+ "codemirror_mode": {
151
+ "name": "ipython",
152
+ "version": 3
153
+ },
154
+ "file_extension": ".py",
155
+ "mimetype": "text/x-python",
156
+ "name": "python",
157
+ "nbconvert_exporter": "python",
158
+ "pygments_lexer": "ipython3",
159
+ "version": "3.11.0"
160
+ }
161
+ },
162
+ "nbformat": 4,
163
+ "nbformat_minor": 2
164
+ }
notebook/gaussians/multi/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
notebook/gaussians/single/.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ *
2
+ !.gitignore
notebook/images/137444513_Livingroom-graphic81/0.png ADDED

Git LFS Details

  • SHA256: 0809c5419d9ff57480a732b2831cec4a48718b03b576280f9aadb86f0b4f859f
  • Pointer size: 131 Bytes
  • Size of remote file: 385 kB
notebook/images/137444513_Livingroom-graphic81/1.png ADDED

Git LFS Details

  • SHA256: a0c0db3618489c01a4b2fe7859fb9737c91d462e008af3625aacd641cfd1e386
  • Pointer size: 131 Bytes
  • Size of remote file: 185 kB
notebook/images/137444513_Livingroom-graphic81/10.png ADDED

Git LFS Details

  • SHA256: 2f464c61845ce02decd71733c90adc357849f9f39e56f88676a1fb036f4cccf4
  • Pointer size: 131 Bytes
  • Size of remote file: 178 kB
notebook/images/137444513_Livingroom-graphic81/11.png ADDED

Git LFS Details

  • SHA256: 16b99b74faa96b723bc5ccbdb58598d7e05222717c3501bd0d750e44a3ac25a9
  • Pointer size: 131 Bytes
  • Size of remote file: 146 kB
notebook/images/137444513_Livingroom-graphic81/12.png ADDED

Git LFS Details

  • SHA256: cc1f5f429e8ffd64268d6dc7900d57f368713935559cfa7e1866f0e011c0b13f
  • Pointer size: 131 Bytes
  • Size of remote file: 138 kB
notebook/images/137444513_Livingroom-graphic81/13.png ADDED

Git LFS Details

  • SHA256: 6fdeaf771ee75a5ea5f245709c4e9b8ccce995398b6d8a9ae6c9313ae08d5040
  • Pointer size: 131 Bytes
  • Size of remote file: 333 kB
notebook/images/137444513_Livingroom-graphic81/14.png ADDED

Git LFS Details

  • SHA256: 971e9af72f9fdcea4a1538e9181cbf8821bede0a04e58ceb0b85a430e0641a4f
  • Pointer size: 131 Bytes
  • Size of remote file: 176 kB
notebook/images/137444513_Livingroom-graphic81/15.png ADDED

Git LFS Details

  • SHA256: 5dd08a28bbb65e33eb2a76a690ede171fd4651b61e0a1a180dd33aa88aff4d28
  • Pointer size: 131 Bytes
  • Size of remote file: 156 kB
notebook/images/137444513_Livingroom-graphic81/2.png ADDED

Git LFS Details

  • SHA256: 686103c83102fa9bd887919aa719856ba87b703ed7472342c860d248b094ce13
  • Pointer size: 131 Bytes
  • Size of remote file: 183 kB
notebook/images/137444513_Livingroom-graphic81/3.png ADDED

Git LFS Details

  • SHA256: 0fab63cd88806b58212a17f68ac2b0ccb1b5a266dc830ddc62fc16b238042b4b
  • Pointer size: 131 Bytes
  • Size of remote file: 758 kB
notebook/images/137444513_Livingroom-graphic81/4.png ADDED

Git LFS Details

  • SHA256: 205d67263f78b970e4ffc34a82e315f0fcf3eb28316fdd2b818bddef916ae358
  • Pointer size: 131 Bytes
  • Size of remote file: 407 kB
notebook/images/137444513_Livingroom-graphic81/5.png ADDED

Git LFS Details

  • SHA256: 913c6d7fa003da7532007dfa18ceb21f2b05dddd4714230a80595082a2b33b48
  • Pointer size: 131 Bytes
  • Size of remote file: 147 kB
notebook/images/137444513_Livingroom-graphic81/6.png ADDED

Git LFS Details

  • SHA256: f77b4ad4639a96c858453ceb03d22a77698c5e275ab1f37d208ce3900aa3fe8c
  • Pointer size: 131 Bytes
  • Size of remote file: 419 kB
notebook/images/137444513_Livingroom-graphic81/7.png ADDED

Git LFS Details

  • SHA256: 963205066849b9f8676281e4344be26f35cbb8e75d5ad67015ed2ee13160549e
  • Pointer size: 131 Bytes
  • Size of remote file: 384 kB
notebook/images/137444513_Livingroom-graphic81/8.png ADDED

Git LFS Details

  • SHA256: d8ba70a2c567ff85bf321e1d87409ba6bc370e46a727759ac749f5a2c4779198
  • Pointer size: 131 Bytes
  • Size of remote file: 150 kB
notebook/images/137444513_Livingroom-graphic81/9.png ADDED

Git LFS Details

  • SHA256: 88364b1e917d467b519381b59b333a0af9b8fb2b2a533d314fbd1537bdbb8055
  • Pointer size: 131 Bytes
  • Size of remote file: 259 kB
notebook/images/137444513_Livingroom-graphic81/image.png ADDED

Git LFS Details

  • SHA256: 8357b2d32d3ab1c03b04d9fa5afc55235197e207581398ff062fc68cfe631e1c
  • Pointer size: 132 Bytes
  • Size of remote file: 2.35 MB
notebook/images/2560px-David_-_The_Death_of_Socrates/0.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/1.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/10.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/11.png ADDED

Git LFS Details

  • SHA256: fe96b6b8e3d3396e863a0518c10090d48c1193a083b8b6113e120509c79de7ce
  • Pointer size: 131 Bytes
  • Size of remote file: 422 kB
notebook/images/2560px-David_-_The_Death_of_Socrates/12.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/13.png ADDED

Git LFS Details

  • SHA256: 53721539dff5273f9b102825721dbda014bfd20df069d26454246bc11786b97d
  • Pointer size: 131 Bytes
  • Size of remote file: 234 kB
notebook/images/2560px-David_-_The_Death_of_Socrates/14.png ADDED

Git LFS Details

  • SHA256: ada68d1447f44661a9ed783a4f7fa7e25db09ac7f0a196bde424223ba01b06d2
  • Pointer size: 131 Bytes
  • Size of remote file: 374 kB
notebook/images/2560px-David_-_The_Death_of_Socrates/15.png ADDED

Git LFS Details

  • SHA256: 81f47bf47227ce7aaf46632614e29d9bf44fa61d56f3ae2ccffc9bd41329c6d0
  • Pointer size: 131 Bytes
  • Size of remote file: 136 kB
notebook/images/2560px-David_-_The_Death_of_Socrates/16.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/17.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/18.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/19.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/2.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/20.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/21.png ADDED
notebook/images/2560px-David_-_The_Death_of_Socrates/22.png ADDED