mahmoodlab / CLAM

Data-efficient and weakly supervised computational pathology on whole slide images - Nature Biomedical Engineering
http://clam.mahmoodlab.org
GNU General Public License v3.0
1.02k stars 340 forks source link

Accidentally dropping coordinates? #160

Closed clemsgrs closed 1 year ago

clemsgrs commented 1 year ago

Hi, thank you for the amazing repo! While scrolling through the patch extraction code, I stumbled upon the following line and was wondering if this was intentional:

https://github.com/mahmoodlab/CLAM/blob/6fbcaa38d79e69f83dd463527093848fa4aa5091/wsi_core/WholeSlideImage.py#L463

My understanding is that if len(results) == 1 (i.e we have only one patch coordinate), we're (accidentally) dropping it. My fix would be to put if len(results)>0: instead.

Let me know what you think!

fedshyvana commented 1 year ago

I think you are right. thanks for catching this.