-
Notifications
You must be signed in to change notification settings - Fork 399
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
Incomplete masks #13
Comments
Funny, I have the same issue. I don't think this is related to CLAM, though. Which OS are you using? I wasn't able to reproduce this on MacOS using the exact same codebase. |
Yeah that's funny... I am using Ubuntu 18. Do you have the same issue with Ubuntu? |
Yes, this happens on Ubuntu for me. I'm running a slightly different Conda environment than the one suggested by the CLAM docs:
Speculating: i think this may be an OpenSlide or Pillow issue. Both come with platform-dependent binaries when installed, which may contain some weird bug. Can you show your |
Thank you for your reply! Here is my
And my conda version is 4.8.3, Python version is 3.7.7. |
Hi all, after some digging around, yes, as far as I am aware of, this is an issue with pixman which Openslide uses. Specifically, I think pixman 0.38.x has this issue. If you either update pixman to 0.40.x or downgrade to 0.36.x this issue should go away. |
More discussion about this can be found here although some of this thread might be a little outdated/inaccurate and would depend on your os and whether you're using conda or not. |
Fantastic! Never would have thought of that. It always amazes me how deep the library dependency rabbit hole can go in modern software ecosystems, but I digress... Maybe you can include the fix ( |
Yes i'm not sure a simple conda install pixman would fix it haha since apparently other libraries sometimes specify a dependency for specific versions of pixman as well. What worked for me was download pixman 0.40 from the link above, manually compile and install. And then for conda I manually copied libpixman-1.so.0.40 into the ~/anaconda/lib folder and ~/anaconda/envs/clam/lib folder to replace the old 0.38 version. Felt pretty hacky but it worked. |
Ah wow, thanks for letting us know.. Always good to know what kind of debugging you can expect. This doesn't sound good. At all. OpenSlide is beginning to look like an increasingly fundamental-yet-fragile part of the digital pathology ecosystem. Really hope some brave soul picks up its maintenance again soon. |
I agree with @fedshyvana
I tried
Finally I fixed it by
Thank you so much for all your help!! @fedshyvana @jjhbw |
For posterity: My
|
I found So I would suggest to try with it first. If it doesn't work, then try to replace the files |
(Re)installing with conda never worked for me, so I got back to a solution I created a while ago for the same issue within QuPath. Some of you may find this solution (i.e. patching pixman oneself manually) helpful: In case you think about using the script: Read / alter to your needs, and definitely use at your own risk! You can also find the script as a gist here: https://gist.github.com/ptschandl/cd72cf279ba83b2b3178d9b32f034c15 |
I tried running
which installs 0.38.0 and I tried running
which results in
It seems cairo is the issue and I notice it's not in the conda list posted above Here's mine:
|
The following worked for me and two of my peers:
|
Thank you for making public such fantastic codes!
When I ran the following command for my dataset,
python create_patches.py --source $SOURCE_DIR --save_dir $SAVE_DIR --patch_size 256 --seg
I got incomplete mask for some slides. Here is an example:

Could you please point out what I did wrong and how to fix it? Thank you!
The text was updated successfully, but these errors were encountered: