face-api/typedoc/index.html

71 lines
274 KiB
HTML
Raw Normal View History

2022-02-07 15:43:35 +01:00
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@vladmandic/face-api - v1.6.5</title><meta name="description" content="Documentation for @vladmandic/face-api - v1.6.5"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@vladmandic/face-api - v1.6.5</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@vladmandic/face-api - v1.6.5</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Namespaces</h3><ul class="tsd-index-list"><li class="tsd-kind-namespace"><a href="modules/draw.html" class="tsd-kind-icon">draw</a></li><li class="tsd-kind-namespace"><a href="modules/utils.html" class="tsd-kind-icon">utils</a></li></ul></section><section class="tsd-index-section "><h3>Enumerations</h3><ul class="tsd-index-list"><li class="tsd-kind-enum"><a href="enums/Gender.html" class="tsd-kind-icon">Gender</a></li></ul></section><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/AgeGenderNet.html" class="tsd-kind-icon">Age<wbr/>Gender<wbr/>Net</a></li><li class="tsd-kind-class"><a href="classes/BoundingBox.html" class="tsd-kind-icon">Bounding<wbr/>Box</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/Box.html" class="tsd-kind-icon">Box</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComposableTask.html" class="tsd-kind-icon">Composable<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComputeAllFaceDescriptorsTask.html" class="tsd-kind-icon">Compute<wbr/>All<wbr/>Face<wbr/>Descriptors<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComputeFaceDescriptorsTaskBase.html" class="tsd-kind-icon">Compute<wbr/>Face<wbr/>Descriptors<wbr/>Task<wbr/>Base</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComputeSingleFaceDescriptorTask.html" class="tsd-kind-icon">Compute<wbr/>Single<wbr/>Face<wbr/>Descriptor<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/DetectAllFaceLandmarksTask.html" class="tsd-kind-icon">Detect<wbr/>All<wbr/>Face<wbr/>Landmarks<wbr/>Task</a></li><li class="tsd-kind-class"><a href="classes/DetectAllFacesTask.html" class="tsd-kind-icon">Detect<wbr/>All<wbr/>Faces<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/DetectFaceL
<p>Computes a 128 entry vector (face descriptor / face embeddings) from the face shown in an image,
which uniquely represents the features of that persons face. The computed face descriptor can
be used to measure the similarity between faces, by computing the euclidean distance of two
face descriptors.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Float32Array</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Float32Array</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Face descriptor with 128 entries or array thereof in case of batch input.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="createCanvas" class="tsd-anchor"></a><h3 class="tsd-anchor-link">create<wbr/>Canvas<a href="#createCanvas" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">create<wbr/>Canvas<span class="tsd-signature-symbol">(</span>__namedParameters<span class="tsd-signature-symbol">: </span><a href="interfaces/IDimensions.html" class="tsd-signature-type" data-tsd-kind="Interface">IDimensions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLCanvasElement</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/createCanvas.ts#L7">dom/createCanvas.ts:7</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>__namedParameters: <a href="interfaces/IDimensions.html" class="tsd-signature-type" data-tsd-kind="Interface">IDimensions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLCanvasElement</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="createCanvasFromMedia" class="tsd-anchor"></a><h3 class="tsd-anchor-link">create<wbr/>Canvas<wbr/>From<wbr/>Media<a href="#createCanvasFromMedia" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">create<wbr/>Canvas<wbr/>From<wbr/>Media<span class="tsd-signature-symbol">(</span>media<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLImageElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLVideoElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ImageData</span>, dims<span class="tsd-signature-symbol">?: </span><a href="interfaces/IDimensions.html" class="tsd-signature-type" data-tsd-kind="Interface">IDimensions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HTMLCanvasElement</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/createCanvas.ts#L15">dom/createCanvas.ts:15</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>media: <span class="tsd-signature-type">HTMLImageElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">HTMLVideoElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ImageData</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> dims: <a href="interfaces/IDimensions.html" class="tsd-signature-type" data-tsd-kind="Interface">IDimensions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">HTMLCanvasElement</span></h4></li></ul></section><section class="tsd-panel tsd-member ts
<p>Detects the 68 point face landmark positions of the face shown in an image.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>68 point face landmarks or array thereof in case of batch input.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="detectFaceLandmarksTiny" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> detect<wbr/>Face<wbr/>Landmarks<wbr/>Tiny<a href="#detectFaceLandmarksTiny" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">detect<wbr/>Face<wbr/>Landmarks<wbr/>Tiny<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/nets.ts#L73">globalApi/nets.ts:73</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Detects the 68 point face landmark positions of the face shown in an image
using a tinier version of the 68 point face landmark model, which is slightly
faster at inference, but also slightly less accurate.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>68 point face landmarks or array thereof in case of batch input.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="detectLandmarks" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> detect<wbr/>Landmarks<a href="#detectLandmarks" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">detect<wbr/>Landmarks<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/nets.ts#L117">globalApi/nets.ts:117</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceLandmarks68.html" class="tsd-signature-type" data-tsd-kind="Class">FaceLandmarks68</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="detectSingleFace" class="tsd-anchor"></a><h3 class="tsd-anchor-link">detect<wbr/>Single<wbr/>Face<a href="#detectSingleFace" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">detect<wbr/>Single<wbr/>Face<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">?: </span><a href="index.html#FaceDetectionOptions" class="tsd-signature-type" data-tsd-kind="Type alias">FaceDetectionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/DetectSingleFaceTask.html" class="tsd-signature-type" data-tsd-kind="Class">DetectSingleFaceTask</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/detectFaces.ts#L6">globalApi/detectFaces.ts:6</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li><li><h5>options: <a href="index
<p>Extracts the tensors of the image regions containing the detected faces.
Useful if you want to compute the face descriptors for the face images.
Using this method is faster then extracting a canvas for each face and
converting them to tensors individually.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>imageTensor: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The image tensor that face detection has been performed on.</p>
</div></div></li><li><h5>detections: <span class="tsd-signature-symbol">(</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> | </span><a href="classes/Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The face detection results or face bounding boxes for that image.</p>
2021-12-01 13:51:57 +01:00
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">tf.Tensor3D</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Tensors of the corresponding image region for each detected face.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="extractFaces" class="tsd-anchor"></a><h3 class="tsd-anchor-link">extract<wbr/>Faces<a href="#extractFaces" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">extract<wbr/>Faces<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, detections<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> | </span><a href="classes/Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/extractFaces.ts#L17">dom/extractFaces.ts:17</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Extracts the image regions containing the detected faces.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The image that face detection has been performed on.</p>
</div></div></li><li><h5>detections: <span class="tsd-signature-symbol">(</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol"> | </span><a href="classes/Rect.html" class="tsd-signature-type" data-tsd-kind="Class">Rect</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The face detection results or face bounding boxes for that image.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLCanvasElement</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>The Canvases of the corresponding image region for each detected face.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="fetchImage" class="tsd-anchor"></a><h3 class="tsd-anchor-link">fetch<wbr/>Image<a href="#fetchImage" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Image<span class="tsd-signature-symbol">(</span>uri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLImageElement</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/fetchImage.ts#L4">dom/fetchImage.ts:4</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>uri: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLImageElement</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"><a id="fetchJson" class="tsd-anchor"></a><h3 class="tsd-anchor-link">fetch<wbr/>Json<a href="#fetchJson" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">fetch<wbr/>Json<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>uri<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/fetchJson.ts#L3">dom/fetchJson.ts:3</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>uri: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="fetchNetWeights" class="tsd-anchor"></a><h3 class="tsd-anchor-li
<p>Pads the smaller dimension of an image tensor with zeros, such that width === height.</p>
2021-12-01 13:51:57 +01:00
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>imgTensor: <span class="tsd-signature-type">Tensor4D</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The image tensor.</p>
</div></div></li><li><h5>isCenterImage: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>(optional, default: false) If true, add an equal amount of padding on
both sides of the minor dimension oof the image.</p>
2021-12-01 13:51:57 +01:00
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">tf.Tensor4D</span></h4><div><p>The padded tensor with width === height.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="predictAgeAndGender" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> predict<wbr/>Age<wbr/>And<wbr/>Gender<a href="#predictAgeAndGender" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">predict<wbr/>Age<wbr/>And<wbr/>Gender<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="index.html#AgeAndGenderPrediction" class="tsd-signature-type" data-tsd-kind="Type alias">AgeAndGenderPrediction</a><span class="tsd-signature-symbol"> | </span><a href="index.html#AgeAndGenderPrediction" class="tsd-signature-type" data-tsd-kind="Type alias">AgeAndGenderPrediction</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/nets.ts#L103">globalApi/nets.ts:103</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Predicts age and gender from a face image.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="index.html#AgeAndGenderPrediction" class="tsd-signature-type" data-tsd-kind="Type alias">AgeAndGenderPrediction</a><span class="tsd-signature-symbol"> | </span><a href="index.html#AgeAndGenderPrediction" class="tsd-signature-type" data-tsd-kind="Type alias">AgeAndGenderPrediction</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Predictions with age, gender and gender probability or array thereof in case of batch input.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="recognizeFaceExpressions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> recognize<wbr/>Face<wbr/>Expressions<a href="#recognizeFaceExpressions" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">recognize<wbr/>Face<wbr/>Expressions<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceExpressions.html" class="tsd-signature-type" data-tsd-kind="Class">FaceExpressions</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceExpressions.html" class="tsd-signature-type" data-tsd-kind="Class">FaceExpressions</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/nets.ts#L94">globalApi/nets.ts:94</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Recognizes the facial expressions from a face image.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceExpressions.html" class="tsd-signature-type" data-tsd-kind="Class">FaceExpressions</a><span class="tsd-signature-symbol"> | </span><a href="classes/FaceExpressions.html" class="tsd-signature-type" data-tsd-kind="Class">FaceExpressions</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Facial expressions with corresponding probabilities or array thereof in case of batch input.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function tsd-has-type-parameter"><a id="resizeResults" class="tsd-anchor"></a><h3 class="tsd-anchor-link">resize<wbr/>Results<a href="#resizeResults" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">resize<wbr/>Results<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>results<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span>, dimensions<span class="tsd-signature-symbol">: </span><a href="interfaces/IDimensions.html" class="tsd-signature-type" data-tsd-kind="Interface">IDimensions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/resizeResults.ts#L7">resizeResults.ts:7</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>results: <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5></li><li><h5>dimensions: <a href="interfaces/IDimensions.html" class="tsd-signature-type" data-tsd-kind="Interface">IDimensions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="resolveInput" class="tsd-anchor"></a><h3 class="tsd-anchor-link">resolve<wbr/>Input<a href="#resolveInput" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">resolve<wbr/>Input<span class="tsd-signature-symbol">(</span>arg<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/resolveInput.ts#L3">dom/resolveInput.ts:3</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>arg: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="shuffleArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link">shuffle<wbr/>Array<a href="#shuffleArray" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-wid
<p>Attempts to detect all faces in an image using SSD Mobilenetv1 Network.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The input image.</p>
</div></div></li><li><h5>options: <a href="classes/SsdMobilenetv1Options.html" class="tsd-signature-type" data-tsd-kind="Class">SsdMobilenetv1Options</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>(optional, default: see SsdMobilenetv1Options constructor for default parameters).</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Bounding box of each face with score.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="tinyFaceDetector" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> tiny<wbr/>Face<wbr/>Detector<a href="#tinyFaceDetector" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">tiny<wbr/>Face<wbr/>Detector<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">: </span><a href="classes/TinyFaceDetectorOptions.html" class="tsd-signature-type" data-tsd-kind="Class">TinyFaceDetectorOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/nets.ts#L44">globalApi/nets.ts:44</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Attempts to detect all faces in an image using the Tiny Face Detector.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The input image.</p>
</div></div></li><li><h5>options: <a href="classes/TinyFaceDetectorOptions.html" class="tsd-signature-type" data-tsd-kind="Class">TinyFaceDetectorOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>(optional, default: see TinyFaceDetectorOptions constructor for default parameters).</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Bounding box of each face with score.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="tinyYolov2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> tiny<wbr/>Yolov2<a href="#tinyYolov2" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">tiny<wbr/>Yolov2<span class="tsd-signature-symbol">(</span>input<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">: </span><a href="interfaces/ITinyYolov2Options.html" class="tsd-signature-type" data-tsd-kind="Interface">ITinyYolov2Options</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/globalApi/nets.ts#L53">globalApi/nets.ts:53</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Attempts to detect all faces in an image using the Tiny Yolov2 Network.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>input: <span class="tsd-signature-type">any</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The input image.</p>
</div></div></li><li><h5>options: <a href="interfaces/ITinyYolov2Options.html" class="tsd-signature-type" data-tsd-kind="Interface">ITinyYolov2Options</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>(optional, default: see TinyYolov2Options constructor for default parameters).</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/FaceDetection.html" class="tsd-signature-type" data-tsd-kind="Class">FaceDetection</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><div><p>Bounding box of each face with score.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="toNetInput" class="tsd-anchor"></a><h3 class="tsd-anchor-link">to<wbr/>Net<wbr/>Input<a href="#toNetInput" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">to<wbr/>Net<wbr/>Input<span class="tsd-signature-symbol">(</span>inputs<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/NetInput.html" class="tsd-signature-type" data-tsd-kind="Class">NetInput</a><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/dom/toNetInput.ts#L15">dom/toNetInput.ts:15</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Validates the input to make sure, they are valid net inputs and awaits all media elements
to be finished loading.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>inputs: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="classes/NetInput.html" class="tsd-signature-type" data-tsd-kind="Class">NetInput</a><span class="tsd-signature-symbol">&gt;</span></h4><div><p>A NetInput instance, which can be passed into one of the neural networks.</p>
2022-02-07 15:43:35 +01:00
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-function"><a id="validateConfig" class="tsd-anchor"></a><h3 class="tsd-anchor-link">validate<wbr/>Config<a href="#validateConfig" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">validate<wbr/>Config<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/vladmandic/face-api/blob/master/src/tinyYolov2/config.ts#L16">tinyYolov2/config.ts:16</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>config: <span class="tsd-signature-type">any</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="index.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="modules/draw.html">draw</a></li><li class=" tsd-kind-namespace"><a href="modules/utils.html">utils</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-enum"><a href="enums/Gender.html" class="tsd-kind-icon">Gender</a></li><li class="tsd-kind-class"><a href="classes/AgeGenderNet.html" class="tsd-kind-icon">Age<wbr/>Gender<wbr/>Net</a></li><li class="tsd-kind-class"><a href="classes/BoundingBox.html" class="tsd-kind-icon">Bounding<wbr/>Box</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/Box.html" class="tsd-kind-icon">Box</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComposableTask.html" class="tsd-kind-icon">Composable<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComputeAllFaceDescriptorsTask.html" class="tsd-kind-icon">Compute<wbr/>All<wbr/>Face<wbr/>Descriptors<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComputeFaceDescriptorsTaskBase.html" class="tsd-kind-icon">Compute<wbr/>Face<wbr/>Descriptors<wbr/>Task<wbr/>Base</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/ComputeSingleFaceDescriptorTask.html" class="tsd-kind-icon">Compute<wbr/>Single<wbr/>Face<wbr/>Descriptor<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/DetectAllFaceLandmarksTask.html" class="tsd-kind-icon">Detect<wbr/>All<wbr/>Face<wbr/>Landmarks<wbr/>Task</a></li><li class="tsd-kind-class"><a href="classes/DetectAllFacesTask.html" class="tsd-kind-icon">Detect<wbr/>All<wbr/>Faces<wbr/>Task</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/DetectFaceLandmarksTaskBase.html" class="tsd-kind-icon">Detect<wbr/>Face<wbr/>Landmarks<wbr/>Task<wbr/>Base</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/DetectFacesTaskBase.html" class="tsd-kind-icon">Detect<wbr/>Faces<wbr/>Task<wbr/>Base</a></li><li class="tsd-kind-class tsd-has-type-parameter"><a href="classes/DetectSingleFaceLandmarksTask.html" class="tsd-kind-icon">Detect<wbr/>Single<wbr/>Face<wbr/>Landmarks<wbr/>Task</a></li><li class="tsd-kind-class"><a href="classes/DetectSingleFaceTask.html" class="tsd-kind-icon">Detect<wbr/>Single<wbr/>Face<wbr/>Task</a></li><li class="tsd-kind-class"><a href="class