vobecant
commited on
Commit
·
004187c
1
Parent(s):
330f925
Initial commit.
Browse files- .idea/workspace.xml +11 -2
- app.py +1 -1
- segmenter_model/utils.py +0 -4
.idea/workspace.xml
CHANGED
|
@@ -2,6 +2,8 @@
|
|
| 2 |
<project version="4">
|
| 3 |
<component name="ChangeListManager">
|
| 4 |
<list default="true" id="5dd22f22-8223-4d55-99f9-57d1e00622d7" name="Default Changelist" comment="Initial commit.">
|
|
|
|
|
|
|
| 5 |
<change beforePath="$PROJECT_DIR$/segmenter_model/utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/segmenter_model/utils.py" afterDir="false" />
|
| 6 |
</list>
|
| 7 |
<option name="SHOW_DIALOG" value="false" />
|
|
@@ -50,7 +52,7 @@
|
|
| 50 |
<option name="number" value="Default" />
|
| 51 |
<option name="presentableId" value="Default" />
|
| 52 |
<updated>1647350746642</updated>
|
| 53 |
-
<workItem from="1647350750956" duration="
|
| 54 |
</task>
|
| 55 |
<task id="LOCAL-00001" summary="Initial commit.">
|
| 56 |
<created>1647352693910</created>
|
|
@@ -255,7 +257,14 @@
|
|
| 255 |
<option name="project" value="LOCAL" />
|
| 256 |
<updated>1647359422799</updated>
|
| 257 |
</task>
|
| 258 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
<servers />
|
| 260 |
</component>
|
| 261 |
<component name="TypeScriptGeneratedFilesManager">
|
|
|
|
| 2 |
<project version="4">
|
| 3 |
<component name="ChangeListManager">
|
| 4 |
<list default="true" id="5dd22f22-8223-4d55-99f9-57d1e00622d7" name="Default Changelist" comment="Initial commit.">
|
| 5 |
+
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
| 6 |
+
<change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
|
| 7 |
<change beforePath="$PROJECT_DIR$/segmenter_model/utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/segmenter_model/utils.py" afterDir="false" />
|
| 8 |
</list>
|
| 9 |
<option name="SHOW_DIALOG" value="false" />
|
|
|
|
| 52 |
<option name="number" value="Default" />
|
| 53 |
<option name="presentableId" value="Default" />
|
| 54 |
<updated>1647350746642</updated>
|
| 55 |
+
<workItem from="1647350750956" duration="8760000" />
|
| 56 |
</task>
|
| 57 |
<task id="LOCAL-00001" summary="Initial commit.">
|
| 58 |
<created>1647352693910</created>
|
|
|
|
| 257 |
<option name="project" value="LOCAL" />
|
| 258 |
<updated>1647359422799</updated>
|
| 259 |
</task>
|
| 260 |
+
<task id="LOCAL-00030" summary="Initial commit.">
|
| 261 |
+
<created>1647359586436</created>
|
| 262 |
+
<option name="number" value="00030" />
|
| 263 |
+
<option name="presentableId" value="LOCAL-00030" />
|
| 264 |
+
<option name="project" value="LOCAL" />
|
| 265 |
+
<updated>1647359586436</updated>
|
| 266 |
+
</task>
|
| 267 |
+
<option name="localTasksCounter" value="31" />
|
| 268 |
<servers />
|
| 269 |
</component>
|
| 270 |
<component name="TypeScriptGeneratedFilesManager">
|
app.py
CHANGED
|
@@ -130,7 +130,7 @@ model, window_size, window_stride = create_model()
|
|
| 130 |
|
| 131 |
def predict(input_img):
|
| 132 |
input_img = Image.open(input_img)
|
| 133 |
-
transform =
|
| 134 |
input_img = transform(input_img)
|
| 135 |
input_img = torch.unsqueeze(input_img, 0)
|
| 136 |
|
|
|
|
| 130 |
|
| 131 |
def predict(input_img):
|
| 132 |
input_img = Image.open(input_img)
|
| 133 |
+
transform = get_transformations()
|
| 134 |
input_img = transform(input_img)
|
| 135 |
input_img = torch.unsqueeze(input_img, 0)
|
| 136 |
|
segmenter_model/utils.py
CHANGED
|
@@ -389,10 +389,6 @@ def inference(
|
|
| 389 |
seg_maps[i: i + WB] = model.forward(crops[i: i + WB], decoder_features=decoder_features,
|
| 390 |
encoder_features=encoder_features,
|
| 391 |
no_upsample=no_upsample)
|
| 392 |
-
# except:
|
| 393 |
-
# print('Input of shape: {}'.format(crops[i:i + WB].shape))
|
| 394 |
-
# assert False, "End after error."
|
| 395 |
-
# torch.cuda.empty_cache()
|
| 396 |
windows["seg_maps"] = seg_maps
|
| 397 |
|
| 398 |
im_seg_map = merge_windows(windows, window_size, ori_shape, no_softmax=decoder_features,
|
|
|
|
| 389 |
seg_maps[i: i + WB] = model.forward(crops[i: i + WB], decoder_features=decoder_features,
|
| 390 |
encoder_features=encoder_features,
|
| 391 |
no_upsample=no_upsample)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 392 |
windows["seg_maps"] = seg_maps
|
| 393 |
|
| 394 |
im_seg_map = merge_windows(windows, window_size, ori_shape, no_softmax=decoder_features,
|