fix(ai): 规划数据排除片头片尾卡并按描述去重,裁剪保底每素材 3 段
实测《无职转生》4 集分析后规划返回空方案,原因: 1. 片头标题画面/演职员表评分最高,占据了每素材有限的段数名额 2. 静态画面重复帧产生大量相同描述,挤掉有效镜头 3. 预算裁剪最低压到每素材 2 段,模型实际只看到 8 个片段 修改:标题/演职员类片段从数据中排除;同素材内相同描述去重; 裁剪保底每素材 3 段;提示词补充「含蓄镜头同样可以表达人物关系」。 新增测试断言标题卡排除。
This commit is contained in:
1 parent
ad2a2ba704
commit
d96ef11fe2
2 files changed
+9
-4
No files matched your search
@@ -34,6 +34,8 @@ test('JSON 解析失败自动重试:第二次不再强制 format 并追加严
|
||||
test('规划提示词:按评分筛选片段、丢弃占位描述、区分新建/修改模式、控制数据体量',()=>{
|
||||
const mk=(id,score)=>({id,name:id,type:'video',duration:120,tags:['海边'],analysis:{segments:[
|
||||
{start:0,end:5,description:'海滩日落,人物走过画面,光线柔和,构图开阔',score,reason:'构图好'},
|
||||
{start:2,end:6,description:'海滩日落,人物走过画面,光线柔和,构图开阔',score:score+2}, // 重复描述应去重
|
||||
{start:8,end:12,description:'动画标题画面,显示作品名称',score:99}, // 片头标题卡应排除
|
||||
{start:10,end:15,description:'尚未进行语义或动作识别',score:null},
|
||||
{start:20,end:25,description:'城市夜景,车流灯光',score:score-10,reason:'节奏感强'},
|
||||
]}});
|
||||
@@ -44,6 +46,7 @@ test('规划提示词:按评分筛选片段、丢弃占位描述、区分新
|
||||
assert.ok(fresh.includes('海滩日落'));
|
||||
assert.ok(fresh.includes('城市夜景'));
|
||||
assert.ok(!fresh.includes('尚未进行语义或动作识别'));
|
||||
assert.ok(!fresh.includes('动画标题画面'),'片头标题卡必须排除');
|
||||
assert.ok(!fresh.includes('motion'));
|
||||
assert.ok(fresh.includes('先 remove 现有全部片段'));
|
||||
assert.ok(fresh.includes('45'));
|
||||
|
||||
Reference in new issue
Block a user