working
This commit is contained in:
9
main.py
9
main.py
@@ -281,10 +281,12 @@ def main():
|
||||
vos_optimized=config.get('models.sam2_vos_optimized', False)
|
||||
)
|
||||
|
||||
# Initialize mask processor
|
||||
# Initialize mask processor with quality enhancements
|
||||
mask_quality_config = config.get('mask_processing', {})
|
||||
mask_processor = MaskProcessor(
|
||||
green_color=config.get_green_color(),
|
||||
blue_color=config.get_blue_color()
|
||||
blue_color=config.get_blue_color(),
|
||||
mask_quality_config=mask_quality_config
|
||||
)
|
||||
|
||||
# Process each segment sequentially (YOLO -> SAM2 -> Render)
|
||||
@@ -296,6 +298,9 @@ def main():
|
||||
|
||||
logger.info(f"Processing segment {segment_idx}/{len(segments_info)-1}")
|
||||
|
||||
# Reset temporal history for new segment
|
||||
mask_processor.reset_temporal_history()
|
||||
|
||||
# Skip if segment output already exists
|
||||
output_video = os.path.join(segment_info['directory'], f"output_{segment_idx}.mp4")
|
||||
if os.path.exists(output_video):
|
||||
|
||||
Reference in New Issue
Block a user