-
Notifications
You must be signed in to change notification settings - Fork 137
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
Data Preprocessing error #40
Comments
@MohamedOmar2020 I think your problem is that one or more of the images is corrupted or unreadable. Try printing the image name that causes the crash and then reading it in a separate Python interpreter session. If the same crash occurs, then the problem is caused by that image. |
@MohamedOmar2020 I am getting the same error that you had, by any chance did you find a resolution to the problem? Also are you trying to use .svs files? |
@Tejussurendran @MohamedOmar2020 Would either of you be able to provide an image that allows me to reproduce this error? |
@JosephDiPalma I am trying to use a .svs file, and it appears that svs files are not supported by imread(), however I am not sure if you have any workarounds for this. |
@Tejussurendran You can fix this issue in 2 ways:
slide = OpenSlide(filename=str(image_loc if by_folder else input_folder.joinpath(image_loc)))
image = np.array(slide.read_region(location=(0, 0), level=0, size=slide.dimensions).convert("RGB")) Also, you will need to have the OpenSlide Python package installed and imported at the top of the file |
@JosephDiPalma Thank you very much for your help! It is currently running without an issue(hopefully!), and I will let you know the outcome of my attempt. Thank you once again for making this platform available to use! |
@Tejussurendran Can you upload the problematic svs file to this dropbox link (https://www.dropbox.com/request/W5tcTkohyOaRocaO8AAr)? Make sure not to upload any PHI or otherwise unauthorized data. |
@JosephDiPalma it appears that at the process step, the process keeps being killed after a specific svs. There is no error being thrown however. Any ideas as to why? |
@JosephDiPalma I tried doing the 2_processing step over the weekend, and it appeared to keep getting killed, regardless of it was a validation training or testing. |
@Tejussurendran The process is likely being killed due to insufficient RAM. Try changing the |
@JosephDiPalma I think I have solved that issue, thank you! However it appears that when trying to generate the validation evaluation patches it is throwing an error. I have attached a copy of it below |
@Tejussurendran Does it work for the other sets? |
@JosephDiPalma It works on the validation set, and I am trying it out on the training set currently. On the testing set it had the same issues as the validation evaluation set. |
@JosephDiPalma i tried setting the num_workers variable to 1 and it the program is still being killed. Is there a bigger underlying issue that maybe causing this to happen? This is occurring with all 3 sets being validation testing and training. |
@Tejussurendran I believe the underlying issue is that you don't have enough system memory. |
@JosephDiPalma I am sshing on to a workstation with 256 gb of ram. I have also uploaded one of the sample images to your dropbox link from earlier. They are only a couple hundred kilobytes |
@Tejussurendran That should be more than enough memory. Can you also provide the Python package names, including versions, to us for debugging? |
@JosephDiPalma Thank you very much for your help! With regards to the issue, it is not consistent on where it is killed, sometimes it is 5 images, sometimes 1 etc.. Also for the python package names, I am not sure how to find the version number, however I have attached the packages being used in utils_processing.py From what I understand it should be the same packages as those provided. import functools |
@JosephDiPalma Also, I am not sure if this will help with solving the issue, but I am also trying to save the images as png. |
@Tejussurendran Could you give us the output of I checked your image in our dropbox. It is an image patch. Is this your input? This library assumes you feed a large slide image file as input, usually a few gigabytes file in the preprocess stage. |
pip list: cycler 0.11.0 conda list: packages in environment at /opt/anaconda3:Name Version Build Channel_ipyw_jlab_nb_ext_conf 0.1.0 py38_0 Also, Im sorry! I think I messed up the file I sent. I have attached the correct file in the dropbox now. Thank you so much for your help! |
@Tejussurendran Using the provided svs file, the code ran successfully for us. |
@JosephDiPalma I have a folder one large folder containing all my work for this project. In it I have a folder for the svs files, structures with Has_Diabetes and Not_Has_Diabetes. The patches are depending on the type, are stored in independent folders as well. I also noticed that with num_workers = 8, the job was killed due to ram consumption. So I tried 4 and it appears that the same issue happened again. I was thinking about potentially generating the patches elsewhere and simply moving them in to the appropriate folders. Would that work? |
@JosephDiPalma Hi, I was wondering what the directory difference between the validation set and validation evaluation set were as, I am trying to develop the patches externally and use them in deepslide. What is the difference between the 2 folders? |
@JosephDiPalma I was wondering if there is any way to reduce the memory consumption of the preprocessing step? |
@Tejussurendran You can reduce the memory consumption of the pre-processing step by reducing the |
Stale issue message |
Hi Guys, thank you for making this wonderful resource available.
I organized my slides into wsi_train, wsi_val, wsi_test using 1_split.py which ran fine. However I keep getting this error when I run code/2_process_patches.py:
These are the packages in my conda env:
_libgcc_mutex 0.1 main conda-forge
_tflow_select 2.3.0 mkl
attrs 19.3.0 py_0 conda-forge
blas 1.0 mkl conda-forge
bzip2 1.0.8 h7b6447c_0
c-ares 1.15.0 h7b6447c_1001
ca-certificates 2021.9.30 h06a4308_1
cairo 1.16.0 h18b612c_1001 conda-forge
certifi 2021.5.30 py36h06a4308_0
cloudpickle 2.0.0 pyhd3eb1b0_0
cpuonly 2.0 0 pytorch
cudatoolkit 10.1.243 h6bb024c_0
cycler 0.10.0 pypi_0 pypi
cytoolz 0.11.0 py36h7b6447c_0
dask-core 2021.3.0 pyhd3eb1b0_0
dataclasses 0.8 pyh4f3eec9_6
dbus 1.13.12 h746ee38_0
decorator 4.4.2 py_0 conda-forge
defusedxml 0.6.0 py_0 conda-forge
entrypoints 0.3 py36_0
et_xmlfile 1.1.0 py36h06a4308_0
expat 2.2.6 he6710b0_0
ffmpeg 4.2.2 h20bf706_0
fontconfig 2.13.1 he4413a7_1000 conda-forge
freetype 2.9.1 h8a8886c_1
fribidi 1.0.9 h516909a_0 conda-forge
gast 0.3.3 py_0 conda-forge
gdk-pixbuf 2.38.2 h3f25603_4 conda-forge
glib 2.63.1 h5a9c865_0
gmp 6.1.2 h6c8ec71_1
gnutls 3.6.15 he1e5248_0
gobject-introspection 1.56.1 py36hbc4ca2d_2
google-pasta 0.2.0 py_0
graphite2 1.3.13 h23475e2_0
gst-plugins-base 1.14.0 hbbd80ab_1
gstreamer 1.14.0 hb453b48_1
h5py 2.10.0 py36h7918eee_0
harfbuzz 2.4.0 h37c48d4_1 conda-forge
hdf5 1.10.4 hb1b8bf9_0
icu 58.2 h9c2bf20_1
imageio 2.9.0 pyhd3eb1b0_0
importlib-metadata 4.8.1 py37h89c1867_0 conda-forge
intel-openmp 2019.4 243
ipython_genutils 0.2.0 pyhd3eb1b0_1
jinja2 2.11.1 py_0 conda-forge
jpeg 9d h36c2ea0_0 conda-forge
jupyter_client 6.1.0 py_0 conda-forge
jupyter_core 4.8.1 py36h06a4308_0
keras-applications 1.0.8 py_0
keras-preprocessing 1.1.0 py_1
kiwisolver 1.3.1 py36h2531618_0
lame 3.100 h7b6447c_0
ld_impl_linux-64 2.33.1 h53a641e_7 conda-forge
libblas 3.8.0 14_mkl conda-forge
libcroco 0.6.13 h8d621e5_0 conda-forge
libedit 3.1.20181209 hc058e9b_0
libffi 3.2.1 hd88cf55_4
libgcc 7.2.0 h69d50b8_2 conda-forge
libgcc-ng 9.1.0 hdf63c60_0
libgfortran-ng 7.3.0 hdf63c60_0
libiconv 1.15 h516909a_1006 conda-forge
libidn2 2.3.2 h7f8727e_0
liblapack 3.8.0 14_mkl conda-forge
libopus 1.3.1 h7b6447c_0
libpng 1.6.37 hbc83047_0
libprotobuf 3.11.4 hd408876_0
librsvg 2.46.2 h33a7fed_1 conda-forge
libsodium 1.0.16 h1bed415_0
libstdcxx-ng 9.1.0 hdf63c60_0
libtasn1 4.16.0 h27cfd23_0
libtiff 4.1.0 h2733197_0
libunistring 0.9.10 h27cfd23_0
libuuid 2.32.1 h14c3975_1000 conda-forge
libuv 1.40.0 h7b6447c_0
libvpx 1.7.0 h439df22_0
libxcb 1.13 h1bed415_1
libxml2 2.9.9 hea5a465_1
markupsafe 2.0.1 py36h27cfd23_0
matplotlib 3.3.4 pypi_0 pypi
matplotlib-base 3.2.1 py36hef1b27d_0
mkl 2019.4 243
mkl-service 2.3.0 py36he8ac12f_0
mkl_fft 1.3.0 py36h54f3939_0
mkl_random 1.1.0 py36hd6b4f25_0
nbconvert 5.6.1 py37_0 conda-forge
nbformat 5.0.4 py_0 conda-forge
ncurses 6.2 he6710b0_0
nettle 3.7.3 hbbd107a_1
networkx 2.5.1 pyhd3eb1b0_0
notebook 6.0.1 py37_0 conda-forge
numpy 1.19.5 pypi_0 pypi
numpy-base 1.19.2 py36hfa32c7d_0
olefile 0.46 pyhd3eb1b0_0
openh264 2.1.0 hd408876_0
openjpeg 2.3.1 h981e76c_3 conda-forge
openpyxl 3.0.9 pyhd3eb1b0_0
openslide 3.4.1 h8137273_0 conda-forge
openssl 1.1.1l h7f8727e_0
packaging 21.0 pyhd8ed1ab_0 conda-forge
pandoc 2.2.3.2 0
pango 1.42.4 h7062337_3 conda-forge
parso 0.6.2 py_0 conda-forge
pcre 8.43 he6710b0_0
pillow 5.3.0 py36h34e0f95_0
pip 21.2.4 pyhd8ed1ab_0 conda-forge
pixman 0.38.0 h7b6447c_0
prometheus_client 0.7.1 py_0 conda-forge
prompt-toolkit 3.0.4 py_0 conda-forge
prompt_toolkit 3.0.4 0 conda-forge
protobuf 3.11.4 py36he6710b0_0
pycparser 2.20 py_0 conda-forge
pygments 2.6.1 py_0 conda-forge
pyparsing 2.4.6 py_0 conda-forge
python 3.6.10 hcf32534_1
python-dateutil 2.8.1 py_0 conda-forge
python_abi 3.6 2_cp36m conda-forge
pytorch 1.10.0 py3.6_cpu_0 pytorch
pytorch-mutex 1.0 cpu pytorch
pytz 2019.3 py_0 conda-forge
pywavelets 1.1.1 py36h7b6447c_2
pyyaml 5.4.1 py36h27cfd23_1
pyzmq 18.1.1 py36he6710b0_0
qt 5.9.7 h5867ecd_1
readline 8.0 h7b6447c_0
scikit-image 0.17.2 pypi_0 pypi
scipy 1.5.2 py36h0b6359f_0
setuptools 58.0.4 py36h06a4308_0
six 1.16.0 pyhd3eb1b0_0
sqlite 3.31.1 h7b6447c_0
testpath 0.4.4 py_0 conda-forge
tifffile 2020.9.3 pypi_0 pypi
tk 8.6.8 hbc83047_0
toolz 0.11.1 pyhd3eb1b0_0
torchaudio 0.10.0 py36_cpu [cpuonly] pytorch
torchvision 0.11.1 py36_cpu [cpuonly] pytorch
tornado 6.1 py36h27cfd23_0
traitlets 4.3.3 py36h06a4308_0
typing_extensions 3.10.0.2 pyh06a4308_0
wcwidth 0.1.8 py_0 conda-forge
webencodings 0.5.1 py_1 conda-forge
werkzeug 1.0.0 py_0 conda-forge
wheel 0.37.0 pyhd8ed1ab_1 conda-forge
x264 1!157.20191217 h7b6447c_0
xlrd 2.0.1 pyhd3eb1b0_0
xorg-kbproto 1.0.7 h14c3975_1002 conda-forge
xorg-libice 1.0.10 h516909a_0 conda-forge
xorg-libsm 1.2.3 h84519dc_1000 conda-forge
xorg-libx11 1.6.9 h516909a_0 conda-forge
xorg-libxext 1.3.4 h516909a_0 conda-forge
xorg-libxrender 0.9.10 h516909a_1002 conda-forge
xorg-renderproto 0.11.1 h14c3975_1002 conda-forge
xorg-xextproto 7.3.0 h14c3975_1002 conda-forge
xorg-xproto 7.0.31 h14c3975_1007 conda-forge
xz 5.2.4 h14c3975_4
yaml 0.2.5 h7b6447c_0
zeromq 4.3.1 he6710b0_3
zipp 2.2.0 py_0 conda-forge
zlib 1.2.11 h7b6447c_3
zstd 1.3.7 h0b5b093_0
The text was updated successfully, but these errors were encountered: