sara-nl / attention-sampling-pytorch

This is a PyTorch implementation of the paper: "Processing Megapixel Images with Deep Attention-Sampling Models".
MIT License
39 stars 9 forks source link

Colon cancer dataset #2

Open Tato14 opened 3 years ago

Tato14 commented 3 years ago

I was wondering which kind of files do you used in this colon cancer implementation. I see the scipy.io.loadmat so I guess do you somehow transform the images?

Did yo utry this implementation in PANDA kaggle challenge?

jorism1993 commented 3 years ago

Hi,

For the colon cancer implementation I used the dataset referenced in the original paper. The reference in the original paper leads to:

Sirinukunwattana, K., Raza, S. E. A., Tsang, Y.-W., Snead,D. R., Cree, I. A., and Rajpoot, N. M. Locality sensitivedeep learning for detection and classification of nuclei inroutine colon cancer histology images.IEEE transactionson medical imaging, 35(5):1196–1206, 2016.

This dataset is available publicly somewhere, although I could not find it when doing a quick Google search when drafting this reply. If you can not find it and you require this dataset, feel free to reach out. Then I can send you my local version. This dataset contains 100 images of dimensions 500×500. The images are available in .bmp while the annotations are in .mat format. The annotations are loaded with scipy.io.loadmat.

I did not try the implementation in the PANDA kaggle challenge. I am not aware of this challenge. I might give it a go in the future.

I hope this answers your questions. If not, please let me know!

Tato14 commented 3 years ago

Thanks @jorism1993. Yes, it gives me a lot of information. You can find the dataset here.

Actually, working with images from the PANDA challenge would be a little bit different than the colon cancer dataset. The images are huge (could be 100Kx100K pixels). Moreover, the information is kind of sparse (a lot of white areas). In this sense, I guess that filtering 0-enriched areas after pad_func = torch.nn.ConstantPad2d(pad_const, 0.0) and keeping the coordinates would reduce memory constrains. I will give this a try.

Also, I was wondering how difficult could be generate an intermediate resolution. I see that in cancer dataset you use scale_factor = 0.2 to generate x_low. I was thinking that, maybe adding a scale_factor = 0.5 and generate x_med would be a great way to treat with this kind of images. But I am not smart enough to do this without help. May I ask for a FR?

jorism1993 commented 3 years ago

I doubt this method would work for such large images. Holding (multiple) 100k x 100k images in memory would require GB's, if not TB's of RAM. Perhaps it would be better to patch these images into 10,000 1000 x 1000 pixel images?

An intermediate solution may also be a good idea. You can ask for a feature request, but this project is not high on my priority list anymore. Chances of me adding extra features in the foreseeable future are slim.