deepinsight / deepinsight/insightface
generate alpha (4 channel) based output in swapping and enhancing
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
How do you generate 4 channel (RGBA) based output image in swapping and enhancing?
Here is my code:
```python
source = cv2.imread('d:/source.jpg')
target = cv2.imread('d:/target.jpg')
source_face = FACE_ANALYSER.get(source)[0]
target_face = FACE_ANALYSER.get(target)[0]
swapped = FACE_SWAPPER.get(target, target_face, source_face, paste_back=True)
enhanced = enhance_face(target_face, result)
cv2.imwrite('d:/out.jpg', enhanced)
```
I need enhanced/swapped face in (RGBA) format, which later can be composited on target.jpg with more editing.
The [enhance_face](https://github.com/s0md3v/roop/blob/0497d0ba029ba24881c8c4d8644189909dc0def8/roop/processors/frame/face_enhancer.py#L61) function.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.