Qnancy commited on
Commit
084d74a
·
verified ·
1 Parent(s): bffe042

Add files using upload-large-folder tool

Browse files
Files changed (32) hide show
  1. Orient_Anything/__pycache__/Rotation.cpython-310.pyc +0 -0
  2. Orient_Anything/__pycache__/inference.cpython-310.pyc +0 -0
  3. Orient_Anything/__pycache__/paths.cpython-310.pyc +0 -0
  4. Orient_Anything/__pycache__/utils.cpython-310.pyc +0 -0
  5. Orient_Anything/__pycache__/vision_tower.cpython-310.pyc +0 -0
  6. Orient_Anything/assets/axis.obj +1664 -0
  7. Orient_Anything/render/canvas.py +49 -0
  8. Orient_Anything/render/model.py +31 -0
  9. Orient_Anything/render/speedup.py +101 -0
  10. processor/__pycache__/__init__.cpython-310.pyc +0 -0
  11. processor/__pycache__/captions.cpython-310.pyc +0 -0
  12. processor/__pycache__/pointcloud.cpython-310.pyc +0 -0
  13. processor/__pycache__/prompt.cpython-310.pyc +0 -0
  14. processor/__pycache__/prompt_CR.cpython-310.pyc +0 -0
  15. processor/__pycache__/prompt_ImageEditbench.cpython-310.pyc +0 -0
  16. processor/__pycache__/prompt_T2Ibench.cpython-310.pyc +0 -0
  17. processor/__pycache__/prompt_utils.cpython-310.pyc +0 -0
  18. processor/__pycache__/segment.cpython-310.pyc +0 -0
  19. processor/wrappers/__init__.py +0 -0
  20. processor/wrappers/__pycache__/__init__.cpython-310.pyc +0 -0
  21. processor/wrappers/__pycache__/grounding_dino.cpython-310.pyc +0 -0
  22. processor/wrappers/__pycache__/metric3d_v2.cpython-310.pyc +0 -0
  23. processor/wrappers/__pycache__/perspective_fields.cpython-310.pyc +0 -0
  24. processor/wrappers/__pycache__/ram.cpython-310.pyc +0 -0
  25. processor/wrappers/__pycache__/sam.cpython-310.pyc +0 -0
  26. processor/wrappers/grounding_dino.py +23 -0
  27. processor/wrappers/metric3d_v2.py +250 -0
  28. processor/wrappers/perspective_fields.py +135 -0
  29. processor/wrappers/ram.py +64 -0
  30. processor/wrappers/sam.py +324 -0
  31. utils/__pycache__/__init__.cpython-310.pyc +0 -0
  32. utils/__pycache__/logger.cpython-310.pyc +0 -0
Orient_Anything/__pycache__/Rotation.cpython-310.pyc ADDED
Binary file (2.96 kB). View file
 
Orient_Anything/__pycache__/inference.cpython-310.pyc ADDED
Binary file (1.81 kB). View file
 
Orient_Anything/__pycache__/paths.cpython-310.pyc ADDED
Binary file (321 Bytes). View file
 
Orient_Anything/__pycache__/utils.cpython-310.pyc ADDED
Binary file (7.63 kB). View file
 
Orient_Anything/__pycache__/vision_tower.cpython-310.pyc ADDED
Binary file (5.32 kB). View file
 
