cornea-1.1.0
توضیحات
A PyPI package to extract insightful information about an image using Machine Intelligence
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cornea-1.1.0 |
| نام | cornea |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Praveen Ravichandran |
| ایمیل نویسنده | pravinba9495@gmail.com |
| آدرس صفحه اصلی | https://github.com/pravinba9495/cornea |
| آدرس اینترنتی | https://pypi.org/project/cornea/ |
| مجوز | MIT |
# Cornea

[](https://www.codacy.com/app/pravinba9495/cornea?utm_source=github.com&utm_medium=referral&utm_content=pravinba9495/cornea&utm_campaign=Badge_Grade)

A PyPI package to extract insightful information about an image using Machine Intelligence
## Requirements
- Python >=3.7
## Installation
The recommended method to install this package is by using `pip` or `pip3`
```bash
pip3 install cornea
or
python3 -m pip install cornea
```
## Setup
The package requires that you specify your Microsoft Azure API credentials as environment variables. Type the following commands in your terminal. ALternatively, you can also add the following lines at the end of `.bashrc` or `.bash_profile`.
```bash
export AZURE_API_KEY={{{YOUR_API_KEY}}}
export AZURE_API_BASE_ENDPOINT={{{YOUR_API_REGION_BASE_URL}}}
export AZURE_API_VERSION={{{AZURE_API_VERSION}}}
```
**Example**:
```bash
export AZURE_API_KEY=QmQZdzdQXftzrOOvCUC7tjx8wzZed8Wk
export AZURE_API_BASE_ENDPOINT=https://eastus.api.cognitive.microsoft.com
export AZURE_API_VERSION=v2.0
```
## Usage
```python
from cornea import descImgFromURL
analysis = descImgFromURL("https://upload.wikimedia.org/wikipedia/commons/b/b9/CyprusShorthair.jpg")
print(analysis)
```
## Output
```bash
{'categories': [{'name': 'animal_cat', 'score': 0.99609375}], 'color': {'dominantColorForeground': 'Grey', 'dominantColorBackground': 'Grey', 'dominantColors': ['Grey'], 'accentColor': '5C4E3C', 'isBwImg': False, 'isBWImg': False}, 'description': {'tags': ['cat', 'indoor', 'laying', 'bed', 'sitting', 'white', 'brown', 'lying', 'small', 'large', 'sleeping'], 'captions': [{'text': 'a cat lying on a bed', 'confidence': 0.9512938154506553}]}, 'requestId': 'ef807a48-ecbf-4c30-883b-64a7d25683f2', 'metadata': {'width': 1024, 'height': 768, 'format': 'Jpeg'}}
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| ~=3.7 | Python |
نحوه نصب
نصب پکیج whl cornea-1.1.0:
pip install cornea-1.1.0.whl
نصب پکیج tar.gz cornea-1.1.0:
pip install cornea-1.1.0.tar.gz