NoelShin
commited on
Commit
·
bcfa8cd
1
Parent(s):
6d6f3c6
fix a minor error
Browse files- .idea/workspace.xml +2 -3
- app.py +1 -1
.idea/workspace.xml
CHANGED
@@ -5,8 +5,7 @@
|
|
5 |
</component>
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="9fb9e207-fc4f-4ff3-9adc-3c4c1e67daa7" name="Changes" comment="">
|
8 |
-
<change beforePath="$PROJECT_DIR
|
9 |
-
<change beforePath="$PROJECT_DIR$/utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils.py" afterDir="false" />
|
10 |
</list>
|
11 |
<option name="SHOW_DIALOG" value="false" />
|
12 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
@@ -48,7 +47,7 @@
|
|
48 |
<option name="presentableId" value="Default" />
|
49 |
<updated>1664204268713</updated>
|
50 |
<workItem from="1664204270261" duration="37000" />
|
51 |
-
<workItem from="1664204316867" duration="
|
52 |
</task>
|
53 |
<servers />
|
54 |
</component>
|
|
|
5 |
</component>
|
6 |
<component name="ChangeListManager">
|
7 |
<list default="true" id="9fb9e207-fc4f-4ff3-9adc-3c4c1e67daa7" name="Changes" comment="">
|
8 |
+
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
|
|
|
9 |
</list>
|
10 |
<option name="SHOW_DIALOG" value="false" />
|
11 |
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
|
47 |
<option name="presentableId" value="Default" />
|
48 |
<updated>1664204268713</updated>
|
49 |
<workItem from="1664204270261" duration="37000" />
|
50 |
+
<workItem from="1664204316867" duration="6094000" />
|
51 |
</task>
|
52 |
<servers />
|
53 |
</component>
|
app.py
CHANGED
@@ -54,7 +54,7 @@ def main(image: Image):
|
|
54 |
|
55 |
# pred: H x W
|
56 |
pred: torch.Tensor = logits.squeeze(dim=0).argmax(dim=0).cpu().numpy()
|
57 |
-
coloured_pred: np.ndarray = colourise_mask(mask=pred
|
58 |
super_imposed_img = cv2.addWeighted(coloured_pred, 0.5, np.array(pil_image), 0.5, 0)
|
59 |
|
60 |
# resize prediction to original resolution
|
|
|
54 |
|
55 |
# pred: H x W
|
56 |
pred: torch.Tensor = logits.squeeze(dim=0).argmax(dim=0).cpu().numpy()
|
57 |
+
coloured_pred: np.ndarray = colourise_mask(mask=pred)
|
58 |
super_imposed_img = cv2.addWeighted(coloured_pred, 0.5, np.array(pil_image), 0.5, 0)
|
59 |
|
60 |
# resize prediction to original resolution
|