tand826 / wsiprocess

Whole Slide Image (WSI) Processing Library for Histopathological / Cytopathological Machine Learning Tasks
Apache License 2.0
23 stars 3 forks source link

basic_usage.py No any result #45

Closed Gaodelike closed 1 year ago

Gaodelike commented 1 year ago

Hi author: Thanks for your code! I ran this script and found that only the folder is generated, but there is no tiles output in it, is my usage wrong or some other reason?

Hope to get your reply。

Bests

Gaodelike commented 1 year ago

The benign and malignant folders are empty

tand826 commented 1 year ago

@Gaodelike Thank you for the comment. It seems to be because the code uses too large "on_annotation" parameter although not more than 50% (default value) of the patch area is on the annotated area. The new code sets 10% for the parameter. Can you please run the code again?

Gaodelike commented 1 year ago

Awesome! It ran out successfully. I have another question: My current annotation file doesn't seem to belong to any kind of annotation format, I may need to use custom annotation parser, but my annotation file seems to be missing some classification information, what do you suggest? 14S02511-2.txt

tand826 commented 1 year ago

@Gaodelike Great! As you pointed out, the annotation file is not in any formats wsiprocess can handle now. With the code like below, you can parse the info of coordinations.

from lxml import etree
tree = etree.parse("14S02511-2.txt")
annotations = tree.xpath("/Annotations/Annotation/Regions/Region")
for annotation in annotations:
    for coord in annotation.xpath("Vertices/V"):
        print(coord.attrib["X"], coord.attrib["Y"])

But the label data is not clear. Is "NegativeROA" the label data? Is the annotation tool private one?

Gaodelike commented 1 year ago

This is the annotation data generated by HALO platform, which seems to be an uncommon annotation format. "NegativeROA" is not label information,HALO platform is paid for use, so it should be considered as a private annotation tool.As you can see, this type of annotation file lacks some label information. I may need to study it again. Anyway, thank you for your help! Bests

tand826 commented 1 year ago

I'm glad I could help. If you have further questions, feel free to reopen the issue. Regards