Socket
Socket
Sign inDemoInstall

face-api.js

Package Overview
Dependencies
8
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.16.0 to 0.16.1

12

build/commonjs/globalApi/DetectFacesTasks.js

@@ -69,7 +69,15 @@ "use strict";

return tslib_1.__awaiter(this, void 0, void 0, function () {
var faceDetections, faceDetectionWithHighestScore;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, new DetectAllFacesTask(this.input, this.options)];
case 1: return [2 /*return*/, (_a.sent())
.sort(function (f1, f2) { return f1.score - f2.score; })[0]];
case 1:
faceDetections = _a.sent();
faceDetectionWithHighestScore = faceDetections[0];
faceDetections.forEach(function (faceDetection) {
if (faceDetection.score > faceDetectionWithHighestScore.score) {
faceDetectionWithHighestScore = faceDetection;
}
});
return [2 /*return*/, faceDetectionWithHighestScore];
}

@@ -76,0 +84,0 @@ });

@@ -67,7 +67,15 @@ import * as tslib_1 from "tslib";

return tslib_1.__awaiter(this, void 0, void 0, function () {
var faceDetections, faceDetectionWithHighestScore;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, new DetectAllFacesTask(this.input, this.options)];
case 1: return [2 /*return*/, (_a.sent())
.sort(function (f1, f2) { return f1.score - f2.score; })[0]];
case 1:
faceDetections = _a.sent();
faceDetectionWithHighestScore = faceDetections[0];
faceDetections.forEach(function (faceDetection) {
if (faceDetection.score > faceDetectionWithHighestScore.score) {
faceDetectionWithHighestScore = faceDetection;
}
});
return [2 /*return*/, faceDetectionWithHighestScore];
}

@@ -74,0 +82,0 @@ });

2

package.json
{
"name": "face-api.js",
"version": "0.16.0",
"version": "0.16.1",
"description": "JavaScript API for face detection and face recognition in the browser with tensorflow.js",

@@ -5,0 +5,0 @@ "module": "./build/es6/index.js",

@@ -61,4 +61,10 @@ import { TNetInput } from 'tfjs-image-recognition-base';

public async run(): Promise<FaceDetection | undefined> {
return (await new DetectAllFacesTask(this.input, this.options))
.sort((f1, f2) => f1.score - f2.score)[0]
const faceDetections = await new DetectAllFacesTask(this.input, this.options);
let faceDetectionWithHighestScore = faceDetections[0];
faceDetections.forEach(faceDetection => {
if (faceDetection.score > faceDetectionWithHighestScore.score) {
faceDetectionWithHighestScore = faceDetection;
}
});
return faceDetectionWithHighestScore;
}

@@ -65,0 +71,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc