not working
This commit is contained in:
10
main.py
10
main.py
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user