Calculating embeddings takes a lot longer than calculating masks, so we can calculate them once, cache them somewhere and use them as needed to provide faster response to user input. It most likely requires some modifications to SAM's code, as I don't think it's currently meant for handling more than 1 image at a time.
Calculating embeddings takes a lot longer than calculating masks, so we can calculate them once, cache them somewhere and use them as needed to provide faster response to user input. It most likely requires some modifications to SAM's code, as I don't think it's currently meant for handling more than 1 image at a time.