Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ if uploaded_image:
|
|
31 |
if st.button('Detect Saliency'):
|
32 |
# Preprocess the image
|
33 |
img = image.resize((384, 288))
|
34 |
-
img = np.array(img) /
|
35 |
img = np.expand_dims(np.transpose(img, (2, 0, 1)), axis=0)
|
36 |
img = torch.from_numpy(img)
|
37 |
img = img.type(torch.FloatTensor).to(device)
|
|
|
31 |
if st.button('Detect Saliency'):
|
32 |
# Preprocess the image
|
33 |
img = image.resize((384, 288))
|
34 |
+
img = np.array(img) / 100.
|
35 |
img = np.expand_dims(np.transpose(img, (2, 0, 1)), axis=0)
|
36 |
img = torch.from_numpy(img)
|
37 |
img = img.type(torch.FloatTensor).to(device)
|