A19grey commited on
Commit
f49612a
·
1 Parent(s): 9890878

updated thresholds options range

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. history.md +8 -0
app.py CHANGED
@@ -127,7 +127,7 @@ def generate_3d_model(depth, image_path, focallength_px, simplification_factor=0
127
 
128
  print("Creating mesh")
129
  # Create the mesh using Trimesh with vertex colors
130
- mesh = trimesh.Trimesh(vertices=vertices, faces=faces, vertex_colors=colors)
131
 
132
  # Mesh cleaning and improvement steps
133
  print("Original mesh - vertices: {}, faces: {}".format(len(mesh.vertices), len(mesh.faces)))
@@ -318,7 +318,7 @@ with gr.Blocks() as iface:
318
  with gr.Row():
319
  simplification_factor = gr.Slider(minimum=0.1, maximum=1.0, value=0.8, step=0.1, label="Simplification Factor")
320
  smoothing_iterations = gr.Slider(minimum=0, maximum=5, value=1, step=1, label="Smoothing Iterations")
321
- thin_threshold = gr.Slider(minimum=0.001, maximum=0.1, value=0.01, step=0.001, label="Thin Feature Threshold")
322
 
323
  regenerate_button = gr.Button("Regenerate 3D Model")
324
  model_status = gr.Textbox(label="3D Model Status")
 
127
 
128
  print("Creating mesh")
129
  # Create the mesh using Trimesh with vertex colors
130
+ mesh = trimesh.Trimesh(vertices=vertices, faces=faces, vertex_colors=colors, process=False)
131
 
132
  # Mesh cleaning and improvement steps
133
  print("Original mesh - vertices: {}, faces: {}".format(len(mesh.vertices), len(mesh.faces)))
 
318
  with gr.Row():
319
  simplification_factor = gr.Slider(minimum=0.1, maximum=1.0, value=0.8, step=0.1, label="Simplification Factor")
320
  smoothing_iterations = gr.Slider(minimum=0, maximum=5, value=1, step=1, label="Smoothing Iterations")
321
+ thin_threshold = gr.Slider(minimum=0.01, maximum=1, value=0.05, step=0.01, label="Thin Feature Threshold (meters)")
322
 
323
  regenerate_button = gr.Button("Regenerate 3D Model")
324
  model_status = gr.Textbox(label="3D Model Status")
history.md CHANGED
@@ -22,3 +22,11 @@
22
  4. Added a print statement just before returning from the `predict_depth` function to log all return values.
23
  - These changes aim to prevent CUDA initialization in the main process and provide more detailed logging for troubleshooting.
24
 
 
 
 
 
 
 
 
 
 
22
  4. Added a print statement just before returning from the `predict_depth` function to log all return values.
23
  - These changes aim to prevent CUDA initialization in the main process and provide more detailed logging for troubleshooting.
24
 
25
+ ## 2024-10-05 22:30 PST
26
+ ### 3D Model Colorization and Thin Threshold Adjustment
27
+ - Problem 1: The generated 3D model lacks proper colorization from the original image.
28
+ - Problem 2: The range for the 'thin' threshold slider may need adjustment, and its units are unclear.
29
+ - Next steps:
30
+ 1. Investigate and fix the texture mapping in the 3D model generation process.
31
+ 2. Clarify the units for the thin threshold and consider adjusting its range.
32
+