Spaces:
Runtime error
Runtime error
Commit ·
c976795
1
Parent(s): 6692db3
increase resolution to 1024px
Browse files
app.py
CHANGED
|
@@ -42,9 +42,10 @@ def applyColormap(img,colormap):
|
|
| 42 |
ret[y,x] = colormap[int(img[y,x])]
|
| 43 |
return ret.astype(np.uint8)
|
| 44 |
|
|
|
|
| 45 |
|
| 46 |
def inference(image):
|
| 47 |
-
image = image.resize(size=(
|
| 48 |
img = np.array(image)[:,:,::-1]
|
| 49 |
result = model.predict(images=[img], visualization=True)[0]
|
| 50 |
result_color = applyColormap(result,colormap)
|
|
|
|
| 42 |
ret[y,x] = colormap[int(img[y,x])]
|
| 43 |
return ret.astype(np.uint8)
|
| 44 |
|
| 45 |
+
size = 1024
|
| 46 |
|
| 47 |
def inference(image):
|
| 48 |
+
image = image.resize(size=(size,size))
|
| 49 |
img = np.array(image)[:,:,::-1]
|
| 50 |
result = model.predict(images=[img], visualization=True)[0]
|
| 51 |
result_color = applyColormap(result,colormap)
|