dustysys / ddetailer

340 stars 74 forks source link

It's unclear to me how it works #4

Closed Eleksar387 closed 1 year ago

Eleksar387 commented 1 year ago

I installed it and it seems there were no errors. I select the script. And now what? How do I run it?

9cento commented 1 year ago

Same here, I managed to get the bounding box face and the full body silhouette modes, but I can't find the way to use the head-only silhouette mode. From the Usage Instructions: "dd-person_mask2former isolates the head's silhouette as the secondary model by using the bitwise AND option" What does it mean? Needs clarifications

Marc899 commented 1 year ago

How to actually use the script? Please explain

dustysys commented 1 year ago

First, enable previews in your settings so you can see where the masks are being placed during generation:

image Test it out in the img2img inpaint tab first where it's easier to tell what it does. After selecting the Detection Detailer script, when you click the usual Generate button the script will run using the settings you define. Here is an example setting for auto-masking a drawn face: image The highlighted region will be inpainted. Use 'Inpaint at full resolution' and 'Masked content: original' in the inpaint settings for best results. Here is an example for masking a drawn person in full: image Using bitwise AND(A&B) allows you to combine the mask generated from the first model selected and the second model to isolate only the face area which is detected as part of the overall person silhouette instead of the whole bounding box from the face detection model: image

If there are no masks drawn for a model it may be because it could not detect anything. You can try reducing the confidence threshold, or try using a different image that has a more stylized artstyle that the anime-trained models are more likely to pick up.

9cento commented 1 year ago

Not sure if it's a bug or not but at least for me the A&B part doesn't work, I still get a box instead of a silhouette of the head. I installed the extension directly from the extension tab for what it's worth. Anyway I will try to play with the sliders and see if that changes something

dustysys commented 1 year ago

If A lies entirely within B, A&B would be the same as A. Try expanding the size of A by using a very large dilation factor (50+) and you should see how B constrains the size of A&B. Also, try using your B model as your model A on its own just to make sure both models are picking up detections.

9cento commented 1 year ago

Yep, the dilation factor did the trick and helped me better understand what was going on. Thank you

younyokel commented 1 year ago

I just installed it on latest webUI but the script isn't visible. image

challengeh commented 1 year ago

I just installed it on latest webUI but the script isn't visible. image

Yeah I never saw the option in the script for me either

dustysys commented 1 year ago

The webUI does need a full restart to install everything, and it won't work if there are any errors in the webUI terminal when you open it. Please open a new issue with any errors like that if you're still seeing the issue.

younyokel commented 1 year ago

The webUI does need a full restart to install everything, and it won't work if there are any errors in the webUI terminal when you open it. Please open a new issue with any errors like that if you're still seeing the issue.

I installed the extension and put the models in mmdet folder but the Detailer option doesn't appear in img2img tab.

kuiyanxu commented 1 year ago

The webUI does need a full restart to install everything, and it won't work if there are any errors in the webUI terminal when you open it. Please open a new issue with any errors like that if you're still seeing the issue.

I have restarted for many times but it didn't help!