houyuanchen111 commited on
Commit
060dc3d
·
1 Parent(s): dd0823d
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -39,7 +39,7 @@ import tempfile
39
  from PIL import Image
40
  import glob
41
  from src.data import DemoData
42
- from src.models import LiNo_UniPS
43
  from torch.utils.data import DataLoader
44
  import pytorch_lightning as pl
45
  import spaces
@@ -206,7 +206,7 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
206
  with gr.Row():
207
  gr.Markdown(
208
  """
209
- LiNo-UniPS is a method for Univeral Photometric Stereo. It predicts the normal map from a given set of images. Key features include:
210
 
211
  * **Light-Agnostic:** Does not require specific lighting parameters as input.
212
  * **Arbitrary-Resolution:** Supports inputs of any resolution.
@@ -222,7 +222,7 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
222
 
223
  2. **Upload Your Mask (Optional)**: A mask is not required for scene reconstruction. However, to reconstruct the normal map for a specific **object**, providing a mask is highly recommended. Use the "Mask" button on the left.
224
 
225
- 3. **Reconstruct**: Click the "Run" button to start the reconstruction process. You can use the slider in "Advanced Settings" to control the number of multi-light images used by LiNo-UniPS. Note: If the selected number exceeds the total number of uploaded images, the maximum available number will be used instead.
226
 
227
  4. **Visualize**: The result will appear in the "Normal Output" viewer on the right. If you use one of our provided examples that includes a ground truth normal map, it will be displayed in the "Ground Truth" viewer for comparison.
228
 
@@ -271,7 +271,7 @@ with gr.Blocks(css="footer {visibility: hidden}") as demo:
271
 
272
  with gr.Column(scale=2):
273
  with gr.Tabs():
274
- with gr.Tab("LiNo-UniPS Output"):
275
  with gr.Row(scale=3):
276
  normal_output = gr.Image(label="Normal Output",height=700,)
277
  normal_gt = gr.Image(label="Ground Truth",height=700)
@@ -378,8 +378,9 @@ if __name__ == "__main__":
378
 
379
  hi3dgen_pipeline = Hi3DGenPipeline.from_pretrained("weights/trellis-normal-v0-1")
380
  hi3dgen_pipeline.cuda()
381
- lino = LiNo_UniPS()
382
  lino.from_pretrained("weights/lino/lino.pth")
383
 
384
  demo.launch(share=False, server_name="0.0.0.0")
385
 
 
 
39
  from PIL import Image
40
  import glob
41
  from src.data import DemoData
42
+ from src.models import LINO_UniPS
43
  from torch.utils.data import DataLoader
44
  import pytorch_lightning as pl
45
  import spaces
 
206
  with gr.Row():
207
  gr.Markdown(
208
  """
209
+ LINO-UniPS is a method for Univeral Photometric Stereo. It predicts the normal map from a given set of images. Key features include:
210
 
211
  * **Light-Agnostic:** Does not require specific lighting parameters as input.
212
  * **Arbitrary-Resolution:** Supports inputs of any resolution.
 
222
 
223
  2. **Upload Your Mask (Optional)**: A mask is not required for scene reconstruction. However, to reconstruct the normal map for a specific **object**, providing a mask is highly recommended. Use the "Mask" button on the left.
224
 
225
+ 3. **Reconstruct**: Click the "Run" button to start the reconstruction process. You can use the slider in "Advanced Settings" to control the number of multi-light images used by LINO-UniPS. Note: If the selected number exceeds the total number of uploaded images, the maximum available number will be used instead.
226
 
227
  4. **Visualize**: The result will appear in the "Normal Output" viewer on the right. If you use one of our provided examples that includes a ground truth normal map, it will be displayed in the "Ground Truth" viewer for comparison.
228
 
 
271
 
272
  with gr.Column(scale=2):
273
  with gr.Tabs():
274
+ with gr.Tab("LINO-UniPS Output"):
275
  with gr.Row(scale=3):
276
  normal_output = gr.Image(label="Normal Output",height=700,)
277
  normal_gt = gr.Image(label="Ground Truth",height=700)
 
378
 
379
  hi3dgen_pipeline = Hi3DGenPipeline.from_pretrained("weights/trellis-normal-v0-1")
380
  hi3dgen_pipeline.cuda()
381
+ lino = LINO_UniPS()
382
  lino.from_pretrained("weights/lino/lino.pth")
383
 
384
  demo.launch(share=False, server_name="0.0.0.0")
385
 
386
+