Spaces:
Running
Running
Fixed camera position of Model3D renderer
Browse files- demo/src/gui.py +10 -8
demo/src/gui.py
CHANGED
@@ -55,8 +55,10 @@ class WebUI:
|
|
55 |
self.volume_renderer = gr.Model3D(
|
56 |
clear_color=[0.0, 0.0, 0.0, 0.0],
|
57 |
label="3D Model",
|
|
|
58 |
visible=True,
|
59 |
elem_id="model-3d",
|
|
|
60 |
).style(height=512)
|
61 |
|
62 |
def set_class_name(self, value):
|
@@ -73,13 +75,13 @@ class WebUI:
|
|
73 |
|
74 |
def process(self, mesh_file_name):
|
75 |
path = mesh_file_name.name
|
76 |
-
run_model(
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
)
|
82 |
-
LOGGER.info("Converting prediction NIfTI to
|
83 |
nifti_to_glb("prediction.nii.gz")
|
84 |
|
85 |
LOGGER.info("Loading CT to numpy...")
|
@@ -195,7 +197,7 @@ class WebUI:
|
|
195 |
|
196 |
gr.Markdown(
|
197 |
"""
|
198 |
-
**NOTE:** Inference might take several minutes (
|
199 |
The segmentation will be available in the 2D and 3D viewers below when finished.
|
200 |
"""
|
201 |
)
|
|
|
55 |
self.volume_renderer = gr.Model3D(
|
56 |
clear_color=[0.0, 0.0, 0.0, 0.0],
|
57 |
label="3D Model",
|
58 |
+
show_label=True,
|
59 |
visible=True,
|
60 |
elem_id="model-3d",
|
61 |
+
camera_position=[90, 180, 768],
|
62 |
).style(height=512)
|
63 |
|
64 |
def set_class_name(self, value):
|
|
|
75 |
|
76 |
def process(self, mesh_file_name):
|
77 |
path = mesh_file_name.name
|
78 |
+
#run_model(
|
79 |
+
# path,
|
80 |
+
# model_path=os.path.join(self.cwd, "resources/models/"),
|
81 |
+
# task=self.class_names[self.class_name],
|
82 |
+
# name=self.result_names[self.class_name],
|
83 |
+
#)
|
84 |
+
LOGGER.info("Converting prediction NIfTI to OBJ...")
|
85 |
nifti_to_glb("prediction.nii.gz")
|
86 |
|
87 |
LOGGER.info("Loading CT to numpy...")
|
|
|
197 |
|
198 |
gr.Markdown(
|
199 |
"""
|
200 |
+
**NOTE:** Inference might take several minutes (Airways: ~8 minutes), see logs to the left. \\
|
201 |
The segmentation will be available in the 2D and 3D viewers below when finished.
|
202 |
"""
|
203 |
)
|