Skip to content
This repository was archived by the owner on May 5, 2023. It is now read-only.
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
2 changes: 1 addition & 1 deletion lib/services/computerVision/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 Microsoft
Copyright (c) 2019 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1,386 changes: 871 additions & 515 deletions lib/services/computerVision/lib/computerVisionClient.d.ts

Large diffs are not rendered by default.

3,524 changes: 2,295 additions & 1,229 deletions lib/services/computerVision/lib/computerVisionClient.js

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions lib/services/computerVision/lib/models/adultInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@
class AdultInfo {
/**
* Create a AdultInfo.
* @member {boolean} [isAdultContent] A value indicating if the image
* @property {boolean} [isAdultContent] A value indicating if the image
* contains adult-oriented content.
* @member {boolean} [isRacyContent] A value indicating if the image is race.
* @member {number} [adultScore] Score from 0 to 1 that indicates how much of
* adult content is within the image.
* @member {number} [racyScore] Score from 0 to 1 that indicates how
* @property {boolean} [isRacyContent] A value indicating if the image is
* racy.
* @property {number} [adultScore] Score from 0 to 1 that indicates how much
* the content is considered adult-oriented within the image.
* @property {number} [racyScore] Score from 0 to 1 that indicates how
* suggestive is the image.
*/
constructor() {
Expand Down
84 changes: 84 additions & 0 deletions lib/services/computerVision/lib/models/areaOfInterestResult.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Result of AreaOfInterest operation.
*
*/
class AreaOfInterestResult {
/**
* Create a AreaOfInterestResult.
* @property {object} [areaOfInterest] A bounding box for an area of interest
* inside an image.
* @property {number} [areaOfInterest.x] X-coordinate of the top left point
* of the area, in pixels.
* @property {number} [areaOfInterest.y] Y-coordinate of the top left point
* of the area, in pixels.
* @property {number} [areaOfInterest.w] Width measured from the top-left
* point of the area, in pixels.
* @property {number} [areaOfInterest.h] Height measured from the top-left
* point of the area, in pixels.
* @property {string} [requestId] Id of the REST API request.
* @property {object} [metadata]
* @property {number} [metadata.width] Image width, in pixels.
* @property {number} [metadata.height] Image height, in pixels.
* @property {string} [metadata.format] Image format.
*/
constructor() {
}

/**
* Defines the metadata of AreaOfInterestResult
*
* @returns {object} metadata of AreaOfInterestResult
*
*/
mapper() {
return {
required: false,
serializedName: 'AreaOfInterestResult',
type: {
name: 'Composite',
className: 'AreaOfInterestResult',
modelProperties: {
areaOfInterest: {
required: false,
readOnly: true,
serializedName: 'areaOfInterest',
type: {
name: 'Composite',
className: 'BoundingRect'
}
},
requestId: {
required: false,
nullable: true,
serializedName: 'requestId',
type: {
name: 'String'
}
},
metadata: {
required: false,
serializedName: 'metadata',
type: {
name: 'Composite',
className: 'ImageMetadata'
}
}
}
}
};
}
}

module.exports = AreaOfInterestResult;
84 changes: 84 additions & 0 deletions lib/services/computerVision/lib/models/boundingRect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* A bounding box for an area inside an image.
*
*/
class BoundingRect {
/**
* Create a BoundingRect.
* @property {number} [x] X-coordinate of the top left point of the area, in
* pixels.
* @property {number} [y] Y-coordinate of the top left point of the area, in
* pixels.
* @property {number} [w] Width measured from the top-left point of the area,
* in pixels.
* @property {number} [h] Height measured from the top-left point of the
* area, in pixels.
*/
constructor() {
}

/**
* Defines the metadata of BoundingRect
*
* @returns {object} metadata of BoundingRect
*
*/
mapper() {
return {
required: false,
serializedName: 'BoundingRect',
type: {
name: 'Composite',
className: 'BoundingRect',
modelProperties: {
x: {
required: false,
nullable: false,
serializedName: 'x',
type: {
name: 'Number'
}
},
y: {
required: false,
nullable: false,
serializedName: 'y',
type: {
name: 'Number'
}
},
w: {
required: false,
nullable: false,
serializedName: 'w',
type: {
name: 'Number'
}
},
h: {
required: false,
nullable: false,
serializedName: 'h',
type: {
name: 'Number'
}
}
}
}
};
}
}

module.exports = BoundingRect;
11 changes: 6 additions & 5 deletions lib/services/computerVision/lib/models/category.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
class Category {
/**
* Create a Category.
* @member {string} [name] Name of the category.
* @member {number} [score] Scoring of the category.
* @member {object} [detail]
* @member {array} [detail.celebrities] An array of celebrities if any
* @property {string} [name] Name of the category.
* @property {number} [score] Scoring of the category.
* @property {object} [detail] Details of the identified category.
* @property {array} [detail.celebrities] An array of celebrities if any
* identified.
* @member {array} [detail.landmarks] An array of landmarks if any
* @property {array} [detail.landmarks] An array of landmarks if any
* identified.
*/
constructor() {
Expand All @@ -44,6 +44,7 @@ class Category {
modelProperties: {
name: {
required: false,
nullable: true,
serializedName: 'name',
type: {
name: 'String'
Expand Down
6 changes: 4 additions & 2 deletions lib/services/computerVision/lib/models/categoryDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
class CategoryDetail {
/**
* Create a CategoryDetail.
* @member {array} [celebrities] An array of celebrities if any identified.
* @member {array} [landmarks] An array of landmarks if any identified.
* @property {array} [celebrities] An array of celebrities if any identified.
* @property {array} [landmarks] An array of landmarks if any identified.
*/
constructor() {
}
Expand All @@ -39,6 +39,7 @@ class CategoryDetail {
modelProperties: {
celebrities: {
required: false,
nullable: true,
serializedName: 'celebrities',
type: {
name: 'Sequence',
Expand All @@ -54,6 +55,7 @@ class CategoryDetail {
},
landmarks: {
required: false,
nullable: true,
serializedName: 'landmarks',
type: {
name: 'Sequence',
Expand Down
25 changes: 14 additions & 11 deletions lib/services/computerVision/lib/models/celebritiesModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,19 @@
class CelebritiesModel {
/**
* Create a CelebritiesModel.
* @member {string} [name] Name of the celebrity.
* @member {number} [confidence] Level of confidence ranging from 0 to 1.
* @member {object} [faceRectangle]
* @member {number} [faceRectangle.left] X-coordinate of the top left point
* of the face.
* @member {number} [faceRectangle.top] Y-coordinate of the top left point of
* the face.
* @member {number} [faceRectangle.width] Width measured from the top-left
* point of the face.
* @member {number} [faceRectangle.height] Height measured from the top-left
* point of the face.
* @property {string} [name] Name of the celebrity.
* @property {number} [confidence] Confidence level for the celebrity
* recognition as a value ranging from 0 to 1.
* @property {object} [faceRectangle] Location of the identified face in the
* image.
* @property {number} [faceRectangle.left] X-coordinate of the top left point
* of the face, in pixels.
* @property {number} [faceRectangle.top] Y-coordinate of the top left point
* of the face, in pixels.
* @property {number} [faceRectangle.width] Width measured from the top-left
* point of the face, in pixels.
* @property {number} [faceRectangle.height] Height measured from the
* top-left point of the face, in pixels.
*/
constructor() {
}
Expand All @@ -48,6 +50,7 @@ class CelebritiesModel {
modelProperties: {
name: {
required: false,
nullable: true,
serializedName: 'name',
type: {
name: 'String'
Expand Down
17 changes: 10 additions & 7 deletions lib/services/computerVision/lib/models/celebrityResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
'use strict';

/**
* List of celebrities recognized in the image.
* Result of domain-specific classifications for the domain of celebrities.
*
*/
class CelebrityResults {
/**
* Create a CelebrityResults.
* @member {array} [celebrities]
* @member {string} [requestId] Id of the REST API request.
* @member {object} [metadata]
* @member {number} [metadata.width] Image width
* @member {number} [metadata.height] Image height
* @member {string} [metadata.format] Image format
* @property {array} [celebrities] List of celebrities recognized in the
* image.
* @property {string} [requestId] Id of the REST API request.
* @property {object} [metadata]
* @property {number} [metadata.width] Image width, in pixels.
* @property {number} [metadata.height] Image height, in pixels.
* @property {string} [metadata.format] Image format.
*/
constructor() {
}
Expand All @@ -43,6 +44,7 @@ class CelebrityResults {
modelProperties: {
celebrities: {
required: false,
nullable: true,
serializedName: 'celebrities',
type: {
name: 'Sequence',
Expand All @@ -58,6 +60,7 @@ class CelebrityResults {
},
requestId: {
required: false,
nullable: true,
serializedName: 'requestId',
type: {
name: 'String'
Expand Down
14 changes: 9 additions & 5 deletions lib/services/computerVision/lib/models/colorInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
class ColorInfo {
/**
* Create a ColorInfo.
* @member {string} [dominantColorForeground] Possible dominant foreground
* @property {string} [dominantColorForeground] Possible dominant foreground
* color.
* @member {string} [dominantColorBackground] Possible dominant background
* @property {string} [dominantColorBackground] Possible dominant background
* color.
* @member {array} [dominantColors] An array of possible dominant colors.
* @member {string} [accentColor] Possible accent color.
* @member {boolean} [isBWImg] A value indicating if the image is black and
* @property {array} [dominantColors] An array of possible dominant colors.
* @property {string} [accentColor] Possible accent color.
* @property {boolean} [isBWImg] A value indicating if the image is black and
* white.
*/
constructor() {
Expand All @@ -45,20 +45,23 @@ class ColorInfo {
modelProperties: {
dominantColorForeground: {
required: false,
nullable: true,
serializedName: 'dominantColorForeground',
type: {
name: 'String'
}
},
dominantColorBackground: {
required: false,
nullable: true,
serializedName: 'dominantColorBackground',
type: {
name: 'String'
}
},
dominantColors: {
required: false,
nullable: true,
serializedName: 'dominantColors',
type: {
name: 'Sequence',
Expand All @@ -73,6 +76,7 @@ class ColorInfo {
},
accentColor: {
required: false,
nullable: true,
serializedName: 'accentColor',
type: {
name: 'String'
Expand Down
Loading