Welcome to Anivision Api , this api is made on fastapi (python) and take input image in base64 encoding in json format. It gives the bounding box location and name of the animal. There are 398 species and sub-species in total.
{
"img_base64": "/9j/4AA..." //string format
}
{
"result":[
"animal name", //string
"center at x axis", //float ex 0.5 relative to image
"center at y axis", //float
"width of bounding box", //float
"height of bounding box" //float
]
}
import requests
import base64
import json
reqUrl = "https://anivision-backend.herokuapp.com/"
headersList = {
"Accept": "*/*",
"Content-Type": "application/json"
}
with open('785432.jpg','rb') as file:
image_binary=file.read()
image_base64=base64.b64encode(image_binary)
payload = json.dumps({
"img_base64": image_base64.decode()
})
response = requests.request("POST", reqUrl, data=payload, headers=headersList)
print(response.text)