Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SlideData to use existing h5path files #337

Open
wants to merge 22 commits into
base: load-data-in-workers
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert making all masks boolean
  • Loading branch information
tddough98 committed Oct 20, 2022
commit 8c78593f20fe979b72211588b616d8c266f4cabf
2 changes: 1 addition & 1 deletion pathml/core/h5managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def add_tile(self, tile):
compression="gzip",
compression_opts=9, # masks should be highly compressible
shuffle=True,
dtype="bool",
dtype=mask.dtype,
)

# add coords
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def create_HE_tile():
im_np_rgb = cv2.cvtColor(im_np, cv2.COLOR_RGBA2RGB)
# make mask object
masks = np.random.randint(
low=0, high=1, size=(im_np_rgb.shape[0], im_np_rgb.shape[1]), dtype=bool
low=0, high=255, size=(im_np_rgb.shape[0], im_np_rgb.shape[1]), dtype=np.uint8
)
masks = {"testmask": masks}
# labels dict
Expand Down Expand Up @@ -74,7 +74,7 @@ def tileVectra():

# make mask object
masks = np.random.randint(
low=0, high=1, size=(region.shape[0], region.shape[1]), dtype=bool
low=0, high=255, size=(region.shape[0], region.shape[1]), dtype=np.uint8
)
masks = {"testmask": masks}

Expand Down