Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply Image segmentation to mask a specific area for inpainting alternate to manual masking. #3222

Open
1 task done
Muhammad-Zubair opened this issue Oct 20, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@Muhammad-Zubair
Copy link

Muhammad-Zubair commented Oct 20, 2022

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

What if we Use model like yolov4 to detect objects in an image then create mask (or even delete the unwanted object or area) and then inpaint which will be much better and accurate. also image segmentation is much easier than text to mask or masking with brush, with just one click away let the model do object detection and masking so inpainting process will be like this:

-> detect an object with yolov4 or any other highly accurate model
-> create mask with U-Net , FastFCN, MaskRCNN (which ever model full fill the purpose best)
-> ( if it give us good result delete the object or area from image)
-> inpaint the masked area ( with text to img)

Proposed workflow

  1. Object Detection
  2. Masking (or deletion of unwanted object or area)
  3. Inpainting
@Ehplodor
Copy link

I'll add this to the list #2940

@winterspringsummer
Copy link
Contributor

winterspringsummer commented Oct 20, 2022

I'm not sure if this is what you are looking for, but there is a custom scripts for selecting area by text - txt2mask
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts#txt2mask

@Muhammad-Zubair
Copy link
Author

I'm not sure if this is what you are looking for, but there is a custom scripts for selecting area by text - txt2mask https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts#txt2mask
image segmentation is much easier than text to mask with just one click away let the work done by image segmentation model or even yolov4 or yolov5 models like that can be used to:
-> detect an object with yolov4 or any other highly accurate model
-> create mask with U-Net , FastFCN, MaskRCNN (which ever model full fill the purpose best)
-> inpaint the masked object

@mezotaken mezotaken added the enhancement New feature or request label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants