kreshuklab / plant-seg

A tool for cell instance aware segmentation in densely packed 3D volumetric images
https://kreshuklab.github.io/plant-seg/
MIT License
88 stars 31 forks source link

Out of (host) memory at Data Pre-Processing step #214

Open bobonannan opened 5 months ago

bobonannan commented 5 months ago

numpy.core._exceptions._ArrayMemoryError: Unable to allocate 30.7 GiB for an array with shape (1417, 2260, 2573) and data type float32

图片bug

how to set patch size? and how to resolve the question of memory?

qin-yu commented 5 months ago

Hey @bobonannan I guess this error is from the very first step of plantseg, i.e. pre-processing? My guess is that your RAM is not big enough for keep this volume. This is, in turn, due to the rescaling of pre-processing, which makes your original volume huge. The first thing I would do is to see if the rescaling is really necessary. We provide networks trained by the same data with different resolution. You may choose a network of lower resolution so you don't have to rescale the data.

Please have a look at https://github.com/hci-unihd/plant-seg?tab=readme-ov-file#pre-trained-networks

qin-yu commented 5 months ago

We currently don't support pre-/post-processing by patch. Please confirm this @lorenzocerrone

qin-yu commented 4 months ago

Hey @bobonannan is this solved or do you still need more assistance?