35e3eb5988 | ||
---|---|---|
ClientLibrary | ||
Data | ||
Sample | ||
SampleScreenshots | ||
.gitignore | ||
CONTRIBUTING.md | ||
LICENSE-IMAGE.md | ||
LICENSE.md | ||
README.md | ||
ThirdPartyNotices.txt |
README.md
The client library
The Face API client library is a thin Java client wrapper for Microsoft Cognitive Services (formerly Project Oxford) Face REST APIs.
The easiest way to consume the client library is to add com.microsoft.projectoxford.face package from Maven Central Repository.
To find the latest version of client library, go to http://search.maven.org, and search for "com.microsoft.projectoxford".
To add the client library dependency from build.gradle file, add the following line in dependencies.
dependencies {
//
// Use the following line to include client library from Maven Central Repository
// Change the version number from the search.maven.org result
//
compile 'com.microsoft.projectoxford:face:1.1.0'
// Your other Dependencies...
}
To do add the client library dependency from Android Studio:
- From Menu, Choose File > Project Structure
- Click on your app module
- Click on Dependencies tab
- Click "+" sign to add new dependency
- Pick "Library dependency" from the drop down list
- Type "com.microsoft.projectoxford" and hit the search icon from "Choose Library Dependency" dialog
- Pick the Project Oxford client library that you intend to use.
- Click "OK" to add the new dependency
The sample
This sample is an Android application to demonstrate the use of Microsoft Cognitive Services (formerly Project Oxford) Face API.
It demonstrates face detection, face verification, face grouping, finding similar faces, and face identification functionalities.
Requirements
Android OS must be Android 4.1 or higher (API Level 16 or higher)
Build the sample
-
First, you must obtain a Face API subscription key by following instructions in Microsoft Cognitive Services subscription.
-
Start Android Studio and open project from Face > Android > Sample folder.
-
In Android Studio -> "Project" panel -> "Android" view, open file "app/res/values/strings.xml", and find the line "Please_add_the_subscription_key_here;". Replace the "Please_add_the_subscription_key_here" value with your subscription key string from the first step. If you cannot find the file "strings.xml", it is in folder "Sample\app\src\main\res\values\string.xml".
-
In Android Studio, select menu "Build > Make Project" to build the sample.
Run the sample
In Android Studio, select menu "Run", and "Run app" to launch this sample app.
Once the app is launched, click on buttons to use samples of between different scenarios, and follow the instructions on screen.
Microsoft will receive the images you upload and may use them to improve Face API and related services. By submitting an image, you confirm you have consent from everyone in it.
Contributing
We welcome contributions and are always looking for new SDKs, input, and suggestions. Feel free to file issues on the repo and we'll address them as we can. You can also learn more about how you can help on the Contribution Rules & Guidelines.
For questions, feedback, or suggestions about Microsoft Cognitive Services, feel free to reach out to us directly.
License
All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see LICENSE.
Sample images are licensed separately, please refer to LICENSE-IMAGE.