TotalSegmentator icon indicating copy to clipboard operation
TotalSegmentator copied to clipboard

Option to avoid reloading weights at every inference

Open Kirscher opened this issue 1 year ago • 2 comments

Hello,

I am using TotalSegmentator for multiple inferences and noticed that the weights are reloaded at each inference. This significantly increases the runtime and memory usage.

Would there be an option to keep the weights in memory between inferences to optimize performance?

Thank you for your attention to this request.

Best regards

Kirscher avatar Nov 06 '24 08:11 Kirscher

Unfortunately supporting this would require a large refactoring of the code base. Therefore, this did not happen so far.

wasserth avatar Nov 11 '24 06:11 wasserth

Hi @wasserth

Thanks for the update. I understand the challenge with refactoring.

Also, on another note, regarding dropout: would it be possible to introduce it easily into the project to obtain a distribution of segmentations? If so, I'd be happy to work on it and propose a PR.

Thanks for your feedback

Kirscher avatar Nov 12 '24 08:11 Kirscher