marrlab / BaSiC

A BaSiC Tool for Background and Shading Correction of Optical Microscopy Images
53 stars 14 forks source link

Python equivalent of BaSiC #2

Open abs51295 opened 3 years ago

abs51295 commented 3 years ago

Hey, is there a python equivalent of BaSiC? Or have you guys implemented a Python version of BaSiC?

Nicholas-Schaub commented 2 years ago

Hey, I see that you posted on this awhile ago. We actually implemented a version of BaSiC in Python. You are free to use it and provide any feedback.

https://github.com/PolusAI/polus-plugins/tree/dev/regression/polus-basic-flatfield-correction-plugin

yfukai commented 2 years ago

Hi @Nicholas-Schaub , I was about to implement the same thing, and it was my great fortune to find your post! I think it would be even more wonderful if it could also read numpy array and pip- installable. Are you planning packaging your script also in that way? I think I can also work a bit if you would need any help.

yfukai commented 2 years ago

Oops sorry @tying84, I just found you recently mentioned about the Python implementation in README. If you're planning to develop, I wouldn't like to interfere with that. If possible, would you mind commenting on this? Just additional comment, but I found the original source code for this repo is licensed under CC BY-NC-ND 4.0. I guess if @Nicholas-Schaub implemented the code from scratch that wouldn't violate the license, but I would like to confirm details in case I take part. Anyway great direction and looking forward to any progress on this!

tying84 commented 2 years ago

Hi, @yfukai no problem for the license. I do not own the license anyway, as it belongs to Helmholtz Munich, my employer. We need to convert the python implementation into Napari plugin (we get CZI funding for it). I wonder whether we can meet up to coordinate a bit of effort on that. You can drop me an email on tingying.peng@helmholtz-muenchen.de and we can set up a zoom meeting.

yfukai commented 2 years ago

Hi @tying84, thank you for your comment. I'm happy to hear that you got the grant from CZI! Sure, I'm still not familiar with making napari plugins, but at least I may be able to contribute packaging scripts as a pip-installable package, such as https://github.com/yfukai/laptrack . Anyway I'll send you a message!

Nicholas-Schaub commented 2 years ago

Hey all.

I'm happy to collaborate in any way, either though code contributions or otherwise. We do not have plans to package it right now, but if there is interest we might. We are funded by NIH to create open source software, so if there is interest then it is definitely within our scope to do so. However, I don't want to repeat the efforts of anyone.

We also have experience building Napari plugins, so we could contribute to that as well.

Our next steps were to implement a GPU accelerated version of the code, but that's currently on the back burner while we work on other things. The BaSiC algorithm is generally one of the slower components to many of our workflows, and we often run them on systems with GPU.

I'm happy to take part in any discussions. You can email me at nick.schaub@nih.gov if anyone is interested in setting up a meeting.

yfukai commented 2 years ago

Thank you @Nicholas-Schaub for your comment, maybe we can discuss in three! I'll email you too.