Skip to content

Commit a87b4c0

Browse files
zihyuntingSDKAuto
andauthored
Generate and implement Face SDK via TypeSpec (#35384)
* CodeGen from PR 27576 in Azure/azure-rest-api-specs Merge 482ba279cb21fbf7f4e6bbd4ad14b6c14aa979d7 into b8af2fc3af08e42d2df6f48d1c84070ef1f6589b * Fix SDK error * SDK Customization * test-resources.json * Samples * Testcases * Add SDK README.md * Rename the folder from samples/_shared to samples/shared * Update the detection interface * Correct the comments in sample codes * Update the README.md * Update the interface of detect_from_url() * Removed TODO tag * Update README.md * Correct the path of the model object * Refine liveness samples * Reorganize samples and tests folder - Only use images under samples/images for test. - Move all async samples under samples folder to address relative import failure - Delete the folder 'tests/images' - Add two utility methods in helpers class. * Add assets.json * Update CHANGELOG and README * Fix errors reported by CI pipeline * Fix typo * Fix tests error * Update CHANGELOG and README * Update customized operations * Update tests to fix test errors * Not support live tests for this preview release * Use `black` to reformat all samples and tests * Remove all ignore flag from samples * Add pyproject.toml * Regenerated code * update patches * fix samples * Update CHANGELOG * Regenerate SDK based on the latest TypeSpec * Update customized method to address the TypeSpec changes * Update customized Enum classes definition and remove ignore flags from samples * Update README.md * Fix pylint error * Use the new name of AAD: 'Microsoft Entra ID' * Change the order of overload functions of * Re-format the code snippet in README.md --------- Co-authored-by: SDKAuto <[email protected]>
1 parent c9fa6e6 commit a87b4c0

File tree

104 files changed

+51699
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+51699
-0
lines changed

.vscode/cspell.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,29 @@
17751775
"wday",
17761776
"SNOMED"
17771777
]
1778+
},
1779+
{
1780+
"filename": "sdk/face/azure-ai-vision-face/**",
1781+
"words": [
1782+
"mros",
1783+
"Nify",
1784+
"ctxt",
1785+
"wday",
1786+
"faceid",
1787+
"facelistid",
1788+
"largefacelistid",
1789+
"persongroupid",
1790+
"largepersongroupid",
1791+
"dynamicpersongroupid",
1792+
"personid",
1793+
"maxnumofcandidatesreturned"
1794+
]
1795+
},
1796+
{
1797+
"filename": "sdk/face/azure-ai-vision-face/tests/**",
1798+
"words": [
1799+
"dcid"
1800+
]
17781801
}
17791802
],
17801803
"allowCompoundWords": true
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Release History
2+
3+
## 1.0.0b1 (Unreleased)
4+
5+
This is the first preview of the `azure-ai-vision-face` client library that follows the [Azure Python SDK Design Guidelines](https://azure.github.io/azure-sdk/python_design.html).
6+
This library replaces the package [azure-cognitiveservices-vision-face](https://pypi.org/project/azure-cognitiveservices-vision-face/).
7+
8+
This package's [documentation](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/face/azure-ai-vision-face/) and [samples](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/face/azure-ai-vision-face/samples) demonstrate the new API.
9+
10+
### Features Added
11+
12+
- Added support for Liveness detection.
13+
- Added support for `person` and `dynamic_person_group` operations.
14+
- Added support for face recognition with `PersonDirectory` (`identify_from_person_directory()` and `identify_from_dynamic_person_group()`).
15+
- Asynchronous APIs are added under `azure.ai.vision.face.aio` namespace.
16+
- Authentication with Microsoft Entra ID is supported using `DefaultAzureCredential()` from `azure.identity`.
17+
18+
### Breaking Changes
19+
20+
- This library supports only the Azure AI Face v1.1-preview.1 API.
21+
- The namespace/package name for Azure AI Face has changed from `azure.cognitiveservices.vision.face` to `azure.ai.vision.face`.
22+
- Three client design:
23+
- `FaceClient` to perform core Face functions such as face detection, recognition(identification and verification),
24+
finding similar faces and grouping faces.
25+
- `FaceAdministrationClient` to managed the following data structures that hold data on faces and persons for
26+
Face recognition, like `face_list`, `large_face_list`, `person_group`, `large_person_group`, `person` and
27+
`dynamic_person_group`.
28+
- `FaceSessionClient` to interact with sessions which is used for Liveness detection.
29+
- New function names that comply with [Azure Python SDK Design Guidelines](https://azure.github.io/azure-sdk/python_design.html):
30+
- For example, the method `person_group_person.create()` is changed to `create_person_group_person()`.
31+
- The Snapshot operations are all removed as [the Snapshot API is no longer supported](https://azure.microsoft.com/updates/facelimitedaccess/).
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Copyright (c) Microsoft Corporation.
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include *.md
2+
include LICENSE
3+
include azure/ai/vision/face/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/ai/__init__.py
8+
include azure/ai/vision/__init__.py

0 commit comments

Comments
 (0)