Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -155,16 +155,27 @@ with gr.Blocks() as demo:
|
|
155 |
with gr.Accordion("Object Detection Settings", open=True):
|
156 |
det_model = gr.Dropdown(choices=list(DETECTION_MODEL_MAP), label="Detection Model")
|
157 |
det_confidence = gr.Slider(0.1, 1.0, 0.5, label="Detection Confidence Threshold")
|
|
|
|
|
|
|
|
|
158 |
|
159 |
with gr.Column(visible=False) as SS_Settings:
|
160 |
with gr.Accordion("Semantic Segmentation Settings", open=True):
|
161 |
seg_model = gr.Dropdown(choices=list(SEGMENTATION_MODEL_MAP), label="Segmentation Model")
|
|
|
|
|
|
|
|
|
162 |
|
163 |
with gr.Column(visible=False) as DE_Settings:
|
164 |
with gr.Accordion("Depth Estimation Settings", open=True):
|
165 |
depth_model = gr.Dropdown(choices=list(DEPTH_MODEL_MAP), label="Depth Model")
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
168 |
|
169 |
# Attach Visibility Logic
|
170 |
run_det.change(fn=toggle_visibility, inputs=[run_det], outputs=[OD_Settings])
|
|
|
155 |
with gr.Accordion("Object Detection Settings", open=True):
|
156 |
det_model = gr.Dropdown(choices=list(DETECTION_MODEL_MAP), label="Detection Model")
|
157 |
det_confidence = gr.Slider(0.1, 1.0, 0.5, label="Detection Confidence Threshold")
|
158 |
+
nms_thresh = gr.Slider(0.1, 1.0, 0.45, label="NMS Threshold")
|
159 |
+
max_det = gr.Slider(1, 100, 20, step=1, label="Max Detections")
|
160 |
+
iou_thresh = gr.Slider(0.1, 1.0, 0.5, label="IoU Threshold")
|
161 |
+
class_filter = gr.CheckboxGroup(["Person", "Car", "Dog"], label="Class Filter")
|
162 |
|
163 |
with gr.Column(visible=False) as SS_Settings:
|
164 |
with gr.Accordion("Semantic Segmentation Settings", open=True):
|
165 |
seg_model = gr.Dropdown(choices=list(SEGMENTATION_MODEL_MAP), label="Segmentation Model")
|
166 |
+
resize_strategy = gr.Dropdown(["Crop", "Pad", "Scale"], label="Resize Strategy")
|
167 |
+
overlay_alpha = gr.Slider(0.0, 1.0, 0.5, label="Overlay Opacity")
|
168 |
+
seg_classes = gr.CheckboxGroup(["Road", "Sky", "Building"], label="Target Classes")
|
169 |
+
enable_crf = gr.Checkbox(label="Postprocessing (CRF)")
|
170 |
|
171 |
with gr.Column(visible=False) as DE_Settings:
|
172 |
with gr.Accordion("Depth Estimation Settings", open=True):
|
173 |
depth_model = gr.Dropdown(choices=list(DEPTH_MODEL_MAP), label="Depth Model")
|
174 |
+
output_type = gr.Dropdown(["Raw", "Disparity", "Scaled"], label="Output Type")
|
175 |
+
colormap = gr.Dropdown(["Jet", "Viridis", "Plasma"], label="Colormap")
|
176 |
+
blend = gr.Slider(0.0, 1.0, 0.5, label="Overlay Blend")
|
177 |
+
normalize = gr.Checkbox(label="Normalize Depth")
|
178 |
+
max_depth = gr.Slider(0.1, 10.0, 5.0, label="Max Depth (meters)")
|
179 |
|
180 |
# Attach Visibility Logic
|
181 |
run_det.change(fn=toggle_visibility, inputs=[run_det], outputs=[OD_Settings])
|