Spaces:
Runtime error
Runtime error
Qihang Yu
commited on
Commit
•
109d852
1
Parent(s):
31a1bd6
Add kMaX-DeepLab
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ os.system("wget https://i.imgur.com/Vj17K5z.jpg")
|
|
50 |
|
51 |
def inference(img):
|
52 |
im = cv2.imread(img)
|
53 |
-
im = imutils.resize(im, width=512)
|
54 |
outputs = predictor(im)
|
55 |
v = Visualizer(im[:, :, ::-1], coco_metadata, scale=1.2, instance_mode=ColorMode.IMAGE_BW)
|
56 |
panoptic_result = v.draw_panoptic_seg(outputs["panoptic_seg"][0].to("cpu"), outputs["panoptic_seg"][1]).get_image()
|
|
|
50 |
|
51 |
def inference(img):
|
52 |
im = cv2.imread(img)
|
53 |
+
#im = imutils.resize(im, width=512)
|
54 |
outputs = predictor(im)
|
55 |
v = Visualizer(im[:, :, ::-1], coco_metadata, scale=1.2, instance_mode=ColorMode.IMAGE_BW)
|
56 |
panoptic_result = v.draw_panoptic_seg(outputs["panoptic_seg"][0].to("cpu"), outputs["panoptic_seg"][1]).get_image()
|