not working

This commit is contained in:
2025-07-27 14:26:20 -07:00
parent 97f12c79a4
commit 02ad4d87d2
2 changed files with 55 additions and 10 deletions

10
main.py
View File

@@ -277,7 +277,8 @@ def main():
logger.info("Step 3: Initializing SAM2 processor")
sam2_processor = SAM2Processor(
checkpoint_path=config.get_sam2_checkpoint(),
config_path=config.get_sam2_config()
config_path=config.get_sam2_config(),
vos_optimized=config.get('models.sam2_vos_optimized', False)
)
# Initialize mask processor
@@ -595,6 +596,13 @@ def main():
logger.error(f"SAM2 processing failed for segment {segment_idx}")
continue
# Check if SAM2 produced adequate results
if len(video_segments) == 0:
logger.error(f"SAM2 produced no frames for segment {segment_idx}")
continue
elif len(video_segments) < 10: # Expected many frames for a 5-second segment
logger.warning(f"SAM2 produced very few frames ({len(video_segments)}) for segment {segment_idx} - this may indicate propagation failure")
# Debug what SAM2 produced
logger.info(f"Pipeline Debug: SAM2 completed for segment {segment_idx}")
logger.info(f"Pipeline Debug: Generated masks for {len(video_segments)} frames")