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

Very high memory usage with pystackreg #28

Open
rpieki opened this issue Nov 23, 2022 · 1 comment
Open

Very high memory usage with pystackreg #28

rpieki opened this issue Nov 23, 2022 · 1 comment

Comments

@rpieki
Copy link

rpieki commented Nov 23, 2022

Hi,
pystackreg is great as I am trying to get into image processing with Python instead of ImageJ/Fiji.

Unfortunately I am running into some issues regarding the memory usage with pystackreg. I want to do a rigid body registration on an 4GB image around 75 frames.
As you can see in the images pystackreg uses all of the 32GB of memory. You notice it to as the PC is lagging. For the same image Fiji uses a considerable less amount of memory. The usage of CPU and Disk (perhaps because of swapping) is a lot higher with pystackreg too.
Do you have an idea why this is or how to solve this?

Used software:
Windows 10 - Python 3.9 - pystackreg 0.2.7
Windows 10 - ImageJ (Fiji) 1.53t - StackReg 2.0.0

Used code:
I tried it with 'previous' and 'first' as reference but it was the same behaviour.

from skimage import io
from pystackreg import StackReg

image = io.imread(filepath)
sr = StackReg(StackReg.RIGID_BODY)
registered_image = sr.register_transform_stack(image, reference='previous')

pystackreg - memory usage at the start

pystackreg_4gb_image_start copy

pystackreg - memory usage later

pystackreg_4gb_image_later copy

Fiji - memory Usage at the start

fiji_stackreg_4gb_image_start copy

Fiji - memory usage later

fiji_stackreg_4gb_image_later copy

@rpieki rpieki changed the title Memory usage very high with pystackreg Very high memory usage with pystackreg Nov 23, 2022
@glichtner
Copy link
Owner

Hi,

thanks for the report, that is an interesting issue, I hadn't looked into memory usage yet (especially not comparing with Fiji).
I will try to look into it, but it might take some time. I will keep you updated.

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

No branches or pull requests

2 participants