MCPcopy Create free account
hub / github.com/TencentARC/InstantMesh / preprocess

Function preprocess

app.py:124–131  ·  view source on GitHub ↗
(input_image, do_remove_background)

Source from the content-addressed store, hash-verified

122
123
124def preprocess(input_image, do_remove_background):
125
126 rembg_session = rembg.new_session() if do_remove_background else None
127 if do_remove_background:
128 input_image = remove_background(input_image, rembg_session)
129 input_image = resize_foreground(input_image, 0.85)
130
131 return input_image
132
133
134def generate_mvs(input_image, sample_steps, sample_seed):

Callers

nothing calls this directly

Calls 2

remove_backgroundFunction · 0.90
resize_foregroundFunction · 0.90

Tested by

no test coverage detected