-
Notifications
You must be signed in to change notification settings - Fork 6
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
Run segmenter
offline
#43
Comments
Hi, Adrien - thanks for opening this issue! Being able to run the segmenter on other computers is something we want to make easy, and progress on that desired improvement is tracked at PlanktoScope/PlanktoScope#371 and PlanktoScope/PlanktoScope#378 . Currently my stopgap solution (and what I run on my laptop to process my PlanktoScope datasets) is a way to use Docker to run the segmenter together with the MQTT broker and a reduced version of the Node-RED dashboard which are currently required to control the segmenter: https://github.com/PlanktoScope/pallet-segmenter ; this is a very inelegant approach, but it was the easiest/fastest approach for me to get something on my laptop. However, one person who tested it encountered some issues with it which I haven't been able to reproduce on my computer (see PlanktoScope/pallet-segmenter#1 for details), and I haven't had the capacity to troubleshoot those problems. I am pretty confident that we could avoid those kinds of problems entirely if we could perform image-processing with a command-line command or by using the segmenter as a Python library (e.g. to run in a Jupyter notebook). If you look at PlanktoScope/PlanktoScope#378 , you can see that I would like to refactor the segmenter to separate the MQTT API from the actual image-processing functionality, so that we can invoke the image-processing functionality without relying on an external MQTT broker and client. However, we have not allocated time to do this refactoring (details in PlanktoScope/PlanktoScope#378 (comment)). It'd be very helpful if you could do one or more of the refactoring steps listed in PlanktoScope/PlanktoScope#378, and I'd be happy to work with you on ensuring that the refactoring proceeds smoothly (in terms of minimizing potential merge conflicts by merging multiple smaller PRs consisting of incremental changes, and by coordinating to prevent major merge conflicts with the FairScope interns working on other changes to the segmenter in #40). If you're interested, we can start by discussing some potential initial approaches to splitting up the segmenter - we can discuss either here on GitHub or in any of the weekly PlanktoScope software development meetings. |
Hi @ethanjli ! Thank you a lot for taking time to answer and provide all this info and development context. For now, I forked the backend and commented any MQTT process in I read through PlanktoScope/PlanktoScope#378 but couldn't find precise implementation requests hence my proposition right here. :) Happy to work on that feature if you think it makes sense 👍 |
Hi, Adrian! Your approach seems like a great plan for a first iteration of refactoring. Here's my proposed (slightly-modified version of your) plan, to avoid having to figure out a good name for the "offline" optional argument:
Based on your testing so far in your forked version of the backend, can you think of any potential problems with this? If not, and if this plan seems clear and reasonable to you, I think this will be a simple and straightforward PR, and I can do the PR review+approval for the changes described above. |
Hi,
Thanks a lot for all your work! It's very nice browsing through your open source code. :)
The
segmenter
being quite expensive to run on a lot of images, I'd like to run it on a machine with more resources after exporting the images, without any open connection to the planktoscope.Browsing through the backend, it feels like I could work on an alternative version of the
SegmenterProcess
class where I'd ignore all the MQTT parts and client setup, and only focus on the skimage processes. So I think basically taking_slice_image()
and running it outside of the class/writing a new shorter one.I was just wondering if you think that's a good idea, or if you'd have a better solution?
Thanks a lot!
The text was updated successfully, but these errors were encountered: