Files
ISISeg/工程分析/实现方案-2026-05-18-20-35-32.md

20 lines
685 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 实现方案
开始时间2026-05-18-20-35-32
## 后端
1.`_process_video` 中维护最近一次成功分割得到的 `active_mask`
2. 命中抽帧关键帧时:
- 执行分割。
- 保存该帧原图、掩膜、叠加图。
- 更新 `active_mask`
- 结果视频写入该关键帧叠加图。
3. 未命中抽帧关键帧时:
- 如果已有 `active_mask`,将最近掩膜叠加到当前原始帧上写入结果视频。
- 如果还没有 `active_mask`,写入原始帧。
## 测试增强
- 在视频 API 测试中读取结果视频的非关键帧,检查其仍包含黄色叠加像素,避免结果视频在关键帧之间回到纯原图。