Spaces:
Configuration error
Configuration error
File size: 1,411 Bytes
c6ad93b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# face-makeup.PyTorch
Lip and hair color editor using face parsing maps.
<table>
<tr>
<th> </th>
<th>Hair</th>
<th>Lip</th>
</tr>
<!-- Line 1: Original Input -->
<tr>
<td><em>Original Input</em></td>
<td><img src="makeup/116_ori.png" height="256" width="256" alt="Original Input"></td>
<td><img src="makeup/116_lip_ori.png" height="256" width="256" alt="Original Input"></td>
</tr>
<!-- Line 2: Color -->
<tr>
<td >Color</td>
<td><img src="makeup/116_0.png" height="256" width="256" alt="Color"></td>
<td><img src="makeup/116_6.png" height="256" width="256" alt="Color"></td>
</tr>
<!-- Line 3: Color -->
<tr>
<td>Color</td>
<td><img src="makeup/116_1.png" height="256" width="256" alt="Color"></td>
<td><img src="makeup/116_3.png" height="256" width="256" alt="Color"></td>
</tr>
<!-- Line 4: Color -->
<tr>
<td>Color</td>
<td><img src="makeup/116_2.png" height="256" width="256" alt="Color"></td>
<td><img src="makeup/116_4.png" height="256" width="256" alt="Color"></td>
</tr>
</table>
### Using PyTorch 1.0 and python 3.x
## Demo
Change hair and lip color:
```Shell
python makeup.py --img-path imgs/116.jpg
```
### Try to use other colors:
Change the color list in **makeup.py**(line 83)
```
colors = [[230, 50, 20], [20, 70, 180], [20, 70, 180]]
```
### Train face parsing model (optional)
Follow this repo [zllrunning/face-parsing.PyTorch](https://github.com/zllrunning/face-parsing.PyTorch) |