more stuff
This commit is contained in:
@@ -34,6 +34,11 @@ class SAM2StreamingProcessor:
|
||||
self.config = config
|
||||
self.device = torch.device(config.get('hardware', {}).get('device', 'cuda'))
|
||||
|
||||
# Processing parameters (set before _init_predictor)
|
||||
self.memory_offload = config.get('matting', {}).get('memory_offload', True)
|
||||
self.fp16 = config.get('matting', {}).get('fp16', True)
|
||||
self.correction_interval = config.get('matting', {}).get('correction_interval', 300)
|
||||
|
||||
# SAM2 model configuration
|
||||
model_cfg = config.get('matting', {}).get('sam2_model_cfg', 'sam2.1_hiera_l')
|
||||
checkpoint = config.get('matting', {}).get('sam2_checkpoint',
|
||||
@@ -43,11 +48,6 @@ class SAM2StreamingProcessor:
|
||||
self.predictor = None
|
||||
self._init_predictor(model_cfg, checkpoint)
|
||||
|
||||
# Processing parameters
|
||||
self.memory_offload = config.get('matting', {}).get('memory_offload', True)
|
||||
self.fp16 = config.get('matting', {}).get('fp16', True)
|
||||
self.correction_interval = config.get('matting', {}).get('correction_interval', 300)
|
||||
|
||||
# State management
|
||||
self.states = {} # eye -> inference state
|
||||
self.object_ids = []
|
||||
|
||||
Reference in New Issue
Block a user