-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
28 lines (26 loc) · 711 Bytes
/
__init__.py
File metadata and controls
28 lines (26 loc) · 711 Bytes
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
import pGan_fSplice
from maskgen.plugins import findPlugin
import os
"""JT code only used for plugin conversion"""
def transform(img, source, target, **kwargs):
donor = kwargs['donor']
pGan_fSplice.loadModel(os.path.join(findPlugin('GAN_face_splice'),pGan_fSplice.PREDICTOR_PATH))
pGan_fSplice.splice_donor_recipient(source,donor,target)
return None, None
def operation():
return {
'name': 'PasteSplice',
'category': 'Paste',
'software': 'GAN_face_splice',
'version': '0.1',
'arguments':{
'donor':{
'type': 'donor',
'description': 'The donor image from which to select the face'
}
},
'description':'Swap the faces of two photographs',
'transitions':[
'image.image'
]
}