jamesdolezal / slideflow

Deep learning library for digital pathology, with both Tensorflow and PyTorch support.
https://slideflow.dev
GNU General Public License v3.0
234 stars 39 forks source link

[BUG] Unable to tile WSIs #318

Closed ajr82 closed 9 months ago

ajr82 commented 9 months ago

Description

To Reproduce

Steps to reproduce the behavior: This is my code that I am running. On running it there are no tiles generated. The code stops without an error.

OPENSLIDE_PATH = 'C:/Git/openslide-20230414/bin' import os if hasattr(os, 'add_dll_directory'):

Windows

with os.add_dll_directory(OPENSLIDE_PATH):
    import openslide

else: import openslide

import pandas as pd import numpy as np from openslide import OpenSlide from multiprocessing import Pool, Value, Lock import os from skimage.color import rgb2hsv from skimage.filters import threshold_otsu from skimage.io import imsave, imread from skimage.exposure.exposure import is_low_contrast from skimage.transform import resize from scipy.ndimage import binary_dilation, binary_erosion import argparse import logging import pickle import h5py

import slideflow as sf

P = sf.create_project( root='C:/Git/project/', annotations="C:/Git/project/test.csv", slides='C:/Git/slides/', ) P.add_source( name="MyProject", slides="C:/Git/slides/", roi="C:/Git/project/slides/roi/directory", tiles="C:/Git/project/slides/tiles/directory", tfrecords="C:/Git/project/slides/tfrecords/directory" ) dataset = sf.Dataset( config='C:/Git/project/datasets.json', sources=['MyProject'], annotations='C:/Git/project/test.csv', tile_px=299, tile_um='40x' ) dataset.extract_tiles(tile_px=299, tile_um='40x') dataset.num_tiles

Expected behavior

Tiles of all WSI to be generated.

Environment:

Additional context

jamesdolezal commented 9 months ago

Thanks for opening this issue. I have a couple of initial questions:

import slideflow as sf
sf.about()
jamesdolezal commented 9 months ago

I'm going to go ahead and close this issue due to inactivity - please respond here if you would like me to re-open.