daidedou commited on
Commit
9aa8f30
·
1 Parent(s): 36538fb

Try to fix the gpu aborted problem (duration?)

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -198,7 +198,7 @@ def init_clicked(mesh1_path, mesh2_path,
198
  p2p_init, _ = extract_p2p_torch_fmap(C12_obj, shape_dict["evecs"], target_dict["evecs"])
199
  return build_outputs(datadicts.shape_surf, datadicts.target_surf, datadicts.cmap1, p2p_init, tag="init")
200
 
201
- @spaces.GPU(duration=120)
202
  def run_clicked(mesh1_path, mesh2_path, yaml_path, lambda_val, zoomout_val, time_val, nloop_val, sds_val, proper_val, progress=gr.Progress(track_tqdm=True)):
203
  if not mesh1_path or not mesh2_path:
204
  raise gr.Error("Please upload both meshes.")
@@ -242,6 +242,8 @@ with gr.Blocks(title="DiffuMatch demo") as demo:
242
  Upload two meshes and try our ICCV zero-shot method <a href="https://daidedou.github.io/publication/nonrigiddiff">DiffuMatch</a> <br/>
243
  <b>Init</b> will give you a rough correspondence, and you can click on <b>Run</b> to see if our method is able to match the two shapes! <br/>
244
  <b>Recommended</b/>: The method requires that the meshes are aligned (rotation-wise) to work well.<br/>
 
 
245
  This method might not work with topological inconsistencies, and will crash for methods with high number of vertices (>10000) - because of the preprocessing. Try it out and let us know! <br/>
246
  """
247
  )
 
198
  p2p_init, _ = extract_p2p_torch_fmap(C12_obj, shape_dict["evecs"], target_dict["evecs"])
199
  return build_outputs(datadicts.shape_surf, datadicts.target_surf, datadicts.cmap1, p2p_init, tag="init")
200
 
201
+ @spaces.GPU(duration=180)
202
  def run_clicked(mesh1_path, mesh2_path, yaml_path, lambda_val, zoomout_val, time_val, nloop_val, sds_val, proper_val, progress=gr.Progress(track_tqdm=True)):
203
  if not mesh1_path or not mesh2_path:
204
  raise gr.Error("Please upload both meshes.")
 
242
  Upload two meshes and try our ICCV zero-shot method <a href="https://daidedou.github.io/publication/nonrigiddiff">DiffuMatch</a> <br/>
243
  <b>Init</b> will give you a rough correspondence, and you can click on <b>Run</b> to see if our method is able to match the two shapes! <br/>
244
  <b>Recommended</b/>: The method requires that the meshes are aligned (rotation-wise) to work well.<br/>
245
+ The method have been adapted to the zeroGPU environment, so results won't be as good as in the paper. Also without Pykeops, the optimization is much slower. <br/>
246
+ We recommend using the <a href="https://github.com/daidedou/diffumatch">offical code</a> if you want to get the best results. <br/>
247
  This method might not work with topological inconsistencies, and will crash for methods with high number of vertices (>10000) - because of the preprocessing. Try it out and let us know! <br/>
248
  """
249
  )