Install
openclaw skills install @xiaoguaishou-sc/skin-pro人脸皮肤分析加强版。调用 RageHealth 开放接口 /face/skin-pro,对正脸照片做皮肤检测。输出肌肤总分、肤质、肤色、肌龄、痘痘/痘印/色斑/痣/黑头/毛孔/皱纹/黑眼圈/眼袋/敏感/色沉/油光的分数与严重程度,以及效果图。支持 skin-pro 默认计分与察颜计分两种策略。当用户上传正脸照要求"皮肤检测"、"肤质分析"、"看毛孔痘痘皱纹"、"肌肤分数"、"skin-pro"时使用此技能。
openclaw skills install @xiaoguaishou-sc/skin-pro/face/skin-proanalyseStrategy=2;否则用默认策略 1伸舌、体质、五脏、食谱不走本技能,改用 tcm-face-tongue。
POST + multipart/form-data/face/skin-proAccessKey、Signature(每次调用前重新生成)imageUrl、imageFile、imageBase64 三选一。同时传入时服务端优先级为 imageFile > imageBase64 > imageUrl字段全集见 references/response_schema.md。
| 参数 | 说明 |
|---|---|
analyseStrategy | 1:skin-pro 默认计分(默认);2:察颜小程序相同计分。策略 2 额外返回 look_radars、total_score |
faceIdDetect + userGroup | 是否开启人脸 ID。为 true 时 userGroup 必填,返回该用户组下唯一 face_id。不同 userGroup 相互隔离 |
displayRes | 展示尺寸,只能 0 或 1,默认 0。其他值返回「尺寸参数不正确」 |
alphaChannel | 通道参数,只能 0 或 1,默认 0。其他值返回「通道参数不正确」 |
# URL 或本地文件二选一
python scripts/call_skin_pro.py \
--image-url https://example.com/face.jpg \
[--analyse-strategy 1] [--face-id-detect --user-group demo] \
[--output skin.json] [--full-stdout]
# 本地文件
python scripts/call_skin_pro.py \
--image-file C:/path/to/face.jpg \
--output skin.json
# 察颜计分
python scripts/call_skin_pro.py \
--image-url https://example.com/face.jpg \
--analyse-strategy 2 \
--output skin.json
凭证由脚本自动从环境变量 SKIN_PRO_AK / SKIN_PRO_SK 读取,不要作为参数传入。首次使用前需前往 https://ragehealth.cn/client 注册申请 AK/SK,写入 scripts/.env(可与 tcm-face-tongue 共用同一对凭证,变量名不同)。脚本内部会生成 Signature 并以 multipart/form-data 提交。
analyseStrategy(服务端默认 1)。只有用户明确要察颜计分时才传 2。success=false 时按 message / 错误码提示,不要编造分数。image_quality:
face_ratio 过小(参考阈值 0.5)、blur 接近 0、brightness.grade 为 pianliang / pianan、姿态角过大 → 先说明照片限制,再给结论blur 越接近 1 越清晰;brightness.grade:zhengchang / pianliang / pianandata 下):
skin_score(0~100,越高越好)。策略 1 为各项均分,不计入 sensitivity、oily_intensity、crows_feet。策略 2 同时有 total_score(与 skin_score 相同,100 减雷达扣分,最低 60)和 look_radars[]skin_age、skin_type.skin_type、skin_tone.value、face_shape、display_imganalyse_result[],每项 type / score / label / levels。毛孔另有 headScore、leftScore、rightScore、chinScore、noseScore 及对应 *Label;皱纹、眼袋、黑眼圈等对称项有 leftScore / rightScoreacne.acne_cls、acne_mark、brown_spot.brown_spot_cls、blackhead_count、wrinkle_count、pores_forehead / pores_leftcheek / pores_rightcheek / pores_jaw / pores_nose--output 文件保留):display_landmarks、raw_landmarks,以及 acne / acne_mark / brown_spot / mole / wrinkle_details 里的 polygon、pos_indexesanalyse_result 里 label 不是「良好」的项,按 score 从低到高blackhead 程度 + blackhead_count,皱纹用 wrinkle_countlook_radars 说明扣分来自哪几项(type / label / deduction)label 与分区,不推断病名| 字段 | 取值 | 含义 |
|---|---|---|
analyse_result[].label | 良好 / 轻度 / 中度 / 重度 | 该项严重程度。分数越高越健康,区间见该项 levels |
skin_type.skin_type | 0 / 1 / 2 / 3 | 油性 / 干性 / 中性 / 混合。details 是各分类置信度 |
skin_tone.value | 0~5 | 粉一白、粉二白、粉三白、黄一白、黄二白、黄黑色 |
face_shape.face_shape | 0~5 | 菱形脸、圆形脸、方形脸、瓜子脸、椭圆脸、长脸 |
face_shape.eye_shape | 0~7 | 垂眼、眯缝眼、上斜眼、柳叶眼、瑞风眼、丹凤眼、桃花眼、杏眼 |
face_shape.eyebrow_shape | 0~6 | 一字眉、标准眉、剑眉、新月眉、柳叶眉、自然眉、短粗眉 |
face_shape.mouth_shape | 0~6 | 微笑唇、薄嘴唇、爱心唇、嘟嘟唇、覆舟唇、厚嘴唇、M 唇 |
face_shape.nose_shape | 0~3 | 正常鼻、小鼻、蒜头鼻、朝天鼻 |
acne.acne_cls | 0 / 1 / 2 / 3 | 粉刺、丘疹、脓头、囊肿。分类 4(痘印)已并入 acne_mark,不会留在 acne |
brown_spot.brown_spot_cls | 1 / 2 / 3 / 4 | 褐青色痣、黄褐斑、雀斑、色斑。分类 0 已并入 acne_mark |
mole.mole_cls | 0 / 1 / 2 | 交界痣、混合痣、皮内痣 |
blackhead.value | 0~3 | 无 / 轻度 / 中度 / 重度(按鼻头黑头数量分档) |
pores_* | 0~3 | 无 / 轻度 / 中度 / 重度。额头、面颊、下巴、鼻子的数量阈值不同,见 response schema |
皱纹 value | 0 / 1 | 无 / 有。字段:forehead_wrinkle、crows_feet、eye_finelines、glabella_wrinkle、nasolabial_fold |
eye_pouch.*.class_index | 0~3 | 无眼袋、卧蚕/衰老型、水肿型/黑眼圈、结构型 |
look_radars[].type | 见下 | 仅策略 2。顺序固定:acne、brown_spot、blackhead、pore、skin_type、dark_circle、eye_pouch、wrinkle_detail |
鱼尾纹条数和面积已合并进眼周细纹(
eye_finelines)。解读眼周时用合并后的wrinkle_count.*_eye_finelines_count,不要把crows_feet再加一遍。
⚠️ 必须提醒:
AccessKey / SecretKeyface_id / userGroup 涉及人脸特征数据,仅在用户明确授权时启用 faceIdDetect用户:帮我看看这张正脸,皮肤怎么样,毛孔和痘痘严不严重。
操作:
python scripts/call_skin_pro.py \
--image-url https://example.com/face.jpg \
--output skin.json
回复(节选):