Skip to content

Remove attributes from detect request #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ base.ts
common.ts
configuration.ts
models/crop.ts
models/detect-request-attributes.ts
models/detect-request.ts
models/detect-response-all-of.ts
models/detect-response.ts
Expand Down Expand Up @@ -64,6 +63,7 @@ models/person-with-images.ts
models/person.ts
models/persons-page-all-of.ts
models/persons-page.ts
models/process-param-attributes.ts
models/process-param.ts
models/quality-config.ts
models/quality-detail.ts
Expand Down
49 changes: 25 additions & 24 deletions src/ext/extra-types/match-detection-types.ts
Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
import { DetectionQuality, FaceQualityScenarios, FaceSDKResult, ImageData } from "../../models";
import { DetectionQuality, FaceQualityScenarios, FaceSDKResult } from '../../models';
import { ImageData } from '../../models/image-data';

type TDetection = {
/**
*
*
* @type {ImageData}
* @memberof Detection
*/
'crop'?: ImageData;
crop?: ImageData;
/**
*
*
* @memberof Detection
*/
'attributes'?: {
attributes?: {
/**
*
*
* @type {Array<{ name?: string; confidence?: number; value?: any; }>}
*/
'details'?: { name?: string; confidence?: number; value?: any; }[];
details?: { name?: string; confidence?: number; value?: any }[];
/**
* The elapsed time for attribute detection.
* @type {number}
*/
'elapsedTime'?: 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>>;
landmarks: Array<Array<number>>;
/**
*
*
* @type {DetectionQuality}
* @memberof Detection
*/
'quality'?: DetectionQuality;
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>;
roi: Array<number>;
/**
* Base64 of the cropped portrait.
* @type {string}
* @memberof Detection
*/
'thumbnail'?: string;
}
thumbnail?: string;
};

export type TDetectResponse = {
export type TDetectResponse = {
results?: {
/**
*
*
* @type {Array<Detection>}
* @memberof DetectResult
*/
'detections': Array<TDetection>;
detections: Array<TDetection>;
/**
* Internal.
* @type {number}
* @memberof DetectResult
*/
'detectorType'?: number;
detectorType?: number;
/**
* Internal.
* @type {number}
* @memberof DetectResult
*/
'landmarksType'?: number;
landmarksType?: number;
/**
*
*
* @type {FaceQualityScenarios}
* @memberof DetectResult
*/
'scenario'?: FaceQualityScenarios;
scenario?: FaceQualityScenarios;
/**
* The total time taken for the detection.
* @type {number}
* @memberof DetectResult
*/
'timer'?: number;
}
} & FaceSDKResult;
timer?: number;
};
} & FaceSDKResult;
7 changes: 0 additions & 7 deletions src/models/detect-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/


import { DetectRequestAttributes } from './detect-request-attributes';
import { ProcessParam } from './process-param';
import { ImageData } from './image-data';

Expand Down Expand Up @@ -47,11 +46,5 @@ export interface DetectRequest {
* @memberof DetectRequest
*/
'thumbnails'?: boolean;
/**
*
* @type {DetectRequestAttributes}
* @memberof DetectRequest
*/
'attributes'?: DetectRequestAttributes;
}

3 changes: 1 addition & 2 deletions src/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export * from './crop';
export * from './detect-request';
export * from './detect-request-attributes';
export * from './detect-response';
export * from './detect-response-all-of';
export * from './detect-result';
Expand All @@ -25,7 +24,6 @@ export * from './group-page';
export * from './group-page-all-of';
export * from './group-to-create';
export * from './image';
export * from './image-data';
export * from './image-fields';
export * from './image-fields-image';
export * from './image-page';
Expand Down Expand Up @@ -55,6 +53,7 @@ export * from './person-with-images-all-of';
export * from './persons-page';
export * from './persons-page-all-of';
export * from './process-param';
export * from './process-param-attributes';
export * from './quality-config';
export * from './quality-detail';
export * from './quality-details-groups';
Expand Down
31 changes: 31 additions & 0 deletions src/models/process-param-attributes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* tslint:disable */
/* eslint-disable */
/**
* Regula FaceSDK Web API
* Regula FaceSDK Web API # Clients * [JavaScript](https://github.com/regulaforensics/FaceSDK-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/FaceSDK-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/FaceSDK-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/FaceSDK-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 5.2.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


import { QualityConfig } from './quality-config';

/**
* Whether to evaluate attributes, such as age and emotions.
* @export
* @interface ProcessParamAttributes
*/
export interface ProcessParamAttributes {
/**
*
* @type {Array<QualityConfig>}
* @memberof ProcessParamAttributes
*/
'config'?: Array<QualityConfig>;
}

7 changes: 4 additions & 3 deletions src/models/process-param.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import { FaceQualityScenarios } from './face-quality-scenarios';
import { OutputImageParams } from './output-image-params';
import { ProcessParamAttributes } from './process-param-attributes';
import { QualityRequest } from './quality-request';

/**
Expand Down Expand Up @@ -48,10 +49,10 @@ export interface ProcessParam {
*/
'quality'?: QualityRequest;
/**
* Whether to evaluate attributes, such as age and emotions.
* @type {boolean}
*
* @type {ProcessParamAttributes}
* @memberof ProcessParam
*/
'attributes'?: boolean;
'attributes'?: ProcessParamAttributes;
}

8 changes: 1 addition & 7 deletions src/models/transaction-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,12 @@ export interface TransactionInfo {
* @memberof TransactionInfo
*/
'video'?: string;
/**
* List of base64 images
* @type {Array<string>}
* @memberof TransactionInfo
*/
'images'?: Array<string>;
/**
* Approximate age with an accuracy of +/-3 years.
* @type {number}
* @memberof TransactionInfo
*/
'estimatedAge'?: number;
'age'?: number;
/**
* Link to the portrait.
* @type {string}
Expand Down