Orient_Anything/assets/axis.obj ADDED
@@ -0,0 +1,1664 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Blender 4.2.1 LTS
2
+ # www.blender.org
3
+ mtllib axis.mtl
4
+ o X
5
+ v 28.000000 0.000000 0.000000
6
+ v 22.000000 0.292636 -1.471178
7
+ v 22.000000 0.574025 -1.385819
8
+ v 22.000000 0.833355 -1.247204
9
+ v 22.000000 1.060660 -1.060660
10
+ v 22.000000 1.247205 -0.833355
11
+ v 22.000000 1.385819 -0.574025
12
+ v 22.000000 1.471178 -0.292636
13
+ v 22.000000 1.500000 -0.000000
14
+ v 22.000000 1.471178 0.292636
15
+ v 22.000000 1.385819 0.574025
16
+ v 22.000000 1.247205 0.833355
17
+ v 22.000000 1.060660 1.060660
18
+ v 22.000000 0.833355 1.247204
19
+ v 22.000000 0.574025 1.385819
20
+ v 22.000000 0.292636 1.471178
21
+ v 22.000000 0.000000 1.500000
22
+ v 22.000000 -0.292635 1.471178
23
+ v 22.000000 -0.574025 1.385819
24
+ v 22.000000 -0.833355 1.247204
25
+ v 22.000000 -1.060660 1.060660
26
+ v 22.000000 -1.247204 0.833355
27
+ v 22.000000 -1.385819 0.574025
28
+ v 22.000000 -1.471178 0.292636
29
+ v 22.000000 -1.500000 0.000000
30
+ v 22.000000 -1.471178 -0.292636
31
+ v 22.000000 -1.385819 -0.574025
32
+ v 22.000000 -1.247204 -0.833355
33
+ v 22.000000 -1.060660 -1.060660
34
+ v 22.000000 -0.833355 -1.247204
35
+ v 22.000000 -0.574025 -1.385819
36
+ v 22.000000 -0.292635 -1.471178
37
+ v 22.000000 -0.000000 -1.500000
38
+ vn -1.0000 -0.0000 -0.0000
39
+ vn -1.0000 0.0001 -0.0000
40
+ vn -1.0000 -0.0001 -0.0000
41
+ vn 0.2414 0.0951 -0.9657
42
+ vn 0.2414 0.2817 -0.9286
43
+ vn 0.2414 0.4575 -0.8558
44
+ vn 0.2414 0.6156 -0.7501
45
+ vn 0.2414 0.7501 -0.6156
46
+ vn 0.2414 0.8558 -0.4574
47
+ vn 0.2414 0.9286 -0.2817
48
+ vn 0.2414 0.9657 -0.0951
49
+ vn 0.2414 0.9657 0.0951
50
+ vn 0.2414 0.9286 0.2817
51
+ vn 0.2414 0.8558 0.4574
52
+ vn 0.2414 0.7501 0.6156
53
+ vn 0.2414 0.6156 0.7501
54
+ vn 0.2414 0.4575 0.8558
55
+ vn 0.2414 0.2817 0.9286
56
+ vn 0.2414 0.0951 0.9657
57
+ vn 0.2414 -0.0951 0.9657
58
+ vn 0.2414 -0.2817 0.9286
59
+ vn 0.2414 -0.4575 0.8558
60
+ vn 0.2414 -0.6156 0.7501
61
+ vn 0.2414 -0.7501 0.6156
62
+ vn 0.2414 -0.8558 0.4575
63
+ vn 0.2414 -0.9286 0.2817
64
+ vn 0.2414 -0.9657 0.0951
65
+ vn 0.2414 -0.9657 -0.0951
66
+ vn 0.2414 -0.9286 -0.2817
67
+ vn 0.2414 -0.8558 -0.4575
68
+ vn 0.2414 -0.7501 -0.6156
69
+ vn 0.2414 -0.6156 -0.7501
70
+ vn 0.2414 -0.4575 -0.8558
71
+ vn 0.2414 -0.2817 -0.9286
72
+ vn 0.2414 -0.0951 -0.9657
73
+ vt 0.597858 0.736041
74
+ vt 0.735114 0.644330
75
+ vt 0.643402 0.507074
76
+ vt 0.506147 0.598785
77
+ vt 0.523575 0.686407
78
+ vt 0.555780 0.524503
79
+ vt 0.717685 0.556707
80
+ vt 0.685480 0.718612
81
+ vt 0.555780 0.718612
82
+ vt 0.506147 0.644330
83
+ vt 0.523575 0.556707
84
+ vt 0.597858 0.507074
85
+ vt 0.685480 0.524503
86
+ vt 0.735114 0.598785
87
+ vt 0.717685 0.686407
88
+ vt 0.643402 0.736041
89
+ vt 0.575961 0.729399
90
+ vt 0.538092 0.704096
91
+ vt 0.512789 0.666227
92
+ vt 0.503903 0.621557
93
+ vt 0.512789 0.576888
94
+ vt 0.538092 0.539019
95
+ vt 0.575961 0.513716
96
+ vt 0.620630 0.504831
97
+ vt 0.665299 0.513716
98
+ vt 0.703168 0.539019
99
+ vt 0.728471 0.576888
100
+ vt 0.737357 0.621557
101
+ vt 0.728471 0.666227
102
+ vt 0.703168 0.704096
103
+ vt 0.665299 0.729399
104
+ vt 0.620630 0.738284
105
+ vt 0.354677 0.736041
106
+ vt 0.377450 0.621557
107
+ vt 0.377450 0.738284
108
+ vt 0.332780 0.729399
109
+ vt 0.312600 0.718612
110
+ vt 0.294911 0.704096
111
+ vt 0.280395 0.686407
112
+ vt 0.269608 0.666227
113
+ vt 0.262966 0.644330
114
+ vt 0.260723 0.621557
115
+ vt 0.262966 0.598785
116
+ vt 0.269608 0.576888
117
+ vt 0.280395 0.556707
118
+ vt 0.294911 0.539019
119
+ vt 0.312600 0.524503
120
+ vt 0.332780 0.513716
121
+ vt 0.354677 0.507074
122
+ vt 0.377450 0.504831
123
+ vt 0.400222 0.507074
124
+ vt 0.422119 0.513716
125
+ vt 0.442299 0.524503
126
+ vt 0.459988 0.539019
127
+ vt 0.474504 0.556707
128
+ vt 0.485291 0.576888
129
+ vt 0.491933 0.598785
130
+ vt 0.494176 0.621557
131
+ vt 0.491933 0.644330
132
+ vt 0.485291 0.666227
133
+ vt 0.474504 0.686407
134
+ vt 0.459988 0.704096
135
+ vt 0.442299 0.718612
136
+ vt 0.422119 0.729399
137
+ vt 0.400222 0.736041
138
+ s 0
139
+ usemtl MI_YamahaMSP3_MatteBlack.004
140
+ f 2/1/1 26/2/1 18/3/1
141
+ f 10/4/1 6/5/1 2/1/1
142
+ f 18/3/1 14/6/1 10/4/1
143
+ f 26/2/1 22/7/1 18/3/1
144
+ f 2/1/1 30/8/1 26/2/1
145
+ f 6/5/1 4/9/1 2/1/1
146
+ f 10/4/1 8/10/1 6/5/1
147
+ f 14/6/1 12/11/1 10/4/1
148
+ f 18/3/1 16/12/1 14/6/1
149
+ f 22/7/1 20/13/1 18/3/1
150
+ f 26/2/1 24/14/1 22/7/1
151
+ f 30/8/1 28/15/1 26/2/1
152
+ f 2/1/1 32/16/1 30/8/1
153
+ f 4/9/1 3/17/1 2/1/1
154
+ f 6/5/2 5/18/2 4/9/2
155
+ f 8/10/3 7/19/3 6/5/3
156
+ f 10/4/1 9/20/1 8/10/1
157
+ f 12/11/3 11/21/3 10/4/3
158
+ f 14/6/2 13/22/2 12/11/2
159
+ f 16/12/1 15/23/1 14/6/1
160
+ f 18/3/1 17/24/1 16/12/1
161
+ f 20/13/1 19/25/1 18/3/1
162
+ f 22/7/3 21/26/3 20/13/3
163
+ f 24/14/2 23/27/2 22/7/2
164
+ f 26/2/1 25/28/1 24/14/1
165
+ f 28/15/2 27/29/2 26/2/2
166
+ f 30/8/3 29/30/3 28/15/3
167
+ f 32/16/1 31/31/1 30/8/1
168
+ f 2/1/1 33/32/1 32/16/1
169
+ f 2/33/4 1/34/4 33/35/4
170
+ f 3/36/5 1/34/5 2/33/5
171
+ f 18/3/1 10/4/1 2/1/1
172
+ f 4/37/6 1/34/6 3/36/6
173
+ f 5/38/7 1/34/7 4/37/7
174
+ f 6/39/8 1/34/8 5/38/8
175
+ f 7/40/9 1/34/9 6/39/9
176
+ f 8/41/10 1/34/10 7/40/10
177
+ f 9/42/11 1/34/11 8/41/11
178
+ f 10/43/12 1/34/12 9/42/12
179
+ f 11/44/13 1/34/13 10/43/13
180
+ f 12/45/14 1/34/14 11/44/14
181
+ f 13/46/15 1/34/15 12/45/15
182
+ f 14/47/16 1/34/16 13/46/16
183
+ f 15/48/17 1/34/17 14/47/17
184
+ f 16/49/18 1/34/18 15/48/18
185
+ f 17/50/19 1/34/19 16/49/19
186
+ f 18/51/20 1/34/20 17/50/20
187
+ f 19/52/21 1/34/21 18/51/21
188
+ f 20/53/22 1/34/22 19/52/22
189
+ f 21/54/23 1/34/23 20/53/23
190
+ f 22/55/24 1/34/24 21/54/24
191
+ f 23/56/25 1/34/25 22/55/25
192
+ f 24/57/26 1/34/26 23/56/26
193
+ f 25/58/27 1/34/27 24/57/27
194
+ f 26/59/28 1/34/28 25/58/28
195
+ f 27/60/29 1/34/29 26/59/29
196
+ f 28/61/30 1/34/30 27/60/30
197
+ f 29/62/31 1/34/31 28/61/31
198
+ f 30/63/32 1/34/32 29/62/32
199
+ f 31/64/33 1/34/33 30/63/33
200
+ f 32/65/34 1/34/34 31/64/34
201
+ f 33/35/35 1/34/35 32/65/35
202
+ o Xzhu
203
+ v 24.000000 0.097545 -0.490393
204
+ v 0.000000 0.097546 -0.490393
205
+ v 24.000000 0.191341 -0.461940
206
+ v 0.000000 0.191342 -0.461940
207
+ v 24.000000 0.277785 -0.415735
208
+ v 0.000000 0.277786 -0.415735
209
+ v 24.000000 0.353553 -0.353553
210
+ v 0.000000 0.353554 -0.353553
211
+ v 24.000000 0.415734 -0.277785
212
+ v 0.000000 0.415735 -0.277785
213
+ v 24.000000 0.461939 -0.191342
214
+ v 0.000000 0.461940 -0.191342
215
+ v 24.000000 0.490392 -0.097545
216
+ v 0.000000 0.490393 -0.097545
217
+ v 24.000000 0.499999 -0.000000
218
+ v 0.000000 0.500001 -0.000000
219
+ v 24.000000 0.490392 0.097545
220
+ v 0.000000 0.490393 0.097545
221
+ v 24.000000 0.461939 0.191342
222
+ v 0.000000 0.461940 0.191342
223
+ v 24.000000 0.415734 0.277785
224
+ v 0.000000 0.415735 0.277785
225
+ v 24.000000 0.353553 0.353553
226
+ v 0.000000 0.353554 0.353553
227
+ v 24.000000 0.277785 0.415735
228
+ v 0.000000 0.277786 0.415735
229
+ v 24.000000 0.191341 0.461940
230
+ v 0.000000 0.191342 0.461940
231
+ v 24.000000 0.097545 0.490393
232
+ v 0.000000 0.097546 0.490393
233
+ v 24.000000 -0.000001 0.500000
234
+ v 0.000000 0.000001 0.500000
235
+ v 24.000000 -0.097546 0.490393
236
+ v 0.000000 -0.097545 0.490393
237
+ v 24.000000 -0.191342 0.461940
238
+ v 0.000000 -0.191341 0.461940
239
+ v 24.000000 -0.277786 0.415735
240
+ v 0.000000 -0.277785 0.415735
241
+ v 24.000000 -0.353554 0.353553
242
+ v 0.000000 -0.353553 0.353553
243
+ v 24.000000 -0.415735 0.277785
244
+ v 0.000000 -0.415734 0.277785
245
+ v 24.000000 -0.461940 0.191342
246
+ v 0.000000 -0.461939 0.191342
247
+ v 24.000000 -0.490393 0.097545
248
+ v 0.000000 -0.490392 0.097545
249
+ v 24.000000 -0.500001 0.000000
250
+ v 0.000000 -0.499999 0.000000
251
+ v 24.000000 -0.490393 -0.097545
252
+ v 0.000000 -0.490392 -0.097545
253
+ v 24.000000 -0.461940 -0.191342
254
+ v 0.000000 -0.461939 -0.191342
255
+ v 24.000000 -0.415735 -0.277785
256
+ v 0.000000 -0.415734 -0.277785
257
+ v 24.000000 -0.353554 -0.353553
258
+ v 0.000000 -0.353553 -0.353553
259
+ v 24.000000 -0.277786 -0.415735
260
+ v 0.000000 -0.277785 -0.415735
261
+ v 24.000000 -0.191342 -0.461940
262
+ v 0.000000 -0.191341 -0.461940
263
+ v 24.000000 -0.097546 -0.490393
264
+ v 0.000000 -0.097545 -0.490393
265
+ v 24.000000 -0.000001 -0.500000
266
+ v 0.000000 0.000001 -0.500000
267
+ vn -1.0000 -0.0000 -0.0000
268
+ vn -0.0000 0.0980 -0.9952
269
+ vn -0.0000 0.2903 -0.9569
270
+ vn 1.0000 -0.0000 -0.0000
271
+ vn -0.0000 0.4714 -0.8819
272
+ vn -0.0000 0.6344 -0.7730
273
+ vn -0.0000 0.7730 -0.6344
274
+ vn -0.0000 0.8819 -0.4714
275
+ vn -0.0000 0.9569 -0.2903
276
+ vn -0.0000 0.9952 -0.0980
277
+ vn -0.0000 0.9952 0.0980
278
+ vn -0.0000 0.9569 0.2903
279
+ vn -0.0000 0.8819 0.4714
280
+ vn -0.0000 0.7730 0.6344
281
+ vn -0.0000 0.6344 0.7730
282
+ vn -0.0000 0.4714 0.8819
283
+ vn -0.0000 0.2903 0.9569
284
+ vn -0.0000 0.0980 0.9952
285
+ vn -0.0000 -0.0980 0.9952
286
+ vn -0.0000 -0.2903 0.9569
287
+ vn -0.0000 -0.4714 0.8819
288
+ vn -0.0000 -0.6344 0.7730
289
+ vn -0.0000 -0.7730 0.6344
290
+ vn -0.0000 -0.8819 0.4714
291
+ vn -0.0000 -0.9569 0.2903
292
+ vn -0.0000 -0.9952 0.0980
293
+ vn -0.0000 -0.9952 -0.0980
294
+ vn -0.0000 -0.9569 -0.2903
295
+ vn -0.0000 -0.8819 -0.4714
296
+ vn -0.0000 -0.7730 -0.6344
297
+ vn -0.0000 -0.6344 -0.7730
298
+ vn -0.0000 -0.4714 -0.8819
299
+ vn -0.0000 -0.2903 -0.9569
300
+ vn -0.0000 -0.0980 -0.9952
301
+ vt 0.597858 0.736041
302
+ vt 0.735114 0.644330
303
+ vt 0.643402 0.507074
304
+ vt 0.506147 0.598785
305
+ vt 0.523575 0.686407
306
+ vt 0.555780 0.524503
307
+ vt 0.717685 0.556707
308
+ vt 0.685480 0.718612
309
+ vt 0.555780 0.718612
310
+ vt 0.506147 0.644330
311
+ vt 0.523575 0.556707
312
+ vt 0.597858 0.507074
313
+ vt 0.685480 0.524503
314
+ vt 0.735114 0.598785
315
+ vt 0.717685 0.686407
316
+ vt 0.643402 0.736041
317
+ vt 0.575961 0.729399
318
+ vt 0.538092 0.704096
319
+ vt 0.512789 0.666227
320
+ vt 0.503903 0.621557
321
+ vt 0.512789 0.576888
322
+ vt 0.538092 0.539019
323
+ vt 0.575961 0.513716
324
+ vt 0.620630 0.504831
325
+ vt 0.665299 0.513716
326
+ vt 0.703168 0.539019
327
+ vt 0.728471 0.576888
328
+ vt 0.737357 0.621557
329
+ vt 0.728471 0.666227
330
+ vt 0.703168 0.704096
331
+ vt 0.665299 0.729399
332
+ vt 0.620630 0.738284
333
+ vt 0.271058 0.986328
334
+ vt 0.255859 0.986328
335
+ vt 0.255859 0.743148
336
+ vt 0.286257 0.986328
337
+ vt 0.271058 0.743148
338
+ vt 0.422119 0.729399
339
+ vt 0.269608 0.666227
340
+ vt 0.332780 0.513716
341
+ vt 0.485291 0.576888
342
+ vt 0.485291 0.666227
343
+ vt 0.422119 0.513716
344
+ vt 0.269608 0.576888
345
+ vt 0.332780 0.729399
346
+ vt 0.459988 0.704096
347
+ vt 0.494176 0.621557
348
+ vt 0.459988 0.539019
349
+ vt 0.377450 0.504831
350
+ vt 0.294911 0.539019
351
+ vt 0.260723 0.621557
352
+ vt 0.294911 0.704096
353
+ vt 0.377450 0.738284
354
+ vt 0.442299 0.718612
355
+ vt 0.474504 0.686407
356
+ vt 0.491933 0.644330
357
+ vt 0.491933 0.598785
358
+ vt 0.474504 0.556707
359
+ vt 0.442299 0.524503
360
+ vt 0.400222 0.507074
361
+ vt 0.354677 0.507074
362
+ vt 0.312600 0.524503
363
+ vt 0.280395 0.556707
364
+ vt 0.262966 0.598785
365
+ vt 0.262966 0.644330
366
+ vt 0.280395 0.686407
367
+ vt 0.312600 0.718612
368
+ vt 0.354677 0.736041
369
+ vt 0.400222 0.736041
370
+ vt 0.301456 0.986328
371
+ vt 0.286257 0.743148
372
+ vt 0.316654 0.986328
373
+ vt 0.301456 0.743148
374
+ vt 0.331853 0.986328
375
+ vt 0.316654 0.743148
376
+ vt 0.347052 0.986328
377
+ vt 0.331853 0.743148
378
+ vt 0.362251 0.986328
379
+ vt 0.347052 0.743148
380
+ vt 0.377450 0.986328
381
+ vt 0.362251 0.743148
382
+ vt 0.392648 0.986328
383
+ vt 0.377450 0.743148
384
+ vt 0.407847 0.986328
385
+ vt 0.392648 0.743148
386
+ vt 0.423046 0.986328
387
+ vt 0.407847 0.743148
388
+ vt 0.438245 0.986328
389
+ vt 0.423046 0.743148
390
+ vt 0.453443 0.986328
391
+ vt 0.438245 0.743148
392
+ vt 0.468642 0.986328
393
+ vt 0.453443 0.743148
394
+ vt 0.483841 0.986328
395
+ vt 0.468642 0.743148
396
+ vt 0.499040 0.986328
397
+ vt 0.483841 0.743148
398
+ vt 0.514239 0.986328
399
+ vt 0.499040 0.743148
400
+ vt 0.529437 0.986328
401
+ vt 0.514239 0.743148
402
+ vt 0.544636 0.986328
403
+ vt 0.529437 0.743148
404
+ vt 0.559835 0.986328
405
+ vt 0.544636 0.743148
406
+ vt 0.575034 0.986328
407
+ vt 0.559835 0.743148
408
+ vt 0.590232 0.986328
409
+ vt 0.575034 0.743148
410
+ vt 0.605431 0.986328
411
+ vt 0.590232 0.743148
412
+ vt 0.620630 0.986328
413
+ vt 0.605431 0.743148
414
+ vt 0.635829 0.986328
415
+ vt 0.620630 0.743148
416
+ vt 0.651028 0.986328
417
+ vt 0.635829 0.743148
418
+ vt 0.666226 0.986328
419
+ vt 0.651028 0.743148
420
+ vt 0.681425 0.986328
421
+ vt 0.666226 0.743148
422
+ vt 0.696624 0.986328
423
+ vt 0.681425 0.743148
424
+ vt 0.711823 0.986328
425
+ vt 0.696624 0.743148
426
+ vt 0.727022 0.986328
427
+ vt 0.711823 0.743148
428
+ vt 0.742220 0.986328
429
+ vt 0.727022 0.743148
430
+ vt 0.742220 0.743148
431
+ s 0
432
+ usemtl MI_YamahaMSP3_MatteBlack.004
433
+ f 35/66/36 83/67/36 67/68/36
434
+ f 51/69/36 43/70/36 35/66/36
435
+ f 67/68/36 59/71/36 51/69/36
436
+ f 83/67/36 75/72/36 67/68/36
437
+ f 35/66/36 91/73/36 83/67/36
438
+ f 43/70/36 39/74/36 35/66/36
439
+ f 51/69/36 47/75/36 43/70/36
440
+ f 59/71/36 55/76/36 51/69/36
441
+ f 67/68/36 63/77/36 59/71/36
442
+ f 75/72/36 71/78/36 67/68/36
443
+ f 83/67/36 79/79/36 75/72/36
444
+ f 91/73/36 87/80/36 83/67/36
445
+ f 35/66/36 95/81/36 91/73/36
446
+ f 39/74/36 37/82/36 35/66/36
447
+ f 43/70/36 41/83/36 39/74/36
448
+ f 47/75/36 45/84/36 43/70/36
449
+ f 51/69/36 49/85/36 47/75/36
450
+ f 55/76/36 53/86/36 51/69/36
451
+ f 59/71/36 57/87/36 55/76/36
452
+ f 63/77/36 61/88/36 59/71/36
453
+ f 67/68/36 65/89/36 63/77/36
454
+ f 71/78/36 69/90/36 67/68/36
455
+ f 75/72/36 73/91/36 71/78/36
456
+ f 79/79/36 77/92/36 75/72/36
457
+ f 83/67/36 81/93/36 79/79/36
458
+ f 87/80/36 85/94/36 83/67/36
459
+ f 91/73/36 89/95/36 87/80/36
460
+ f 95/81/36 93/96/36 91/73/36
461
+ f 35/66/36 97/97/36 95/81/36
462
+ f 34/98/37 96/99/37 97/100/37
463
+ f 36/101/38 34/98/38 35/102/38
464
+ f 92/103/39 44/104/39 60/105/39
465
+ f 76/106/39 84/107/39 92/103/39
466
+ f 60/105/39 68/108/39 76/106/39
467
+ f 44/104/39 52/109/39 60/105/39
468
+ f 92/103/39 36/110/39 44/104/39
469
+ f 84/107/39 88/111/39 92/103/39
470
+ f 76/106/39 80/112/39 84/107/39
471
+ f 68/108/39 72/113/39 76/106/39
472
+ f 60/105/39 64/114/39 68/108/39
473
+ f 52/109/39 56/115/39 60/105/39
474
+ f 44/104/39 48/116/39 52/109/39
475
+ f 36/110/39 40/117/39 44/104/39
476
+ f 92/103/39 96/118/39 36/110/39
477
+ f 88/111/39 90/119/39 92/103/39
478
+ f 84/107/39 86/120/39 88/111/39
479
+ f 80/112/39 82/121/39 84/107/39
480
+ f 76/106/39 78/122/39 80/112/39
481
+ f 72/113/39 74/123/39 76/106/39
482
+ f 68/108/39 70/124/39 72/113/39
483
+ f 64/114/39 66/125/39 68/108/39
484
+ f 60/105/39 62/126/39 64/114/39
485
+ f 56/115/39 58/127/39 60/105/39
486
+ f 52/109/39 54/128/39 56/115/39
487
+ f 48/116/39 50/129/39 52/109/39
488
+ f 44/104/39 46/130/39 48/116/39
489
+ f 40/117/39 42/131/39 44/104/39
490
+ f 36/110/39 38/132/39 40/117/39
491
+ f 96/118/39 34/133/39 36/110/39
492
+ f 92/103/39 94/134/39 96/118/39
493
+ f 38/135/40 36/101/40 37/136/40
494
+ f 40/137/41 38/135/41 39/138/41
495
+ f 42/139/42 40/137/42 41/140/42
496
+ f 44/141/43 42/139/43 43/142/43
497
+ f 46/143/44 44/141/44 45/144/44
498
+ f 48/145/45 46/143/45 47/146/45
499
+ f 50/147/46 48/145/46 49/148/46
500
+ f 52/149/47 50/147/47 51/150/47
501
+ f 54/151/48 52/149/48 53/152/48
502
+ f 56/153/49 54/151/49 55/154/49
503
+ f 58/155/50 56/153/50 57/156/50
504
+ f 60/157/51 58/155/51 59/158/51
505
+ f 62/159/52 60/157/52 61/160/52
506
+ f 64/161/53 62/159/53 63/162/53
507
+ f 66/163/54 64/161/54 65/164/54
508
+ f 68/165/55 66/163/55 67/166/55
509
+ f 70/167/56 68/165/56 69/168/56
510
+ f 72/169/57 70/167/57 71/170/57
511
+ f 74/171/58 72/169/58 73/172/58
512
+ f 76/173/59 74/171/59 75/174/59
513
+ f 78/175/60 76/173/60 77/176/60
514
+ f 80/177/61 78/175/61 79/178/61
515
+ f 82/179/62 80/177/62 81/180/62
516
+ f 84/181/63 82/179/63 83/182/63
517
+ f 86/183/64 84/181/64 85/184/64
518
+ f 88/185/65 86/183/65 87/186/65
519
+ f 90/187/66 88/185/66 89/188/66
520
+ f 92/189/67 90/187/67 91/190/67
521
+ f 94/191/68 92/189/68 93/192/68
522
+ f 96/193/69 94/191/69 95/194/69
523
+ f 67/68/36 51/69/36 35/66/36
524
+ f 34/98/37 97/100/37 35/102/37
525
+ f 36/101/38 35/102/38 37/136/38
526
+ f 60/105/39 76/106/39 92/103/39
527
+ f 38/135/40 37/136/40 39/138/40
528
+ f 40/137/41 39/138/41 41/140/41
529
+ f 42/139/42 41/140/42 43/142/42
530
+ f 44/141/43 43/142/43 45/144/43
531
+ f 46/143/44 45/144/44 47/146/44
532
+ f 48/145/45 47/146/45 49/148/45
533
+ f 50/147/46 49/148/46 51/150/46
534
+ f 52/149/47 51/150/47 53/152/47
535
+ f 54/151/48 53/152/48 55/154/48
536
+ f 56/153/49 55/154/49 57/156/49
537
+ f 58/155/50 57/156/50 59/158/50
538
+ f 60/157/51 59/158/51 61/160/51
539
+ f 62/159/52 61/160/52 63/162/52
540
+ f 64/161/53 63/162/53 65/164/53
541
+ f 66/163/54 65/164/54 67/166/54
542
+ f 68/165/55 67/166/55 69/168/55
543
+ f 70/167/56 69/168/56 71/170/56
544
+ f 72/169/57 71/170/57 73/172/57
545
+ f 74/171/58 73/172/58 75/174/58
546
+ f 76/173/59 75/174/59 77/176/59
547
+ f 78/175/60 77/176/60 79/178/60
548
+ f 80/177/61 79/178/61 81/180/61
549
+ f 82/179/62 81/180/62 83/182/62
550
+ f 84/181/63 83/182/63 85/184/63
551
+ f 86/183/64 85/184/64 87/186/64
552
+ f 88/185/65 87/186/65 89/188/65
553
+ f 90/187/66 89/188/66 91/190/66
554
+ f 92/189/67 91/190/67 93/192/67
555
+ f 94/191/68 93/192/68 95/194/68
556
+ f 96/193/69 95/194/69 97/195/69
557
+ o Y
558
+ v 0.000000 -0.000002 -28.000000
559
+ v -0.292636 -1.471180 -22.000000
560
+ v -0.574025 -1.385821 -22.000000
561
+ v -0.833355 -1.247206 -22.000000
562
+ v -1.060660 -1.060662 -22.000000
563
+ v -1.247204 -0.833357 -22.000000
564
+ v -1.385819 -0.574027 -22.000000
565
+ v -1.471178 -0.292637 -22.000000
566
+ v -1.500000 -0.000002 -22.000000
567
+ v -1.471178 0.292634 -22.000000
568
+ v -1.385819 0.574023 -22.000000
569
+ v -1.247204 0.833353 -22.000000
570
+ v -1.060660 1.060658 -22.000000
571
+ v -0.833355 1.247203 -22.000000
572
+ v -0.574025 1.385817 -22.000000
573
+ v -0.292636 1.471176 -22.000000
574
+ v 0.000000 1.499998 -22.000000
575
+ v 0.292636 1.471176 -22.000000
576
+ v 0.574025 1.385817 -22.000000
577
+ v 0.833355 1.247203 -22.000000
578
+ v 1.060660 1.060658 -22.000000
579
+ v 1.247204 0.833353 -22.000000
580
+ v 1.385819 0.574023 -22.000000
581
+ v 1.471178 0.292634 -22.000000
582
+ v 1.500000 -0.000002 -22.000000
583
+ v 1.471178 -0.292637 -22.000000
584
+ v 1.385819 -0.574027 -22.000000
585
+ v 1.247204 -0.833357 -22.000000
586
+ v 1.060660 -1.060662 -22.000000
587
+ v 0.833355 -1.247206 -22.000000
588
+ v 0.574025 -1.385821 -22.000000
589
+ v 0.292636 -1.471180 -22.000000
590
+ v 0.000000 -1.500002 -22.000000
591
+ vn -0.0000 -0.0000 1.0000
592
+ vn -0.0001 -0.0000 1.0000
593
+ vn 0.0001 -0.0000 1.0000
594
+ vn -0.0951 -0.9657 -0.2414
595
+ vn -0.2817 -0.9286 -0.2414
596
+ vn -0.4575 -0.8558 -0.2414
597
+ vn -0.6156 -0.7501 -0.2414
598
+ vn -0.7501 -0.6156 -0.2414
599
+ vn -0.8558 -0.4575 -0.2414
600
+ vn -0.9286 -0.2817 -0.2414
601
+ vn -0.9657 -0.0951 -0.2414
602
+ vn -0.9657 0.0951 -0.2414
603
+ vn -0.9286 0.2817 -0.2414
604
+ vn -0.8558 0.4575 -0.2414
605
+ vn -0.7501 0.6156 -0.2414
606
+ vn -0.6156 0.7501 -0.2414
607
+ vn -0.4574 0.8558 -0.2414
608
+ vn -0.2817 0.9286 -0.2414
609
+ vn -0.0951 0.9657 -0.2414
610
+ vn 0.0951 0.9657 -0.2414
611
+ vn 0.2817 0.9286 -0.2414
612
+ vn 0.4574 0.8558 -0.2414
613
+ vn 0.6156 0.7501 -0.2414
614
+ vn 0.7501 0.6156 -0.2414
615
+ vn 0.8558 0.4575 -0.2414
616
+ vn 0.9286 0.2817 -0.2414
617
+ vn 0.9657 0.0951 -0.2414
618
+ vn 0.9657 -0.0951 -0.2414
619
+ vn 0.9286 -0.2817 -0.2414
620
+ vn 0.8558 -0.4575 -0.2414
621
+ vn 0.7501 -0.6156 -0.2414
622
+ vn 0.6156 -0.7501 -0.2414
623
+ vn 0.4575 -0.8558 -0.2414
624
+ vn 0.2817 -0.9286 -0.2414
625
+ vn 0.0951 -0.9657 -0.2414
626
+ vt 0.847703 0.234951
627
+ vt 0.974738 0.150069
628
+ vt 0.889856 0.023035
629
+ vt 0.762822 0.107916
630
+ vt 0.778953 0.189013
631
+ vt 0.808759 0.039165
632
+ vt 0.958607 0.068972
633
+ vt 0.928801 0.218820
634
+ vt 0.808759 0.218820
635
+ vt 0.762822 0.150069
636
+ vt 0.778953 0.068972
637
+ vt 0.847703 0.023035
638
+ vt 0.928801 0.039165
639
+ vt 0.974738 0.107916
640
+ vt 0.958607 0.189013
641
+ vt 0.889856 0.234951
642
+ vt 0.827437 0.228803
643
+ vt 0.792388 0.205385
644
+ vt 0.768969 0.170336
645
+ vt 0.760746 0.128993
646
+ vt 0.768969 0.087650
647
+ vt 0.792388 0.052601
648
+ vt 0.827437 0.029182
649
+ vt 0.868780 0.020959
650
+ vt 0.910123 0.029182
651
+ vt 0.945172 0.052601
652
+ vt 0.968590 0.087650
653
+ vt 0.976814 0.128993
654
+ vt 0.968590 0.170336
655
+ vt 0.945172 0.205385
656
+ vt 0.910123 0.228803
657
+ vt 0.868780 0.237027
658
+ vt 0.622632 0.234951
659
+ vt 0.643709 0.128993
660
+ vt 0.643709 0.237027
661
+ vt 0.602366 0.228803
662
+ vt 0.583688 0.218820
663
+ vt 0.567317 0.205385
664
+ vt 0.553881 0.189013
665
+ vt 0.543898 0.170336
666
+ vt 0.537751 0.150069
667
+ vt 0.535675 0.128993
668
+ vt 0.537751 0.107916
669
+ vt 0.543898 0.087650
670
+ vt 0.553881 0.068972
671
+ vt 0.567317 0.052601
672
+ vt 0.583688 0.039165
673
+ vt 0.602366 0.029182
674
+ vt 0.622632 0.023035
675
+ vt 0.643709 0.020959
676
+ vt 0.664785 0.023035
677
+ vt 0.685052 0.029182
678
+ vt 0.703729 0.039165
679
+ vt 0.720101 0.052601
680
+ vt 0.733536 0.068972
681
+ vt 0.743519 0.087650
682
+ vt 0.749667 0.107916
683
+ vt 0.751743 0.128993
684
+ vt 0.749667 0.150069
685
+ vt 0.743519 0.170336
686
+ vt 0.733536 0.189013
687
+ vt 0.720101 0.205385
688
+ vt 0.703729 0.218820
689
+ vt 0.685052 0.228803
690
+ vt 0.664785 0.234951
691
+ s 0
692
+ usemtl MI_YamahaMSP3_MatteBlack.003
693
+ f 99/196/70 123/197/70 115/198/70
694
+ f 107/199/70 103/200/70 99/196/70
695
+ f 115/198/70 111/201/70 107/199/70
696
+ f 123/197/70 119/202/70 115/198/70
697
+ f 99/196/70 127/203/70 123/197/70
698
+ f 103/200/70 101/204/70 99/196/70
699
+ f 107/199/70 105/205/70 103/200/70
700
+ f 111/201/70 109/206/70 107/199/70
701
+ f 115/198/70 113/207/70 111/201/70
702
+ f 119/202/70 117/208/70 115/198/70
703
+ f 123/197/70 121/209/70 119/202/70
704
+ f 127/203/70 125/210/70 123/197/70
705
+ f 99/196/70 129/211/70 127/203/70
706
+ f 101/204/70 100/212/70 99/196/70
707
+ f 103/200/71 102/213/71 101/204/71
708
+ f 105/205/71 104/214/71 103/200/71
709
+ f 107/199/72 106/215/72 105/205/72
710
+ f 109/206/72 108/216/72 107/199/72
711
+ f 111/201/71 110/217/71 109/206/71
712
+ f 113/207/70 112/218/70 111/201/70
713
+ f 115/198/70 114/219/70 113/207/70
714
+ f 117/208/70 116/220/70 115/198/70
715
+ f 119/202/72 118/221/72 117/208/72
716
+ f 121/209/71 120/222/71 119/202/71
717
+ f 123/197/71 122/223/71 121/209/71
718
+ f 125/210/72 124/224/72 123/197/72
719
+ f 127/203/72 126/225/72 125/210/72
720
+ f 129/211/70 128/226/70 127/203/70
721
+ f 99/196/70 130/227/70 129/211/70
722
+ f 99/228/73 98/229/73 130/230/73
723
+ f 100/231/74 98/229/74 99/228/74
724
+ f 115/198/70 107/199/70 99/196/70
725
+ f 101/232/75 98/229/75 100/231/75
726
+ f 102/233/76 98/229/76 101/232/76
727
+ f 103/234/77 98/229/77 102/233/77
728
+ f 104/235/78 98/229/78 103/234/78
729
+ f 105/236/79 98/229/79 104/235/79
730
+ f 106/237/80 98/229/80 105/236/80
731
+ f 107/238/81 98/229/81 106/237/81
732
+ f 108/239/82 98/229/82 107/238/82
733
+ f 109/240/83 98/229/83 108/239/83
734
+ f 110/241/84 98/229/84 109/240/84
735
+ f 111/242/85 98/229/85 110/241/85
736
+ f 112/243/86 98/229/86 111/242/86
737
+ f 113/244/87 98/229/87 112/243/87
738
+ f 114/245/88 98/229/88 113/244/88
739
+ f 115/246/89 98/229/89 114/245/89
740
+ f 116/247/90 98/229/90 115/246/90
741
+ f 117/248/91 98/229/91 116/247/91
742
+ f 118/249/92 98/229/92 117/248/92
743
+ f 119/250/93 98/229/93 118/249/93
744
+ f 120/251/94 98/229/94 119/250/94
745
+ f 121/252/95 98/229/95 120/251/95
746
+ f 122/253/96 98/229/96 121/252/96
747
+ f 123/254/97 98/229/97 122/253/97
748
+ f 124/255/98 98/229/98 123/254/98
749
+ f 125/256/99 98/229/99 124/255/99
750
+ f 126/257/100 98/229/100 125/256/100
751
+ f 127/258/101 98/229/101 126/257/101
752
+ f 128/259/102 98/229/102 127/258/102
753
+ f 129/260/103 98/229/103 128/259/103
754
+ f 130/230/104 98/229/104 129/260/104
755
+ o Yzhu
756
+ v -0.097545 0.490392 -0.000000
757
+ v -0.097545 0.490391 -24.000000
758
+ v -0.191342 0.461939 -0.000000
759
+ v -0.191342 0.461938 -24.000000
760
+ v -0.277785 0.415734 -0.000000
761
+ v -0.277785 0.415733 -24.000000
762
+ v -0.353553 0.353553 -0.000000
763
+ v -0.353553 0.353552 -24.000000
764
+ v -0.415735 0.277785 -0.000000
765
+ v -0.415735 0.277784 -24.000000
766
+ v -0.461940 0.191341 -0.000000
767
+ v -0.461940 0.191340 -24.000000
768
+ v -0.490393 0.097545 -0.000000
769
+ v -0.490393 0.097544 -24.000000
770
+ v -0.500000 -0.000001 0.000000
771
+ v -0.500000 -0.000001 -24.000000
772
+ v -0.490393 -0.097546 0.000000
773
+ v -0.490393 -0.097547 -24.000000
774
+ v -0.461940 -0.191342 0.000000
775
+ v -0.461940 -0.191343 -24.000000
776
+ v -0.415735 -0.277786 0.000000
777
+ v -0.415735 -0.277787 -24.000000
778
+ v -0.353553 -0.353554 0.000000
779
+ v -0.353553 -0.353555 -24.000000
780
+ v -0.277785 -0.415735 0.000000
781
+ v -0.277785 -0.415736 -24.000000
782
+ v -0.191342 -0.461940 0.000000
783
+ v -0.191342 -0.461941 -24.000000
784
+ v -0.097545 -0.490393 0.000000
785
+ v -0.097545 -0.490394 -24.000000
786
+ v 0.000000 -0.500001 0.000000
787
+ v 0.000000 -0.500001 -24.000000
788
+ v 0.097545 -0.490393 0.000000
789
+ v 0.097545 -0.490394 -24.000000
790
+ v 0.191342 -0.461940 0.000000
791
+ v 0.191342 -0.461941 -24.000000
792
+ v 0.277785 -0.415735 0.000000
793
+ v 0.277785 -0.415736 -24.000000
794
+ v 0.353553 -0.353554 0.000000
795
+ v 0.353553 -0.353555 -24.000000
796
+ v 0.415735 -0.277786 0.000000
797
+ v 0.415735 -0.277787 -24.000000
798
+ v 0.461940 -0.191342 0.000000
799
+ v 0.461940 -0.191343 -24.000000
800
+ v 0.490393 -0.097546 0.000000
801
+ v 0.490393 -0.097547 -24.000000
802
+ v 0.500000 -0.000001 0.000000
803
+ v 0.500000 -0.000001 -24.000000
804
+ v 0.490393 0.097545 -0.000000
805
+ v 0.490393 0.097544 -24.000000
806
+ v 0.461940 0.191341 -0.000000
807
+ v 0.461940 0.191340 -24.000000
808
+ v 0.415735 0.277785 -0.000000
809
+ v 0.415735 0.277784 -24.000000
810
+ v 0.353553 0.353553 -0.000000
811
+ v 0.353553 0.353552 -24.000000
812
+ v 0.277785 0.415734 -0.000000
813
+ v 0.277785 0.415733 -24.000000
814
+ v 0.191342 0.461939 -0.000000
815
+ v 0.191342 0.461938 -24.000000
816
+ v 0.097545 0.490392 -0.000000
817
+ v 0.097545 0.490391 -24.000000
818
+ v 0.000000 0.499999 -0.000000
819
+ v 0.000000 0.499999 -24.000000
820
+ vn -0.0000 -0.0000 -1.0000
821
+ vn -0.0001 -0.0000 -1.0000
822
+ vn 0.0001 -0.0000 -1.0000
823
+ vn -0.0980 0.9952 -0.0000
824
+ vn -0.2903 0.9569 -0.0000
825
+ vn -0.0000 -0.0000 1.0000
826
+ vn -0.4714 0.8819 -0.0000
827
+ vn -0.6344 0.7730 -0.0000
828
+ vn -0.7730 0.6344 -0.0000
829
+ vn -0.8819 0.4714 -0.0000
830
+ vn -0.9569 0.2903 -0.0000
831
+ vn -0.9952 0.0980 -0.0000
832
+ vn -0.9952 -0.0980 -0.0000
833
+ vn -0.9569 -0.2903 -0.0000
834
+ vn -0.8819 -0.4714 -0.0000
835
+ vn -0.7730 -0.6344 -0.0000
836
+ vn -0.6344 -0.7730 -0.0000
837
+ vn -0.4714 -0.8819 -0.0000
838
+ vn -0.2903 -0.9569 -0.0000
839
+ vn -0.0980 -0.9952 -0.0000
840
+ vn 0.0980 -0.9952 -0.0000
841
+ vn 0.2903 -0.9569 -0.0000
842
+ vn 0.4714 -0.8819 -0.0000
843
+ vn 0.6344 -0.7730 -0.0000
844
+ vn 0.7730 -0.6344 -0.0000
845
+ vn 0.8819 -0.4714 -0.0000
846
+ vn 0.9569 -0.2903 -0.0000
847
+ vn 0.9952 -0.0980 -0.0000
848
+ vn 0.9952 0.0980 -0.0000
849
+ vn 0.9569 0.2903 -0.0000
850
+ vn 0.8819 0.4714 -0.0000
851
+ vn 0.7730 0.6344 -0.0000
852
+ vn 0.6344 0.7730 -0.0000
853
+ vn 0.4714 0.8819 -0.0000
854
+ vn 0.2903 0.9569 -0.0000
855
+ vn 0.0980 0.9952 -0.0000
856
+ vt 0.847703 0.234951
857
+ vt 0.974738 0.150069
858
+ vt 0.889856 0.023035
859
+ vt 0.762822 0.107916
860
+ vt 0.778953 0.189013
861
+ vt 0.808759 0.039165
862
+ vt 0.958607 0.068972
863
+ vt 0.928801 0.218820
864
+ vt 0.808759 0.218820
865
+ vt 0.762822 0.150069
866
+ vt 0.778953 0.068972
867
+ vt 0.847703 0.023035
868
+ vt 0.928801 0.039165
869
+ vt 0.974738 0.107916
870
+ vt 0.958607 0.189013
871
+ vt 0.889856 0.234951
872
+ vt 0.827437 0.228803
873
+ vt 0.792388 0.205385
874
+ vt 0.768969 0.170336
875
+ vt 0.760746 0.128993
876
+ vt 0.768969 0.087650
877
+ vt 0.792388 0.052601
878
+ vt 0.827437 0.029182
879
+ vt 0.868780 0.020959
880
+ vt 0.910123 0.029182
881
+ vt 0.945172 0.052601
882
+ vt 0.968590 0.087650
883
+ vt 0.976814 0.128993
884
+ vt 0.968590 0.170336
885
+ vt 0.945172 0.205385
886
+ vt 0.910123 0.228803
887
+ vt 0.868780 0.237027
888
+ vt 0.545240 0.466600
889
+ vt 0.531173 0.466600
890
+ vt 0.531173 0.241528
891
+ vt 0.559307 0.466600
892
+ vt 0.545240 0.241528
893
+ vt 0.685052 0.228803
894
+ vt 0.543898 0.170336
895
+ vt 0.602366 0.029182
896
+ vt 0.743519 0.087650
897
+ vt 0.743519 0.170336
898
+ vt 0.685052 0.029182
899
+ vt 0.543898 0.087650
900
+ vt 0.602366 0.228803
901
+ vt 0.720101 0.205385
902
+ vt 0.751743 0.128993
903
+ vt 0.720101 0.052601
904
+ vt 0.643709 0.020959
905
+ vt 0.567317 0.052601
906
+ vt 0.535675 0.128993
907
+ vt 0.567317 0.205385
908
+ vt 0.643709 0.237027
909
+ vt 0.703729 0.218820
910
+ vt 0.733536 0.189013
911
+ vt 0.749667 0.150069
912
+ vt 0.749667 0.107916
913
+ vt 0.733536 0.068972
914
+ vt 0.703729 0.039165
915
+ vt 0.664785 0.023035
916
+ vt 0.622632 0.023035
917
+ vt 0.583688 0.039165
918
+ vt 0.553881 0.068972
919
+ vt 0.537751 0.107916
920
+ vt 0.537751 0.150069
921
+ vt 0.553881 0.189013
922
+ vt 0.583688 0.218820
923
+ vt 0.622632 0.234951
924
+ vt 0.664785 0.234951
925
+ vt 0.573374 0.466600
926
+ vt 0.559307 0.241528
927
+ vt 0.587441 0.466600
928
+ vt 0.573374 0.241528
929
+ vt 0.601508 0.466600
930
+ vt 0.587441 0.241528
931
+ vt 0.615575 0.466600
932
+ vt 0.601508 0.241528
933
+ vt 0.629642 0.466600
934
+ vt 0.615575 0.241528
935
+ vt 0.643709 0.466600
936
+ vt 0.629642 0.241528
937
+ vt 0.657776 0.466600
938
+ vt 0.643709 0.241528
939
+ vt 0.671843 0.466600
940
+ vt 0.657776 0.241528
941
+ vt 0.685910 0.466600
942
+ vt 0.671843 0.241528
943
+ vt 0.699977 0.466600
944
+ vt 0.685910 0.241528
945
+ vt 0.714043 0.466600
946
+ vt 0.699977 0.241528
947
+ vt 0.728110 0.466600
948
+ vt 0.714043 0.241528
949
+ vt 0.742177 0.466600
950
+ vt 0.728110 0.241528
951
+ vt 0.756244 0.466600
952
+ vt 0.742177 0.241528
953
+ vt 0.770311 0.466600
954
+ vt 0.756244 0.241528
955
+ vt 0.784378 0.466600
956
+ vt 0.770311 0.241528
957
+ vt 0.798445 0.466600
958
+ vt 0.784378 0.241528
959
+ vt 0.812512 0.466600
960
+ vt 0.798445 0.241528
961
+ vt 0.826579 0.466600
962
+ vt 0.812512 0.241528
963
+ vt 0.840646 0.466600
964
+ vt 0.826579 0.241528
965
+ vt 0.854713 0.466600
966
+ vt 0.840646 0.241528
967
+ vt 0.868780 0.466600
968
+ vt 0.854713 0.241528
969
+ vt 0.882847 0.466600
970
+ vt 0.868780 0.241528
971
+ vt 0.896914 0.466600
972
+ vt 0.882847 0.241528
973
+ vt 0.910981 0.466600
974
+ vt 0.896914 0.241528
975
+ vt 0.925048 0.466600
976
+ vt 0.910981 0.241528
977
+ vt 0.939115 0.466600
978
+ vt 0.925048 0.241528
979
+ vt 0.953182 0.466600
980
+ vt 0.939115 0.241528
981
+ vt 0.967249 0.466600
982
+ vt 0.953182 0.241528
983
+ vt 0.981316 0.466600
984
+ vt 0.967249 0.241528
985
+ vt 0.981316 0.241528
986
+ s 0
987
+ usemtl MI_YamahaMSP3_MatteBlack.003
988
+ f 132/261/105 180/262/105 164/263/105
989
+ f 148/264/105 140/265/105 132/261/105
990
+ f 164/263/105 156/266/105 148/264/105
991
+ f 180/262/105 172/267/105 164/263/105
992
+ f 132/261/105 188/268/105 180/262/105
993
+ f 140/265/105 136/269/105 132/261/105
994
+ f 148/264/106 144/270/106 140/265/106
995
+ f 156/266/105 152/271/105 148/264/105
996
+ f 164/263/105 160/272/105 156/266/105
997
+ f 172/267/105 168/273/105 164/263/105
998
+ f 180/262/107 176/274/107 172/267/107
999
+ f 188/268/105 184/275/105 180/262/105
1000
+ f 132/261/105 192/276/105 188/268/105
1001
+ f 136/269/105 134/277/105 132/261/105
1002
+ f 140/265/105 138/278/105 136/269/105
1003
+ f 144/270/107 142/279/107 140/265/107
1004
+ f 148/264/106 146/280/106 144/270/106
1005
+ f 152/271/105 150/281/105 148/264/105
1006
+ f 156/266/105 154/282/105 152/271/105
1007
+ f 160/272/105 158/283/105 156/266/105
1008
+ f 164/263/105 162/284/105 160/272/105
1009
+ f 168/273/105 166/285/105 164/263/105
1010
+ f 172/267/105 170/286/105 168/273/105
1011
+ f 176/274/105 174/287/105 172/267/105
1012
+ f 180/262/107 178/288/107 176/274/107
1013
+ f 184/275/106 182/289/106 180/262/106
1014
+ f 188/268/105 186/290/105 184/275/105
1015
+ f 192/276/105 190/291/105 188/268/105
1016
+ f 132/261/105 194/292/105 192/276/105
1017
+ f 131/293/108 193/294/108 194/295/108
1018
+ f 133/296/109 131/293/109 132/297/109
1019
+ f 189/298/110 141/299/110 157/300/110
1020
+ f 173/301/110 181/302/110 189/298/110
1021
+ f 157/300/110 165/303/110 173/301/110
1022
+ f 141/299/110 149/304/110 157/300/110
1023
+ f 189/298/110 133/305/110 141/299/110
1024
+ f 181/302/110 185/306/110 189/298/110
1025
+ f 173/301/110 177/307/110 181/302/110
1026
+ f 165/303/110 169/308/110 173/301/110
1027
+ f 157/300/110 161/309/110 165/303/110
1028
+ f 149/304/110 153/310/110 157/300/110
1029
+ f 141/299/110 145/311/110 149/304/110
1030
+ f 133/305/110 137/312/110 141/299/110
1031
+ f 189/298/110 193/313/110 133/305/110
1032
+ f 185/306/110 187/314/110 189/298/110
1033
+ f 181/302/110 183/315/110 185/306/110
1034
+ f 177/307/110 179/316/110 181/302/110
1035
+ f 173/301/110 175/317/110 177/307/110
1036
+ f 169/308/110 171/318/110 173/301/110
1037
+ f 165/303/110 167/319/110 169/308/110
1038
+ f 161/309/110 163/320/110 165/303/110
1039
+ f 157/300/110 159/321/110 161/309/110
1040
+ f 153/310/110 155/322/110 157/300/110
1041
+ f 149/304/110 151/323/110 153/310/110
1042
+ f 145/311/110 147/324/110 149/304/110
1043
+ f 141/299/110 143/325/110 145/311/110
1044
+ f 137/312/110 139/326/110 141/299/110
1045
+ f 133/305/110 135/327/110 137/312/110
1046
+ f 193/313/110 131/328/110 133/305/110
1047
+ f 189/298/110 191/329/110 193/313/110
1048
+ f 135/330/111 133/296/111 134/331/111
1049
+ f 137/332/112 135/330/112 136/333/112
1050
+ f 139/334/113 137/332/113 138/335/113
1051
+ f 141/336/114 139/334/114 140/337/114
1052
+ f 143/338/115 141/336/115 142/339/115
1053
+ f 145/340/116 143/338/116 144/341/116
1054
+ f 147/342/117 145/340/117 146/343/117
1055
+ f 149/344/118 147/342/118 148/345/118
1056
+ f 151/346/119 149/344/119 150/347/119
1057
+ f 153/348/120 151/346/120 152/349/120
1058
+ f 155/350/121 153/348/121 154/351/121
1059
+ f 157/352/122 155/350/122 156/353/122
1060
+ f 159/354/123 157/352/123 158/355/123
1061
+ f 161/356/124 159/354/124 160/357/124
1062
+ f 163/358/125 161/356/125 162/359/125
1063
+ f 165/360/126 163/358/126 164/361/126
1064
+ f 167/362/127 165/360/127 166/363/127
1065
+ f 169/364/128 167/362/128 168/365/128
1066
+ f 171/366/129 169/364/129 170/367/129
1067
+ f 173/368/130 171/366/130 172/369/130
1068
+ f 175/370/131 173/368/131 174/371/131
1069
+ f 177/372/132 175/370/132 176/373/132
1070
+ f 179/374/133 177/372/133 178/375/133
1071
+ f 181/376/134 179/374/134 180/377/134
1072
+ f 183/378/135 181/376/135 182/379/135
1073
+ f 185/380/136 183/378/136 184/381/136
1074
+ f 187/382/137 185/380/137 186/383/137
1075
+ f 189/384/138 187/382/138 188/385/138
1076
+ f 191/386/139 189/384/139 190/387/139
1077
+ f 193/388/140 191/386/140 192/389/140
1078
+ f 164/263/105 148/264/105 132/261/105
1079
+ f 131/293/108 194/295/108 132/297/108
1080
+ f 133/296/109 132/297/109 134/331/109
1081
+ f 157/300/110 173/301/110 189/298/110
1082
+ f 135/330/111 134/331/111 136/333/111
1083
+ f 137/332/112 136/333/112 138/335/112
1084
+ f 139/334/113 138/335/113 140/337/113
1085
+ f 141/336/114 140/337/114 142/339/114
1086
+ f 143/338/115 142/339/115 144/341/115
1087
+ f 145/340/116 144/341/116 146/343/116
1088
+ f 147/342/117 146/343/117 148/345/117
1089
+ f 149/344/118 148/345/118 150/347/118
1090
+ f 151/346/119 150/347/119 152/349/119
1091
+ f 153/348/120 152/349/120 154/351/120
1092
+ f 155/350/121 154/351/121 156/353/121
1093
+ f 157/352/122 156/353/122 158/355/122
1094
+ f 159/354/123 158/355/123 160/357/123
1095
+ f 161/356/124 160/357/124 162/359/124
1096
+ f 163/358/125 162/359/125 164/361/125
1097
+ f 165/360/126 164/361/126 166/363/126
1098
+ f 167/362/127 166/363/127 168/365/127
1099
+ f 169/364/128 168/365/128 170/367/128
1100
+ f 171/366/129 170/367/129 172/369/129
1101
+ f 173/368/130 172/369/130 174/371/130
1102
+ f 175/370/131 174/371/131 176/373/131
1103
+ f 177/372/132 176/373/132 178/375/132
1104
+ f 179/374/133 178/375/133 180/377/133
1105
+ f 181/376/134 180/377/134 182/379/134
1106
+ f 183/378/135 182/379/135 184/381/135
1107
+ f 185/380/136 184/381/136 186/383/136
1108
+ f 187/382/137 186/383/137 188/385/137
1109
+ f 189/384/138 188/385/138 190/387/138
1110
+ f 191/386/139 190/387/139 192/389/139
1111
+ f 193/388/140 192/389/140 194/390/140
1112
+ o Z
1113
+ v 0.000000 28.000000 -0.000002
1114
+ v -0.292636 22.000000 -1.471180
1115
+ v -0.574025 22.000000 -1.385821
1116
+ v -0.833355 22.000000 -1.247206
1117
+ v -1.060660 22.000000 -1.060662
1118
+ v -1.247204 22.000000 -0.833357
1119
+ v -1.385819 22.000000 -0.574027
1120
+ v -1.471178 22.000000 -0.292638
1121
+ v -1.500000 22.000000 -0.000002
1122
+ v -1.471178 22.000000 0.292634
1123
+ v -1.385819 22.000000 0.574023
1124
+ v -1.247204 22.000000 0.833353
1125
+ v -1.060660 22.000000 1.060658
1126
+ v -0.833355 22.000000 1.247202
1127
+ v -0.574025 22.000000 1.385817
1128
+ v -0.292636 22.000000 1.471176
1129
+ v 0.000000 22.000000 1.499998
1130
+ v 0.292636 22.000000 1.471176
1131
+ v 0.574025 22.000000 1.385817
1132
+ v 0.833355 22.000000 1.247202
1133
+ v 1.060660 22.000000 1.060658
1134
+ v 1.247204 22.000000 0.833353
1135
+ v 1.385819 22.000000 0.574023
1136
+ v 1.471178 22.000000 0.292634
1137
+ v 1.500000 22.000000 -0.000002
1138
+ v 1.471178 22.000000 -0.292638
1139
+ v 1.385819 22.000000 -0.574027
1140
+ v 1.247204 22.000000 -0.833357
1141
+ v 1.060660 22.000000 -1.060662
1142
+ v 0.833355 22.000000 -1.247206
1143
+ v 0.574025 22.000000 -1.385821
1144
+ v 0.292636 22.000000 -1.471180
1145
+ v 0.000000 22.000000 -1.500002
1146
+ vn -0.0000 -1.0000 -0.0000
1147
+ vn -0.0000 -1.0000 0.0001
1148
+ vn -0.0000 -1.0000 -0.0001
1149
+ vn -0.0951 0.2414 -0.9657
1150
+ vn -0.2817 0.2414 -0.9286
1151
+ vn -0.4575 0.2414 -0.8558
1152
+ vn -0.6156 0.2414 -0.7501
1153
+ vn -0.7501 0.2414 -0.6156
1154
+ vn -0.8558 0.2414 -0.4575
1155
+ vn -0.9286 0.2414 -0.2817
1156
+ vn -0.9657 0.2414 -0.0951
1157
+ vn -0.9657 0.2414 0.0951
1158
+ vn -0.9286 0.2414 0.2817
1159
+ vn -0.8558 0.2414 0.4575
1160
+ vn -0.7501 0.2414 0.6156
1161
+ vn -0.6156 0.2414 0.7501
1162
+ vn -0.4575 0.2414 0.8558
1163
+ vn -0.2817 0.2414 0.9286
1164
+ vn -0.0951 0.2414 0.9657
1165
+ vn 0.0951 0.2414 0.9657
1166
+ vn 0.2817 0.2414 0.9286
1167
+ vn 0.4575 0.2414 0.8558
1168
+ vn 0.6156 0.2414 0.7501
1169
+ vn 0.7501 0.2414 0.6156
1170
+ vn 0.8558 0.2414 0.4575
1171
+ vn 0.9286 0.2414 0.2817
1172
+ vn 0.9657 0.2414 0.0951
1173
+ vn 0.9657 0.2414 -0.0951
1174
+ vn 0.9286 0.2414 -0.2817
1175
+ vn 0.8558 0.2414 -0.4575
1176
+ vn 0.7501 0.2414 -0.6156
1177
+ vn 0.6156 0.2414 -0.7501
1178
+ vn 0.4575 0.2414 -0.8558
1179
+ vn 0.2817 0.2414 -0.9286
1180
+ vn 0.0951 0.2414 -0.9657
1181
+ vt 0.344619 0.232996
1182
+ vt 0.473521 0.146867
1183
+ vt 0.387392 0.017966
1184
+ vt 0.258490 0.104095
1185
+ vt 0.274858 0.186384
1186
+ vt 0.305103 0.034334
1187
+ vt 0.457153 0.064579
1188
+ vt 0.426908 0.216629
1189
+ vt 0.305103 0.216629
1190
+ vt 0.258490 0.146867
1191
+ vt 0.274858 0.064579
1192
+ vt 0.344619 0.017966
1193
+ vt 0.426908 0.034334
1194
+ vt 0.473521 0.104095
1195
+ vt 0.457153 0.186384
1196
+ vt 0.387392 0.232996
1197
+ vt 0.324055 0.226758
1198
+ vt 0.288491 0.202996
1199
+ vt 0.264728 0.167432
1200
+ vt 0.256384 0.125481
1201
+ vt 0.264728 0.083531
1202
+ vt 0.288491 0.047967
1203
+ vt 0.324055 0.024204
1204
+ vt 0.366006 0.015859
1205
+ vt 0.407956 0.024204
1206
+ vt 0.443520 0.047967
1207
+ vt 0.467283 0.083531
1208
+ vt 0.475627 0.125481
1209
+ vt 0.467283 0.167432
1210
+ vt 0.443520 0.202996
1211
+ vt 0.407956 0.226758
1212
+ vt 0.366006 0.235103
1213
+ vt 0.116241 0.232996
1214
+ vt 0.137627 0.125481
1215
+ vt 0.137627 0.235103
1216
+ vt 0.095676 0.226758
1217
+ vt 0.076724 0.216629
1218
+ vt 0.060112 0.202996
1219
+ vt 0.046480 0.186384
1220
+ vt 0.036350 0.167432
1221
+ vt 0.030112 0.146867
1222
+ vt 0.028005 0.125481
1223
+ vt 0.030112 0.104095
1224
+ vt 0.036350 0.083531
1225
+ vt 0.046480 0.064579
1226
+ vt 0.060112 0.047967
1227
+ vt 0.076724 0.034334
1228
+ vt 0.095676 0.024204
1229
+ vt 0.116241 0.017966
1230
+ vt 0.137627 0.015859
1231
+ vt 0.159013 0.017966
1232
+ vt 0.179577 0.024204
1233
+ vt 0.198530 0.034334
1234
+ vt 0.215141 0.047967
1235
+ vt 0.228774 0.064579
1236
+ vt 0.238904 0.083531
1237
+ vt 0.245142 0.104095
1238
+ vt 0.247249 0.125481
1239
+ vt 0.245142 0.146867
1240
+ vt 0.238904 0.167432
1241
+ vt 0.228774 0.186384
1242
+ vt 0.215141 0.202996
1243
+ vt 0.198530 0.216629
1244
+ vt 0.179577 0.226758
1245
+ vt 0.159013 0.232996
1246
+ s 0
1247
+ usemtl MI_YamahaMSP3_MatteBlack.010
1248
+ f 196/391/141 220/392/141 212/393/141
1249
+ f 204/394/141 200/395/141 196/391/141
1250
+ f 212/393/141 208/396/141 204/394/141
1251
+ f 220/392/141 216/397/141 212/393/141
1252
+ f 196/391/141 224/398/141 220/392/141
1253
+ f 200/395/141 198/399/141 196/391/141
1254
+ f 204/394/141 202/400/141 200/395/141
1255
+ f 208/396/141 206/401/141 204/394/141
1256
+ f 212/393/141 210/402/141 208/396/141
1257
+ f 216/397/141 214/403/141 212/393/141
1258
+ f 220/392/141 218/404/141 216/397/141
1259
+ f 224/398/141 222/405/141 220/392/141
1260
+ f 196/391/141 226/406/141 224/398/141
1261
+ f 198/399/142 197/407/142 196/391/142
1262
+ f 200/395/143 199/408/143 198/399/143
1263
+ f 202/400/141 201/409/141 200/395/141
1264
+ f 204/394/141 203/410/141 202/400/141
1265
+ f 206/401/141 205/411/141 204/394/141
1266
+ f 208/396/142 207/412/142 206/401/142
1267
+ f 210/402/143 209/413/143 208/396/143
1268
+ f 212/393/141 211/414/141 210/402/141
1269
+ f 214/403/143 213/415/143 212/393/143
1270
+ f 216/397/142 215/416/142 214/403/142
1271
+ f 218/404/141 217/417/141 216/397/141
1272
+ f 220/392/141 219/418/141 218/404/141
1273
+ f 222/405/141 221/419/141 220/392/141
1274
+ f 224/398/143 223/420/143 222/405/143
1275
+ f 226/406/142 225/421/142 224/398/142
1276
+ f 196/391/141 227/422/141 226/406/141
1277
+ f 196/423/144 195/424/144 227/425/144
1278
+ f 197/426/145 195/424/145 196/423/145
1279
+ f 212/393/141 204/394/141 196/391/141
1280
+ f 198/427/146 195/424/146 197/426/146
1281
+ f 199/428/147 195/424/147 198/427/147
1282
+ f 200/429/148 195/424/148 199/428/148
1283
+ f 201/430/149 195/424/149 200/429/149
1284
+ f 202/431/150 195/424/150 201/430/150
1285
+ f 203/432/151 195/424/151 202/431/151
1286
+ f 204/433/152 195/424/152 203/432/152
1287
+ f 205/434/153 195/424/153 204/433/153
1288
+ f 206/435/154 195/424/154 205/434/154
1289
+ f 207/436/155 195/424/155 206/435/155
1290
+ f 208/437/156 195/424/156 207/436/156
1291
+ f 209/438/157 195/424/157 208/437/157
1292
+ f 210/439/158 195/424/158 209/438/158
1293
+ f 211/440/159 195/424/159 210/439/159
1294
+ f 212/441/160 195/424/160 211/440/160
1295
+ f 213/442/161 195/424/161 212/441/161
1296
+ f 214/443/162 195/424/162 213/442/162
1297
+ f 215/444/163 195/424/163 214/443/163
1298
+ f 216/445/164 195/424/164 215/444/164
1299
+ f 217/446/165 195/424/165 216/445/165
1300
+ f 218/447/166 195/424/166 217/446/166
1301
+ f 219/448/167 195/424/167 218/447/167
1302
+ f 220/449/168 195/424/168 219/448/168
1303
+ f 221/450/169 195/424/169 220/449/169
1304
+ f 222/451/170 195/424/170 221/450/170
1305
+ f 223/452/171 195/424/171 222/451/171
1306
+ f 224/453/172 195/424/172 223/452/172
1307
+ f 225/454/173 195/424/173 224/453/173
1308
+ f 226/455/174 195/424/174 225/454/174
1309
+ f 227/425/175 195/424/175 226/455/175
1310
+ o Zzhu
1311
+ v -0.097545 24.000000 -0.490395
1312
+ v -0.097545 -0.000000 -0.490393
1313
+ v -0.191342 24.000000 -0.461942
1314
+ v -0.191342 -0.000000 -0.461940
1315
+ v -0.277785 24.000000 -0.415737
1316
+ v -0.277785 -0.000000 -0.415735
1317
+ v -0.353553 24.000000 -0.353555
1318
+ v -0.353553 -0.000000 -0.353553
1319
+ v -0.415735 24.000000 -0.277787
1320
+ v -0.415735 -0.000000 -0.277785
1321
+ v -0.461940 24.000000 -0.191344
1322
+ v -0.461940 -0.000000 -0.191342
1323
+ v -0.490393 24.000000 -0.097547
1324
+ v -0.490393 -0.000000 -0.097545
1325
+ v -0.500000 24.000000 -0.000002
1326
+ v -0.500000 0.000000 0.000000
1327
+ v -0.490393 24.000000 0.097543
1328
+ v -0.490393 0.000000 0.097545
1329
+ v -0.461940 24.000000 0.191340
1330
+ v -0.461940 0.000000 0.191342
1331
+ v -0.415735 24.000000 0.277783
1332
+ v -0.415735 0.000000 0.277785
1333
+ v -0.353553 24.000000 0.353551
1334
+ v -0.353553 0.000000 0.353553
1335
+ v -0.277785 24.000000 0.415733
1336
+ v -0.277785 0.000000 0.415735
1337
+ v -0.191342 24.000000 0.461938
1338
+ v -0.191342 0.000000 0.461940
1339
+ v -0.097545 24.000000 0.490391
1340
+ v -0.097545 0.000000 0.490393
1341
+ v 0.000000 24.000000 0.499998
1342
+ v 0.000000 0.000000 0.500000
1343
+ v 0.097545 24.000000 0.490391
1344
+ v 0.097545 0.000000 0.490393
1345
+ v 0.191342 24.000000 0.461938
1346
+ v 0.191342 0.000000 0.461940
1347
+ v 0.277785 24.000000 0.415733
1348
+ v 0.277785 0.000000 0.415735
1349
+ v 0.353553 24.000000 0.353551
1350
+ v 0.353553 0.000000 0.353553
1351
+ v 0.415735 24.000000 0.277783
1352
+ v 0.415735 0.000000 0.277785
1353
+ v 0.461940 24.000000 0.191340
1354
+ v 0.461940 0.000000 0.191342
1355
+ v 0.490393 24.000000 0.097543
1356
+ v 0.490393 0.000000 0.097545
1357
+ v 0.500000 24.000000 -0.000002
1358
+ v 0.500000 0.000000 0.000000
1359
+ v 0.490393 24.000000 -0.097547
1360
+ v 0.490393 -0.000000 -0.097545
1361
+ v 0.461940 24.000000 -0.191344
1362
+ v 0.461940 -0.000000 -0.191342
1363
+ v 0.415735 24.000000 -0.277787
1364
+ v 0.415735 -0.000000 -0.277785
1365
+ v 0.353553 24.000000 -0.353555
1366
+ v 0.353553 -0.000000 -0.353553
1367
+ v 0.277785 24.000000 -0.415737
1368
+ v 0.277785 -0.000000 -0.415735
1369
+ v 0.191342 24.000000 -0.461942
1370
+ v 0.191342 -0.000000 -0.461940
1371
+ v 0.097545 24.000000 -0.490395
1372
+ v 0.097545 -0.000000 -0.490393
1373
+ v 0.000000 24.000000 -0.500002
1374
+ v 0.000000 -0.000000 -0.500000
1375
+ vn -0.0000 -1.0000 -0.0000
1376
+ vn -0.0980 -0.0000 -0.9952
1377
+ vn -0.2903 -0.0000 -0.9569
1378
+ vn -0.0000 1.0000 -0.0000
1379
+ vn -0.4714 -0.0000 -0.8819
1380
+ vn -0.6344 -0.0000 -0.7730
1381
+ vn -0.7730 -0.0000 -0.6344
1382
+ vn -0.8819 -0.0000 -0.4714
1383
+ vn -0.9569 -0.0000 -0.2903
1384
+ vn -0.9952 -0.0000 -0.0980
1385
+ vn -0.9952 -0.0000 0.0980
1386
+ vn -0.9569 -0.0000 0.2903
1387
+ vn -0.8819 -0.0000 0.4714
1388
+ vn -0.7730 -0.0000 0.6344
1389
+ vn -0.6344 -0.0000 0.7730
1390
+ vn -0.4714 -0.0000 0.8819
1391
+ vn -0.2903 -0.0000 0.9569
1392
+ vn -0.0980 -0.0000 0.9952
1393
+ vn 0.0980 -0.0000 0.9952
1394
+ vn 0.2903 -0.0000 0.9569
1395
+ vn 0.4714 -0.0000 0.8819
1396
+ vn 0.6344 -0.0000 0.7730
1397
+ vn 0.7730 -0.0000 0.6344
1398
+ vn 0.8819 -0.0000 0.4714
1399
+ vn 0.9569 -0.0000 0.2903
1400
+ vn 0.9952 -0.0000 0.0980
1401
+ vn 0.9952 -0.0000 -0.0980
1402
+ vn 0.9569 -0.0000 -0.2903
1403
+ vn 0.8819 -0.0000 -0.4714
1404
+ vn 0.7730 -0.0000 -0.6344
1405
+ vn 0.6344 -0.0000 -0.7730
1406
+ vn 0.4714 -0.0000 -0.8819
1407
+ vn 0.2903 -0.0000 -0.9569
1408
+ vn 0.0980 -0.0000 -0.9952
1409
+ vt 0.344619 0.232996
1410
+ vt 0.473521 0.146867
1411
+ vt 0.387392 0.017966
1412
+ vt 0.258490 0.104095
1413
+ vt 0.274858 0.186384
1414
+ vt 0.305103 0.034334
1415
+ vt 0.457153 0.064579
1416
+ vt 0.426908 0.216629
1417
+ vt 0.305103 0.216629
1418
+ vt 0.258490 0.146867
1419
+ vt 0.274858 0.064579
1420
+ vt 0.344619 0.017966
1421
+ vt 0.426908 0.034334
1422
+ vt 0.473521 0.104095
1423
+ vt 0.457153 0.186384
1424
+ vt 0.387392 0.232996
1425
+ vt 0.324055 0.226758
1426
+ vt 0.288491 0.202996
1427
+ vt 0.264728 0.167432
1428
+ vt 0.256384 0.125481
1429
+ vt 0.264728 0.083531
1430
+ vt 0.288491 0.047967
1431
+ vt 0.324055 0.024204
1432
+ vt 0.366006 0.015859
1433
+ vt 0.407956 0.024204
1434
+ vt 0.443520 0.047967
1435
+ vt 0.467283 0.083531
1436
+ vt 0.475627 0.125481
1437
+ vt 0.467283 0.167432
1438
+ vt 0.443520 0.202996
1439
+ vt 0.407956 0.226758
1440
+ vt 0.366006 0.235103
1441
+ vt 0.037711 0.468049
1442
+ vt 0.023437 0.468049
1443
+ vt 0.023437 0.239671
1444
+ vt 0.051985 0.468049
1445
+ vt 0.037711 0.239671
1446
+ vt 0.179577 0.226758
1447
+ vt 0.036350 0.167432
1448
+ vt 0.095676 0.024204
1449
+ vt 0.238904 0.083531
1450
+ vt 0.238904 0.167432
1451
+ vt 0.179577 0.024204
1452
+ vt 0.036350 0.083531
1453
+ vt 0.095676 0.226758
1454
+ vt 0.215141 0.202996
1455
+ vt 0.247249 0.125481
1456
+ vt 0.215141 0.047967
1457
+ vt 0.137627 0.015859
1458
+ vt 0.060112 0.047967
1459
+ vt 0.028005 0.125481
1460
+ vt 0.060112 0.202996
1461
+ vt 0.137627 0.235103
1462
+ vt 0.198530 0.216629
1463
+ vt 0.228774 0.186384
1464
+ vt 0.245142 0.146867
1465
+ vt 0.245142 0.104095
1466
+ vt 0.228774 0.064579
1467
+ vt 0.198530 0.034334
1468
+ vt 0.159013 0.017966
1469
+ vt 0.116241 0.017966
1470
+ vt 0.076724 0.034334
1471
+ vt 0.046480 0.064579
1472
+ vt 0.030112 0.104095
1473
+ vt 0.030112 0.146867
1474
+ vt 0.046480 0.186384
1475
+ vt 0.076724 0.216629
1476
+ vt 0.116241 0.232996
1477
+ vt 0.159013 0.232996
1478
+ vt 0.066259 0.468049
1479
+ vt 0.051985 0.239671
1480
+ vt 0.080532 0.468049
1481
+ vt 0.066259 0.239671
1482
+ vt 0.094806 0.468049
1483
+ vt 0.080532 0.239671
1484
+ vt 0.109080 0.468049
1485
+ vt 0.094806 0.239671
1486
+ vt 0.123353 0.468049
1487
+ vt 0.109080 0.239671
1488
+ vt 0.137627 0.468049
1489
+ vt 0.123353 0.239671
1490
+ vt 0.151901 0.468049
1491
+ vt 0.137627 0.239671
1492
+ vt 0.166174 0.468049
1493
+ vt 0.151901 0.239671
1494
+ vt 0.180448 0.468049
1495
+ vt 0.166174 0.239671
1496
+ vt 0.194722 0.468049
1497
+ vt 0.180448 0.239671
1498
+ vt 0.208995 0.468049
1499
+ vt 0.194722 0.239671
1500
+ vt 0.223269 0.468049
1501
+ vt 0.208995 0.239671
1502
+ vt 0.237543 0.468049
1503
+ vt 0.223269 0.239671
1504
+ vt 0.251816 0.468049
1505
+ vt 0.237543 0.239671
1506
+ vt 0.266090 0.468049
1507
+ vt 0.251816 0.239671
1508
+ vt 0.280364 0.468049
1509
+ vt 0.266090 0.239671
1510
+ vt 0.294637 0.468049
1511
+ vt 0.280364 0.239671
1512
+ vt 0.308911 0.468049
1513
+ vt 0.294637 0.239671
1514
+ vt 0.323185 0.468049
1515
+ vt 0.308911 0.239671
1516
+ vt 0.337458 0.468049
1517
+ vt 0.323185 0.239671
1518
+ vt 0.351732 0.468049
1519
+ vt 0.337458 0.239671
1520
+ vt 0.366006 0.468049
1521
+ vt 0.351732 0.239671
1522
+ vt 0.380279 0.468049
1523
+ vt 0.366006 0.239671
1524
+ vt 0.394553 0.468049
1525
+ vt 0.380279 0.239671
1526
+ vt 0.408827 0.468049
1527
+ vt 0.394553 0.239671
1528
+ vt 0.423100 0.468049
1529
+ vt 0.408827 0.239671
1530
+ vt 0.437374 0.468049
1531
+ vt 0.423100 0.239671
1532
+ vt 0.451648 0.468049
1533
+ vt 0.437374 0.239671
1534
+ vt 0.465921 0.468049
1535
+ vt 0.451648 0.239671
1536
+ vt 0.480195 0.468049
1537
+ vt 0.465921 0.239671
1538
+ vt 0.480195 0.239671
1539
+ s 0
1540
+ usemtl MI_YamahaMSP3_MatteBlack.010
1541
+ f 229/456/176 277/457/176 261/458/176
1542
+ f 245/459/176 237/460/176 229/456/176
1543
+ f 261/458/176 253/461/176 245/459/176
1544
+ f 277/457/176 269/462/176 261/458/176
1545
+ f 229/456/176 285/463/176 277/457/176
1546
+ f 237/460/176 233/464/176 229/456/176
1547
+ f 245/459/176 241/465/176 237/460/176
1548
+ f 253/461/176 249/466/176 245/459/176
1549
+ f 261/458/176 257/467/176 253/461/176
1550
+ f 269/462/176 265/468/176 261/458/176
1551
+ f 277/457/176 273/469/176 269/462/176
1552
+ f 285/463/176 281/470/176 277/457/176
1553
+ f 229/456/176 289/471/176 285/463/176
1554
+ f 233/464/176 231/472/176 229/456/176
1555
+ f 237/460/176 235/473/176 233/464/176
1556
+ f 241/465/176 239/474/176 237/460/176
1557
+ f 245/459/176 243/475/176 241/465/176
1558
+ f 249/466/176 247/476/176 245/459/176
1559
+ f 253/461/176 251/477/176 249/466/176
1560
+ f 257/467/176 255/478/176 253/461/176
1561
+ f 261/458/176 259/479/176 257/467/176
1562
+ f 265/468/176 263/480/176 261/458/176
1563
+ f 269/462/176 267/481/176 265/468/176
1564
+ f 273/469/176 271/482/176 269/462/176
1565
+ f 277/457/176 275/483/176 273/469/176
1566
+ f 281/470/176 279/484/176 277/457/176
1567
+ f 285/463/176 283/485/176 281/470/176
1568
+ f 289/471/176 287/486/176 285/463/176
1569
+ f 229/456/176 291/487/176 289/471/176
1570
+ f 228/488/177 290/489/177 291/490/177
1571
+ f 230/491/178 228/488/178 229/492/178
1572
+ f 286/493/179 238/494/179 254/495/179
1573
+ f 270/496/179 278/497/179 286/493/179
1574
+ f 254/495/179 262/498/179 270/496/179
1575
+ f 238/494/179 246/499/179 254/495/179
1576
+ f 286/493/179 230/500/179 238/494/179
1577
+ f 278/497/179 282/501/179 286/493/179
1578
+ f 270/496/179 274/502/179 278/497/179
1579
+ f 262/498/179 266/503/179 270/496/179
1580
+ f 254/495/179 258/504/179 262/498/179
1581
+ f 246/499/179 250/505/179 254/495/179
1582
+ f 238/494/179 242/506/179 246/499/179
1583
+ f 230/500/179 234/507/179 238/494/179
1584
+ f 286/493/179 290/508/179 230/500/179
1585
+ f 282/501/179 284/509/179 286/493/179
1586
+ f 278/497/179 280/510/179 282/501/179
1587
+ f 274/502/179 276/511/179 278/497/179
1588
+ f 270/496/179 272/512/179 274/502/179
1589
+ f 266/503/179 268/513/179 270/496/179
1590
+ f 262/498/179 264/514/179 266/503/179
1591
+ f 258/504/179 260/515/179 262/498/179
1592
+ f 254/495/179 256/516/179 258/504/179
1593
+ f 250/505/179 252/517/179 254/495/179
1594
+ f 246/499/179 248/518/179 250/505/179
1595
+ f 242/506/179 244/519/179 246/499/179
1596
+ f 238/494/179 240/520/179 242/506/179
1597
+ f 234/507/179 236/521/179 238/494/179
1598
+ f 230/500/179 232/522/179 234/507/179
1599
+ f 290/508/179 228/523/179 230/500/179
1600
+ f 286/493/179 288/524/179 290/508/179
1601
+ f 232/525/180 230/491/180 231/526/180
1602
+ f 234/527/181 232/525/181 233/528/181
1603
+ f 236/529/182 234/527/182 235/530/182
1604
+ f 238/531/183 236/529/183 237/532/183
1605
+ f 240/533/184 238/531/184 239/534/184
1606
+ f 242/535/185 240/533/185 241/536/185
1607
+ f 244/537/186 242/535/186 243/538/186
1608
+ f 246/539/187 244/537/187 245/540/187
1609
+ f 248/541/188 246/539/188 247/542/188
1610
+ f 250/543/189 248/541/189 249/544/189
1611
+ f 252/545/190 250/543/190 251/546/190
1612
+ f 254/547/191 252/545/191 253/548/191
1613
+ f 256/549/192 254/547/192 255/550/192
1614
+ f 258/551/193 256/549/193 257/552/193
1615
+ f 260/553/194 258/551/194 259/554/194
1616
+ f 262/555/195 260/553/195 261/556/195
1617
+ f 264/557/196 262/555/196 263/558/196
1618
+ f 266/559/197 264/557/197 265/560/197
1619
+ f 268/561/198 266/559/198 267/562/198
1620
+ f 270/563/199 268/561/199 269/564/199
1621
+ f 272/565/200 270/563/200 271/566/200
1622
+ f 274/567/201 272/565/201 273/568/201
1623
+ f 276/569/202 274/567/202 275/570/202
1624
+ f 278/571/203 276/569/203 277/572/203
1625
+ f 280/573/204 278/571/204 279/574/204
1626
+ f 282/575/205 280/573/205 281/576/205
1627
+ f 284/577/206 282/575/206 283/578/206
1628
+ f 286/579/207 284/577/207 285/580/207
1629
+ f 288/581/208 286/579/208 287/582/208
1630
+ f 290/583/209 288/581/209 289/584/209
1631
+ f 261/458/176 245/459/176 229/456/176
1632
+ f 228/488/177 291/490/177 229/492/177
1633
+ f 230/491/178 229/492/178 231/526/178
1634
+ f 254/495/179 270/496/179 286/493/179
1635
+ f 232/525/180 231/526/180 233/528/180
1636
+ f 234/527/181 233/528/181 235/530/181
1637
+ f 236/529/182 235/530/182 237/532/182
1638
+ f 238/531/183 237/532/183 239/534/183
1639
+ f 240/533/184 239/534/184 241/536/184
1640
+ f 242/535/185 241/536/185 243/538/185
1641
+ f 244/537/186 243/538/186 245/540/186
1642
+ f 246/539/187 245/540/187 247/542/187
1643
+ f 248/541/188 247/542/188 249/544/188
1644
+ f 250/543/189 249/544/189 251/546/189
1645
+ f 252/545/190 251/546/190 253/548/190
1646
+ f 254/547/191 253/548/191 255/550/191
1647
+ f 256/549/192 255/550/192 257/552/192
1648
+ f 258/551/193 257/552/193 259/554/193
1649
+ f 260/553/194 259/554/194 261/556/194
1650
+ f 262/555/195 261/556/195 263/558/195
1651
+ f 264/557/196 263/558/196 265/560/196
1652
+ f 266/559/197 265/560/197 267/562/197
1653
+ f 268/561/198 267/562/198 269/564/198
1654
+ f 270/563/199 269/564/199 271/566/199
1655
+ f 272/565/200 271/566/200 273/568/200
1656
+ f 274/567/201 273/568/201 275/570/201
1657
+ f 276/569/202 275/570/202 277/572/202
1658
+ f 278/571/203 277/572/203 279/574/203
1659
+ f 280/573/204 279/574/204 281/576/204
1660
+ f 282/575/205 281/576/205 283/578/205
1661
+ f 284/577/206 283/578/206 285/580/206
1662
+ f 286/579/207 285/580/207 287/582/207
1663
+ f 288/581/208 287/582/208 289/584/208
1664
+ f 290/583/209 289/584/209 291/585/209
Orient_Anything/render/canvas.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import typing as t
2
+
3
+ from PIL import Image, ImageColor, ImageOps, ImageChops, ImageFilter
4
+ import numpy as np
5
+
6
+ class Canvas:
7
+ def __init__(self, filename=None, height=500, width=500):
8
+ self.filename = filename
9
+ self.height, self.width = height, width
10
+ self.img = Image.new("RGBA", (self.height, self.width), (0, 0, 0, 0))
11
+
12
+ def draw(self, dots, color: t.Union[tuple, str]):
13
+ if isinstance(color, str):
14
+ color = ImageColor.getrgb(color)
15
+ if isinstance(dots, tuple):
16
+ dots = [dots]
17
+ for dot in dots:
18
+ if dot[0]>=self.height or dot[1]>=self.width or dot[0]<0 or dot[1]<0:
19
+ # print(dot)
20
+ continue
21
+ self.img.putpixel(dot, color + (255,))
22
+
23
+ def add_white_border(self, border_size=5):
24
+ # 确保输入图像是 RGBA 模式
25
+ if self.img.mode != "RGBA":
26
+ self.img = self.img.convert("RGBA")
27
+
28
+ # 提取 alpha 通道
29
+ alpha = self.img.getchannel("A")
30
+ # print(alpha.size)
31
+ dilated_alpha = alpha.filter(ImageFilter.MaxFilter(size=5))
32
+ # # print(dilated_alpha.size)
33
+ white_area = Image.new("RGBA", self.img.size, (255, 255, 255, 255))
34
+ white_area.putalpha(dilated_alpha)
35
+
36
+ # 合并膨胀后的白色区域与原图像
37
+ result = Image.alpha_composite(white_area, self.img)
38
+ # expanded_alpha = ImageOps.expand(alpha, border=border_size, fill=255)
39
+ # white_border = Image.new("RGBA", image.size, (255, 255, 255, 255))
40
+ # white_border.putalpha(alpha)
41
+ return result
42
+
43
+ def __enter__(self):
44
+ return self
45
+
46
+ def __exit__(self, type, value, traceback):
47
+ # self.img = add_white_border(self.img)
48
+ self.img.save(self.filename)
49
+ pass
Orient_Anything/render/model.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy
2
+ from PIL import Image
3
+ from .core import Vec4d
4
+
5
+
6
+ class Model:
7
+ def __init__(self, filename, texture_filename):
8
+ """
9
+ https://en.wikipedia.org/wiki/Wavefront_.obj_file#Vertex_normal_indices
10
+ """
11
+ self.vertices = []
12
+ self.uv_vertices = []
13
+ self.uv_indices = []
14
+ self.indices = []
15
+
16
+ texture = Image.open(texture_filename)
17
+ self.texture_array = numpy.array(texture)
18
+ self.texture_width, self.texture_height = texture.size
19
+
20
+ with open(filename) as f:
21
+ for line in f:
22
+ if line.startswith("v "):
23
+ x, y, z = [float(d) for d in line.strip("v").strip().split(" ")]
24
+ self.vertices.append(Vec4d(x, y, z, 1))
25
+ elif line.startswith("vt "):
26
+ u, v = [float(d) for d in line.strip("vt").strip().split(" ")]
27
+ self.uv_vertices.append([u, v])
28
+ elif line.startswith("f "):
29
+ facet = [d.split("/") for d in line.strip("f").strip().split(" ")]
30
+ self.indices.append([int(d[0]) for d in facet])
31
+ self.uv_indices.append([int(d[1]) for d in facet])
Orient_Anything/render/speedup.py ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import cython
2
+ import numpy as np
3
+ from math import sqrt
4
+
5
+
6
+ def normalize(x, y, z):
7
+ unit = sqrt(x * x + y * y + z * z)
8
+ if unit == 0:
9
+ return 0, 0, 0
10
+ return x / unit, y / unit, z / unit
11
+
12
+
13
+ def get_min_max(a, b, c):
14
+ min = a
15
+ max = a
16
+ if min > b:
17
+ min = b
18
+ if min > c:
19
+ min = c
20
+ if max < b:
21
+ max = b
22
+ if max < c:
23
+ max = c
24
+ return int(min), int(max)
25
+
26
+ def dot_product(a0, a1, a2, b0, b1, b2):
27
+ r = a0 * b0 + a1 * b1 + a2 * b2
28
+ return r
29
+
30
+
31
+ def cross_product(a0, a1, a2, b0, b1, b2):
32
+ x = a1 * b2 - a2 * b1
33
+ y = a2 * b0 - a0 * b2
34
+ z = a0 * b1 - a1 * b0
35
+ return x,y,z
36
+
37
+
38
+ # @cython.boundscheck(False)
39
+ def generate_faces(triangles, width, height):
40
+ """ draw the triangle faces with z buffer
41
+
42
+ Args:
43
+ triangles: groups of vertices
44
+
45
+ FYI:
46
+ * zbuffer, https://github.com/ssloy/tinyrenderer/wiki/Lesson-3:-Hidden-faces-removal-(z-buffer)
47
+ * uv mapping and perspective correction
48
+ """
49
+ i, j, k, length = 0, 0, 0, 0
50
+ bcy, bcz, x, y, z = 0.,0.,0.,0.,0.
51
+ a, b, c = [0.,0.,0.],[0.,0.,0.],[0.,0.,0.]
52
+ m, bc = [0.,0.,0.],[0.,0.,0.]
53
+ uva, uvb, uvc = [0.,0.],[0.,0.],[0.,0.]
54
+ minx, maxx, miny, maxy = 0,0,0,0
55
+ length = triangles.shape[0]
56
+ zbuffer = {}
57
+ faces = []
58
+
59
+ for i in range(length):
60
+ a = triangles[i, 0, 0], triangles[i, 0, 1], triangles[i, 0, 2]
61
+ b = triangles[i, 1, 0], triangles[i, 1, 1], triangles[i, 1, 2]
62
+ c = triangles[i, 2, 0], triangles[i, 2, 1], triangles[i, 2, 2]
63
+ uva = triangles[i, 0, 3], triangles[i, 0, 4]
64
+ uvb = triangles[i, 1, 3], triangles[i, 1, 4]
65
+ uvc = triangles[i, 2, 3], triangles[i, 2, 4]
66
+ minx, maxx = get_min_max(a[0], b[0], c[0])
67
+ miny, maxy = get_min_max(a[1], b[1], c[1])
68
+ pixels = []
69
+ for j in range(minx, maxx + 2):
70
+ for k in range(miny - 1, maxy + 2):
71
+ # 必须显式转换成 double 参与底下的运算,不然结果是错的
72
+ x = j
73
+ y = k
74
+
75
+ m[0], m[1], m[2] = cross_product(c[0] - a[0], b[0] - a[0], a[0] - x, c[1] - a[1], b[1] - a[1], a[1] - y)
76
+ if abs(m[2]) > 0:
77
+ bcy = m[1] / m[2]
78
+ bcz = m[0] / m[2]
79
+ bc = (1 - bcy - bcz, bcy, bcz)
80
+ else:
81
+ continue
82
+
83
+ # here, -0.00001 because of the precision lose
84
+ if bc[0] < -0.00001 or bc[1] < -0.00001 or bc[2] < -0.00001:
85
+ continue
86
+
87
+ z = 1 / (bc[0] / a[2] + bc[1] / b[2] + bc[2] / c[2])
88
+
89
+ # Blender 导出来的 uv 数据,跟之前的顶点数据有一样的问题,Y轴是个反的,
90
+ # 所以这里的纹理图片要旋转一下才能 work
91
+ v = (uva[0] * bc[0] / a[2] + uvb[0] * bc[1] / b[2] + uvc[0] * bc[2] / c[2]) * z * width
92
+ u = height - (uva[1] * bc[0] / a[2] + uvb[1] * bc[1] / b[2] + uvc[1] * bc[2] / c[2]) * z * height
93
+
94
+ # https://en.wikipedia.org/wiki/Pairing_function
95
+ idx = ((x + y) * (x + y + 1) + y) / 2
96
+ if zbuffer.get(idx) is None or zbuffer[idx] < z:
97
+ zbuffer[idx] = z
98
+ pixels.append((i, j, k, int(u) - 1, int(v) - 1))
99
+
100
+ faces.append(pixels)
101
+ return faces
processor/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (152 Bytes). View file
 
