Files
SnapOtter/apps/docs/id/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

2.8 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
Deteksi dan buramkan wajah dalam gambar secara otomatis dengan deteksi wajah AI untuk privasi dan anonimisasi yang patuh GDPR. fb861c12aea5 human a2d660c6993d

Buramkan Wajah / PII

Deteksi dan buramkan wajah dalam gambar secara otomatis menggunakan deteksi wajah bertenaga AI (MediaPipe).

API Endpoint

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

Pemrosesan: Asinkron (mengembalikan 202, polling /api/v1/jobs/{jobId}/progress untuk status melalui SSE)

Bundel model: face-detection (200-300 MB)

Parameter

Parameter Tipe Wajib Bawaan Deskripsi
file file Ya - Berkas gambar (multipart)
blurRadius number Tidak 30 Radius blur yang diterapkan pada wajah yang terdeteksi (1-100)
sensitivity number Tidak 0.5 Sensitivitas deteksi wajah (0-1). Nilai lebih rendah mendeteksi lebih sedikit wajah dengan keyakinan lebih tinggi

Contoh Permintaan

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

Respons

Respons Awal (202 Accepted)

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

Progres (SSE di /api/v1/jobs/{jobId}/progress)

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

Hasil Akhir (melalui 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}
    ]
  }
}

Tidak Ada Wajah Terdeteksi

Jika tidak ada wajah ditemukan, hasil menyertakan peringatan:

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

Catatan

  • Memerlukan bundel model face-detection untuk dipasang (200-300 MB).
  • Format keluaran mengikuti format input secara otomatis.
  • Larik faces berisi koordinat kotak pembatas (x, y, width, height) untuk setiap wajah yang terdeteksi.
  • Naikkan sensitivity (lebih dekat ke 1,0) untuk mendeteksi lebih banyak wajah, termasuk yang sebagian terhalang.
  • Mendukung format input HEIC/HEIF, RAW, TGA, PSD, EXR, dan HDR melalui dekode otomatis.