Skip to content
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

backend/processing/segmenter: Support running the segmenter separately on a local computer #371

Open
Tracked by #163
Mrvy29 opened this issue Feb 14, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request software
Milestone

Comments

@Mrvy29
Copy link

Mrvy29 commented Feb 14, 2024

Hello all planktoscope users and developers!

When analyzing lots of samples with the planktoscope on a time schedule, especially fresh plankton, we found the segmenter was slowing and creating issues with pictures acquisitions in parallel. We resorted to running the samples and finding another time for segmenting.

We are wondering how it to possibly run the segmenter on a regular computer with the appropriate software installed. As I understand it potentially on a python local machine/runtime.

How can we access the segmenter's code? Would it be possible to obtain something like that?

Thanks!

@Mrvy29 Mrvy29 added the enhancement New feature or request label Feb 14, 2024
@ethanjli
Copy link
Member

ethanjli commented Feb 16, 2024

Hi! This is something I am working on, and it is now possible to run the segmenter on any computer as a Docker container (with the container image ghcr.io/Planktoscope/device-backend-processing-segmenter). The segmenter still requires an MQTT broker such as mosquitto, and for now the Node-RED dashboard is the only user interface for the segmenter - so my next step is to package the Node-RED dashboard as a container image to run on non-Raspberry Pi computers. Afterwards, then I will be able to provide a few commands for you to run to bring up everything needed to run the segmenter on another computer.

If you require a workaround before I finish the work described above (which will take a while to complete), some alternative options are listed in the comments under #163 . You can also access the segmenter's source code at https://github.com/PlanktoScope/device-backend/tree/main/processing/segmenter

@ethanjli ethanjli self-assigned this Feb 16, 2024
@ethanjli ethanjli added this to the Backlog milestone Feb 16, 2024
@ethanjli ethanjli changed the title Running the segmenter separately on a local computer backend/processing/segmenter: Support running the segmenter separately on a local computer Feb 28, 2024
@ethanjli
Copy link
Member

ethanjli commented Feb 28, 2024

Update: I've put together a prototype of a simple set of commands for bringing up the segmenter on a separate computer, along with everything needed to interact with the segmenter from your web browser, at https://github.com/PlanktoScope/pallet-segmenter . It works on my computer (and I found that segmentation is very fast there!). Before it'll be ready for more general usage, I will wait for more people to test it out and provide feedback (both on whether everything works as expected, and on the quality of the usage instructions, and on how easy it is to use) - so for anyone who's interested, please test it out! Note that I've tested it on Linux, but not on macOS or Windows, so things might need to be fixed on the two latter platforms.

@Mrvy29
Copy link
Author

Mrvy29 commented Mar 10, 2024

Hi Ethan, thanks ao much for the thorough answers, just got back from sea and am eager to try. I work on a Mac so that will broaden OS tested on. I'll let you know how I get on. In the meantime I've uploaded first test sample data to ECOTAXA and have lots more to ask about, i'll prepare these queries on a separate thread.
M

@ethanjli
Copy link
Member

Great! For any questions you have or anything which is unclear (e.g. due to inadequate documentation), please feel free to create one or more posts in https://github.com/PlanktoScope/PlanktoScope/discussions/new?category=help-support

@ethanjli
Copy link
Member

Update: I've also created a separate issue (#378) to track some work I plan to do eventually for making it simpler to just run the segmenter as a batch-processing routine on a specified list of datasets from the command-line (rather than having to go through a Node-RED dashboard).

@ethanjli
Copy link
Member

As discussed in the 2024-04-11 software meeting (in a discussion about designing the next version of the PlanktoScope's MQTT API), we decided that we will try to make it possible to import the segmenter as a Python library for use in a Jupyter notebook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request software
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants