接口10:头部外缘膨胀带遮罩 + 分步可视化
新增 POST /api/v1/head/band(worker + 网关代理)与测试页 test_interface10.html: - 先和接口9 一样得到内缩后的基准遮罩(含额头的闭合区域外缘朝151内缩 erode_cm、 底线不动,默认1.2cm),在此基础上取外轮廓线,去掉贴着底部分割线的那一段。 - 把外轮廓线膨胀成带子(总宽 dilate_cm,默认2cm;半径=总宽/2,虹膜标定换算)。 - 裁到分割线以上(不越过底线)。BiSeNet/SegFormer 两套并排对比。 - 两个可调参数 erode_cm + dilate_cm(页面数字框+滑块+localStorage)。 - 复用 head_mask 的构件,无新依赖;纯新增,不改动既有接口。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -211,6 +211,7 @@ async def index():
|
||||
"if6_measure_v2": "/static/test_interface6.html",
|
||||
"if7_hair_grow_v2": "/static/test_interface7.html",
|
||||
"if9_head_mask": "/static/test_interface9.html",
|
||||
"if10_head_band": "/static/test_interface10.html",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -600,3 +601,9 @@ async def hair_grow_v2(request: Request):
|
||||
async def head_mask(request: Request):
|
||||
"""接口9:头发遮罩生成 + 分步可视化"""
|
||||
return await _proxy(request, "/api/v1/head/mask")
|
||||
|
||||
|
||||
@app.post("/api/v1/head/band", tags=["人脸分析"])
|
||||
async def head_band(request: Request):
|
||||
"""接口10:头部外缘膨胀带遮罩 + 分步可视化"""
|
||||
return await _proxy(request, "/api/v1/head/band")
|
||||
|
||||
Reference in New Issue
Block a user