Closed hitesha14 closed 6 years ago
I think the error is not with the augment but with the shuffle_all. When it is trying to shuffle the train object - i.e., shuffle all the images with their labels, classes and coords, it is finding that there are no images. Try with shuffle_all=False
and then output len(dataset.train.images)
. My guess is that this will be 0. It is possible that the combination of your selected patch_size
and level
actually return no patches.
I am currently working on an update to py_wsi which will add three major improvements which will be helpful in general, and particularly when dealing with much larger datasets:
I will also post a blog post soon on understanding patch_size and tile level. The test patch sampling functionality should also be very helpful. I would strongly suggest downloading the update when it is available, and I appreciate any feedback after that.
There are 3 Images, 3 XML files and 3 .svs files. I am using Aperio Image Scope for processing. I have installed required libraries, set the paths correctly. These are my parameters, file directory of SVS images, patch size, level (magnification), and overlap.
import py_wsi import lmdb file_dir = "C:/Users/hits/filesxml/" xml_dir = file_dir patch_size = 200 level = 2 db_location = "" db_name = "patch_db" overlap = 0
I am encountering following error: ValueError: not enough values to unpack (expected 4, got 0). There is problem with this code line augment = False. I have gone through your code base, haven't been able to figure out the problem.
The stack trace is given below:
import py_wsi.dataset as ds import py_wsi.imagepy_toolkit as imagepy_toolkit dataset = ds.read_datasets(turtle, set_id=1, valid_id=0, total_sets=2, shuffle_all=True, augment=False) ValueError Traceback (most recent call last)