Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -48,9 +48,9 @@ def inference(image):
|
|
48 |
instance_mode=ColorMode.SEGMENTATION # remove the colors of unsegmented pixels. This option is only available for segmentation models
|
49 |
)
|
50 |
# v = Visualizer(img,scale=1.2)
|
51 |
-
out = v.draw_instance_predictions(outputs["
|
52 |
|
53 |
-
return out.get_image()
|
54 |
|
55 |
title = "Detectron2 Car damage Detection"
|
56 |
description = "This demo introduces an interactive playground for our trained Detectron2 model."
|
|
|
48 |
instance_mode=ColorMode.SEGMENTATION # remove the colors of unsegmented pixels. This option is only available for segmentation models
|
49 |
)
|
50 |
# v = Visualizer(img,scale=1.2)
|
51 |
+
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
|
52 |
|
53 |
+
return out.get_image()[:, :, ::-1]
|
54 |
|
55 |
title = "Detectron2 Car damage Detection"
|
56 |
description = "This demo introduces an interactive playground for our trained Detectron2 model."
|