ruiite commited on
Commit
618f1a2
1 Parent(s): 7b046ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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["pred_masks"].to("cpu"))
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."