processor/__pycache__/captions.cpython-310.pyc ADDED
Binary file (4.26 kB). View file
 
processor/__pycache__/pointcloud.cpython-310.pyc ADDED
Binary file (12.5 kB). View file
 
processor/__pycache__/prompt.cpython-310.pyc ADDED
Binary file (6.79 kB). View file
 
processor/__pycache__/prompt_CR.cpython-310.pyc ADDED
Binary file (6.53 kB). View file
 
processor/__pycache__/prompt_ImageEditbench.cpython-310.pyc ADDED
Binary file (17.2 kB). View file
 
processor/__pycache__/prompt_T2Ibench.cpython-310.pyc ADDED
Binary file (21.2 kB). View file
 
processor/__pycache__/prompt_utils.cpython-310.pyc ADDED
Binary file (2.98 kB). View file
 
processor/__pycache__/segment.cpython-310.pyc ADDED
Binary file (5.01 kB). View file
 
processor/wrappers/__init__.py ADDED
File without changes
processor/wrappers/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (161 Bytes). View file
 
processor/wrappers/__pycache__/grounding_dino.cpython-310.pyc ADDED
Binary file (896 Bytes). View file
 
processor/wrappers/__pycache__/metric3d_v2.cpython-310.pyc ADDED
Binary file (6.91 kB). View file
 
