Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def segment_image(im):
|
|
38 |
outputs = predictor(im)
|
39 |
v = Visualizer(im[:, :, ::-1],
|
40 |
scale=0.5,
|
41 |
-
instance_mode=ColorMode.
|
42 |
)
|
43 |
print(len(outputs["instances"])," trees detected.")
|
44 |
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
|
|
|
38 |
outputs = predictor(im)
|
39 |
v = Visualizer(im[:, :, ::-1],
|
40 |
scale=0.5,
|
41 |
+
instance_mode=ColorMode.SEGMENTATION
|
42 |
)
|
43 |
print(len(outputs["instances"])," trees detected.")
|
44 |
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
|