Segment Anything is a model from Meta that can be used to select portions of images. Combined with DALL·E's ability to inpaint specified portions of images, you can use Segment Anything to easily select any part of an image you'd like to alter.
In this notebook, we'll use these tools to become fashion designers and dynamically replace our digital models' outfits with tailored, original creations. The notebook follows this flow:
- Setup: Initialise your libraries and any location directories.
- Generate original image: Make an original image that we'll create dynamic masks from.
- Generate mask: Use Segment Anything to create a dynamic mask.
- Create new image: Generate a new image with the masked area inpainted with a fresh prompt.