MCPcopy Create free account
hub / github.com/microsoft/TRELLIS / prepare_multi_example

Function prepare_multi_example

app.py:224–235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222
223
224def prepare_multi_example() -> List[Image.Image]:
225 multi_case = list(set([i.split('_')[0] for i in os.listdir("assets/example_multi_image")]))
226 images = []
227 for case in multi_case:
228 _images = []
229 for i in range(1, 4):
230 img = Image.open(f'assets/example_multi_image/{case}_{i}.png')
231 W, H = img.size
232 img = img.resize((int(W / H * 512), 512))
233 _images.append(np.array(img))
234 images.append(Image.fromarray(np.concatenate(_images, axis=1)))
235 return images
236
237
238def split_image(image: Image.Image) -> List[Image.Image]:

Callers 1

app.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected