@@ -98,16 +98,12 @@ def on_predict(self):
98
98
voxel_size ["y" ] = self .voxel_size_param .value ()
99
99
if voxel_size :
100
100
if model_type == "custom" :
101
- show_info (f "INFO: Scaling image not avaialable for custom model." )
101
+ show_info ("INFO: The image is not rescaled for a custom model." )
102
102
else :
103
103
# calculate scale so voxel_size is the same as in training
104
104
scale = compute_scale_from_voxel_size (voxel_size , model_type )
105
105
show_info (f"INFO: Rescaled the image by { scale } to optimize for the selected model." )
106
106
107
- if model_type == "custom" :
108
- # choose appropriate segmentation
109
- model_type = self .model_target_selector .currentText ()
110
-
111
107
segmentation = run_segmentation (
112
108
image , model = model , model_type = model_type , tiling = self .tiling , scale = scale
113
109
)
@@ -160,13 +156,6 @@ def _create_settings_widget(self):
160
156
placeholder = "path/to/checkpoint.pt" ,
161
157
)
162
158
setting_values .layout ().addLayout (layout )
163
-
164
- self .model_target_selector , layout = self ._add_choice_param (
165
- name = "Model Target" , value = "vesicles" , options = [
166
- "vesicles" , "mitochondria" , "active_zone" , "compartments" , "inner_ear_structures"
167
- ]
168
- )
169
- setting_values .layout ().addLayout (layout )
170
159
171
160
settings = self ._make_collapsible (widget = setting_values , title = "Advanced Settings" )
172
161
return settings
0 commit comments