Fixes #8
4
main.py
4
main.py
@ -48,7 +48,7 @@ def transfer_to_anime(img: np.ndarray):
|
|||||||
return cv2.cvtColor(model_out, cv2.COLOR_BGR2RGB)
|
return cv2.cvtColor(model_out, cv2.COLOR_BGR2RGB)
|
||||||
|
|
||||||
|
|
||||||
def similarity_to_anime(source_image, anime_faces_set, debug=True):
|
def similarity_to_anime(source_image, anime_faces_set, debug=False):
|
||||||
try:
|
try:
|
||||||
source_face_bbox = find_face_bbox(source_image)
|
source_face_bbox = find_face_bbox(source_image)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -69,7 +69,7 @@ def similarity_to_anime(source_image, anime_faces_set, debug=True):
|
|||||||
plt.imshow(source_face_anime)
|
plt.imshow(source_face_anime)
|
||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
return compare_with_anime_characters(source_face_anime, anime_faces_set)
|
return compare_with_anime_characters(source_face_anime, anime_faces_set, verbose=debug)
|
||||||
|
|
||||||
|
|
||||||
def validate(test_set, anime_faces_set):
|
def validate(test_set, anime_faces_set):
|
||||||
|
Loading…
Reference in New Issue
Block a user