-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SP-11788 - fix detection model through extra types
- Loading branch information
1 parent
4ea834d
commit 7923c8a
Showing
3 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { DetectionQuality, FaceQualityScenarios, FaceSDKResult, ImageData } from "../../models"; | ||
|
||
type TDetection = { | ||
/** | ||
* | ||
* @type {ImageData} | ||
* @memberof Detection | ||
*/ | ||
'crop'?: ImageData; | ||
/** | ||
* | ||
* @memberof Detection | ||
*/ | ||
'attributes'?: { | ||
/** | ||
* | ||
* @type {Array<{ name?: string; confidence?: number; value?: any; }>} | ||
*/ | ||
'details'?: { name?: string; confidence?: number; value?: any; }[]; | ||
/** | ||
* The elapsed time for attribute detection. | ||
* @type {number} | ||
*/ | ||
'elapsedTime'?: number; | ||
}; | ||
/** | ||
* Absolute coordinates (x,y) of five points of each detected face: left eye, right eye, nose, left point of lips, right point of lips. | ||
* @type {Array<Array<number>>} | ||
* @memberof Detection | ||
*/ | ||
'landmarks': Array<Array<number>>; | ||
/** | ||
* | ||
* @type {DetectionQuality} | ||
* @memberof Detection | ||
*/ | ||
'quality'?: DetectionQuality; | ||
/** | ||
* The rectangular area of a detected face that is represented by a set of four elements: the X and Y coordinates of the top-left point, and the width and height dimensions of the rectangle. | ||
* @type {Array<number>} | ||
* @memberof Detection | ||
*/ | ||
'roi': Array<number>; | ||
/** | ||
* Base64 of the cropped portrait. | ||
* @type {string} | ||
* @memberof Detection | ||
*/ | ||
'thumbnail'?: string; | ||
} | ||
|
||
export type TDetectResponse = { | ||
results?: { | ||
/** | ||
* | ||
* @type {Array<Detection>} | ||
* @memberof DetectResult | ||
*/ | ||
'detections': Array<TDetection>; | ||
/** | ||
* Internal. | ||
* @type {number} | ||
* @memberof DetectResult | ||
*/ | ||
'detectorType'?: number; | ||
/** | ||
* Internal. | ||
* @type {number} | ||
* @memberof DetectResult | ||
*/ | ||
'landmarksType'?: number; | ||
/** | ||
* | ||
* @type {FaceQualityScenarios} | ||
* @memberof DetectResult | ||
*/ | ||
'scenario'?: FaceQualityScenarios; | ||
/** | ||
* The total time taken for the detection. | ||
* @type {number} | ||
* @memberof DetectResult | ||
*/ | ||
'timer'?: number; | ||
} | ||
} & FaceSDKResult; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters