Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move files from /sdk/face to /sdk/vision #10562

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<module>sdk/eventgrid</module>
<module>sdk/eventhubs</module>
<module>sdk/extendedlocation</module>
<module>sdk/face</module>
<module>sdk/fluidrelay</module>
<module>sdk/formrecognizer</module>
<module>sdk/frontdoor</module>
Expand Down
6 changes: 0 additions & 6 deletions sdk/face/azure-ai-vision-face/assets.json

This file was deleted.

15 changes: 0 additions & 15 deletions sdk/face/pom.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,11 @@ For details on contributing to this repository, see the [contributing guide](htt


<!-- LINKS -->
[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/
[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/
[face_java_package_maven]: https://central.sonatype.com/artifact/com.azure/azure-ai-vision-face/
[face_ref_java_docs]: https://aka.ms/azsdk-java-face-ref
[face_product_docs]: https://learn.microsoft.com/azure/ai-services/computer-vision/overview-identity
[face_samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/samples
[face_samples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/samples

[jdk_link]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable
[azure_sub]: https://azure.microsoft.com/free/
Expand All @@ -406,15 +406,15 @@ For details on contributing to this repository, see the [contributing guide](htt
[regional_endpoints]: https://azure.microsoft.com/global-infrastructure/services/?products=cognitive-services
[azure_sdk_java_azure_key_credential]: https://learn.microsoft.com/java/api/com.azure.core.credential.azurekeycredential?view=azure-java-stable

[face_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java
[face_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java
[face_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClientBuilder.java
[face_administration_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationAsyncClient.java
[face_administration_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClient.java
[face_administration_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClientBuilder.java
[face_session_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java
[face_session_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java
[face_session_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/face/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClientBuilder.java
[face_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAsyncClient.java
[face_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClient.java
[face_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceClientBuilder.java
[face_administration_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationAsyncClient.java
[face_administration_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClient.java
[face_administration_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceAdministrationClientBuilder.java
[face_session_client_async]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionAsyncClient.java
[face_session_client]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClient.java
[face_session_client_builder]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/vision/azure-ai-vision-face/src/main/java/com/azure/ai/vision/face/FaceSessionClientBuilder.java

[azure_sdk_java_identity]: https://learn.microsoft.com/azure/developer/java/sdk/identity
[custom_subdomain]: https://docs.microsoft.com/azure/cognitive-services/authentication#create-a-resource-with-a-custom-subdomain
Expand Down
6 changes: 6 additions & 0 deletions sdk/vision/azure-ai-vision-face/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo" : "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath" : "java",
"TagPrefix" : "java/vision/azure-ai-vision-face",
"Tag" : "java/vision/azure-ai-vision-face_b9618d1bba"
}
16 changes: 6 additions & 10 deletions sdk/face/ci.yml → sdk/vision/azure-ai-vision-face/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ trigger:
- release/*
paths:
include:
- sdk/face/ci.yml
- sdk/face/azure-ai-vision-face/
- sdk/vision/azure-ai-vision-face/
exclude:
- sdk/face/pom.xml
- sdk/face/azure-ai-vision-face/pom.xml
- sdk/vision/azure-ai-vision-face/pom.xml

pr:
branches:
Expand All @@ -23,11 +21,9 @@ pr:
- release/*
paths:
include:
- sdk/face/ci.yml
- sdk/face/azure-ai-vision-face/
- sdk/vision/azure-ai-vision-face/
exclude:
- sdk/face/pom.xml
- sdk/face/azure-ai-vision-face/pom.xml
- sdk/vision/azure-ai-vision-face/pom.xml

parameters:
- name: release_azureaivisionface
Expand All @@ -36,9 +32,9 @@ parameters:
default: true

extends:
template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml
template: ../../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
ServiceDirectory: face
ServiceDirectory: vision
EnableBatchRelease: true
Artifacts:
- name: azure-ai-vision-face
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,23 @@

import com.azure.ai.vision.face.FaceAsyncClient;
import com.azure.ai.vision.face.FaceClientBuilder;
import com.azure.ai.vision.face.samples.utils.ConfigurationHelper;
import com.azure.ai.vision.face.samples.utils.Resources;
import com.azure.ai.vision.face.samples.utils.Utils;
import com.azure.ai.vision.face.models.DetectOptions;
import com.azure.ai.vision.face.models.FaceDetectionModel;
import com.azure.ai.vision.face.models.FaceDetectionResult;
import com.azure.ai.vision.face.models.FaceRecognitionModel;
import com.azure.ai.vision.face.samples.utils.ConfigurationHelper;
import com.azure.ai.vision.face.samples.utils.Resources;
import com.azure.ai.vision.face.samples.utils.Utils;
import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.util.BinaryData;
import reactor.core.publisher.Flux;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static com.azure.ai.vision.face.samples.utils.Utils.log;
import static com.azure.ai.vision.face.models.FaceAttributeType.Detection01;
import static com.azure.ai.vision.face.models.FaceAttributeType.Detection03;
import static com.azure.ai.vision.face.models.FaceAttributeType.Recognition04;
import static com.azure.ai.vision.face.samples.utils.Utils.log;

public class DetectFacesAsync {
public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ public static void main(String[] args) {
// We can also list all the liveness sessions of this face account.
List<LivenessSessionItem> sessions = faceSessionClient.getLivenessSessions();
logObject("List all the liveness sessions: ", sessions, true);
}
finally {
} finally {
// Delete this session
faceSessionClient.deleteLivenessSession(livenessSessionCreationResult.getSessionId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void main(String[] args) {

} finally {
// Delete this session
logObject("Delete liveness sessions: "+sessionId);
logObject("Delete liveness sessions: " + sessionId);
faceSessionClient.deleteLivenessWithVerifySession(sessionId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static void main(String[] args) {
logObject("List all the liveness sessions: ", sessions, true);

} finally {
logObject("Delete liveness sessions: "+sessionId);
logObject("Delete liveness sessions: " + sessionId);
// Delete this session
faceSessionClient.deleteLivenessWithVerifySession(livenessSessionCreationResult.getSessionId())
.block();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

package com.azure.ai.vision.face.samples;

//import com.azure.ai.vision.face.*;

import com.azure.ai.vision.face.FaceAdministrationClient;
import com.azure.ai.vision.face.FaceAdministrationClientBuilder;
import com.azure.ai.vision.face.FaceClient;
Expand Down Expand Up @@ -35,7 +37,10 @@
import java.util.Objects;
import java.util.stream.Collectors;

import static com.azure.ai.vision.face.samples.utils.Utils.*;
import static com.azure.ai.vision.face.samples.utils.Utils.log;
import static com.azure.ai.vision.face.samples.utils.Utils.logObject;
import static com.azure.ai.vision.face.samples.utils.Utils.safelyRun;


public class IdentifyAgainstDynamicPersonDirectory {
private static final RuntimeException[] EXCEPTION_CONTAINER = new RuntimeException[1];
Expand Down Expand Up @@ -200,8 +205,8 @@ private static void listDynamicPersonGroupReferences(
logObject("List DynamicPersonGroup with " + personData.getName() + " ", dynamicPersonGroupNames);
}

private static void deleteDynamicPersonGroups
(FaceAdministrationClient administrationClient, List<String> dynamicPersonGroupsIds) {
private static void deleteDynamicPersonGroups(
FaceAdministrationClient administrationClient, List<String> dynamicPersonGroupsIds) {

log("Deleting DynamicPeronGroups: " + dynamicPersonGroupsIds.size());
List<SyncPoller<FaceOperationResult, Void>> pollers = dynamicPersonGroupsIds.stream()
Expand Down Expand Up @@ -321,7 +326,7 @@ private static String createUserData(String... tags) {
private static Pair<PersonData, SyncPoller<FaceOperationResult, PersonDirectoryPerson>> createPerson(
FaceAdministrationClient administrationClient, PersonData personData) {
log("Create Person: " + personData.getName());
return Utils.safelyRunWithExceptionCheck(EXCEPTION_CONTAINER, "createPerson", ()->
return Utils.safelyRunWithExceptionCheck(EXCEPTION_CONTAINER, "createPerson", () ->
Pair.of(personData,
administrationClient.beginCreatePerson(personData.getName(), personData.getUserData())));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private static void createPersonsAndAddFaces(FaceAdministrationClient administra

private static Pair<PersonData, SyncPoller<FaceOperationResult, PersonDirectoryPerson>> createPerson(
FaceAdministrationClient administrationClient, PersonData personData) {
return Utils.safelyRunWithExceptionCheck(EXCEPTION_CONTAINER, "createPerson", ()->
return Utils.safelyRunWithExceptionCheck(EXCEPTION_CONTAINER, "createPerson", () ->
Pair.of(personData,
administrationClient.beginCreatePerson(personData.getName(), personData.getUserData())));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
import java.util.Objects;
import java.util.stream.Collectors;

import static com.azure.ai.vision.face.samples.utils.Utils.*;
import static com.azure.ai.vision.face.samples.utils.Utils.log;
import static com.azure.ai.vision.face.samples.utils.Utils.safelyRun;

public class VerifyFromDynamicPersonDirectory {
private static final RuntimeException[] EXCEPTION_CONTAINER = new RuntimeException[1];
Expand Down Expand Up @@ -106,7 +107,7 @@ private static void createPersons(FaceAdministrationClient administrationClient,
private static Pair<PersonData, SyncPoller<FaceOperationResult, PersonDirectoryPerson>> createPerson(
FaceAdministrationClient administrationClient, PersonData personData) {
log("Create Person: " + personData.getName());
return Utils.safelyRunWithExceptionCheck(EXCEPTION_CONTAINER, "createPerson", ()->
return Utils.safelyRunWithExceptionCheck(EXCEPTION_CONTAINER, "createPerson", () ->
Pair.of(personData,
administrationClient.beginCreatePerson(personData.getName(), personData.getUserData())));
}
Expand Down Expand Up @@ -160,7 +161,7 @@ private static SyncPoller<FaceOperationResult, PersonDirectoryFace> addFacesToPe
private static void deletePersons(FaceAdministrationClient administrationClient, List<PersonData> personDataList) {
log("Deleting Persons: " + personDataList.size());
List<SyncPoller<FaceOperationResult, Void>> pollers = personDataList.stream()
.map(personData -> Utils.safelyRun(
.map(personData -> safelyRun(
() -> administrationClient
.beginDeletePerson(personData.getPersonId())))
.filter(Objects::nonNull)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@

import com.azure.ai.vision.face.models.FaceOperationResult;
import com.azure.ai.vision.face.models.PersonDirectoryFace;
import com.azure.ai.vision.face.models.PersonDirectoryPerson;
import com.azure.core.util.polling.SyncPoller;

import java.time.Duration;

public class PersonData {
private final String name;
private final String userData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;
import com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;

import java.nio.file.Path;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/ai/Face
commit: 2e1a769d48e131213fc240d93b963d1e1099b80f
commit: 88f9ba778e8611066336aa8713e3205788153913
repo: Azure/azure-rest-api-specs
additionalDirectories:
14 changes: 13 additions & 1 deletion sdk/vision/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ trigger:
include:
- sdk/vision/ci.yml
- sdk/vision/azure-ai-vision-imageanalysis/
- sdk/vision/azure-ai-vision-face/
exclude:
- sdk/vision/pom.xml
- sdk/vision/azure-ai-vision-imageanalysis/pom.xml
- sdk/vision/azure-ai-vision-face/pom.xml

pr:
branches:
Expand All @@ -25,15 +27,21 @@ pr:
include:
- sdk/vision/ci.yml
- sdk/vision/azure-ai-vision-imageanalysis/
- sdk/vision/azure-ai-vision-face/
exclude:
- sdk/vision/pom.xml
- sdk/vision/azure-ai-vision-imageanalysis/pom.xml
- sdk/vision/azure-ai-vision-face/pom.xml

parameters:
- name: release_azureaivisionimageanalysis
displayName: azure-ai-vision-imageanalysis
type: boolean
default: true
- name: release_azureaivisionface
displayName: azure-ai-vision-face
type: boolean
default: true

# Note that IgnoreVerifyTypeSpecCodeGenerationError is set to true here in order to ignore
# errors from the task "Verify TypeSpec Code Generation" in the CI pipeline. This task is
Expand All @@ -50,4 +58,8 @@ extends:
- name: azure-ai-vision-imageanalysis
groupId: com.azure
safeName: azureaivisionimageanalysis
releaseInBatch: ${{ parameters.release_azureaivisionimageanalysis }}
releaseInBatch: ${{ parameters.release_azureaivisionimageanalysis }}
- name: azure-ai-vision-face
groupId: com.azure
safeName: azureaivisionface
releaseInBatch: ${{ parameters.release_azureaivisionface }}
3 changes: 2 additions & 1 deletion sdk/vision/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@

<modules>
<module>azure-ai-vision-imageanalysis</module>
<module>azure-ai-vision-face</module>
</modules>
</project>
</project>