1+ declare interface Options {
2+ limit : number ,
3+ prediction_count ?: number ,
4+ face_plugins ?: string ,
5+ det_prob_threshold ?: number ,
6+ status ?: boolean
7+ }
8+ declare interface FaceCollectionAddOptions {
9+ det_prob_threshold : string
10+ }
11+
12+ declare interface ServiceOptions {
13+ limit : number ,
14+ face_plugins ?: string ,
15+ det_prob_threshold ?: number ,
16+ status ?: boolean
17+ }
18+
119declare interface Detection {
2- detect < T > ( image_path : string , localOptions ?: any ) : Promise < T > ;
20+ detect < T > ( image_path : string , localOptions ?: ServiceOptions ) : Promise < T > ;
321}
422
523declare interface Verification {
6- verify < T > ( source_image_path : string , target_image_path : string , options ?: any ) : Promise < T >
24+ verify < T > ( source_image_path : string , target_image_path : string , options : ServiceOptions ) : Promise < T >
725}
826
927declare interface Recognition {
28+ recognize < T > ( image_path : string , options : Options ) : Promise < T > ;
1029 getFaceCollection ( ) : FaceCollectionFunctions ;
1130 subjectFunctions ( ) : SubjectFunctions ;
1231}
@@ -24,15 +43,15 @@ declare interface FaceCollectionFunctions {
2443 * @param {String } subject
2544 * @returns {Promise }
2645 */
27- add < T > ( image_path : string , subject : string , options ?: any ) : Promise < T > ;
46+ add < T > ( image_path : string , subject : string , options ?: FaceCollectionAddOptions ) : Promise < T > ;
2847
2948 /**
3049 * Verify face from image
3150 * @param {String } image_path
3251 * @param {String } image_id
3352 * @returns {Promise }
3453 */
35- verify < T > ( image_path : string , image_id : string , options ?: any ) : Promise < T > ,
54+ verify < T > ( image_path : string , image_id : string , options ?: Options ) : Promise < T > ,
3655
3756 /**
3857 * Delete image by id
@@ -100,7 +119,7 @@ declare interface SubjectFunctions {
100119}
101120
102121export declare class CompreFace {
103- constructor ( server : string , port : number , options ?: any ) ;
122+ constructor ( server : string , port : number , options ?: Options ) ;
104123
105124 /**
106125 * Initialize RecognitionService instance
0 commit comments