Updated readme (#42)
* Update the readme. Added a screenshot of the sample app. * Fixed path to test config file * Applied feedback received * Applied feedback on readme * Applied feedback on readme Removed "questions" header
This commit is contained in:
Родитель
dd28822b04
Коммит
c9048b6887
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 168 KiB |
68
README.md
68
README.md
|
@ -1,31 +1,19 @@
|
|||
# Microsoft Face API: Python SDK
|
||||
This repo contains the Python SDK for the Microsoft Face API, an offering within [Microsoft Cognitive Services](https://www.microsoft.com/cognitive-services), formerly known as Project Oxford.
|
||||
This repo contains the Python SDK for the Microsoft Face API, an offering within [Microsoft Cognitive Services](https://azure.microsoft.com/en-us/services/cognitive-services/), formerly known as Project Oxford.
|
||||
|
||||
* [Learn about the Face API](https://www.microsoft.com/cognitive-services/en-us/face-api)
|
||||
* [Read the documentation](https://www.microsoft.com/cognitive-services/en-us/face-api/documentation/overview)
|
||||
* [Find more SDKs & Samples](https://www.microsoft.com/cognitive-services/en-us/SDK-Sample?api=face)
|
||||
* [Learn about the Face API](https://azure.microsoft.com/en-us/services/cognitive-services/face/)
|
||||
* [Read the documentation](https://docs.microsoft.com/en-us/azure/cognitive-services/face/overview)
|
||||
* [More SDKs & Samples](https://azure.microsoft.com/en-us/resources/samples/?api=face&sort=0&service=cognitive-services&term=face)
|
||||
|
||||
## Installation
|
||||
## Getting started
|
||||
|
||||
Install the module using [pip](https://pypi.python.org/pypi/pip/):
|
||||
|
||||
```bash
|
||||
pip install cognitive_face
|
||||
```
|
||||
|
||||
## Installation from Source Code
|
||||
|
||||
```bash
|
||||
python setup.py install
|
||||
```
|
||||
|
||||
## Unittests
|
||||
|
||||
Before running unittests, please refer to the [/cognitive_face/tests/config.sample.py](/cognitive_face/tests/config.sample.py) and set proper configuration with valid [Subscription Key](https://www.microsoft.com/cognitive-services/en-us/sign-up) to make the unittests work.
|
||||
|
||||
```bash
|
||||
python setup.py test
|
||||
```
|
||||
|
||||
## Minimal Usage
|
||||
Use it:
|
||||
|
||||
```python
|
||||
import cognitive_face as CF
|
||||
|
@ -41,27 +29,47 @@ result = CF.face.detect(img_url)
|
|||
print result
|
||||
```
|
||||
|
||||
## Sample
|
||||
### Installing from the source code
|
||||
|
||||
A Python SDK sample built with wxPython is also provided, before execution,
|
||||
please install all components listed below.
|
||||
```bash
|
||||
python setup.py install
|
||||
```
|
||||
|
||||
### Sample Prerequisite
|
||||
### Running the unit tests
|
||||
|
||||
- [Python 2.7](https://www.python.org/downloads/) (only Python 2 supported due
|
||||
to limitation of wxPython)
|
||||
- [wxPython](https://wxpython.org/)
|
||||
- [cognitive_face package](https://pypi.python.org/pypi/cognitive_face)
|
||||
To run the tests you will need a valid subscription. You can get one [here](https://azure.microsoft.com/en-gb/try/cognitive-services/?api=face-api).
|
||||
|
||||
### Sample Execution
|
||||
1. Copy `cognitive_face/tests/config.sample.py` into `cognitive_face/tests/config.py`.
|
||||
1. Change the `KEY` and `BASE_URL` parameters to your own subscription's API key and endpoint.
|
||||
1. Run the following:
|
||||
|
||||
```bash
|
||||
python setup.py test
|
||||
```
|
||||
|
||||
## Running the sample
|
||||
|
||||
A sample desktop application is also provided.
|
||||
|
||||
To run it, install the following prerequisites:
|
||||
|
||||
- [Python 2.7](https://www.python.org/downloads/) (version 3 is **not** currently supported, you can vote for this feature [here](https://github.com/Microsoft/Cognitive-Face-Python/issues/30))
|
||||
- [wxPython 3.0.2](https://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/) (version 4 is **not** currently supported)
|
||||
|
||||
Then run the following:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Microsoft/Cognitive-Face-Python.git
|
||||
cd Cognitive-Face-Python
|
||||
pip install -r requirements.txt
|
||||
python sample
|
||||
```
|
||||
|
||||
![Sample app](./Assets/sample_screenshot.png)
|
||||
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome contributions. Feel free to file issues and pull requests on the repo and we'll address them as we can. Learn more about how you can help on our [Contribution Rules & Guidelines](</CONTRIBUTING.md>).
|
||||
|
||||
You can reach out to us anytime with questions and suggestions using our communities below:
|
||||
|
@ -71,7 +79,7 @@ You can reach out to us anytime with questions and suggestions using our communi
|
|||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## Updates
|
||||
* [Face API Release Notes](https://www.microsoft.com/cognitive-services/en-us/face-api/documentation/ReleaseNotes)
|
||||
* [Face API Release Notes](https://docs.microsoft.com/en-us/azure/cognitive-services/face/releasenotes)
|
||||
|
||||
## License
|
||||
All Microsoft Cognitive Services SDKs and samples are licensed with the MIT License. For more details, see
|
||||
|
|
Загрузка…
Ссылка в новой задаче