Skip to content
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

Slide tile generation #64

Open
RhDm opened this issue Nov 8, 2021 · 6 comments
Open

Slide tile generation #64

RhDm opened this issue Nov 8, 2021 · 6 comments

Comments

@RhDm
Copy link

RhDm commented Nov 8, 2021

Hi paquo team. I wondered whether it would be useful to extend paquo's functionality by, e.g. option to create .jpeg/.png tiles from slides.
This summer, I finished one medical image segmentation/classification deep learning project, so I could implement such functionality in the fork.

I would use OpenSlide, though, which creates an additional dependency.

Are you interested?

@ap--
Copy link
Collaborator

ap-- commented Nov 8, 2021

Hello @RhDm,

thanks for reaching out ❤️
We're always happy to get new contributors on board!

Could you explain your use case in a bit more detail, so that I can understand how you expect the tile generation to be interfaced with?
i.e. do you expect paquo.Images.QuPathProjectImageEntry to have a method to save tiles to disk? or do you have something else in mind?

Cheers,
Andreas 😃

@RhDm
Copy link
Author

RhDm commented Nov 8, 2021

Hi Andreas,

Great to hear that!
paquo.Images.QuPathProjectImageEntry is a perfect 'ground' for such an extension as it provides path to the .svs file and annotations.

In terms of tile generation, currently, my code does the following (among many other things):

  • given the user-defined path, creates subfolders that correspond to the selected annotation classes
  • creates tiles given user-defined tile size (--> for model training)
  • creates tiles from the slide without annotations + the corresponding .json file with the tile coordinates (--> for model testing or new slides)

I am using OpenSlide for .png/.jpeg generation from the .svs slides.

Thanks,
Dmitri

@ap--
Copy link
Collaborator

ap-- commented Nov 8, 2021

Hi Dmitri,

So as I understand, the information your code needs that would be specific to QuPath and paquo are:

  • the local path to the specific image
  • and the user annotations

And it would use that information to create tiled png/jpeg datasets on disk with (I assume) masks and json information about the tiles.

I would suggest to currently NOT add this code to paquo, BUT:
We will soon (~a few weeks) release a pathology dataset python library that has a lot of your mentioned functionality built-in and it would be a ✨ perfect ✨ place for your contributions. This library has native support for cloud storage too (by using i.e. tiffslide instead of openslide) and it's compatible with paquo ootb.

So let's keep this issue open, and I will ping you here, once we release the other library, and we'll organise your contribution to the new library?

Does that sound like a good plan? Let me know what you think!
Cheers,
Andreas 😃

@RhDm
Copy link
Author

RhDm commented Nov 8, 2021

Hi Andreas,

That sounds good!
Although, it seems that you already have something that does everything I proposed. However, the code I wrote for my segmentation/classification project has many other functionalities, so maybe something else might be of interest.

Curious to see what functionalities your new library will have!

Thanks,
Dmitri

@RhDm
Copy link
Author

RhDm commented Jan 3, 2022

Hi Andreas,

I wrote you an email to the address [email protected] a few weeks ago. Not sure whether you received it or if it landed in some filter.

Anyways, I wanted to tell you about dogsled a package for medical slide normalisation I created. It uses paquo for obtaining the slide paths when the user wishes to normalise the slides of a QuPath project.

All the best,
Dmitri

@ap--
Copy link
Collaborator

ap-- commented Jan 4, 2022

Hi Dmitri,

I checked my mail, and couldn't find your message. Maybe it got moved to spam and/or accidentally removed in the meantime. It's best to use the issue tracker here for communication 😊

And it's great to see paquo being used in other packages ❤️
I'll definitely check out dogsled and will keep you updated when our release schedule moves forward 😃
Lot's of stuff to do, as always 😅

Have a great start into the new year!
Cheers,
Andreas 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants