adpro commited on
Commit
d35bc3b
·
1 Parent(s): 51255e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from gluoncv.data.transforms.presets.segmentation import test_transform
9
  # using cpu
10
  ctx = mx.cpu(0)
11
 
12
- model = gluoncv.model_zoo.get_model("deeplab_resnet50_citys", pretrained=True)
13
 
14
 
15
  def segmentation(image):
@@ -18,7 +18,7 @@ def segmentation(image):
18
  img = test_transform(img, ctx)
19
  output = model.predict(img)
20
  predict = mx.nd.squeeze(mx.nd.argmax(output, 1)).asnumpy()
21
- mask = get_color_pallete(predict, "cityscapes")
22
  return mask
23
 
24
 
 
9
  # using cpu
10
  ctx = mx.cpu(0)
11
 
12
+ model = gluoncv.model_zoo.get_model("deeplab_resnet101_ade", pretrained=True)
13
 
14
 
15
  def segmentation(image):
 
18
  img = test_transform(img, ctx)
19
  output = model.predict(img)
20
  predict = mx.nd.squeeze(mx.nd.argmax(output, 1)).asnumpy()
21
+ mask = get_color_pallete(predict, "ade20k")
22
  return mask
23
 
24