You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried running HoVer-Net withNucleusInstanceSegmentor on a WSI image, but after running for 12 hours with a GPU and showing progress I encounter a FileNotFoundError when it tries to save the output file.
While the code was running, I see that the output directory I specified (/hpc/temp/setty_m/tbencomo/morphology/tiatoolbox/test-dir2) was created and exists, but when it crashes and I check the files the directory no longer exists - somehow the output directory is getting deleted. I think this is causing the FileNotFoundError error because the output directory does not exist.
The example code and dataset from the documentation works without issue. My WSI file is significantly larger (18MB for your example data sample_wsi.svs vs my file which is 1.2GB). I am running a RTX 2080ti.
What I Did
import logging
import warnings
if logging.getLogger().hasHandlers():
logging.getLogger().handlers.clear()
import cv2
import joblib
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
from tiatoolbox import logger
from tiatoolbox.models.engine.nucleus_instance_segmentor import NucleusInstanceSegmentor
from tiatoolbox.utils.misc import download_data, imread
from tiatoolbox.utils.visualization import overlay_prediction_contours
from tiatoolbox.wsicore.wsireader import WSIReader
warnings.filterwarnings("ignore")
mpl.rcParams["figure.dpi"] = 300 # for high resolution figure in notebook
mpl.rcParams["figure.facecolor"] = "white" # To make sure text is visible in dark mode
plt.rcParams.update({"font.size": 5})
inst_segmentor = NucleusInstanceSegmentor(
pretrained_model="hovernet_fast-pannuke",
num_loader_workers=0,
num_postproc_workers=0,
batch_size=8,
auto_generate_mask=True,
verbose=False,
)
wsi_file2 = '/fh/fast/setty_m/nghiem_setty_collaboration/incyte-xenium/he-images/XE015/0022273.svs'
# WSI prediction
# if ON_GPU=False, this part will take more than a couple of hours to process.
wsi_output = inst_segmentor.predict(
[wsi_file2],
masks=None,
save_dir="/hpc/temp/setty_m/tbencomo/morphology/tiatoolbox/test-dir2/",
mode="wsi",
on_gpu=True,
crash_on_exception=True,
)
Description
I tried running HoVer-Net with
NucleusInstanceSegmentor
on a WSI image, but after running for 12 hours with a GPU and showing progress I encounter aFileNotFoundError
when it tries to save the output file.While the code was running, I see that the output directory I specified (
/hpc/temp/setty_m/tbencomo/morphology/tiatoolbox/test-dir2
) was created and exists, but when it crashes and I check the files the directory no longer exists - somehow the output directory is getting deleted. I think this is causing theFileNotFoundError
error because the output directory does not exist.The example code and dataset from the documentation works without issue. My WSI file is significantly larger (18MB for your example data
sample_wsi.svs
vs my file which is 1.2GB). I am running a RTX 2080ti.What I Did
Here is the log:
The text was updated successfully, but these errors were encountered: