predtiler 0.0.1__tar.gz → 0.0.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {predtiler-0.0.1 → predtiler-0.0.2}/PKG-INFO +4 -4
- {predtiler-0.0.1 → predtiler-0.0.2}/README.md +1 -1
- {predtiler-0.0.1 → predtiler-0.0.2}/pyproject.toml +2 -2
- predtiler-0.0.2/src/predtiler/__init__.py +8 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/src/predtiler/tile_stitcher.py +1 -2
- {predtiler-0.0.1 → predtiler-0.0.2}/tests/test_full_tiling_setup.py +1 -2
- {predtiler-0.0.1 → predtiler-0.0.2}/.github/pull_request_template.md +0 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/.github/workflows/ci.yml +0 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/.github/workflows/coverage.yml +0 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/.gitignore +0 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/LICENSE +0 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/src/predtiler/dataset.py +0 -0
- {predtiler-0.0.1 → predtiler-0.0.2}/src/predtiler/tile_manager.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: predtiler
|
3
|
-
Version: 0.0.
|
4
|
-
Summary:
|
3
|
+
Version: 0.0.2
|
4
|
+
Summary: Subclassing your dataset class into a new class that can be used for tiled prediction to obtain the stitched prediction.
|
5
5
|
Project-URL: homepage, https://github.com/ashesh-0/PredTiler
|
6
6
|
Project-URL: repository, https://github.com/ashesh-0/PredTiler
|
7
7
|
Author: Ashesh
|
@@ -86,7 +86,7 @@ For this we also need a tile manager that will manage the tiles.
|
|
86
86
|
|
87
87
|
```python
|
88
88
|
|
89
|
-
from predtiler
|
89
|
+
from predtiler import get_tiling_dataset, get_tile_manager, stitch_predictions
|
90
90
|
patch_size = 256
|
91
91
|
tile_size = 128
|
92
92
|
data_shape = (10, 2048, 2048) # size of the data you are working with
|
@@ -57,7 +57,7 @@ For this we also need a tile manager that will manage the tiles.
|
|
57
57
|
|
58
58
|
```python
|
59
59
|
|
60
|
-
from predtiler
|
60
|
+
from predtiler import get_tiling_dataset, get_tile_manager, stitch_predictions
|
61
61
|
patch_size = 256
|
62
62
|
tile_size = 128
|
63
63
|
data_shape = (10, 2048, 2048) # size of the data you are working with
|
@@ -16,8 +16,8 @@ sources = ["src"]
|
|
16
16
|
# https://peps.python.org/pep-0621/
|
17
17
|
[project]
|
18
18
|
name = "predtiler"
|
19
|
-
version = "0.0.
|
20
|
-
description = "
|
19
|
+
version = "0.0.2"
|
20
|
+
description = "Subclassing your dataset class into a new class that can be used for tiled prediction to obtain the stitched prediction."
|
21
21
|
readme = "README.md"
|
22
22
|
requires-python = ">=3.9"
|
23
23
|
license = { text = "MIT" }
|
@@ -15,8 +15,7 @@ def stitch_predictions(predictions:np.ndarray, manager):
|
|
15
15
|
mng = manager
|
16
16
|
shape = list(mng.data_shape)
|
17
17
|
shape.append(predictions.shape[1])
|
18
|
-
|
19
|
-
|
18
|
+
assert mng.patch_shape[-2:] == predictions.shape[-2:], 'Patch shape and predictions shape must match. Please set the patch shape correctly'
|
20
19
|
output = np.zeros(shape, dtype=predictions.dtype)
|
21
20
|
for dset_idx in range(predictions.shape[0]):
|
22
21
|
# grid start, grid end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
from unittest.mock import Mock
|
2
2
|
import numpy as np
|
3
|
-
from predtiler
|
4
|
-
from predtiler.tile_stitcher import stitch_predictions
|
3
|
+
from predtiler import get_tiling_dataset, get_tile_manager, stitch_predictions
|
5
4
|
|
6
5
|
def get_data_3D(n=5,Z=9, H=512,W=512,C=2):
|
7
6
|
data = np.arange(n*Z*H*W*C).reshape(n,Z,H,W,C)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|