express-sweet 1.0.40 → 1.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/index.html
CHANGED
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<!--begin::Title-->
|
|
82
82
|
<h1 class="page-heading d-flex text-dark fw-bold fs-3 justify-content-center align-items-baseline my-0">
|
|
83
83
|
<!-- <h1 class="page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0"> -->
|
|
84
|
-
DevDocs<a href="#changelog" class="badge fw-semibold fs-7 px-2 ms-2 bg-body text-dark text-hover-primary shadow-sm">v1.0.
|
|
84
|
+
DevDocs<a href="#changelog" class="badge fw-semibold fs-7 px-2 ms-2 bg-body text-dark text-hover-primary shadow-sm">v1.0.41</a>
|
|
85
85
|
</h1>
|
|
86
86
|
<!--end::Title-->
|
|
87
87
|
</div>
|
|
@@ -7299,6 +7299,14 @@ await client.indexFace('MyCollection', fs.readFileSync('img.jpg&#
|
|
|
7299
7299
|
The operation returns the maximum number of faces with the highest confidence in the match.<br>
|
|
7300
7300
|
The default value is 5.
|
|
7301
7301
|
</li>
|
|
7302
|
+
<li>
|
|
7303
|
+
<code>options.throwNotFoundFaceException: boolean</code>
|
|
7304
|
+
If true, throws a <code>FaceMissingInPhoto</code> exception when a face is not found in the image; if false, returns null. Default is false.
|
|
7305
|
+
</li>
|
|
7306
|
+
<li>
|
|
7307
|
+
<code>options.throwTooManyFaceException: booleanr</code>
|
|
7308
|
+
If true, throws a <code>FacesMultipleInPhoto</code> exception when more than one face is found in the image. Default is false.
|
|
7309
|
+
</li>
|
|
7302
7310
|
</ul>
|
|
7303
7311
|
</div>
|
|
7304
7312
|
<!--end::Parameters-->
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import BoundingBox from '~/interfaces/BoundingBox';
|
|
|
4
4
|
import FaceDetails from '~/interfaces/FaceDetails';
|
|
5
5
|
import IndexFaceDetails from '~/interfaces/IndexFaceDetails';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Rekognition Client.
|
|
8
8
|
*/
|
|
9
9
|
export default class {
|
|
10
10
|
#private;
|
|
@@ -61,6 +61,8 @@ export default class {
|
|
|
61
61
|
* The maximum length is 255, and the characters that can be used are "[a-zA-Z0-9_.\-:]+".
|
|
62
62
|
* @param {boolean} options.returnDetails If false, only the face ID of the created face is returned.
|
|
63
63
|
* If true, returns the face ID of the created face, plus age range, gender, and emotion.
|
|
64
|
+
* @throws {FaceMissingInPhoto} Throws an exception if no face is found in the image.
|
|
65
|
+
* @throws {FacesMultipleInPhoto} Throws an exception if more than one face is found in the image.
|
|
64
66
|
* @return {Promise<string|IndexFaceDetails>} If options.returnDetails is false, the face identifier is returned.
|
|
65
67
|
* If options.returnDetails is true, returns the gender, age group, and emotion in addition to the face identifier.
|
|
66
68
|
*/
|
|
@@ -72,21 +74,27 @@ export default class {
|
|
|
72
74
|
* For a given input image, first detects the largest face in the image, and then searches the specified collection for matching faces.
|
|
73
75
|
* The operation compares the features of the input face with faces in the specified collection.
|
|
74
76
|
*
|
|
75
|
-
* @param {string}
|
|
76
|
-
* @param {string}
|
|
77
|
-
* @param {object}
|
|
78
|
-
* @param {number}
|
|
79
|
-
*
|
|
80
|
-
* @param {number}
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* @
|
|
84
|
-
*
|
|
85
|
-
*
|
|
77
|
+
* @param {string} collectionId ID of the collection to search.
|
|
78
|
+
* @param {string} img Image path or Data Url or image buffer.
|
|
79
|
+
* @param {object} options option.
|
|
80
|
+
* @param {number} options.minConfidence Specifies the minimum confidence in the face match to return.
|
|
81
|
+
* The default value is 80%.
|
|
82
|
+
* @param {number} options.maxFaces Maximum number of faces to return.
|
|
83
|
+
* The operation returns the maximum number of faces with the highest confidence in the match.
|
|
84
|
+
* The default value is 5.
|
|
85
|
+
* @param {boolean} options.throwNotFoundFaceException If true, throws a FaceMissingInPhoto exception when a face is not found in the image; if false, returns null. Default is false.
|
|
86
|
+
* @param {boolean} options.throwTooManyFaceException If true, throws a FacesMultipleInPhoto exception when more than one face is found in the image. Default is false.
|
|
87
|
+
* @throws {FaceMissingInPhoto} Throws an exception if options.throwNotFoundFaceException is true and no face is found in the image
|
|
88
|
+
* @throws {FacesMultipleInPhoto} Throws an exception if options.throwTooManyFaceException is true and more than one face is found in the image
|
|
89
|
+
* @return {Promise<FaceMatch[]|FaceMatch|null>} If options.maxFaces is 1, the face information found is returned.
|
|
90
|
+
* If options.maxFaces is 2 or more, the list of face information found is returned.
|
|
91
|
+
* Returns null if no face is found.
|
|
86
92
|
*/
|
|
87
93
|
searchFaces(collectionId: string, img: string, options?: {
|
|
88
94
|
minConfidence?: number;
|
|
89
95
|
maxFaces?: number;
|
|
96
|
+
throwNotFoundFaceException?: boolean;
|
|
97
|
+
throwTooManyFaceException?: boolean;
|
|
90
98
|
}): Promise<FaceMatch[] | FaceMatch | null>;
|
|
91
99
|
/**
|
|
92
100
|
* Returns metadata for faces in the specified collection.
|