processor/wrappers/__pycache__/perspective_fields.cpython-310.pyc ADDED
Binary file (3.03 kB). View file
 
processor/wrappers/__pycache__/ram.cpython-310.pyc ADDED
Binary file (2.26 kB). View file
 
processor/wrappers/__pycache__/sam.cpython-310.pyc ADDED
Binary file (9.01 kB). View file
 
processor/wrappers/grounding_dino.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+
4
+ GSA_PATH = "/mnt/prev_nas/qhy_1/GenSpace/osdsynth/external/Grounded-Segment-Anything"
5
+ sys.path.append(GSA_PATH)
6
+
7
+ from GroundingDINO.groundingdino.util.inference import Model
8
+
9
+ # GroundingDINO config and checkpoint
10
+ GROUNDING_DINO_CONFIG_PATH = os.path.abspath(
11
+ os.path.join(GSA_PATH, "GroundingDINO/groundingdino/config/GroundingDINO_SwinT_OGC.py")
12
+ )
13
+ # GROUNDING_DINO_CHECKPOINT_PATH = os.path.abspath(os.path.join(GSA_PATH, "./groundingdino_swint_ogc.pth"))
14
+ GROUNDING_DINO_CHECKPOINT_PATH = "/mnt/prev_nas/qhy_1/GenSpace/osdsynth/external/Grounded-Segment-Anything/groundingdino_swint_ogc.pth"
15
+
16
+ def get_grounding_dino_model(cfg, device):
17
+ grounding_dino_model = Model(
18
+ model_config_path=GROUNDING_DINO_CONFIG_PATH,
19
+ model_checkpoint_path=GROUNDING_DINO_CHECKPOINT_PATH,
20
+ device=device,
21
+ )
22
+
23
+ return grounding_dino_model
processor/wrappers/metric3d_v2.py ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import cv2
2
+ import matplotlib
3
+ import numpy as np
4
+ import torch
5
+ import torchvision.transforms as transforms
6
+ import trimesh
7
+ from PIL import Image
8
+
9
+
10
+ def get_depth_model(device):
11
+ depth_model = torch.hub.load("osdsynth/external/Metric3D", "metric3d_vit_giant2", pretrain=True, source='local')
12
+ return depth_model.to(device)
13
+
14
+
15
+ def inference_depth(rgb_origin, intrinsic, depth_model):
16
+ # Code from # https://github.com/YvanYin/Metric3D/blob/main/hubconf.py, assume rgb_origin is in RGB
17
+ intrinsic = [intrinsic[0, 0], intrinsic[1, 1], intrinsic[0, 2], intrinsic[1, 2]]
18
+
19
+ #### ajust input size to fit pretrained model
20
+ # keep ratio resize
21
+ input_size = (616, 1064) # for vit model
22
+ # input_size = (544, 1216) # for convnext model
23
+ h, w = rgb_origin.shape[:2]
24
+ scale = min(input_size[0] / h, input_size[1] / w)
25
+ rgb = cv2.resize(rgb_origin, (int(w * scale), int(h * scale)), interpolation=cv2.INTER_LINEAR)
26
+ # remember to scale intrinsic, hold depth
27
+ intrinsic = [intrinsic[0] * scale, intrinsic[1] * scale, intrinsic[2] * scale, intrinsic[3] * scale]
28
+
29
+ # padding to input_size
30
+ padding = [123.675, 116.28, 103.53]
31
+ h, w = rgb.shape[:2]
32
+ pad_h = input_size[0] - h
33
+ pad_w = input_size[1] - w
34
+ pad_h_half = pad_h // 2
35
+ pad_w_half = pad_w // 2
36
+ rgb = cv2.copyMakeBorder(
37
+ rgb, pad_h_half, pad_h - pad_h_half, pad_w_half, pad_w - pad_w_half, cv2.BORDER_CONSTANT, value=padding
38
+ )
39
+ pad_info = [pad_h_half, pad_h - pad_h_half, pad_w_half, pad_w - pad_w_half]
40
+
41
+ #### normalize
42
+ mean = torch.tensor([123.675, 116.28, 103.53]).float()[:, None, None]
43
+ std = torch.tensor([58.395, 57.12, 57.375]).float()[:, None, None]
44
+ rgb = torch.from_numpy(rgb.transpose((2, 0, 1))).float()
45
+ rgb = torch.div((rgb - mean), std)
46
+ rgb = rgb[None, :, :, :].cuda()
47
+
48
+ with torch.no_grad():
49
+ pred_depth, confidence, output_dict = depth_model.inference({"input": rgb})
50
+
51
+ # un pad
52
+ pred_depth = pred_depth.squeeze()
53
+ pred_depth = pred_depth[
54
+ pad_info[0] : pred_depth.shape[0] - pad_info[1], pad_info[2] : pred_depth.shape[1] - pad_info[3]
55
+ ]
56
+
57
+ # upsample to original size
58
+ pred_depth = torch.nn.functional.interpolate(
59
+ pred_depth[None, None, :, :], rgb_origin.shape[:2], mode="bilinear"
60
+ ).squeeze()
61
+
62
+ #### de-canonical transform
63
+ canonical_to_real_scale = intrinsic[0] / 1000.0 # 1000.0 is the focal length of canonical camera
64
+ pred_depth = pred_depth * canonical_to_real_scale # now the depth is metric
65
+ pred_depth = torch.clamp(pred_depth, 0, 300)
66
+ return pred_depth.detach().cpu().numpy()
67
+
68
+
69
+ def depth_to_mesh(points, depth, image_rgb):
70
+ triangles = create_triangles(image_rgb.shape[0], image_rgb.shape[1], mask=~depth_edges_mask(depth))
71
+ mesh = trimesh.Trimesh(
72
+ vertices=points.reshape(-1, 3),
73
+ faces=triangles,
74
+ vertex_colors=image_rgb.reshape(-1, 3),
75
+ )
76
+ # mesh_t.export(save_pcd_dir+f'/{filename}_t_mesh.obj')
77
+ return mesh
78
+
79
+
80
+ def depth_edges_mask(depth):
81
+ """Returns a mask of edges in the depth map.
82
+
83
+ Args:
84
+ depth: 2D numpy array of shape (H, W) with dtype float32.
85
+ Returns:
86
+ mask: 2D numpy array of shape (H, W) with dtype bool.
87
+ """
88
+ # Compute the x and y gradients of the depth map.
89
+ depth_dx, depth_dy = np.gradient(depth)
90
+ # Compute the gradient magnitude.
91
+ depth_grad = np.sqrt(depth_dx**2 + depth_dy**2)
92
+ # Compute the edge mask.
93
+ mask = depth_grad > 0.05
94
+ return mask
95
+
96
+
97
+ def create_triangles(h, w, mask=None):
98
+ """
99
+ Reference: https://github.com/google-research/google-research/blob/e96197de06613f1b027d20328e06d69829fa5a89/infinite_nature/render_utils.py#L68
100
+ Creates mesh triangle indices from a given pixel grid size.
101
+ This function is not and need not be differentiable as triangle indices are
102
+ fixed.
103
+ Args:
104
+ h: (int) denoting the height of the image.
105
+ w: (int) denoting the width of the image.
106
+ Returns:
107
+ triangles: 2D numpy array of indices (int) with shape (2(W-1)(H-1) x 3)
108
+ """
109
+ x, y = np.meshgrid(range(w - 1), range(h - 1))
110
+ tl = y * w + x
111
+ tr = y * w + x + 1
112
+ bl = (y + 1) * w + x
113
+ br = (y + 1) * w + x + 1
114
+ triangles = np.array([tl, bl, tr, br, tr, bl])
115
+ triangles = np.transpose(triangles, (1, 2, 0)).reshape(((w - 1) * (h - 1) * 2, 3))
116
+ if mask is not None:
117
+ mask = mask.reshape(-1)
118
+ triangles = triangles[mask[triangles].all(1)]
119
+ return triangles
120
+
121
+
122
+ def get_intrinsics(H, W, fov):
123
+ """Intrinsics for a pinhole camera model.
124
+
125
+ Assume fov of 55 degrees and central principal point.
126
+ """
127
+ # fy = 0.5 * H / np.tan(0.5 * fov * np.pi / 180.0)
128
+ # fx = 0.5 * W / np.tan(0.5 * fov * np.pi / 180.0)
129
+
130
+ focal = H / 2 / np.tan(np.radians(fov) / 2)
131
+
132
+ cx = 0.5 * W
133
+ cy = 0.5 * H
134
+ return np.array([[focal, 0, cx], [0, focal, cy], [0, 0, 1]])
135
+
136
+
137
+ def depth_to_points(depth, R=None, t=None, fov=None, intrinsic=None):
138
+ if intrinsic is None:
139
+ K = get_intrinsics(depth.shape[1], depth.shape[2], fov)
140
+ else:
141
+ K = intrinsic
142
+ Kinv = np.linalg.inv(K)
143
+ if R is None:
144
+ R = np.eye(3)
145
+ if t is None:
146
+ t = np.zeros(3)
147
+
148
+ # M converts from your coordinate to PyTorch3D's coordinate system
149
+ M = np.eye(3)
150
+ # M[0, 0] = -1.0
151
+ # M[1, 1] = -1.0
152
+
153
+ height, width = depth.shape[1:3]
154
+
155
+ x = np.arange(width)
156
+ y = np.arange(height)
157
+ coord = np.stack(np.meshgrid(x, y), -1)
158
+ coord = np.concatenate((coord, np.ones_like(coord)[:, :, [0]]), -1) # z=1
159
+ coord = coord.astype(np.float32)
160
+ # coord = torch.as_tensor(coord, dtype=torch.float32, device=device)
161
+ coord = coord[None] # bs, h, w, 3
162
+
163
+ D = depth[:, :, :, None, None]
164
+ # print(D.shape, Kinv[None, None, None, ...].shape, coord[:, :, :, :, None].shape )
165
+ pts3D_1 = D * Kinv[None, None, None, ...] @ coord[:, :, :, :, None]
166
+ # pts3D_1 live in your coordinate system. Convert them to Py3D's
167
+ pts3D_1 = M[None, None, None, ...] @ pts3D_1
168
+ # from reference to targe tviewpoint
169
+ pts3D_2 = R[None, None, None, ...] @ pts3D_1 + t[None, None, None, :, None]
170
+ # pts3D_2 = pts3D_1
171
+ # depth_2 = pts3D_2[:, :, :, 2, :] # b,1,h,w
172
+
173
+ # G converts from your coordinate to PyTorch3D's coordinate system
174
+ G = np.eye(3)
175
+ G[0, 0] = -1.0
176
+ G[1, 1] = -1.0
177
+
178
+ return pts3D_2[:, :, :, :3, 0][0] @ G.T
179
+
180
+ # return (G[None, None, None, ...] @ pts3D_2)[:, :, :, :3, 0][0]
181
+
182
+ # return pts3D_2[:, :, :, :3, 0][0]
183
+
184
+
185
+ def colorize_depth(
186
+ value,
187
+ vmin=None,
188
+ vmax=None,
189
+ cmap="inferno_r",
190
+ invalid_val=-99,
191
+ invalid_mask=None,
192
+ background_color=(128, 128, 128, 255),
193
+ gamma_corrected=False,
194
+ value_transform=None,
195
+ ):
196
+ """Converts a depth map to a color image.
197
+
198
+ Args:
199
+ value (torch.Tensor, numpy.ndarry): Input depth map. Shape: (H, W) or (1, H, W) or (1, 1, H, W). All singular dimensions are squeezed
200
+ vmin (float, optional): vmin-valued entries are mapped to start color of cmap. If None, value.min() is used. Defaults to None.
201
+ vmax (float, optional): vmax-valued entries are mapped to end color of cmap. If None, value.max() is used. Defaults to None.
202
+ cmap (str, optional): matplotlib colormap to use. Defaults to 'magma_r'.
203
+ invalid_val (int, optional): Specifies value of invalid pixels that should be colored as 'background_color'. Defaults to -99.
204
+ invalid_mask (numpy.ndarray, optional): Boolean mask for invalid regions. Defaults to None.
205
+ background_color (tuple[int], optional): 4-tuple RGB color to give to invalid pixels. Defaults to (128, 128, 128, 255).
206
+ gamma_corrected (bool, optional): Apply gamma correction to colored image. Defaults to False.
207
+ value_transform (Callable, optional): Apply transform function to valid pixels before coloring. Defaults to None.
208
+
209
+ Returns:
210
+ numpy.ndarray, dtype - uint8: Colored depth map. Shape: (H, W, 4)
211
+ """
212
+ if isinstance(value, torch.Tensor):
213
+ value = value.detach().cpu().numpy()
214
+
215
+ value = value.squeeze()
216
+ if invalid_mask is None:
217
+ invalid_mask = value == invalid_val
218
+ mask = np.logical_not(invalid_mask)
219
+
220
+ # normalize
221
+ vmin = np.percentile(value[mask], 2) if vmin is None else vmin
222
+ vmax = np.percentile(value[mask], 85) if vmax is None else vmax
223
+ if vmin != vmax:
224
+ value = (value - vmin) / (vmax - vmin) # vmin..vmax
225
+ else:
226
+ # Avoid 0-division
227
+ value = value * 0.0
228
+
229
+ # squeeze last dim if it exists
230
+ # grey out the invalid values
231
+
232
+ value[invalid_mask] = np.nan
233
+ cmapper = matplotlib.cm.get_cmap(cmap)
234
+ if value_transform:
235
+ value = value_transform(value)
236
+ # value = value / value.max()
237
+ value = cmapper(value, bytes=True) # (nxmx4)
238
+
239
+ # img = value[:, :, :]
240
+ img = value[...]
241
+ img[invalid_mask] = background_color
242
+
243
+ # return img.transpose((2, 0, 1))
244
+ if gamma_corrected:
245
+ # gamma correction
246
+ img = img / 255
247
+ img = np.power(img, 2.2)
248
+ img = img * 255
249
+ img = img.astype(np.uint8)
250
+ return img
processor/wrappers/perspective_fields.py ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+
4
+ PPF_PATH = "/mnt/prev_nas/qhy_1/GenSpace/osdsynth/external/PerspectiveFields"
5
+ sys.path.append(PPF_PATH) # This is needed for the following imports in this file
6
+
7
+ PPF_PATH_ABS = os.path.abspath(PPF_PATH)
8
+
9
+ import copy
10
+ import os
11
+
12
+ import cv2
13
+ import numpy as np
14
+ import torch
15
+ from perspective2d import PerspectiveFields
16
+ from perspective2d.utils import draw_from_r_p_f_cx_cy, draw_perspective_fields
17
+
18
+
19
+ def create_rotation_matrix(
20
+ roll: float,
21
+ pitch: float,
22
+ yaw: float,
23
+ degrees: bool = False,
24
+ ) -> np.ndarray:
25
+ r"""Create rotation matrix from extrinsic parameters
26
+ Args:
27
+ roll (float): camera rotation about camera frame z-axis
28
+ pitch (float): camera rotation about camera frame x-axis
29
+ yaw (float): camera rotation about camera frame y-axis
30
+
31
+ Returns:
32
+ np.ndarray: rotation R_z @ R_x @ R_y
33
+ """
34
+ if degrees:
35
+ roll = np.radians(roll)
36
+ pitch = np.radians(pitch)
37
+ yaw = np.radians(yaw)
38
+ # calculate rotation about the x-axis
39
+ R_x = np.array(
40
+ [
41
+ [1.0, 0.0, 0.0],
42
+ [0.0, np.cos(pitch), np.sin(pitch)],
43
+ [0.0, -np.sin(pitch), np.cos(pitch)],
44
+ ]
45
+ )
46
+ # calculate rotation about the y-axis
47
+ R_y = np.array(
48
+ [
49
+ [np.cos(yaw), 0.0, -np.sin(yaw)],
50
+ [0.0, 1.0, 0.0],
51
+ [np.sin(yaw), 0.0, np.cos(yaw)],
52
+ ]
53
+ )
54
+ # calculate rotation about the z-axis
55
+ R_z = np.array(
56
+ [
57
+ [np.cos(roll), np.sin(roll), 0.0],
58
+ [-np.sin(roll), np.cos(roll), 0.0],
59
+ [0.0, 0.0, 1.0],
60
+ ]
61
+ )
62
+
63
+ return R_z @ R_x @ R_y
64
+
65
+
66
+ def resize_fix_aspect_ratio(img, field, target_width=None, target_height=None):
67
+ height = img.shape[0]
68
+ width = img.shape[1]
69
+ if target_height is None:
70
+ factor = target_width / width
71
+ elif target_width is None:
72
+ factor = target_height / height
73
+ else:
74
+ factor = max(target_width / width, target_height / height)
75
+ if factor == target_width / width:
76
+ target_height = int(height * factor)
77
+ else:
78
+ target_width = int(width * factor)
79
+
80
+ img = cv2.resize(img, (target_width, target_height))
81
+ for key in field:
82
+ if key not in ["up", "lati"]:
83
+ continue
84
+ tmp = field[key].numpy()
85
+ transpose = len(tmp.shape) == 3
86
+ if transpose:
87
+ tmp = tmp.transpose(1, 2, 0)
88
+ tmp = cv2.resize(tmp, (target_width, target_height))
89
+ if transpose:
90
+ tmp = tmp.transpose(2, 0, 1)
91
+ field[key] = torch.tensor(tmp)
92
+ return img, field
93
+
94
+
95
+ def run_perspective_fields_model(model, image_bgr):
96
+
97
+ pred = model.inference(img_bgr=image_bgr)
98
+ field = {
99
+ "up": pred["pred_gravity_original"].cpu().detach(),
100
+ "lati": pred["pred_latitude_original"].cpu().detach(),
101
+ }
102
+ img, field = resize_fix_aspect_ratio(image_bgr[..., ::-1], field, 640)
103
+
104
+ # Draw perspective field from ParamNet predictions
105
+ param_vis = draw_from_r_p_f_cx_cy(
106
+ img,
107
+ pred["pred_roll"].item(),
108
+ pred["pred_pitch"].item(),
109
+ pred["pred_general_vfov"].item(),
110
+ pred["pred_rel_cx"].item(),
111
+ pred["pred_rel_cy"].item(),
112
+ "deg",
113
+ up_color=(0, 1, 0),
114
+ ).astype(np.uint8)
115
+ param_vis = cv2.cvtColor(param_vis, cv2.COLOR_RGB2BGR)
116
+
117
+ param = {
118
+ "roll": pred["pred_roll"].cpu().item(),
119
+ "pitch": pred["pred_pitch"].cpu().item(),
120
+ }
121
+
122
+ return param_vis, param
123
+
124
+
125
+ def get_perspective_fields_model(cfg, device):
126
+ MODEL_ID = "Paramnet-360Cities-edina-centered"
127
+ # MODEL_ID = 'Paramnet-360Cities-edina-uncentered'
128
+ # MODEL_ID = 'PersNet_Paramnet-GSV-centered'
129
+ # MODEL_ID = 'PersNet_Paramnet-GSV-uncentered'
130
+ # MODEL_ID = 'PersNet-360Cities'
131
+ # feel free to test with uncentered or centered depending on your data
132
+
133
+ PerspectiveFields.versions()
134
+ pf_model = PerspectiveFields(MODEL_ID).eval().cuda()
135
+ return pf_model
processor/wrappers/ram.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ sys.path.append("/mnt/prev_nas/qhy_1/GenSpace/osdsynth/external/Grounded-Segment-Anything/recognize-anything")
4
+ from typing import List
5
+
6
+ import torchvision.transforms as TS
7
+ from ram import inference_ram
8
+ from ram.models import ram
9
+
10
+
11
+ def run_tagging_model(cfg, raw_image, tagging_model):
12
+ res = inference_ram(raw_image, tagging_model)
13
+ caption = "NA"
14
+ tags = res[0].strip(" ").replace(" ", " ").replace(" |", ",")
15
+ print("Tags: ", tags)
16
+
17
+ # Currently ", " is better for detecting single tags
18
+ # while ". " is a little worse in some case
19
+ text_prompt = res[0].replace(" |", ",")
20
+
21
+ if cfg.rm_bg_classes:
22
+ cfg.remove_classes += cfg.bg_classes
23
+
24
+ classes = process_tag_classes(
25
+ text_prompt,
26
+ add_classes=cfg.add_classes,
27
+ remove_classes=cfg.remove_classes,
28
+ )
29
+ print("Tags (Final): ", classes)
30
+ return classes
31
+
32
+
33
+ def process_tag_classes(text_prompt: str, add_classes: List[str] = [], remove_classes: List[str] = []) -> list[str]:
34
+ """Convert a text prompt from Tag2Text to a list of classes."""
35
+ classes = text_prompt.split(",")
36
+ classes = [obj_class.strip() for obj_class in classes]
37
+ classes = [obj_class for obj_class in classes if obj_class != ""]
38
+
39
+ for c in add_classes:
40
+ if c not in classes:
41
+ classes.append(c)
42
+
43
+ for c in remove_classes:
44
+ classes = [obj_class for obj_class in classes if c not in obj_class.lower()]
45
+
46
+ return classes
47
+
48
+
49
+ def get_tagging_model(cfg, device):
50
+ RAM_CHECKPOINT_PATH = os.path.abspath(
51
+ "osdsynth/external/Grounded-Segment-Anything/recognize-anything/ram_swin_large_14m.pth"
52
+ )
53
+ tagging_model = ram(pretrained=RAM_CHECKPOINT_PATH, image_size=384, vit="swin_l")
54
+
55
+ tagging_model = tagging_model.eval().to(device)
56
+ tagging_transform = TS.Compose(
57
+ [
58
+ TS.Resize((384, 384)),
59
+ TS.ToTensor(),
60
+ TS.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
61
+ ]
62
+ )
63
+
64
+ return tagging_transform, tagging_model
processor/wrappers/sam.py ADDED
@@ -0,0 +1,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ from typing import Any, Dict, Generator, ItemsView, List, Tuple
4
+
5
+ import cv2
6
+ import numpy as np
7
+ import torch
8
+ from PIL import Image
9
+
10
+ GSA_PATH = "/mnt/prev_nas/qhy_1/GenSpace/osdsynth/external/Grounded-Segment-Anything"
11
+ sys.path.append(GSA_PATH)
12
+
13
+ from segment_anything.segment_anything import SamAutomaticMaskGenerator, SamPredictor, sam_hq_model_registry, sam_model_registry
14
+
15
+ # Segment-Anything checkpoint
16
+ SAM_ENCODER_VERSION = "vit_h"
17
+ SAM_CHECKPOINT_PATH = os.path.join(GSA_PATH, "./sam_vit_h_4b8939.pth")
18
+
19
+ # Segment-Anything checkpoint
20
+ SAM_HQ_ENCODER_VERSION = "vit_h"
21
+ SAM_HQ_CHECKPOINT_PATH = os.path.join(GSA_PATH, "./sam_hq_vit_h.pth")
22
+
23
+ # Prompting SAM with detected boxes
24
+ def get_sam_segmentation_from_xyxy(sam_predictor: SamPredictor, image: np.ndarray, xyxy: np.ndarray) -> np.ndarray:
25
+ sam_predictor.set_image(image)
26
+ result_masks = []
27
+ for box in xyxy:
28
+ masks, scores, logits = sam_predictor.predict(box=box, multimask_output=True)
29
+ index = np.argmax(scores)
30
+ result_masks.append(masks[index])
31
+ return np.array(result_masks)
32
+
33
+
34
+ def get_sam_predictor(variant: str, device: str | int) -> SamPredictor:
35
+ if variant == "sam":
36
+ sam = sam_model_registry[SAM_ENCODER_VERSION](checkpoint=SAM_CHECKPOINT_PATH)
37
+ sam.to(device)
38
+ sam_predictor = SamPredictor(sam)
39
+ return sam_predictor
40
+
41
+ if variant == "sam-hq":
42
+ print("Using SAM-HQ")
43
+ sam = sam_hq_model_registry[SAM_HQ_ENCODER_VERSION](checkpoint=SAM_HQ_CHECKPOINT_PATH)
44
+ sam.to(device)
45
+ sam_predictor = SamPredictor(sam)
46
+ return sam_predictor
47
+
48
+ else:
49
+ raise NotImplementedError
50
+
51
+
52
+ def get_sam_mask_generator(variant: str, device: str | int) -> SamAutomaticMaskGenerator:
53
+ if variant == "sam":
54
+ sam = sam_model_registry[SAM_ENCODER_VERSION](checkpoint=SAM_CHECKPOINT_PATH)
55
+ sam.to(device)
56
+ mask_generator = SamAutomaticMaskGenerator(
57
+ model=sam,
58
+ points_per_side=12,
59
+ points_per_batch=144,
60
+ pred_iou_thresh=0.88,
61
+ stability_score_thresh=0.95,
62
+ crop_n_layers=0,
63
+ min_mask_region_area=100,
64
+ )
65
+ return mask_generator
66
+ elif variant == "fastsam":
67
+ raise NotImplementedError
68
+ else:
69
+ raise NotImplementedError
70
+
71
+
72
+ def convert_detections_to_list(detections_dict, classes):
73
+ detection_list = []
74
+ for i in range(len(detections_dict["xyxy"])):
75
+ detection = {
76
+ "class_name": classes[detections_dict["class_id"][i]], # Lookup class name using class_id
77
+ "xyxy": detections_dict["xyxy"][i], # Assuming detections.xyxy is a numpy array
78
+ "confidence": detections_dict["confidence"][i].item(), # Convert numpy scalar to Python scalar
79
+ "class_id": detections_dict["class_id"][i].item(),
80
+ "box_area": detections_dict["box_area"][i].item(),
81
+ "mask": detections_dict["mask"][i],
82
+ "subtracted_mask": detections_dict["subtracted_mask"][i],
83
+ "rle": detections_dict["rle"][i],
84
+ "area": detections_dict["area"][i],
85
+ }
86
+ detection_list.append(detection)
87
+ return detection_list
88
+
89
+
90
+ def convert_detections_to_dict(detections, classes, image_crops=None, image_feats=None, text_feats=None):
91
+ # Convert the detections to a dict. The elements are in np.array
92
+ results = {
93
+ "xyxy": detections.xyxy,
94
+ "confidence": detections.confidence,
95
+ "class_id": detections.class_id,
96
+ "box_area": detections.box_area,
97
+ "mask": detections.mask,
98
+ "area": detections.area,
99
+ "classes": classes,
100
+ }
101
+ return results
102
+
103
+
104
+ def mask_subtract_contained(xyxy: np.ndarray, mask: np.ndarray, th1=0.8, th2=0.7):
105
+ """Compute the containing relationship between all pair of bounding boxes. For each mask, subtract the mask of
106
+ bounding boxes that are contained by it.
107
+
108
+ Args:
109
+ xyxy: (N, 4), in (x1, y1, x2, y2) format
110
+ mask: (N, H, W), binary mask
111
+ th1: float, threshold for computing intersection over box1
112
+ th2: float, threshold for computing intersection over box2
113
+
114
+ Returns:
115
+ mask_sub: (N, H, W), binary mask
116
+ """
117
+ N = xyxy.shape[0] # number of boxes
118
+
119
+ # Get areas of each xyxy
120
+ areas = (xyxy[:, 2] - xyxy[:, 0]) * (xyxy[:, 3] - xyxy[:, 1]) # (N,)
121
+
122
+ # Compute intersection boxes
123
+ lt = np.maximum(xyxy[:, None, :2], xyxy[None, :, :2]) # left-top points (N, N, 2)
124
+ rb = np.minimum(xyxy[:, None, 2:], xyxy[None, :, 2:]) # right-bottom points (N, N, 2)
125
+
126
+ inter = (rb - lt).clip(min=0) # intersection sizes (dx, dy), if no overlap, clamp to zero (N, N, 2)
127
+
128
+ # Compute areas of intersection boxes
129
+ inter_areas = inter[:, :, 0] * inter[:, :, 1] # (N, N)
130
+
131
+ inter_over_box1 = inter_areas / areas[:, None] # (N, N)
132
+ # inter_over_box2 = inter_areas / areas[None, :] # (N, N)
133
+ inter_over_box2 = inter_over_box1.T # (N, N)
134
+
135
+ # if the intersection area is smaller than th2 of the area of box1,
136
+ # and the intersection area is larger than th1 of the area of box2,
137
+ # then box2 is considered contained by box1
138
+ contained = (inter_over_box1 < th2) & (inter_over_box2 > th1) # (N, N)
139
+ contained_idx = contained.nonzero() # (num_contained, 2)
140
+
141
+ mask_sub = mask.copy() # (N, H, W)
142
+ # mask_sub[contained_idx[0]] = mask_sub[contained_idx[0]] & (~mask_sub[contained_idx[1]])
143
+ for i in range(len(contained_idx[0])):
144
+ mask_sub[contained_idx[0][i]] = mask_sub[contained_idx[0][i]] & (~mask_sub[contained_idx[1][i]])
145
+
146
+ return mask_sub, contained
147
+
148
+
149
+ def filter_detections(cfg, detections_dict: dict, image: np.ndarray):
150
+ # If no detection at all
151
+ if len(detections_dict["xyxy"]) == 0:
152
+ return detections_dict
153
+
154
+ # Filter out the objects based on various criteria
155
+ idx_to_keep = []
156
+ for obj_idx in range(len(detections_dict["xyxy"])):
157
+ class_name = detections_dict["classes"][detections_dict["class_id"][obj_idx]]
158
+
159
+ # Skip masks that are too small
160
+ if detections_dict["mask"][obj_idx].sum() < max(cfg.mask_area_threshold, 10):
161
+ print(f"Skipping {class_name} mask with too few points")
162
+ continue
163
+
164
+ # Skip the BG classes
165
+ if cfg.skip_bg and class_name in cfg.bg_classes:
166
+ print(f"Skipping {class_name} as it is a background class")
167
+ continue
168
+
169
+ # Skip the non-background boxes that are too large
170
+ if class_name not in cfg.bg_classes:
171
+ x1, y1, x2, y2 = detections_dict["xyxy"][obj_idx]
172
+ bbox_area = (x2 - x1) * (y2 - y1)
173
+ image_area = image.shape[0] * image.shape[1]
174
+ if bbox_area > cfg.max_bbox_area_ratio * image_area:
175
+ print(f"Skipping {class_name} with area {bbox_area} > {cfg.max_bbox_area_ratio} * {image_area}")
176
+ continue
177
+
178
+ # Skip masks with low confidence
179
+ if detections_dict["confidence"][obj_idx] < cfg.mask_conf_threshold:
180
+ print(
181
+ f"Skipping {class_name} with confidence {detections_dict['confidence'][obj_idx]} < {cfg.mask_conf_threshold}"
182
+ )
183
+ continue
184
+
185
+ idx_to_keep.append(obj_idx)
186
+
187
+ for k in detections_dict.keys():
188
+ if isinstance(detections_dict[k], str) or k == "classes": # Captions
189
+ continue
190
+ elif isinstance(detections_dict[k], list):
191
+ detections_dict[k] = [detections_dict[k][i] for i in idx_to_keep]
192
+ elif isinstance(detections_dict[k], np.ndarray):
193
+ detections_dict[k] = detections_dict[k][idx_to_keep]
194
+ else:
195
+ raise NotImplementedError(f"Unhandled type {type(detections_dict[k])}")
196
+
197
+ return detections_dict
198
+
199
+
200
+ def sort_detections_by_area(detections_dict):
201
+ # Sort the detections by area, use negative to sort from large to small
202
+ sorted_indices = np.argsort(-detections_dict["area"])
203
+ for key in detections_dict.keys():
204
+ if isinstance(detections_dict[key], np.ndarray): # Check to ensure it's an array
205
+ detections_dict[key] = detections_dict[key][sorted_indices]
206
+ return detections_dict
207
+
208
+
209
+ def post_process_mask(detections_dict):
210
+ sam_masks = torch.tensor(detections_dict["subtracted_mask"])
211
+ uncompressed_mask_rles = mask_to_rle_pytorch(sam_masks)
212
+ rle_masks_list = [coco_encode_rle(uncompressed_mask_rles[i]) for i in range(len(uncompressed_mask_rles))]
213
+ detections_dict["rle"] = rle_masks_list
214
+ return detections_dict
215
+
216
+
217
+ def crop_image_and_mask(image: Image, mask: np.ndarray, x1: int, y1: int, x2: int, y2: int, padding: int = 0):
218
+ """Crop the image and mask with some padding.
219
+
220
+ I made a single function that crops both the image and the mask at the same time because I was getting shape
221
+ mismatches when I cropped them separately.This way I can check that they are the same shape.
222
+ """
223
+
224
+ image = np.array(image)
225
+ # Verify initial dimensions
226
+ if image.shape[:2] != mask.shape:
227
+ print(f"Initial shape mismatch: Image shape {image.shape} != Mask shape {mask.shape}")
228
+ return None, None
229
+
230
+ # Define the cropping coordinates
231
+ x1 = max(0, x1 - padding)
232
+ y1 = max(0, y1 - padding)
233
+ x2 = min(image.shape[1], x2 + padding)
234
+ y2 = min(image.shape[0], y2 + padding)
235
+ # round the coordinates to integers
236
+ x1, y1, x2, y2 = round(x1), round(y1), round(x2), round(y2)
237
+
238
+ # Crop the image and the mask
239
+ image_crop = image[y1:y2, x1:x2]
240
+ mask_crop = mask[y1:y2, x1:x2]
241
+
242
+ # Verify cropped dimensions
243
+ if image_crop.shape[:2] != mask_crop.shape:
244
+ print(
245
+ "Cropped shape mismatch: Image crop shape {} != Mask crop shape {}".format(
246
+ image_crop.shape, mask_crop.shape
247
+ )
248
+ )
249
+ return None, None
250
+
251
+ # convert the image back to a pil image
252
+ image_crop = Image.fromarray(image_crop)
253
+
254
+ return image_crop, mask_crop
255
+
256
+
257
+ def crop_detections_with_xyxy(cfg, image, detections_list):
258
+ for idx, detection in enumerate(detections_list):
259
+ x1, y1, x2, y2 = detection["xyxy"]
260
+ image_crop, mask_crop = crop_image_and_mask(image, detection["mask"], x1, y1, x2, y2, padding=10)
261
+ if cfg.masking_option == "blackout":
262
+ image_crop_modified = blackout_nonmasked_area(image_crop, mask_crop)
263
+ elif cfg.masking_option == "red_outline":
264
+ image_crop_modified = draw_red_outline(image_crop, mask_crop)
265
+ else:
266
+ image_crop_modified = image_crop # No modification
267
+ detections_list[idx]["image_crop"] = image_crop
268
+ detections_list[idx]["mask_crop"] = mask_crop
269
+ detections_list[idx]["image_crop_modified"] = image_crop_modified
270
+ return detections_list
271
+
272
+
273
+ def mask_to_rle_pytorch(tensor: torch.Tensor) -> List[Dict[str, Any]]:
274
+ """
275
+ Encodes masks to an uncompressed RLE, in the format expected by
276
+ pycoco tools.
277
+ """
278
+ # Put in fortran order and flatten h,w
279
+ b, h, w = tensor.shape
280
+ tensor = tensor.permute(0, 2, 1).flatten(1)
281
+
282
+ # Compute change indices
283
+ diff = tensor[:, 1:] ^ tensor[:, :-1]
284
+ change_indices = diff.nonzero()
285
+
286
+ # Encode run length
287
+ out = []
288
+ for i in range(b):
289
+ cur_idxs = change_indices[change_indices[:, 0] == i, 1]
290
+ cur_idxs = torch.cat(
291
+ [
292
+ torch.tensor([0], dtype=cur_idxs.dtype, device=cur_idxs.device),
293
+ cur_idxs + 1,
294
+ torch.tensor([h * w], dtype=cur_idxs.dtype, device=cur_idxs.device),
295
+ ]
296
+ )
297
+ btw_idxs = cur_idxs[1:] - cur_idxs[:-1]
298
+ counts = [] if tensor[i, 0] == 0 else [0]
299
+ counts.extend(btw_idxs.detach().cpu().tolist())
300
+ out.append({"size": [h, w], "counts": counts})
301
+ return out
302
+
303
+
304
+ def rle_to_mask(rle: Dict[str, Any]) -> np.ndarray:
305
+ """Compute a binary mask from an uncompressed RLE."""
306
+ h, w = rle["size"]
307
+ mask = np.empty(h * w, dtype=bool)
308
+ idx = 0
309
+ parity = False
310
+ for count in rle["counts"]:
311
+ mask[idx : idx + count] = parity
312
+ idx += count
313
+ parity ^= True
314
+ mask = mask.reshape(w, h)
315
+ return mask.transpose() # Put in C order
316
+
317
+
318
+ def coco_encode_rle(uncompressed_rle: Dict[str, Any]) -> Dict[str, Any]:
319
+ from pycocotools import mask as mask_utils # type: ignore
320
+
321
+ h, w = uncompressed_rle["size"]
322
+ rle = mask_utils.frPyObjects(uncompressed_rle, h, w)
323
+ rle["counts"] = rle["counts"].decode("utf-8") # Necessary to serialize with json
324
+ return rle
utils/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (148 Bytes). View file
 
utils/__pycache__/logger.cpython-310.pyc ADDED
Binary file (5.3 kB). View file