# Background removal feature

**URL:** <https://forum.8thwall.com/t/background-removal-feature/2744>\
**Category:** Technical Support\
**Tags:** face-effects, background-removal, selfie-segmentation\
**Created:** [September 12, 2024, 2:08pm UTC](https://forum.8thwall.com/t/background-removal-feature/2744 "2024-09-12T14:08:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alessandro\_Straccia](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/alessandro_straccia/32/426_2.png) [@Alessandro\_Straccia](https://forum.8thwall.com/u/Alessandro_Straccia)\
**Post date:** [September 12, 2024, 2:08pm UTC](https://forum.8thwall.com/t/background-removal-feature/2744/1 "2024-09-12T14:08:37Z")

</div>

Hi guys!  
Is there any background removal feature for selfie filters on 8th Wall? Or would we need to use a 3rd party library to do that?

Thanks!

---

<div class="post-metadata">

**Author:** ![Evan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/evan/32/431_2.png) [@Evan](https://forum.8thwall.com/u/Evan)\
**Post date:** [September 13, 2024, 9:28pm UTC](https://forum.8thwall.com/t/background-removal-feature/2744/2 "2024-09-13T21:28:02Z")

</div>

8th Wall provides face tracking, and we use a 3D model of a head attached to the face to occlude the face. We don’t provide person/background segmentation at this time. If you’d like to experiment with implementing your own ML model to handle person/background segmentation, a good starting point would be our [custom camera pipeline module sample project](https://www.8thwall.com/8thwall/camera-qrcode).

You might also consider creative workarounds, such as using a transparent gradient texture (i.e. opaque at the top of the screen \> transparent on the bottom of the screen) or using something like a particle effect to make the lack of segmentation less noticeable, such as in this experience: [L.A. Dodgers - World Series Selfie | Aircards | 8th Wall](https://www.8thwall.com/aircards/dodgers).

---

<div class="post-metadata">

**Author:** ![Alessandro\_Straccia](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/alessandro_straccia/32/426_2.png) [@Alessandro\_Straccia](https://forum.8thwall.com/u/Alessandro_Straccia)\
**Post date:** [September 13, 2024, 9:44pm UTC](https://forum.8thwall.com/t/background-removal-feature/2744/3 "2024-09-13T21:44:29Z")

</div>

Thanks Evan!  
My project is using A-Frame, do you have an example of camera pipeline module for A-Frame?

Cheers!

---

<div class="post-metadata">

**Author:** ![Evan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.8thwall.com/evan/32/431_2.png) [@Evan](https://forum.8thwall.com/u/Evan)\
**Post date:** [September 13, 2024, 9:50pm UTC](https://forum.8thwall.com/t/background-removal-feature/2744/4 "2024-09-13T21:50:35Z")

</div>

We don’t have a full-fledged example of integrating a third party ML model into an A-Frame project, but you can add custom camera pipeline modules via an A-Frame component.

For example:

```auto
const myComponent = {
  init() {
    const onxrloaded = () => {
      window.XR8.addCameraPipelineModule({
        name: 'myCameraPipelineModule',
        onUpdate: () => {
          console.log('update')
        },
      })
    }
    window.XR8 ? onxrloaded() : window.addEventListener('xrloaded', onxrloaded)
  }
}

AFRAME.registerComponent('my-component', myComponent)

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/x8thwall/original/2X/9/9212a857458f1b03a6accb129e0f8cbea408e3e5.png) [@system](https://forum.8thwall.com/u/system)\
**Post date:** [September 20, 2024, 6:22am UTC](https://forum.8thwall.com/t/background-removal-feature/2744/5 "2024-09-20T06:22:34Z")

</div>

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.
