eamonnbell-dur / maoii-workflow

Workflow for massive analysis of internet images
MIT License
0 stars 0 forks source link

Cache SAM image embeddings #8

Open eamonnbell-dur opened 8 months ago

eamonnbell-dur commented 8 months ago

Currently for mask generation, a new SAM embedding is produced for each input image. But the same embedding can be reused over multiple mask generation steps. So we should store the SAM embeddings once.

The simplest thing to do would be to use the filesystem for this and load the embeddings on demand.

This depends on splitting out SAM embedding inference from mask prompting.

eamonnbell-dur commented 1 month ago

This feature may be helpful: https://snakemake.readthedocs.io/en/stable/executing/caching.html