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

add multiprocessing to outlines_list #712

Merged
merged 3 commits into from
May 24, 2023

Conversation

mrariden
Copy link
Collaborator

Per #704, saving outlines takes a long time to find contours for each mask. To speed up the process I added multiprocessing to process the masks in parallel.

Tested on Ubuntu 22, needs to be tested on Windows and Mac.

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2023

Codecov Report

Merging #712 (c8697b9) into main (325a2c5) will increase coverage by 24.85%.
The diff coverage is 60.86%.

@@             Coverage Diff             @@
##             main     #712       +/-   ##
===========================================
+ Coverage   37.21%   62.06%   +24.85%     
===========================================
  Files          19       14        -5     
  Lines        5371     2958     -2413     
===========================================
- Hits         1999     1836      -163     
+ Misses       3372     1122     -2250     
Impacted Files Coverage Δ
cellpose/utils.py 38.26% <60.86%> (+5.73%) ⬆️

... and 10 files with indirect coverage changes

@mrariden
Copy link
Collaborator Author

@yassinharim reports success on Windows 11 (#704 (comment)). Will implement tests so GH checks have chance to catch multithreading weirdness.

@mrariden mrariden marked this pull request as ready for review May 20, 2023 02:06
@mrariden
Copy link
Collaborator Author

test passing, good for review

@mrariden mrariden self-assigned this May 22, 2023
@carsen-stringer carsen-stringer merged commit 8b53a57 into MouseLand:main May 24, 2023
12 checks passed
@mrariden mrariden deleted the export_multiproc branch May 24, 2023 21:17
@carsen-stringer
Copy link
Member

carsen-stringer commented Sep 30, 2023

I'm wondering if we should check how big the image is before doing this, if the image is small with few masks then starting the pool is slower (or maybe it's just on ubuntu for me)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants