1
00:00:00,050 --> 00:00:08,300
Welcome to the section in which we shall be mastering image segmentation by building a virtual outfit

2
00:00:08,300 --> 00:00:11,420
change plugin with the 51 app.

3
00:00:11,420 --> 00:00:20,990
The tool we shall build will take in as input this image and then output this other image based on a

4
00:00:20,990 --> 00:00:22,010
given prompt.

5
00:00:22,010 --> 00:00:32,900
So as you could see here, we are able to modify the boot color based on just this prompt and an inpainting

6
00:00:32,900 --> 00:00:33,650
model.

7
00:00:33,650 --> 00:00:40,760
Nonetheless, for the inpainting model to produce this new output, where we have the boot color which

8
00:00:40,760 --> 00:00:47,780
has been changed, it takes in the prompt, as we've said already, and a mask.

9
00:00:47,780 --> 00:00:55,370
And in order to generate this kind of mask, where we have all the other parts apart from the boot,

10
00:00:55,370 --> 00:01:05,720
which are set to a pixel value of zero, we are going to train our own SEG former model, which is going

11
00:01:05,720 --> 00:01:16,640
to get this input and generate a mask like this one, from which we could extract specific classes,

12
00:01:16,640 --> 00:01:18,530
like in this case, the boot.

13
00:01:18,530 --> 00:01:23,360
And with that said, we'll start by looking at data preparation.

14
00:01:24,080 --> 00:01:29,210
Then we'll go on to dive into model creation.

15
00:01:29,240 --> 00:01:38,510
Then we'll train our model and after training this model, we will make use of this trained segmentation

16
00:01:38,510 --> 00:01:48,560
model to input masks like this into our inpainting model, such that we are able to generate new images

17
00:01:48,560 --> 00:01:52,580
which have been modified based on a specific prompt.

18
00:01:52,610 --> 00:02:00,920
Apart from using this tool as a visual outfit changer, we are going to make use of it in data augmentation

19
00:02:00,920 --> 00:02:05,900
by creating a very simple plugin with the 51 app.

20
00:02:07,310 --> 00:02:11,840
The 51 plugin will build is quite simple and straightforward.

21
00:02:11,870 --> 00:02:15,200
The first thing we'll do is select a given sample.

22
00:02:15,230 --> 00:02:23,180
Once this sample is selected, we'll go on to click on Stable Diffusion Inpainting plugin and then put

23
00:02:23,180 --> 00:02:26,240
in the different values like the specific class.

24
00:02:26,240 --> 00:02:29,390
Like in this case we want to modify the shirt.

25
00:02:29,420 --> 00:02:31,460
We'll also select number of augmentations.

26
00:02:31,460 --> 00:02:32,840
We'll pass in the prompt.

27
00:02:33,050 --> 00:02:35,090
We'll have the number of inference steps.

28
00:02:35,090 --> 00:02:37,460
We'll have the guidance scale.

29
00:02:37,460 --> 00:02:41,090
And then we would click on execute.

30
00:02:41,120 --> 00:02:44,450
Once executed we'll wait for a little bit.

31
00:02:44,450 --> 00:02:50,120
And then we get our generated samples like this one we have right here.

32
00:02:50,120 --> 00:02:59,960
We go from an input where this man was putting on a military green shirt to one where we have this man

33
00:02:59,990 --> 00:03:02,120
putting on a designer shirt.

34
00:03:02,120 --> 00:03:06,470
And with that said, let's dive into data preparation.
