Skip to content

Commit 650a003

Browse files
feat(aws-android-sdk-rekognition): update models to latest (#2599)
Co-authored-by: Rafael Juliano <[email protected]>
1 parent b994959 commit 650a003

17 files changed

+950
-89
lines changed

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognition.java

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -695,19 +695,25 @@ DescribeStreamProcessorResult describeStreamProcessor(
695695
* <code>Geometry</code>).
696696
* </p>
697697
* <p>
698-
* During training model calculates a threshold value that determines if a
699-
* prediction for a label is true. By default,
700-
* <code>DetectCustomLabels</code> doesn't return labels whose confidence
701-
* value is below the model's calculated threshold value. To filter labels
702-
* that are returned, specify a value for <code>MinConfidence</code> that is
703-
* higher than the model's calculated threshold. You can get the model's
704-
* calculated threshold from the model's training results shown in the
705-
* Amazon Rekognition Custom Labels console. To get all labels, regardless
706-
* of confidence, specify a <code>MinConfidence</code> value of 0.
698+
* To filter labels that are returned, specify a value for
699+
* <code>MinConfidence</code>. <code>DetectCustomLabelsLabels</code> only
700+
* returns labels with a confidence that's higher than the specified value.
701+
* The value of <code>MinConfidence</code> maps to the assumed threshold
702+
* values created during training. For more information, see <i>Assumed
703+
* threshold</i> in the Amazon Rekognition Custom Labels Developer Guide.
704+
* Amazon Rekognition Custom Labels metrics expresses an assumed threshold
705+
* as a floating point value between 0-1. The range of
706+
* <code>MinConfidence</code> normalizes the threshold value to a percentage
707+
* value (0-100). Confidence responses from <code>DetectCustomLabels</code>
708+
* are also returned as a percentage. You can use <code>MinConfidence</code>
709+
* to change the precision and recall or your model. For more information,
710+
* see <i>Analyzing an image</i> in the Amazon Rekognition Custom Labels
711+
* Developer Guide.
707712
* </p>
708713
* <p>
709-
* You can also add the <code>MaxResults</code> parameter to limit the
710-
* number of labels returned.
714+
* If you don't specify a value for <code>MinConfidence</code>,
715+
* <code>DetectCustomLabels</code> returns labels based on the assumed
716+
* threshold of each label.
711717
* </p>
712718
* <p>
713719
* This is a stateless API operation. That is, the operation does not
@@ -717,6 +723,10 @@ DescribeStreamProcessorResult describeStreamProcessor(
717723
* This operation requires permissions to perform the
718724
* <code>rekognition:DetectCustomLabels</code> action.
719725
* </p>
726+
* <p>
727+
* For more information, see <i>Analyzing an image</i> in the Amazon
728+
* Rekognition Custom Labels Developer Guide.
729+
* </p>
720730
*
721731
* @param detectCustomLabelsRequest
722732
* @return detectCustomLabelsResult The response from the DetectCustomLabels
@@ -1136,10 +1146,10 @@ DetectTextResult detectText(DetectTextRequest detectTextRequest) throws AmazonCl
11361146

11371147
/**
11381148
* <p>
1139-
* Gets the name and additional information about a celebrity based on his
1140-
* or her Amazon Rekognition ID. The additional information is returned as
1141-
* an array of URLs. If there is no additional information about the
1142-
* celebrity, this list is empty.
1149+
* Gets the name and additional information about a celebrity based on their
1150+
* Amazon Rekognition ID. The additional information is returned as an array
1151+
* of URLs. If there is no additional information about the celebrity, this
1152+
* list is empty.
11431153
* </p>
11441154
* <p>
11451155
* For more information, see Recognizing Celebrities in an Image in the

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/AmazonRekognitionClient.java

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,19 +1343,25 @@ public DescribeStreamProcessorResult describeStreamProcessor(
13431343
* <code>Geometry</code>).
13441344
* </p>
13451345
* <p>
1346-
* During training model calculates a threshold value that determines if a
1347-
* prediction for a label is true. By default,
1348-
* <code>DetectCustomLabels</code> doesn't return labels whose confidence
1349-
* value is below the model's calculated threshold value. To filter labels
1350-
* that are returned, specify a value for <code>MinConfidence</code> that is
1351-
* higher than the model's calculated threshold. You can get the model's
1352-
* calculated threshold from the model's training results shown in the
1353-
* Amazon Rekognition Custom Labels console. To get all labels, regardless
1354-
* of confidence, specify a <code>MinConfidence</code> value of 0.
1346+
* To filter labels that are returned, specify a value for
1347+
* <code>MinConfidence</code>. <code>DetectCustomLabelsLabels</code> only
1348+
* returns labels with a confidence that's higher than the specified value.
1349+
* The value of <code>MinConfidence</code> maps to the assumed threshold
1350+
* values created during training. For more information, see <i>Assumed
1351+
* threshold</i> in the Amazon Rekognition Custom Labels Developer Guide.
1352+
* Amazon Rekognition Custom Labels metrics expresses an assumed threshold
1353+
* as a floating point value between 0-1. The range of
1354+
* <code>MinConfidence</code> normalizes the threshold value to a percentage
1355+
* value (0-100). Confidence responses from <code>DetectCustomLabels</code>
1356+
* are also returned as a percentage. You can use <code>MinConfidence</code>
1357+
* to change the precision and recall or your model. For more information,
1358+
* see <i>Analyzing an image</i> in the Amazon Rekognition Custom Labels
1359+
* Developer Guide.
13551360
* </p>
13561361
* <p>
1357-
* You can also add the <code>MaxResults</code> parameter to limit the
1358-
* number of labels returned.
1362+
* If you don't specify a value for <code>MinConfidence</code>,
1363+
* <code>DetectCustomLabels</code> returns labels based on the assumed
1364+
* threshold of each label.
13591365
* </p>
13601366
* <p>
13611367
* This is a stateless API operation. That is, the operation does not
@@ -1365,6 +1371,10 @@ public DescribeStreamProcessorResult describeStreamProcessor(
13651371
* This operation requires permissions to perform the
13661372
* <code>rekognition:DetectCustomLabels</code> action.
13671373
* </p>
1374+
* <p>
1375+
* For more information, see <i>Analyzing an image</i> in the Amazon
1376+
* Rekognition Custom Labels Developer Guide.
1377+
* </p>
13681378
*
13691379
* @param detectCustomLabelsRequest
13701380
* @return detectCustomLabelsResult The response from the DetectCustomLabels
@@ -1944,10 +1954,10 @@ public DetectTextResult detectText(DetectTextRequest detectTextRequest)
19441954

19451955
/**
19461956
* <p>
1947-
* Gets the name and additional information about a celebrity based on his
1948-
* or her Amazon Rekognition ID. The additional information is returned as
1949-
* an array of URLs. If there is no additional information about the
1950-
* celebrity, this list is empty.
1957+
* Gets the name and additional information about a celebrity based on their
1958+
* Amazon Rekognition ID. The additional information is returned as an array
1959+
* of URLs. If there is no additional information about the celebrity, this
1960+
* list is empty.
19511961
* </p>
19521962
* <p>
19531963
* For more information, see Recognizing Celebrities in an Image in the

aws-android-sdk-rekognition/src/main/java/com/amazonaws/services/rekognition/model/Celebrity.java

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ public class Celebrity implements Serializable {
6969
*/
7070
private Float matchConfidence;
7171

72+
/**
73+
* <p>
74+
* The known gender identity for the celebrity that matches the provided ID.
75+
* </p>
76+
*/
77+
private KnownGender knownGender;
78+
7279
/**
7380
* <p>
7481
* An array of URLs pointing to additional information about the celebrity.
@@ -369,6 +376,54 @@ public Celebrity withMatchConfidence(Float matchConfidence) {
369376
return this;
370377
}
371378

379+
/**
380+
* <p>
381+
* The known gender identity for the celebrity that matches the provided ID.
382+
* </p>
383+
*
384+
* @return <p>
385+
* The known gender identity for the celebrity that matches the
386+
* provided ID.
387+
* </p>
388+
*/
389+
public KnownGender getKnownGender() {
390+
return knownGender;
391+
}
392+
393+
/**
394+
* <p>
395+
* The known gender identity for the celebrity that matches the provided ID.
396+
* </p>
397+
*
398+
* @param knownGender <p>
399+
* The known gender identity for the celebrity that matches the
400+
* provided ID.
401+
* </p>
402+
*/
403+
public void setKnownGender(KnownGender knownGender) {
404+
this.knownGender = knownGender;
405+
}
406+
407+
/**
408+
* <p>
409+
* The known gender identity for the celebrity that matches the provided ID.
410+
* </p>
411+
* <p>
412+
* Returns a reference to this object so that method calls can be chained
413+
* together.
414+
*
415+
* @param knownGender <p>
416+
* The known gender identity for the celebrity that matches the
417+
* provided ID.
418+
* </p>
419+
* @return A reference to this updated object so that method calls can be
420+
* chained together.
421+
*/
422+
public Celebrity withKnownGender(KnownGender knownGender) {
423+
this.knownGender = knownGender;
424+
return this;
425+
}
426+
372427
/**
373428
* Returns a string representation of this object; useful for testing and
374429
* debugging.
@@ -389,7 +444,9 @@ public String toString() {
389444
if (getFace() != null)
390445
sb.append("Face: " + getFace() + ",");
391446
if (getMatchConfidence() != null)
392-
sb.append("MatchConfidence: " + getMatchConfidence());
447+
sb.append("MatchConfidence: " + getMatchConfidence() + ",");
448+
if (getKnownGender() != null)
449+
sb.append("KnownGender: " + getKnownGender());
393450
sb.append("}");
394451
return sb.toString();
395452
}
@@ -405,6 +462,8 @@ public int hashCode() {
405462
hashCode = prime * hashCode + ((getFace() == null) ? 0 : getFace().hashCode());
406463
hashCode = prime * hashCode
407464
+ ((getMatchConfidence() == null) ? 0 : getMatchConfidence().hashCode());
465+
hashCode = prime * hashCode
466+
+ ((getKnownGender() == null) ? 0 : getKnownGender().hashCode());
408467
return hashCode;
409468
}
410469

@@ -440,6 +499,11 @@ public boolean equals(Object obj) {
440499
if (other.getMatchConfidence() != null
441500
&& other.getMatchConfidence().equals(this.getMatchConfidence()) == false)
442501
return false;
502+
if (other.getKnownGender() == null ^ this.getKnownGender() == null)
503+
return false;
504+
if (other.getKnownGender() != null
505+
&& other.getKnownGender().equals(this.getKnownGender()) == false)
506+
return false;
443507
return true;
444508
}
445509
}

0 commit comments

Comments
 (0)