Skip to content

Commit 7d3be70

Browse files
authored
Merge pull request #912 from watson-developer-cloud/visual-recognition-update
Update Visual Recognition service
2 parents d317458 + 424add6 commit 7d3be70

File tree

12 files changed

+35
-407
lines changed

12 files changed

+35
-407
lines changed

config.properties.enc

80 Bytes
Binary file not shown.

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/VisualRecognition.java

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,14 @@ public ServiceCall<ClassifiedImages> classify() {
164164
/**
165165
* Detect faces in images.
166166
*
167-
* **Important:** On April 2, 2018, the identity information in the response to calls to the Face model will be
168-
* removed. The identity information refers to the `name` of the person, `score`, and `type_hierarchy` knowledge
169-
* graph. For details about the enhanced Face model, see the [Release
170-
* notes](https://console.bluemix.net/docs/services/visual-recognition/release-notes.html#23february2018). Analyze and
171-
* get data about faces in images. Responses can include estimated age and gender, and the service can identify
172-
* celebrities. This feature uses a built-in classifier, so you do not train it on custom classifiers. The Detect
173-
* faces method does not support general biometric facial recognition.
167+
* **Important:** On April 2, 2018, the identity information in the response to calls to the Face model was removed.
168+
* The identity information refers to the `name` of the person, `score`, and `type_hierarchy` knowledge graph. For
169+
* details about the enhanced Face model, see the [Release
170+
* notes](https://console.bluemix.net/docs/services/visual-recognition/release-notes.html#2april2018). Analyze and get
171+
* data about faces in images. Responses can include estimated age and gender. This feature uses a built-in model, so
172+
* no training is necessary. The Detect faces method does not support general biometric facial recognition. Supported
173+
* image formats include .gif, .jpg, .png, and .tif. The maximum image size is 10 MB. The minimum recommended pixel
174+
* density is 32X32 pixels per inch.
174175
*
175176
* @param detectFacesOptions the {@link DetectFacesOptions} containing the options for the call
176177
* @return a {@link ServiceCall} with a response type of {@link DetectedFaces}
@@ -201,23 +202,6 @@ public ServiceCall<DetectedFaces> detectFaces(DetectFacesOptions detectFacesOpti
201202
return createServiceCall(builder.build(), ResponseConverterUtils.getObject(DetectedFaces.class));
202203
}
203204

204-
/**
205-
* Detect faces in images.
206-
*
207-
* **Important:** On April 2, 2018, the identity information in the response to calls to the Face model will be
208-
* removed. The identity information refers to the `name` of the person, `score`, and `type_hierarchy` knowledge
209-
* graph. For details about the enhanced Face model, see the [Release
210-
* notes](https://console.bluemix.net/docs/services/visual-recognition/release-notes.html#23february2018). Analyze and
211-
* get data about faces in images. Responses can include estimated age and gender, and the service can identify
212-
* celebrities. This feature uses a built-in classifier, so you do not train it on custom classifiers. The Detect
213-
* faces method does not support general biometric facial recognition.
214-
*
215-
* @return a {@link ServiceCall} with a response type of {@link DetectedFaces}
216-
*/
217-
public ServiceCall<DetectedFaces> detectFaces() {
218-
return detectFaces(null);
219-
}
220-
221205
/**
222206
* Create a classifier.
223207
*

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public Float getScore() {
5252
/**
5353
* Gets the typeHierarchy.
5454
*
55-
* Knowledge graph of the property. For example, `People/Leaders/Presidents/USA/Barack Obama`. Included only if
55+
* Knowledge graph of the property. For example, `/fruit/pome/apple/eating apple/Granny Smith`. Included only if
5656
* identified.
5757
*
5858
* @return the typeHierarchy

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/ClassifyOptions.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,11 @@ public List<String> owners() {
353353
/**
354354
* Gets the classifierIds.
355355
*
356-
* Which classifiers to apply. Overrides the **owners** parameter. You can specify both custom and built-in
357-
* classifiers. The built-in `default` classifier is used if both **classifier_ids** and **owners** parameters are
358-
* empty. The following built-in classifier IDs require no training: - `default`: Returns classes from thousands of
359-
* general tags. - `food`: (Beta) Enhances specificity and accuracy for images of food items. - `explicit`: (Beta)
360-
* Evaluates whether the image might be pornographic.
356+
* Which classifiers to apply. Overrides the **owners** parameter. You can specify both custom and built-in classifier
357+
* IDs. The built-in `default` classifier is used if both **classifier_ids** and **owners** parameters are empty. The
358+
* following built-in classifier IDs require no training: - `default`: Returns classes from thousands of general tags.
359+
* - `food`: (Beta) Enhances specificity and accuracy for images of food items. - `explicit`: (Beta) Evaluates whether
360+
* the image might be pornographic.
361361
*
362362
* @return the classifierIds
363363
*/

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/DetectFacesBetaOptions.java

Lines changed: 0 additions & 183 deletions
This file was deleted.

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/DetectFacesOptions.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,10 @@ public Builder newBuilder() {
156156
/**
157157
* Gets the imagesFile.
158158
*
159-
* An image file (.jpg, .png) or .zip file with images. Include no more than 15 images. All faces are detected, but if
160-
* there are more than 10 faces in an image, age and gender confidence scores might return scores of 0. You can also
161-
* include an image with the **url** parameter.
159+
* An image file (gif, .jpg, .png, .tif.) or .zip file with images. Limit the .zip file to 100 MB. You can include a
160+
* maximum of 15 images in a request. Encode the image and .zip file names in UTF-8 if they contain non-ASCII
161+
* characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters. You can also include an
162+
* image with the **url** parameter.
162163
*
163164
* @return the imagesFile
164165
*/
@@ -180,9 +181,9 @@ public String imagesFilename() {
180181
/**
181182
* Gets the url.
182183
*
183-
* The URL of an image to analyze. Must be in .jpg, or .png format. The minimum recommended pixel density is 32X32
184-
* pixels per inch, and the maximum image size is 2 MB. You can also include images with the **images_file**
185-
* parameter.
184+
* The URL of an image to analyze. Must be in .gif, .jpg, .png, or .tif format. The minimum recommended pixel density
185+
* is 32X32 pixels per inch, and the maximum image size is 10 MB. Redirects are followed, so you can use a shortened
186+
* URL. You can also include images with the **images_file** parameter.
186187
*
187188
* @return the url
188189
*/

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/Face.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public class Face extends GenericModel {
2424
private FaceGender gender;
2525
@SerializedName("face_location")
2626
private FaceLocation faceLocation;
27-
private FaceIdentity identity;
2827

2928
/**
3029
* Gets the age.
@@ -52,13 +51,4 @@ public FaceGender getGender() {
5251
public FaceLocation getFaceLocation() {
5352
return faceLocation;
5453
}
55-
56-
/**
57-
* Gets the identity.
58-
*
59-
* @return the identity
60-
*/
61-
public FaceIdentity getIdentity() {
62-
return identity;
63-
}
6454
}

visual-recognition/src/main/java/com/ibm/watson/developer_cloud/visual_recognition/v3/model/FaceAge.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
import com.ibm.watson.developer_cloud.service.model.GenericModel;
1616

1717
/**
18-
* Provides age information about a face. If there are more than 10 faces in an image, the response might return the
19-
* confidence score `0`.
18+
* Provides age information about a face.
2019
*/
2120
public class FaceAge extends GenericModel {
2221

@@ -49,8 +48,8 @@ public Long getMax() {
4948
/**
5049
* Gets the score.
5150
*
52-
* Confidence score for the property in the range of 0 to 1. A higher score indicates greater likelihood that the
53-
* class is depicted in the image. The default threshold for returning scores from a classifier is 0.5.
51+
* Confidence score in the range of 0 to 1. A higher score indicates greater confidence in the estimated value for the
52+
* property.
5453
*
5554
* @return the score
5655
*/

0 commit comments

Comments
 (0)