Skip to content

Commit c91202d

Browse files
committed
generate Visual Recogntion
1 parent 69efd84 commit c91202d

20 files changed

+158
-51
lines changed

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/IVisualRecognitionService.cs

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,48 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3
2222
{
2323
public partial interface IVisualRecognitionService
2424
{
25-
ClassifiedImages Classify(System.IO.Stream imagesFile = null, string acceptLanguage = null, string url = null, float? threshold = null, List<string> owners = null, List<string> classifierIds = null, string imagesFileContentType = null);
26-
DetectedFaces DetectFaces(System.IO.Stream imagesFile = null, string url = null, string imagesFileContentType = null);
27-
28-
object DeleteClassifier(string classifierId);
29-
30-
Classifier GetClassifier(string classifierId);
31-
32-
Classifiers ListClassifiers(bool? verbose = null);
25+
/// <summary>
26+
/// Classify images. Classify images with built-in or custom classifiers.
27+
/// </summary>
28+
/// <param name="imagesFile">An image file (.jpg, .png) or .zip file with images. Maximum image size is 10 MB. Include no more than 20 images and limit the .zip file to 100 MB. Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters. You can also include an image with the **url** parameter. (optional)</param>
29+
/// <param name="acceptLanguage">The language of the output class names. The full set of languages is supported only for the built-in `default` classifier ID. The class names of custom classifiers are not translated. The response might not be in the specified language when the requested language is not supported or when there is no translation for the class name. (optional, default to en)</param>
30+
/// <param name="url">The URL of an image to analyze. Must be in .jpg, or .png format. The minimum recommended pixel density is 32X32 pixels per inch, and the maximum image size is 10 MB. You can also include images with the **images_file** parameter. (optional)</param>
31+
/// <param name="threshold">The minimum score a class must have to be displayed in the response. Set the threshold to `0.0` to ignore the classification score and return all values. (optional, default to 0.5)</param>
32+
/// <param name="owners">The categories of classifiers to apply. Use `IBM` to classify against the `default` general classifier, and use `me` to classify against your custom classifiers. To analyze the image against both classifier categories, set the value to both `IBM` and `me`. The built-in `default` classifier is used if both **classifier_ids** and **owners** parameters are empty. The **classifier_ids** parameter overrides **owners**, so make sure that **classifier_ids** is empty. (optional)</param>
33+
/// <param name="classifierIds">Which classifiers to apply. Overrides the **owners** parameter. You can specify both custom and built-in classifier IDs. The built-in `default` classifier is used if both **classifier_ids** and **owners** parameters are empty. The following built-in classifier IDs require no training: - `default`: Returns classes from thousands of general tags. - `food`: (Beta) Enhances specificity and accuracy for images of food items. - `explicit`: (Beta) Evaluates whether the image might be pornographic. (optional)</param>
34+
/// <param name="imagesFileContentType">The content type of imagesFile. (optional)</param>
35+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
36+
/// <returns><see cref="ClassifiedImages" />ClassifiedImages</returns>
37+
ClassifiedImages Classify(System.IO.Stream imagesFile = null, string acceptLanguage = null, string url = null, float? threshold = null, List<string> owners = null, List<string> classifierIds = null, string imagesFileContentType = null, Dictionary<string, object> customData = null);
38+
/// <summary>
39+
/// Detect faces in images. **Important:** On April 2, 2018, the identity information in the response to calls to the Face model was removed. The identity information refers to the `name` of the person, `score`, and `type_hierarchy` knowledge graph. For details about the enhanced Face model, see the [Release notes](https://console.bluemix.net/docs/services/visual-recognition/release-notes.html#2april2018). Analyze and get data about faces in images. Responses can include estimated age and gender. This feature uses a built-in model, so no training is necessary. The Detect faces method does not support general biometric facial recognition. Supported image formats include .gif, .jpg, .png, and .tif. The maximum image size is 10 MB. The minimum recommended pixel density is 32X32 pixels per inch.
40+
/// </summary>
41+
/// <param name="imagesFile">An image file (gif, .jpg, .png, .tif.) or .zip file with images. Limit the .zip file to 100 MB. You can include a maximum of 15 images in a request. Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters. You can also include an image with the **url** parameter. (optional)</param>
42+
/// <param name="url">The URL of an image to analyze. Must be in .gif, .jpg, .png, or .tif format. The minimum recommended pixel density is 32X32 pixels per inch, and the maximum image size is 10 MB. Redirects are followed, so you can use a shortened URL. You can also include images with the **images_file** parameter. (optional)</param>
43+
/// <param name="imagesFileContentType">The content type of imagesFile. (optional)</param>
44+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
45+
/// <returns><see cref="DetectedFaces" />DetectedFaces</returns>
46+
DetectedFaces DetectFaces(System.IO.Stream imagesFile = null, string url = null, string imagesFileContentType = null, Dictionary<string, object> customData = null);
47+
/// <summary>
48+
/// Delete a classifier.
49+
/// </summary>
50+
/// <param name="classifierId">The ID of the classifier.</param>
51+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
52+
/// <returns><see cref="BaseModel" />BaseModel</returns>
53+
BaseModel DeleteClassifier(string classifierId, Dictionary<string, object> customData = null);
54+
/// <summary>
55+
/// Retrieve classifier details. Retrieve information about a custom classifier.
56+
/// </summary>
57+
/// <param name="classifierId">The ID of the classifier.</param>
58+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
59+
/// <returns><see cref="Classifier" />Classifier</returns>
60+
Classifier GetClassifier(string classifierId, Dictionary<string, object> customData = null);
61+
/// <summary>
62+
/// Retrieve a list of classifiers.
63+
/// </summary>
64+
/// <param name="verbose">Specify `true` to return details about the classifiers. Omit this parameter to return a brief list of classifiers. (optional)</param>
65+
/// <param name="customData">Custom data object to pass data including custom request headers.</param>
66+
/// <returns><see cref="Classifiers" />Classifiers</returns>
67+
Classifiers ListClassifiers(bool? verbose = null, Dictionary<string, object> customData = null);
3368
}
3469
}

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/IVisualRecognitionServiceExtension.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@
1616
*/
1717

