We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I grab the image from Camelyon16 dataset according to the provided meta.csv file, but the extracted image isn't the same as the image found in hdf5.
Is there anything wrong with my approach of extracting image from the dataset based on the given meta?
import openslide import pandas as pd import h5py from PIL import Image img_id = 0 df = pd.read_csv('../../dataset/pcam/camelyonpatch_level_2_split_test_meta.csv') fn = df['wsi'][img_id][-8:] slide = openslide.open_slide('/mnt/datasets/CAMELYON16/testing/images/%s.tif' % fn) x = df['coord_x'][img_id] y = df['coord_y'][img_id] img = slide.read_region((x, y), 2, (96, 96)) img.save('pcam_sample/%s_1.tif' % fn) data = h5py.File('../../dataset/pcam/camelyonpatch_level_2_split_test_x.h5', 'r') img2 = Image.fromarray(data['x'][img_id]) img2.save('pcam_sample/%s_2.tif' % fn)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I grab the image from Camelyon16 dataset according to the provided meta.csv file, but the extracted image isn't the same as the image found in hdf5.
Is there anything wrong with my approach of extracting image from the dataset based on the given meta?
The text was updated successfully, but these errors were encountered: