A LITTLE EXPRESSION, A LOT TO EXPLORE.

每一个表情,
都有迹可循。

打开摄像头,或选择一张照片。
让细微的面部变化,变得看得见。

LIVE CAPTURE
摄像头未开启

和镜头打个招呼

让面部保持在画面中,光线充足时效果更好

单人正面 · 自然光线 · 无遮挡⌗
目标每秒 5 次 · 本地识别

先点击绿色按钮打开摄像头,并允许访问。模型就绪后会自动检测;也可以单独暂停检测、关闭摄像头。

图像只在你的浏览器内处理,不上传。首次加载网页和模型需要联网。

实测 — 次 / 秒
正在初始化内置模型…
IN THIS SESSION

刚刚的表情

↝

表情的变化,会留在这里。仅保留本次页面最近 8 条结果,刷新后清空。

A BETTER READING

放松一点,自然就好。

保持面部清晰、避免逆光。画面只保留一张脸。模糊、过暗或多人时,会提醒你调整。

☀ 光线充足◎ 正面入镜◌ 减少遮挡
MAKE IT PERSONAL

让模型学习你的表情

原始表情模型

自己标注、在本机训练,再用新拍的样本比较是否更准。只有通过验证,你才可以启用个人分类器。

展开本机训练与验证
  1. 采集训练样本:使用精细识别,选择你实际做出的表情,再点击采集。七类各至少 10 条;建议分几次拍摄,包含不同光线、正面和左右歪头约 15–35°。开心、生气、厌恶建议各采 30 条以上,避免只采同一表情强度。
  2. 训练分类层:在本机学习 256 维表情特征与标签的对应关系。训练时厌恶类别的损失权重提高到其他类别的 1.75 倍,在样本数量平衡的基础上重点学习厌恶;仍需中性和生气作对照。保留原视觉网络,只训练小型分类层;不是从零训练大模型。
  3. 另采样本验证:训练结束后,每类另采至少 5 条。建议隔一段时间重新拍摄,不能复用训练照片或拆分同一视频的相邻帧。用于其他人时,也需另留未参与训练的人。
  4. 比较后启用:仅当宏平均 F1 提高至少 2 个百分点、准确率不降低且单类召回率下降不超过 20 个百分点,同时开心、生气、厌恶的精确率和召回率均不下降,已采集歪头样本的准确率不下降时,允许启用。这个小样本门槛只用于探索,不是统计显著性证明。

标签描述可见的表情样式,并不证明内心情绪。无法判断或混合表情不要强行采样。最低样本数只用于试验,不保证训练会变好。

第 1 步 · 采集训练样本

打开摄像头并开始检测,或分析照片,再选择标签、点击采集。不会自动收集样本。

训练与推理均不联网。只在你点击采集时保留表情特征和标签,不保存原照片;刷新会清空,请按需导出。特征文件也请妥善保管。导入模型后需重新验证再启用。

模型设置浏览器本地 · 面部对齐

当前灵敏度:最高分类分数至少 45%,领先第二名至少 8 个百分点。中性分数 ×0.70,厌恶分数 ×1.25,再统一归一化。这是手动决策偏好,会更容易报出表情,也可能增加误报;镜像分歧与画面质量检查仍保留。

默认精细识别:同帧分析、按双眼连线旋正歪头、原图与镜像特征融合并检查分歧、照片最高保留 1280 像素长边且不再二次 JPEG 压缩。视频约 160 毫秒短时平滑会带来少量响应延迟。目标默认每秒 10 次,实际速度看设备;可选快速模式(关闭旋正与镜像复核)。歪头支持范围约 ±50°,大幅侧脸、低头与仰头不保证识别;没有检测到人脸时会尝试 ±30° 旋转搜寻,耗时会增加。画面质量阈值与不确定阈值是经验设置,尚未做概率校准。

PASS THE EXPRESSION

把这个小实验,分享出去。

分享的是网页链接,不会附带你的照片或训练数据。

结果卡只包含当前分类与分数,不含人脸照片。你可以自行附在 X 帖子中。

GOOD TO KNOW

使用前,了解这几件事。

从 X 打开,摄像头无法使用?

点击 X 内置浏览器的菜单,选择在 Safari 或 Chrome 中打开;不同手机的菜单名称可能不同。也可以复制本页链接,粘贴到系统浏览器。允许网页及系统的相机权限,确认摄像头没有被其他应用占用。你随时可以改用照片识别。

每秒能检测几次?

默认目标 10 次/秒,可选择 2、5、10、15、30 次。实际速度由设备决定,以页面“实测”为准。首次模型加载后,分析在本机进行。长时间使用时可降低频率,或点击暂停检测。

歪头也能识别吗?

精细模式先测量双眼连线的倾斜角度,将人脸旋正再分类;画面会显示歪头角度。默认目标每秒 10 次,以实测速度为准。建议从左右 15–35° 开始,大幅侧脸、遮挡或倾斜超过约 50° 时会提示调整。原图与镜像结果分歧时不会强行给出确定标签。精度是否提高,仍需用另拍的标注样本验证。

它能读懂我的心情吗?

它将可见的面部样式分为中性、开心、悲伤、生气、害怕、厌恶和惊讶,不能确定你的真实内心感受。分数不等于准确率;不清楚的画面会提示不确定。

照片、样本和模型存在哪里?

照片和视频在浏览器内存中处理,不上传到识别服务器。本页结果与训练样本刷新后清空;只有你主动导出时才生成本机文件。导出的特征和标签也请妥善保管。本应用没有分析统计或广告脚本;网站托管服务可能处理正常访问日志。

可以离线使用吗?

网页版首次加载需要联网。你也可以保存当前 HTML 文件,在兼容的电脑浏览器中打开。移动系统或文件预览器可能限制本地文件摄像头,手机优先使用本网页。

模型和开源许可

采用 face-api.js 0.22.2 的 Tiny Face Detector、Tiny Landmarks 与 Face Expression 模型。个人训练只更新最后的分类层,不能保证精度提高。

开源许可
MIT License

Copyright (c) 2018 Vincent Mühler

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

TensorFlow.js: Copyright 2018 Google LLC.
Licensed under the Apache License, Version 2.0.


                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS