autozoom_enabled

Updated: 28-6-2023

Description

Tries to automatically localize a species, potentially improving accuracy. Requires more computation power and longer response time. autozoom_enabled example autozoom_enabled example

Values

Value Description
0 disabled (default)
1 enabled

Example use

Get test image

Requires curl and jq.

curl \
    -X POST \
    -F "image=@AO_1120028.jpg" \
    -F "autozoom_enabled=1" \
    "https://multi-source.identify.biodiversityanalysis.eu/v2/observation/identify" | \
jq

Requires the Python requests library. Available with pip install requests.

import json

import requests


def example_request():
    url = (
        "https://multi-source.identify."
        "biodiversityanalysis.eu/v2/"
        "observation/identify"
    )
    test_image = "buteo2.jpg"
    data = {"autozoom_enabled": 1}

    with open(test_image, "rb") as image:
        response = requests.post(
            url=url,
            files={"image": image},
            data=data,
        )
    return response.json()


if __name__ == "__main__":
    json_response = example_request()
    print(json.dumps(json_response, indent=2))
{
  "api_implementation": {
    "tag": "api-v2:2.1.0-20230616",
    "version": "49476035"
  },
  "generated_by": {
    "datetime": "2023-06-28T11:26:43.135858",
    "parameters": {
      "autozoom_enabled": "1"
    },
    "tag": "algorithm=msm-eur:1.1-20230619,api=api-v2:2.1.0-20230616",
    "version": "algorithm=df722733dc3eb9647870d237c918cecd0d8aabeb,api=49476035"
  },
  "identification": {
    "image": {
      "confidence": "uncertain"
    }
  },
  "links": {
    "taxa": {
      "url": "v2/taxa/main_order"
    },
    "taxa_with_filter": {
      "url": "v2/taxa/main_order?id={taxon_id}"
    }
  },
  "media": [
    {
      "filename": "AO_1120028",
      "id": "image0"
    }
  ],
  "model_implementation": {
    "algorithm_tag": "msm-eur:1.1-20230619",
    "tag": "main_order",
    "version": "df722733dc3eb9647870d237c918cecd0d8aabeb"
  },
  "predictions": [
    {
      "region_group_id": "individual0",
      "taxa": {
        "items": [
          {
            "probability": 0.860428,
            "scientific_name": "Saxicola rubicola",
            "scientific_name_id": "GBIF:4408759"
          },
          {
            "probability": 0.139572,
            "scientific_name": "Saxicola rubicola hibernans",
            "scientific_name_id": "GBIF:7687128"
          },
          {
            "probability": 0,
            "scientific_name": "Saxicola rubicola rubicola",
            "scientific_name_id": "GBIF:8248237"
          },
          {
            "probability": 0,
            "scientific_name": "Saxicola maurus maurus",
            "scientific_name_id": "GBIF:7619236"
          },
          {
            "probability": 0,
            "scientific_name": "Anthus petrosus littoralis",
            "scientific_name_id": "GBIF:6486586"
          },
          {
            "probability": 0,
            "scientific_name": "Pelophylax",
            "scientific_name_id": "GBIF:2426629"
          },
          {
            "probability": 0,
            "scientific_name": "Larus fuscus intermedius",
            "scientific_name_id": "GBIF:5846432"
          },
          {
            "probability": 0,
            "scientific_name": "Anthus pratensis",
            "scientific_name_id": "GBIF:2490266"
          },
          {
            "probability": 0,
            "scientific_name": "Trachemys scripta scripta",
            "scientific_name_id": "GBIF:7062200"
          },
          {
            "probability": 0,
            "scientific_name": "Pelophylax lessonae",
            "scientific_name_id": "GBIF:2426654"
          }
        ],
        "type": "multiclass"
      }
    }
  ],
  "region_groups": [
    {
      "id": "individual0",
      "individual_id": "individual0",
      "regions": [
        {
          "box": {
            "x1": 0.166875,
            "x2": 0.833125,
            "y1": 0,
            "y2": 1
          },
          "id": "image0?region=full",
          "media_id": "image0"
        },
        {
          "box": {
            "x1": 0.389375,
            "x2": 0.69875,
            "y1": 0.23358348968105067,
            "y2": 0.698874296435272
          },
          "id": "image0?region=globalzoom",
          "media_id": "image0"
        }
      ]
    }
  ]
}