OFR: Optical Feature Recognition
Our API provides a feature to extract visual features from images.
Identify visual features in images.​
Performs optical feature recognition (OFR) to identify visual features such as objects, landmarks, or logos from images, aiding in image analysis and categorization.
path=/vision
method=post
Request
JavaScript
const response = await fetch('https://api.umamiai.xyz/v1/vision', {
method: 'POST',
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_UMAMIAI_API_KEY"
},
body: JSON.stringify({
"image": {
"source": {
"imageUri": "text"
}
},
"features": [
{
"type": "FACE_DETECTION"
}
]
}),
});
const data = await response.json();
Python
import requests
response = requests.post(
"https://api.umamiai.xyz/v1/vision",
headers={"Content-Type":"application/json","Authorization": "Bearer YOUR_UMAMIAI_API_KEY"},
json={"image":{"source":{"imageUri":"text"}},"features":[{"type":"FACE_DETECTION"}]}
)
data = response.json()
Curl
curl -L \
-X POST \
-H 'Authorization: Bearer YOUR_UMAMIAI_API_KEY' \
-H 'Content-Type: application/json' \
'https://api.umamiai.xyz/v1/vision' \
-d '{"image":{"source":{"imageUri":"text"}},"features":[{"type":"FACE_DETECTION"}]}'
Response
{
"faceAnnotations": [],
"landmarkAnnotations": [],
"logoAnnotations": [],
"labelAnnotations": [],
"localizedObjectAnnotations": [],
"textAnnotations": []
}