Spaces:
Sleeping
Sleeping
Update app.py
Browse files[fix]model type to sepia
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def show_coord(evt: gr.SelectData):
|
|
| 31 |
def generate_mask(model_type,img, coord):
|
| 32 |
#x, y = map(int, coord.split(','))
|
| 33 |
#
|
| 34 |
-
mask = sepia((img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8), stack_image=False)
|
| 35 |
mask = F.interpolate(torch.from_numpy(mask).unsqueeze(0).unsqueeze(0),size=[img.shape[0],img.shape[1]],mode='bilinear').squeeze().numpy()
|
| 36 |
col = torch.from_numpy(mask).squeeze().unsqueeze(2).repeat(1,1,3)
|
| 37 |
col=col/col.max()
|
|
|
|
| 31 |
def generate_mask(model_type,img, coord):
|
| 32 |
#x, y = map(int, coord.split(','))
|
| 33 |
#
|
| 34 |
+
mask = sepia(model_type,(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8),(img*0.999999).astype(np.uint8), stack_image=False)
|
| 35 |
mask = F.interpolate(torch.from_numpy(mask).unsqueeze(0).unsqueeze(0),size=[img.shape[0],img.shape[1]],mode='bilinear').squeeze().numpy()
|
| 36 |
col = torch.from_numpy(mask).squeeze().unsqueeze(2).repeat(1,1,3)
|
| 37 |
col=col/col.max()
|