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

[DOC] add disclaimer that this project is for academic research purposes only #224

Merged
merged 4 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Original H&E | Heatmap of Tumor Probability
[![Supported Python versions](https://img.shields.io/pypi/pyversions/wsinfer)](https://pypi.org/project/wsinfer/)
[![Published in npj Precision Oncology](https://img.shields.io/badge/Published-npj_Precision_Oncology-blue)](https://doi.org/10.1038/s41698-024-00499-9)

> [!CAUTION]
> WSInfer is an academic project intended for research use only.

See https://wsinfer.readthedocs.io for documentation.

The main feature of WSInfer is a minimal command-line interface for running deep learning inference
Expand Down
4 changes: 4 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ WSInfer: blazingly fast inference on whole slide images
on whole slide images. It includes several built-in models, and it can be used with any
PyTorch model as well. The built-in models :ref:`are listed below <available-models>`.

.. caution::

WSInfer is an academic project intended for research use only.

Running inference on whole slide images is done with a single command line:

::
Expand Down
4 changes: 2 additions & 2 deletions wsinfer/modellib/run_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def run_inference(

# Store the coordinates and model probabiltiies of each patch in this slide.
# This lets us know where the probabiltiies map to in the slide.
slide_coords: list[npt.NDArray[np.int_]] = []
slide_probs: list[npt.NDArray[np.float_]] = []
slide_coords: list[npt.NDArray[np.integer]] = []
slide_probs: list[npt.NDArray[np.floating]] = []
for batch_imgs, batch_coords in tqdm.tqdm(loader):
assert batch_imgs.shape[0] == batch_coords.shape[0], "length mismatch"
with torch.no_grad():
Expand Down
5 changes: 1 addition & 4 deletions wsinfer/patchlib/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ def segment_tissue(
_, im_arr = cv.threshold(
im_arr, thresh=binary_threshold, maxval=255, type=cv.THRESH_BINARY
)

# Convert to boolean dtype. This helps with static type analysis because at this
# point, im_arr is a uint8 array.
im_arr_binary: npt.NDArray[np.bool_] = im_arr > 0 # type: ignore
im_arr_binary: npt.NDArray[np.bool_] = im_arr > 0

# Closing. This removes small holes. It might not be entirely necessary because
# we have hole removal below.
Expand Down
Loading