Git Product home page Git Product logo

Comments (7)

martvanrijthoven avatar martvanrijthoven commented on June 3, 2024 1

Hi Michel,

Yes, indeed the intersection can then be done on polygon level. And yes you can use that function to convert a NumPy array to polygons. You can use a spacing value of ~4.0 or ~8.0 (.get_slide) when opening the mask (please use the asap backend, because openslide backend does not work well with monochrome images) and upscale the polygons.

For creating tissue masks I recommend using this algorithm

Best wishes,
Mart

from pathology-whole-slide-data.

michelbotros avatar michelbotros commented on June 3, 2024 1

Hi Mart,

Okay, all clear! Thank you very much for the explanation.

Best,

Michel

from pathology-whole-slide-data.

martvanrijthoven avatar martvanrijthoven commented on June 3, 2024 1

Hi Michel,

If it is still pending, maybe you can contact Peter Bandi he has created this algorithm.

from pathology-whole-slide-data.

michelbotros avatar michelbotros commented on June 3, 2024

example_lazy_annotations_3

from pathology-whole-slide-data.

martvanrijthoven avatar martvanrijthoven commented on June 3, 2024

Dear Michel,

There are two options available already.

The first one is by using the MaskAnnotationParser
This parser converts a mask into multiple rectangle regions for which the size can be specified.

Another option, which I would recommend, is to create polygons from the tissue mask with this function
With the Shapely library, you can intersect the tissue mask polygons and the annotated polygons. From the intersection you create a new annotation file, e.g., with write_asap_annotation or use the internal JSON representation of wholeslidedata convert_annotations_to_json. In this way you get a cleaned annotation file which you can use for training.

I hope this helps and please let me know if anything is unclear.

Best wishes,
Mart

from pathology-whole-slide-data.

michelbotros avatar michelbotros commented on June 3, 2024

Dear Mart,

Thanks for the suggestions. I think the second option, where a clean annotation file is created, is indeed preferred. If I understand it correctly we then find the intersection between the tissue region and the annotation region on polygon level.

This function converts a tissue mask (Numpy) to polygon format and assumes that I have already obtained a tissue mask as well, right? What would you recommend to obtain the tissue masks themselves?

Best,

Michel

from pathology-whole-slide-data.

michelbotros avatar michelbotros commented on June 3, 2024

Hi Mart,

I requested access to the algorithm that you mentioned, but its still pending. Do you perhaps know who I would have to contact to get permission?

Best,

Michel

from pathology-whole-slide-data.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.