azure_cognitiveservices_computervision 0.16.0
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.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision.rb +63 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/computer_vision_client.rb +2173 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/adult_info.rb +83 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/azure_regions.rb +26 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/category.rb +69 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/category_detail.rb +56 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/celebrities_model.rb +69 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/color_info.rb +98 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error.rb +75 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/computer_vision_error_codes.rb +27 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/details.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_model_results.rb +80 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/domain_models.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_description.rb +70 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/face_rectangle.rb +79 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_analysis.rb +169 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_caption.rb +57 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description.rb +99 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_description_details.rb +99 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_metadata.rb +68 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_tag.rb +57 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_type.rb +57 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/image_url.rb +47 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/language1.rb +16 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/line.rb +86 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/list_models_result.rb +56 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/model_description.rb +65 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_languages.rb +41 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_line.rb +72 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_region.rb +72 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_result.rb +104 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/ocr_word.rb +62 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/recognition_result.rb +56 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/tag_result.rb +79 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_result.rb +62 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb +18 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/visual_feature_types.rb +21 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/models/word.rb +66 -0
- data/lib/1.0/generated/azure_cognitiveservices_computervision/module_definition.rb +9 -0
- data/lib/azure_cognitiveservices_computervision.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/computervision_latest_profile_client.rb +38 -0
- data/lib/profiles/latest/computervision_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/computervision_profile_module.rb +201 -0
- data/lib/version.rb +7 -0
- metadata +166 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Information on a recognized word.
|
10
|
+
#
|
11
|
+
class OcrWord
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Bounding box of a recognized word. The four integers
|
16
|
+
# represent the x-coordinate of the left edge, the y-coordinate of the
|
17
|
+
# top edge, width, and height of the bounding box, in the coordinate
|
18
|
+
# system of the input image, after it has been rotated around its center
|
19
|
+
# according to the detected text angle (see textAngle property), with the
|
20
|
+
# origin at the top-left corner, and the y-axis pointing down.
|
21
|
+
attr_accessor :bounding_box
|
22
|
+
|
23
|
+
# @return [String] String value of a recognized word.
|
24
|
+
attr_accessor :text
|
25
|
+
|
26
|
+
|
27
|
+
#
|
28
|
+
# Mapper for OcrWord class as Ruby Hash.
|
29
|
+
# This will be used for serialization/deserialization.
|
30
|
+
#
|
31
|
+
def self.mapper()
|
32
|
+
{
|
33
|
+
client_side_validation: true,
|
34
|
+
required: false,
|
35
|
+
serialized_name: 'OcrWord',
|
36
|
+
type: {
|
37
|
+
name: 'Composite',
|
38
|
+
class_name: 'OcrWord',
|
39
|
+
model_properties: {
|
40
|
+
bounding_box: {
|
41
|
+
client_side_validation: true,
|
42
|
+
required: false,
|
43
|
+
serialized_name: 'boundingBox',
|
44
|
+
type: {
|
45
|
+
name: 'String'
|
46
|
+
}
|
47
|
+
},
|
48
|
+
text: {
|
49
|
+
client_side_validation: true,
|
50
|
+
required: false,
|
51
|
+
serialized_name: 'text',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class RecognitionResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<Line>]
|
17
|
+
attr_accessor :lines
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for RecognitionResult class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
client_side_validation: true,
|
27
|
+
required: false,
|
28
|
+
serialized_name: 'RecognitionResult',
|
29
|
+
type: {
|
30
|
+
name: 'Composite',
|
31
|
+
class_name: 'RecognitionResult',
|
32
|
+
model_properties: {
|
33
|
+
lines: {
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'lines',
|
37
|
+
type: {
|
38
|
+
name: 'Sequence',
|
39
|
+
element: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'LineElementType',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'Line'
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The results of a image tag operation, including any tags and image
|
10
|
+
# metadata.
|
11
|
+
#
|
12
|
+
class TagResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<ImageTag>] A list of tags with confidence level.
|
17
|
+
attr_accessor :tags
|
18
|
+
|
19
|
+
# @return [String] Id of the REST API request.
|
20
|
+
attr_accessor :request_id
|
21
|
+
|
22
|
+
# @return [ImageMetadata] Image metadata
|
23
|
+
attr_accessor :metadata
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for TagResult class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
client_side_validation: true,
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'TagResult',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'TagResult',
|
38
|
+
model_properties: {
|
39
|
+
tags: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'tags',
|
43
|
+
type: {
|
44
|
+
name: 'Sequence',
|
45
|
+
element: {
|
46
|
+
client_side_validation: true,
|
47
|
+
required: false,
|
48
|
+
serialized_name: 'ImageTagElementType',
|
49
|
+
type: {
|
50
|
+
name: 'Composite',
|
51
|
+
class_name: 'ImageTag'
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
},
|
56
|
+
request_id: {
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
serialized_name: 'requestId',
|
60
|
+
type: {
|
61
|
+
name: 'String'
|
62
|
+
}
|
63
|
+
},
|
64
|
+
metadata: {
|
65
|
+
client_side_validation: true,
|
66
|
+
required: false,
|
67
|
+
serialized_name: 'metadata',
|
68
|
+
type: {
|
69
|
+
name: 'Composite',
|
70
|
+
class_name: 'ImageMetadata'
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class TextOperationResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [TextOperationStatusCodes] Status of the text operation.
|
17
|
+
# Possible values include: 'Not Started', 'Running', 'Failed',
|
18
|
+
# 'Succeeded'
|
19
|
+
attr_accessor :status
|
20
|
+
|
21
|
+
# @return [RecognitionResult]
|
22
|
+
attr_accessor :recognition_result
|
23
|
+
|
24
|
+
|
25
|
+
#
|
26
|
+
# Mapper for TextOperationResult class as Ruby Hash.
|
27
|
+
# This will be used for serialization/deserialization.
|
28
|
+
#
|
29
|
+
def self.mapper()
|
30
|
+
{
|
31
|
+
client_side_validation: true,
|
32
|
+
required: false,
|
33
|
+
serialized_name: 'TextOperationResult',
|
34
|
+
type: {
|
35
|
+
name: 'Composite',
|
36
|
+
class_name: 'TextOperationResult',
|
37
|
+
model_properties: {
|
38
|
+
status: {
|
39
|
+
client_side_validation: true,
|
40
|
+
required: false,
|
41
|
+
serialized_name: 'status',
|
42
|
+
type: {
|
43
|
+
name: 'Enum',
|
44
|
+
module: 'TextOperationStatusCodes'
|
45
|
+
}
|
46
|
+
},
|
47
|
+
recognition_result: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
serialized_name: 'recognitionResult',
|
51
|
+
type: {
|
52
|
+
name: 'Composite',
|
53
|
+
class_name: 'RecognitionResult'
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
data/lib/1.0/generated/azure_cognitiveservices_computervision/models/text_operation_status_codes.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for TextOperationStatusCodes
|
10
|
+
#
|
11
|
+
module TextOperationStatusCodes
|
12
|
+
NotStarted = "Not Started"
|
13
|
+
Running = "Running"
|
14
|
+
Failed = "Failed"
|
15
|
+
Succeeded = "Succeeded"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for VisualFeatureTypes
|
10
|
+
#
|
11
|
+
module VisualFeatureTypes
|
12
|
+
ImageType = "ImageType"
|
13
|
+
Faces = "Faces"
|
14
|
+
Adult = "Adult"
|
15
|
+
Categories = "Categories"
|
16
|
+
Color = "Color"
|
17
|
+
Tags = "Tags"
|
18
|
+
Description = "Description"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::CognitiveServices::ComputerVision::V1_0
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Model object.
|
10
|
+
#
|
11
|
+
#
|
12
|
+
class Word
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<Integer>]
|
17
|
+
attr_accessor :bounding_box
|
18
|
+
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :text
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for Word class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'Word',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'Word',
|
35
|
+
model_properties: {
|
36
|
+
bounding_box: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'boundingBox',
|
40
|
+
type: {
|
41
|
+
name: 'Sequence',
|
42
|
+
element: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'NumberElementType',
|
46
|
+
type: {
|
47
|
+
name: 'Number'
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
text: {
|
53
|
+
client_side_validation: true,
|
54
|
+
required: false,
|
55
|
+
serialized_name: 'text',
|
56
|
+
type: {
|
57
|
+
name: 'String'
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::CognitiveServices end
|
8
|
+
module Azure::CognitiveServices::ComputerVision end
|
9
|
+
module Azure::CognitiveServices::ComputerVision::V1_0 end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require '1.0/generated/azure_cognitiveservices_computervision'
|
6
|
+
require 'profiles/latest/computervision_latest_profile_client'
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::CognitiveServices end
|
7
|
+
module Azure::CognitiveServices::ComputerVision end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
require 'profiles/latest/computervision_module_definition'
|
6
|
+
require 'profiles/latest/modules/computervision_profile_module'
|
7
|
+
|
8
|
+
module Azure::ComputerVision::Profiles::Latest
|
9
|
+
#
|
10
|
+
# Client class for the Latest profile SDK.
|
11
|
+
#
|
12
|
+
class Client < ComputerVisionDataClass
|
13
|
+
include MsRestAzure::Common::Configurable
|
14
|
+
|
15
|
+
#
|
16
|
+
# Initializes a new instance of the Client class.
|
17
|
+
# @param options [Hash] hash of client options.
|
18
|
+
# options = {
|
19
|
+
# tenant_id: 'YOUR TENANT ID',
|
20
|
+
# client_id: 'YOUR CLIENT ID',
|
21
|
+
# client_secret: 'YOUR CLIENT SECRET',
|
22
|
+
# subscription_id: 'YOUR SUBSCRIPTION ID',
|
23
|
+
# credentials: credentials,
|
24
|
+
# active_directory_settings: active_directory_settings,
|
25
|
+
# base_url: 'YOUR BASE URL',
|
26
|
+
# options: options
|
27
|
+
# }
|
28
|
+
# 'credentials' are optional and if not passed in the hash, will be obtained
|
29
|
+
# from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
|
30
|
+
#
|
31
|
+
# Also, base_url, active_directory_settings & options are optional.
|
32
|
+
#
|
33
|
+
def initialize(options = {})
|
34
|
+
super(options)
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
module Azure end
|
6
|
+
module Azure::ComputerVision end
|
7
|
+
module Azure::ComputerVision::Profiles end
|
8
|
+
module Azure::ComputerVision::Profiles::Latest end
|