1818
using IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model;
19+
using System.Collections.Generic;
20+
using System.Threading.Tasks;
1921

2022
namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3
2123
{
2224
public partial interface IVisualRecognitionService
2325
{
24-
Classifier CreateClassifier(CreateClassifier createClassifier);
26+
Classifier CreateClassifier(CreateClassifier createClassifier, Dictionary<string, object> customData = null);
2527

26-
Classifier UpdateClassifier(UpdateClassifier updateClassifier);
28+
Classifier UpdateClassifier(UpdateClassifier updateClassifier, Dictionary<string, object> customData = null);
29+
30+
Task<System.IO.Stream> GetCoreMlModel(string classifierId, Dictionary<string, object> customData = null);
2731
}
2832
}

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/ClassResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2222
/// <summary>
2323
/// Result of a class within a classifier.
2424
/// </summary>
25-
public class ClassResult
25+
public class ClassResult : BaseModel
2626
{
2727
/// <summary>
2828
/// The name of the class.

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/ClassifiedImage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2323
/// <summary>
2424
/// Classifier results for one image.
2525
/// </summary>
26-
public class ClassifiedImage
26+
public class ClassifiedImage : BaseModel
2727
{
2828
/// <summary>
2929
/// Source of the image before any redirects. Not returned when the image is uploaded.

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/ClassifiedImages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2323
/// <summary>
2424
/// Classify results for multiple images.
2525
/// </summary>
26-
public class ClassifiedImages
26+
public class ClassifiedImages : BaseModel
2727
{
2828
/// <summary>
2929
/// The number of custom classes identified in the images.

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/Classifier.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2626
/// <summary>
2727
/// Information about a classifier.
2828
/// </summary>
29-
public class Classifier
29+
public class Classifier : BaseModel
3030
{
3131
/// <summary>
3232
/// The training status of classifier.

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/ClassifierResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2323
/// <summary>
2424
/// Classifier and score combination.
2525
/// </summary>
26-
public class ClassifierResult
26+
public class ClassifierResult : BaseModel
2727
{
2828
/// <summary>
2929
/// Name of the classifier.

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/Classifiers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2323
/// <summary>
2424
/// List of classifiers.
2525
/// </summary>
26-
public class Classifiers
26+
public class Classifiers : BaseModel
2727
{
2828
/// <summary>
2929
/// Gets or Sets Classifiers

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/DetectedFaces.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2323
/// <summary>
2424
/// DetectedFaces.
2525
/// </summary>
26-
public class DetectedFaces
26+
public class DetectedFaces : BaseModel
2727
{
2828
/// <summary>
2929
/// Number of images processed for the API call.

src/IBM.WatsonDeveloperCloud.VisualRecognition.v3/Model/ErrorInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace IBM.WatsonDeveloperCloud.VisualRecognition.v3.Model
2222
/// <summary>
2323
/// Information about what might have caused a failure, such as an image that is too large. Not returned when there is no error.
2424
/// </summary>
25-
public class ErrorInfo
25+
public class ErrorInfo : BaseModel
2626
{
2727
/// <summary>
2828
/// HTTP status code.

0 commit comments

Comments
 (0)