djbielejeski / a-person-mask-generator

Extension for Automatic1111 and ComfyUI to automatically create masks for Background/Hair/Body/Face/Clothes in Img2Img
MIT License
247 stars 30 forks source link

The "hair" mask doesn't recognize a beard #5

Closed Osato28 closed 8 months ago

Osato28 commented 8 months ago

As far as I've noticed, the precision is phenomenal, but the model has a pretty significant limitation: There is no way to detect facial hair separately, or even as part of the hair. The extension detects the beard as part of the face.

I'm not sure if it's fixable, since it's caused by Google's mediapipe model and I don't know whether that model can be retrained, but posting it just to be thorough.

Version: commit 443e491.

How to replicate: put an image of a bearded man into img2img and use the extension to first detect hair, then face (skin).

Original image 1: image(7) Hair: image(6) Face (skin): image(8)

Original image 2: image(10) Hair: image(11) Face (skin): image(9)

djbielejeski commented 8 months ago

The model we use selfie_multiclass_256x256.tflite unfortunately does not support beard masks. I also don't see any other models that do at this time.