Skip to content

Instantly share code, notes, and snippets.

@yavuzKomecoglu
Last active February 12, 2022 17:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yavuzKomecoglu/d2f0b658cc7ff19785ff6217b4ef9ccc to your computer and use it in GitHub Desktop.
Save yavuzKomecoglu/d2f0b658cc7ff19785ff6217b4ef9ccc to your computer and use it in GitHub Desktop.
intenseye-detection-api.py
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