Skip to content

Commit

Permalink
Update scripts and verification function
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Gabarro committed Jun 19, 2024
1 parent 6a575a4 commit 50389b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions scripts/extract_faces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json;
import sys;
from deepface import DeepFace;

try:
Expand Down
1 change: 1 addition & 0 deletions scripts/represent.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json;
import sys;
from deepface import DeepFace;

result = DeepFace.represent(
Expand Down
1 change: 1 addition & 0 deletions scripts/verify.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json;
import sys;
from deepface import DeepFace;

try:
Expand Down
3 changes: 2 additions & 1 deletion src/DeepFace.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function verify(
bool $align = true,
Normalization $normalization = Normalization::BASE,
bool $anti_spoofing = false,
): VerifyResult {
): VerifyResult|array {
$img1 = new SplFileInfo($img1_path);
$img2 = new SplFileInfo($img2_path);

Expand Down Expand Up @@ -85,6 +85,7 @@ public function verify(
],
);
} catch(DeepFaceException $e){
// if any of these images fails the spoof detection, it will throw 'Exception while processing imgX_path'
return array("error" => $e->getMessage());
}

Expand Down

0 comments on commit 50389b8

Please sign in to comment.