You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/cognitiveservices/Vision.ImageAnalysis/models.tsp
+28Lines changed: 28 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,34 @@ import "@typespec/http";
3
3
namespaceImageAnalysis;
4
4
usingTypeSpec.Http;
5
5
6
+
modelSharedAnalyzeQuery {
7
+
@query({
8
+
name:"features",
9
+
format:"csv",
10
+
})
11
+
@doc("A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Tags, Caption, DenseCaptions, Objects, Read, SmartCrops, People. If VisualFeatures is not specified, then Categories, Tags, and Description are included in the response by default.")
12
+
visualFeatures?:Array<visualFeatures>;
13
+
14
+
@query("model-name")
15
+
@doc("The name of the custom trained model. This parameter needs to be specified if the parameter \"features\" is not specified.")
16
+
modelName?:string;
17
+
18
+
@query("language")
19
+
@doc("The desired language for output generation. If this parameter is not specified, the default value is \"en\". See https://aka.ms/cv-languages for a list of supported languages.")
20
+
language?:string="en";
21
+
22
+
@query({
23
+
name:"smartcrops-aspect-ratios",
24
+
format:"csv"
25
+
})
26
+
@doc("A list of aspect ratios to use for smartCrops feature. Aspect ratios are calculated by dividing the target crop width by the height. Supported values are between 0.75 and 1.8 (inclusive). Multiple values should be comma-separated. If this parameter is not specified, the service will return one crop suggestion with an aspect ratio it sees fit between 0.5 and 2.0 (inclusive).")
27
+
smartCropsAspectRatios?:Array<float64>;
28
+
29
+
@query("gender-neutral-caption")
30
+
@doc("Boolean flag for enabling gender-neutral captioning for caption and denseCaptions features. If this parameter is not specified, the default value is \"false\".")
Copy file name to clipboardExpand all lines: specification/cognitiveservices/Vision.ImageAnalysis/routes.tsp
+3-51Lines changed: 3 additions & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -23,36 +23,12 @@ namespace ImageAnalysis;
23
23
@action("analyze")
24
24
opanalyzeFromStreamisAzure.Core.RpcOperation<
25
25
{
26
-
@query({
27
-
name:"features",
28
-
format:"csv",
29
-
})
30
-
@doc("A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Tags, Caption, DenseCaptions, Objects, Read, SmartCrops, People. If VisualFeatures is not specified, then Categories, Tags, and Description are included in the response by default.")
31
-
visualFeatures?:Array<visualFeatures>;
26
+
...SharedAnalyzeQuery,
32
27
33
28
@doc("The format of the HTTP payload.")
34
29
@header()
35
30
contentType:"application/octet-stream";
36
31
37
-
@query("model-name")
38
-
@doc("The name of the custom trained model. This parameter needs to be specified if the parameter \"features\" is not specified.")
39
-
modelName?:string;
40
-
41
-
@query("language")
42
-
@doc("The desired language for output generation. If this parameter is not specified, the default value is \"en\". See https://aka.ms/cv-languages for a list of supported languages.")
43
-
language?:string="en";
44
-
45
-
@query({
46
-
name:"smartcrops-aspect-ratios",
47
-
format:"csv"
48
-
})
49
-
@doc("A list of aspect ratios to use for smartCrops feature. Aspect ratios are calculated by dividing the target crop width by the height. Supported values are between 0.75 and 1.8 (inclusive). Multiple values should be comma-separated. If this parameter is not specified, the service will return one crop suggestion with an aspect ratio it sees fit between 0.5 and 2.0 (inclusive).")
50
-
smartCropsAspectRatios?:Array<float64>;
51
-
52
-
@query("gender-neutral-caption")
53
-
@doc("Boolean flag for enabling gender-neutral captioning for caption and denseCaptions features. If this parameter is not specified, the default value is \"false\".")
54
-
genderNeutralCaption?:boolean=false;
55
-
56
32
@doc("The image to be analyzed")
57
33
@body
58
34
imageContents:bytes;
@@ -68,36 +44,12 @@ op analyzeFromStream is Azure.Core.RpcOperation<
68
44
@action("analyze")
69
45
opanalyzeFromUrlisAzure.Core.RpcOperation<
70
46
{
47
+
...SharedAnalyzeQuery,
48
+
71
49
@doc("The format of the HTTP payload.")
72
50
@header("Content-Type")
73
51
contentType:"application/json";
74
52
75
-
@query({
76
-
name:"features",
77
-
format:"csv",
78
-
})
79
-
@doc("A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include: Categories, Tags, Description, Faces, ImageType, Color, Adult, Brands, Objects, and Celebrities. If VisualFeatures is not specified, then Categories, Tags, and Description are included in the response by default.")
80
-
visualFeatures?:Array<visualFeatures>;
81
-
82
-
@query("model-name")
83
-
@doc("The name of the custom trained model. This parameter needs to be specified if the parameter \"features\" is not specified.")
84
-
modelName?:string;
85
-
86
-
@query("language")
87
-
@doc("The desired language for output generation. If this parameter is not specified, the default value is \"en\". See https://aka.ms/cv-languages for a list of supported languages.")
88
-
language?:string="en";
89
-
90
-
@query({
91
-
name:"smartcrops-aspect-ratios",
92
-
format:"csv"
93
-
})
94
-
@doc("A list of aspect ratios to use for smartCrops feature. Aspect ratios are calculated by dividing the target crop width by the height. Supported values are between 0.75 and 1.8 (inclusive). Multiple values should be comma-separated. If this parameter is not specified, the service will return one crop suggestion with an aspect ratio it sees fit between 0.5 and 2.0 (inclusive).")
95
-
smartCropsAspectRatios?:Array<float64>;
96
-
97
-
@query("gender-neutral-caption")
98
-
@doc("Boolean flag for enabling gender-neutral captioning for caption and denseCaptions features. If this parameter is not specified, the default value is \"false\".")
0 commit comments