Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -189,32 +189,26 @@ def do_inference(input_3d, sample_seed=0, do_sampling=False, do_marching_cubes=F
|
|
189 |
return input_save_name, input_render_res, save_name, output_render
|
190 |
|
191 |
|
192 |
-
_HEADER_ =
|
193 |
-
|
194 |
|
195 |
-
|
196 |
|
197 |
-
|
198 |
|
199 |
-
|
200 |
|
201 |
-
|
202 |
-
|
203 |
-
-
|
204 |
-
|
205 |
-
|
206 |
-
- For point cloud input, please refer to our github repo <a href='https://github.com/buaacyw/MeshAnythingV2' target='_blank'>GitHub</a>.
|
207 |
-
'''
|
208 |
|
|
|
|
|
209 |
|
210 |
-
_CITE_ = r"""
|
211 |
-
If MeshAnythingV2 is helpful, please help to ⭐ the <a href='https://github.com/buaacyw/MeshAnythingV2' target='_blank'>Github Repo</a>. Thanks!
|
212 |
-
---
|
213 |
-
📋 **License**
|
214 |
-
MIT LICENSE.
|
215 |
-
📧 **Contact**
|
216 |
-
If you have any questions, feel free to open a discussion or contact us at <b>yiwen002@e.ntu.edu.sg</b>.
|
217 |
"""
|
|
|
218 |
output_model_obj = gr.Model3D(
|
219 |
label="Generated Mesh (OBJ Format)",
|
220 |
display_mode="wireframe",
|
@@ -276,8 +270,6 @@ with (gr.Blocks() as demo):
|
|
276 |
with gr.Row():
|
277 |
gr.Markdown('''Try click random sampling and different <b>Seed Value</b> if the result is unsatisfying''')
|
278 |
|
279 |
-
gr.Markdown(_CITE_)
|
280 |
-
|
281 |
mv_images = gr.State()
|
282 |
|
283 |
submit.click(
|
|
|
189 |
return input_save_name, input_render_res, save_name, output_render
|
190 |
|
191 |
|
192 |
+
_HEADER_ = """
|
193 |
+
## Step 2: Simplify the generated 3D Mesh and Shader Smooth (optional)
|
194 |
|
195 |
+
ADD ILLUSTRATION
|
196 |
|
197 |
+
- The 3D Mesh Generated contains too much polygons, fortunately, we can use another AI model to help us optimize it.
|
198 |
|
199 |
+
- The model we use is called [MeshAnythingV2](https://huggingface.co/Yiwen-ntu/MeshAnythingV2).
|
200 |
|
201 |
+
- We can make the simplified mesh more smooth is to use Shader Smooth.
|
202 |
+
|
203 |
+
- You can usually do it in Blender, but we can do it directly here. Simply -> ✅ Shader Smooth.
|
204 |
+
|
205 |
+
## 💡 Tips
|
|
|
|
|
206 |
|
207 |
+
- We don't click on Preprocess with marching Cubes, because in the last step the input mesh was produced by it.
|
208 |
+
- Limited by computational resources, MeshAnything is trained on meshes with fewer than 1600 faces and cannot generate meshes with more than 1600 faces. The shape of the input mesh should be sharp enough; otherwise, it will be challenging to represent it with only 1600 faces. Thus, feed-forward image-to-3D methods may often produce bad results due to insufficient shape quality.
|
209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
"""
|
211 |
+
|
212 |
output_model_obj = gr.Model3D(
|
213 |
label="Generated Mesh (OBJ Format)",
|
214 |
display_mode="wireframe",
|
|
|
270 |
with gr.Row():
|
271 |
gr.Markdown('''Try click random sampling and different <b>Seed Value</b> if the result is unsatisfying''')
|
272 |
|
|
|
|
|
273 |
mv_images = gr.State()
|
274 |
|
275 |
submit.click(
|