bb489f4f517052fe4b15a6d249acde5bdc6beb60,scripts/convert.py,ConvertImage,process_image,#ConvertImage#Any#,33
Before Change
print("- Found more than one face!")
self.verify_output = True
new_face = converter.convert_one_image(cv2.resize(face.image, (256, 256) ))
image[slice(face.y, face.y + face.h), slice(face.x, face.x + face.w)] = cv2.resize(new_face, (face.w, face.h))
self.faces_detected = self.faces_detected + 1
output_file = self.output_dir / Path(filename).name
cv2.imwrite(str(output_file), image)
except Exception as e:
After Change
def process_image(self, filename):
// TODO move the model load and the converter creation in a method called on init, but after the arg parsing
(face_A,face_B) = ("/decoder_A.h5", "/decoder_B.h5") if not self.arguments.swap_model else ("/decoder_B.h5", "/decoder_A.h5")
model_dir = self.arguments.model_dir
encoder.load_weights(model_dir + "/encoder.h5")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: deepfakes/faceswap
Commit Name: bb489f4f517052fe4b15a6d249acde5bdc6beb60
Time: 2018-01-03
Author: github@clorr.fr
File Name: scripts/convert.py
Class Name: ConvertImage
Method Name: process_image
Project Name: pliablepixels/zmeventnotification
Commit Name: 2303bad77ae5f16e9d87ef6dd2427b39e2fa1670
Time: 2019-03-02
Author: pliablepixels@gmail.com
File Name: hook/zmes_hook_helpers/face.py
Class Name: Face
Method Name: detect
Project Name: scikit-image/scikit-image
Commit Name: ed8539bc74d05675df666397be4902fa9cfb92a1
Time: 2017-09-20
Author: jsch@demuc.de
File Name: doc/examples/transform/plot_rescale.py
Class Name:
Method Name: