kreshuklab / plant-seg

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

feat(pred): check and free VRAM for prediction with oversized patch #272

Closed qin-yu closed 1 month ago

qin-yu commented 1 month ago

This PR addresses an issue where users had to restart PlantSeg to recover from out-of-memory (OOM) errors when the combined patch size and patch halo exceed the device's memory capacity. Now VRAM is freed properly.

qin-yu commented 1 month ago

Almost introduced a bug. Let's write tests.

qin-yu commented 1 month ago

Free all GPU memory used in between runs