Files
SnapOtter/apps/docs/ja/tools/image/blur-faces.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

3.0 KiB
Raw Blame History

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
AI 顔検出で画像内の顔を自動検出してぼかし、プライバシー保護と GDPR に準拠した匿名化を行います。 fb861c12aea5 human a863b71fd7e4

Face / PII Blur

AI 対応の顔検出 (MediaPipe) を使用して、画像内の顔を自動検出してぼかします。

API Endpoint

POST /api/v1/tools/image/blur-faces

処理: 非同期 (202 を返し、SSE でステータスを /api/v1/jobs/{jobId}/progress からポーリング)

モデルバンドル: face-detection (200 300 MB)

Parameters

Parameter Type Required Default Description
file file Yes - 画像ファイル (マルチパート)
blurRadius number No 30 検出された顔に適用するぼかし半径 (1 ~ 100)
sensitivity number No 0.5 顔検出の感度 (0 ~ 1)。値が低いほど、より高い信頼度で検出する顔が少なくなります

Example Request

curl -X POST http://localhost:1349/api/v1/tools/image/blur-faces \
  -F "file=@group-photo.jpg" \
  -F 'settings={"blurRadius":40,"sensitivity":0.3}'

Response

Initial Response (202 Accepted)

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "async": true
}

Progress (SSE at /api/v1/jobs/{jobId}/progress)

event: progress
data: {"phase":"processing","stage":"Detecting faces...","percent":40}

Final Result (via SSE)

{
  "phase": "complete",
  "percent": 100,
  "result": {
    "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "downloadUrl": "/api/v1/download/{jobId}/group-photo_blurred.jpg",
    "originalSize": 450000,
    "processedSize": 420000,
    "facesDetected": 3,
    "faces": [
      {"x": 100, "y": 50, "w": 80, "h": 80},
      {"x": 300, "y": 60, "w": 75, "h": 75},
      {"x": 500, "y": 55, "w": 85, "h": 85}
    ]
  }
}

No Faces Detected

顔が見つからない場合、結果に警告が含まれます:

{
  "phase": "complete",
  "percent": 100,
  "result": {
    "facesDetected": 0,
    "warning": "No faces detected in this image. Try increasing detection sensitivity."
  }
}

Notes

  • face-detection モデルバンドルのインストールが必要です (200 ~ 300 MB)。
  • 出力形式は入力形式に自動的に一致します。
  • faces 配列には、検出された各顔のバウンディングボックス座標 (x、y、width、height) が含まれます。
  • 部分的に隠れている顔を含め、より多くの顔を検出するには sensitivity を上げてください (1.0 に近づける)。
  • HEIC/HEIF、RAW、TGA、PSD、EXR、HDR の入力形式を自動デコードでサポートします。