exception handling
parent
586dcdf477
commit
15d0176596
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -634,7 +634,7 @@
|
|||
]
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytes": 1782,
|
||||
"bytes": 1808,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/classes/FaceDetection.ts",
|
||||
|
@ -2591,7 +2591,7 @@
|
|||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {},
|
||||
"bytes": 309774
|
||||
"bytes": 309815
|
||||
},
|
||||
"dist/face-api.esm-nobundle.js": {
|
||||
"imports": [],
|
||||
|
@ -2872,7 +2872,7 @@
|
|||
"bytesInOutput": 773
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytesInOutput": 475
|
||||
"bytesInOutput": 489
|
||||
},
|
||||
"src/dom/extractFaceTensors.ts": {
|
||||
"bytesInOutput": 442
|
||||
|
@ -3187,7 +3187,7 @@
|
|||
"bytesInOutput": 443
|
||||
}
|
||||
},
|
||||
"bytes": 82164
|
||||
"bytes": 82178
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -634,7 +634,7 @@
|
|||
]
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytes": 1782,
|
||||
"bytes": 1808,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/classes/FaceDetection.ts",
|
||||
|
@ -2591,7 +2591,7 @@
|
|||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1447733
|
||||
"bytes": 1447774
|
||||
},
|
||||
"dist/face-api.esm.js": {
|
||||
"imports": [],
|
||||
|
@ -2866,7 +2866,7 @@
|
|||
"bytesInOutput": 776
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytesInOutput": 480
|
||||
"bytesInOutput": 494
|
||||
},
|
||||
"src/dom/extractFaceTensors.ts": {
|
||||
"bytesInOutput": 418
|
||||
|
@ -3187,7 +3187,7 @@
|
|||
"bytesInOutput": 446
|
||||
}
|
||||
},
|
||||
"bytes": 1134626
|
||||
"bytes": 1134640
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -634,7 +634,7 @@
|
|||
]
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytes": 1782,
|
||||
"bytes": 1808,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/classes/FaceDetection.ts",
|
||||
|
@ -2591,7 +2591,7 @@
|
|||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {},
|
||||
"bytes": 1447740
|
||||
"bytes": 1447781
|
||||
},
|
||||
"dist/face-api.js": {
|
||||
"imports": [],
|
||||
|
@ -2748,7 +2748,7 @@
|
|||
"bytesInOutput": 776
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytesInOutput": 480
|
||||
"bytesInOutput": 494
|
||||
},
|
||||
"src/dom/extractFaceTensors.ts": {
|
||||
"bytesInOutput": 418
|
||||
|
@ -3066,7 +3066,7 @@
|
|||
"bytesInOutput": 446
|
||||
}
|
||||
},
|
||||
"bytes": 1134789
|
||||
"bytes": 1134803
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -634,7 +634,7 @@
|
|||
]
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytes": 1782,
|
||||
"bytes": 1808,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/classes/FaceDetection.ts",
|
||||
|
@ -2591,7 +2591,7 @@
|
|||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {},
|
||||
"bytes": 309659
|
||||
"bytes": 309700
|
||||
},
|
||||
"dist/face-api.node-gpu.js": {
|
||||
"imports": [],
|
||||
|
@ -2751,7 +2751,7 @@
|
|||
"bytesInOutput": 773
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytesInOutput": 475
|
||||
"bytesInOutput": 489
|
||||
},
|
||||
"src/dom/extractFaceTensors.ts": {
|
||||
"bytesInOutput": 442
|
||||
|
@ -3066,7 +3066,7 @@
|
|||
"bytesInOutput": 443
|
||||
}
|
||||
},
|
||||
"bytes": 82707
|
||||
"bytes": 82721
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -634,7 +634,7 @@
|
|||
]
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytes": 1782,
|
||||
"bytes": 1808,
|
||||
"imports": [
|
||||
{
|
||||
"path": "src/classes/FaceDetection.ts",
|
||||
|
@ -2591,7 +2591,7 @@
|
|||
"imports": [],
|
||||
"exports": [],
|
||||
"inputs": {},
|
||||
"bytes": 309651
|
||||
"bytes": 309692
|
||||
},
|
||||
"dist/face-api.node.js": {
|
||||
"imports": [],
|
||||
|
@ -2751,7 +2751,7 @@
|
|||
"bytesInOutput": 773
|
||||
},
|
||||
"src/dom/extractFaces.ts": {
|
||||
"bytesInOutput": 475
|
||||
"bytesInOutput": 489
|
||||
},
|
||||
"src/dom/extractFaceTensors.ts": {
|
||||
"bytesInOutput": 442
|
||||
|
@ -3066,7 +3066,7 @@
|
|||
"bytesInOutput": 443
|
||||
}
|
||||
},
|
||||
"bytes": 82699
|
||||
"bytes": 82713
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,8 +47,9 @@ export async function extractFaces(
|
|||
x, y, width, height,
|
||||
}) => {
|
||||
const faceImg = createCanvas({ width, height });
|
||||
getContext2dOrThrow(faceImg)
|
||||
.putImageData(ctx.getImageData(x, y, width, height), 0, 0);
|
||||
try {
|
||||
getContext2dOrThrow(faceImg).putImageData(ctx.getImageData(x, y, width, height), 0, 0);
|
||||
} catch { /**/ }
|
||||
return faceImg;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue