det core
This commit is contained in:
@@ -375,10 +375,27 @@ class VR180Processor(VideoProcessor):
|
||||
|
||||
# Propagate masks (most expensive operation)
|
||||
self._print_memory_step(f"Before SAM2 propagation ({eye_name} eye, {num_frames} frames)")
|
||||
video_segments = self.sam2_model.propagate_masks(
|
||||
start_frame=0,
|
||||
max_frames=num_frames
|
||||
)
|
||||
|
||||
# Use Det-SAM2 continuous correction if enabled
|
||||
if self.config.matting.continuous_correction:
|
||||
video_segments = self.sam2_model.propagate_masks_with_continuous_correction(
|
||||
detector=self.detector,
|
||||
temp_video_path=str(temp_video_path),
|
||||
start_frame=0,
|
||||
max_frames=num_frames,
|
||||
correction_interval=self.config.matting.correction_interval,
|
||||
frame_release_interval=self.config.matting.frame_release_interval,
|
||||
frame_window_size=self.config.matting.frame_window_size
|
||||
)
|
||||
print(f"Used Det-SAM2 continuous correction (interval: {self.config.matting.correction_interval} frames)")
|
||||
else:
|
||||
video_segments = self.sam2_model.propagate_masks(
|
||||
start_frame=0,
|
||||
max_frames=num_frames,
|
||||
frame_release_interval=self.config.matting.frame_release_interval,
|
||||
frame_window_size=self.config.matting.frame_window_size
|
||||
)
|
||||
|
||||
self._print_memory_step(f"After SAM2 propagation ({eye_name} eye)")
|
||||
|
||||
# Apply masks - need to reload frames from temp video since we freed the original frames
|
||||
|
||||
Reference in New Issue
Block a user