Last active
February 12, 2022 17:47
-
-
Save yavuzKomecoglu/d2f0b658cc7ff19785ff6217b4ef9ccc to your computer and use it in GitHub Desktop.
intenseye-detection-api.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
API_URL = 'https://api.intenseye.com/images/detection' | |
TOKEN = '{INTENSEYE_TOKEN}' | |
IMAGE_URL = "http://yavuzkomecoglu.com/img/hababam.jpg" | |
headers = { | |
'Content-Type': 'application/json' | |
} | |
payload = { | |
"image": { | |
"url": IMAGE_URL | |
}, | |
"tracks": [{ | |
"type": "person", | |
"params": { | |
"pose": True, | |
"emotion": True, | |
"ageGender": True | |
} | |
} | |
], | |
"options": { | |
"objectDetection": { | |
"confidence": 0.85 | |
} | |
} | |
} | |
r = requests.put(API_URL, auth=(TOKEN, ''), data=json.dumps(payload), headers = headers) | |
print("HTTP Status Code: " + str(r.status_code)) | |
print(r.json()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment