Fonction vérifiée

Arrière-plan de portrait

Détectez la personne sur l'appareil et remplacez l'arrière-plan qui l'entoure.

Le problème résolu: A portrait may need a cleaner or differently colored background while keeping the person visible.

Détectez la personne sur l'appareil et remplacez l'arrière-plan qui l'entoure.
Détectez la personne sur l'appareil et remplacez l'arrière-plan qui l'entoure.

Ce que vous pouvez faire

  • Run on-device portrait subject detection.
  • Refine the detected portrait mask.
  • Replace the surrounding area with a selected background color.
  • Preview the composition before saving.

Options disponibles

  • Background color
  • Portrait composition and preview

Entrées prises en charge

  • A portrait image with a detectable person

Résultats

  • Portrait image with a replaced background

Flux de travail

  1. Choose a portrait with a clearly visible subject.
  2. Let the on-device model detect the person.
  3. Inspect the subject edge and composition.
  4. Choose the replacement background.
  5. Generate and review the output.

Limites

  • Edge quality depends on the source image, lighting, pose, and model result.
  • The first use can require downloading the portrait model.

Questions fréquentes

Is portrait detection performed on the device?

The verified workflow uses an on-device portrait model after its required model asset is available.

Will every edge be detected perfectly?

No. Hair, low contrast, complex backgrounds, and image quality can affect the generated mask, so preview review is required.

Éléments du projet

  • feature/feature_app/src/main/java/com/wkq/photo/feature/app/aibackground/AiBackgroundFragment.kt
  • feature/feature_app/src/main/res/values/home_strings.xml
Lire le guide associé