Spaces:
Runtime error
Runtime error
jens commited on
Commit ·
344f858
1
Parent(s): c1883e2
fix
Browse files- app.py +4 -4
- inference.py +1 -1
app.py
CHANGED
|
@@ -20,11 +20,11 @@ def snap(image, video):
|
|
| 20 |
|
| 21 |
demo = gr.Interface(
|
| 22 |
snap,
|
| 23 |
-
inputs=[gr.Image(source="webcam", tool=None
|
| 24 |
gr.Video(source="webcam")],
|
| 25 |
-
outputs=[gr.Image(label="RGB"
|
| 26 |
-
gr.Image(label="predicted depth"
|
| 27 |
-
gr.Image(label="predicted segmentation"
|
| 28 |
gr.Model3D(label="3D mesh reconstruction - RGB",
|
| 29 |
clear_color=[1.0, 1.0, 1.0, 1.0]),
|
| 30 |
gr.Model3D(label="3D mesh reconstruction - Segmented",
|
|
|
|
| 20 |
|
| 21 |
demo = gr.Interface(
|
| 22 |
snap,
|
| 23 |
+
inputs=[gr.Image(source="webcam", tool=None),
|
| 24 |
gr.Video(source="webcam")],
|
| 25 |
+
outputs=[gr.Image(label="RGB"),
|
| 26 |
+
gr.Image(label="predicted depth"),
|
| 27 |
+
gr.Image(label="predicted segmentation"),
|
| 28 |
gr.Model3D(label="3D mesh reconstruction - RGB",
|
| 29 |
clear_color=[1.0, 1.0, 1.0, 1.0]),
|
| 30 |
gr.Model3D(label="3D mesh reconstruction - Segmented",
|
inference.py
CHANGED
|
@@ -51,4 +51,4 @@ class SegmentPredictor:
|
|
| 51 |
mask_annotator = sv.MaskAnnotator()
|
| 52 |
detections = sv.Detections.from_sam(sam_result=sam_result)
|
| 53 |
annotated_image = mask_annotator.annotate(scene=image.copy(), detections=detections)
|
| 54 |
-
return
|
|
|
|
| 51 |
mask_annotator = sv.MaskAnnotator()
|
| 52 |
detections = sv.Detections.from_sam(sam_result=sam_result)
|
| 53 |
annotated_image = mask_annotator.annotate(scene=image.copy(), detections=detections)
|
| 54 |
+
return annotated_image
|