Sign In

Anzhc's Face Segmentation (Prototype) | YOLOv8 | Adetailer model

242
2.5k
46
Updated: Jun 18, 2024
tooladetaileryolov8
Type
Other
Stats
253
Reviews
Published
Jun 17, 2024
Base Model
Other
Hash
AutoV2
4A07184988
Winter Sovereign
Anzhc

If you are having issues:

  1. Activate your venv

  2. pip install dill

  3. pip install --upgrade ultralytics

This should fix generic problems.


Small segmentation model aiming to create accurate masks of face for improved inpainting quality with adetailer extension.


V2: Tried to improve colored skin detection. Possibly improved detection from side.
Removed female/male separation, since i forgor which class was what, it's simpler that way.

This time around im releasing a small lineup of models, in order of quality you'll get in a1111: v2 640, v2 768 MS, v2 768, v2 1024

Use v2 640, if you need it for adetailer. Rest are situational and for out of automatic purposes, since adetailer extension doesn't support other than 640 resolution right now, it will use it with any of model listed above.


Can also be downloaded at HF: https://huggingface.co/Anzhc/Anzhcs_YOLOs

Script im using: https://github.com/Anzhc/Training-script-for-Ultralytics-YOLO


Usage

Put into `automatic1111/models/adetailer`, or any other place that you know will ork with YOLOv8 models.

Use.


What it does?

Instead of just finding face, it tries to create a mask covering face, which narrows down area of inpainting, which leads to better results, due to attention of model not spreading to anything else.

Yolo face mask:

My face mask:

Due to it being very small(in dataset), and experimental in nature, it's not generalized enough, and will have issues, so be advised.

P.S. In case of tolo face, WHOLE box is inpainted, while my model creates mask to inpaint.

In some cases, particularly close-ups and face shots, standard yolo face model will create hard burn

Because area of inpaint is almost whole image. In case of my model it tries to localize area, which doesn't create such burn.

But yes, here you can see that it's not quite adept with close-ups, and chops it quite a bit.

This is really easy to improve, but im busy with work and other stuff to really do that.