-
Notifications
You must be signed in to change notification settings - Fork 45
Plant Health Assessment
Submit photos of a sick plant to our backend and get the JSON result with plant health status and specific problems.
See the Plant.id Health Assessment product page.
Endpoint:
https://api.plant.id/v2/health_assessment
Request method:
- POST
Required parameters:
-
images
- a list of one or more images of the plant you want to diagnose (images should be encoded as strings in Base64)
Optional parameters:
-
latitude
- geographic coordinate (float) - increases the identification accuracy -
longitude
- geographic coordinate (float) - increases the identification accuracy -
modifiers
- list of strings that influence the identification process and results (speed, accuracy, response content), see the list of available modifiers -
disease_details
- list of strings that specify what additional information about the plant disease (e.g. description, treatment) will be included in the response, see the list of available disease details -
language
- language code (ISO 639-1, default"en"
) that specifies the language of the response (supported languages: English -"en"
, German -"de"
, Czech -"cs"
, Spanish -"es"
, French -"fr"
, Italian -"it"
, Dutch -"nl"
, Polish -"pl"
, Swedish -"sv"
, Chinese -"zh"
, Danish -"da"
, Turkish -"tr"
, Hindu -"hi"
, Arabic -"ar"
, Portuguese -"pt"
, Korean -"ko"
) -
languages
- list of up to 3 language codes (ISO 639-1) to specify languages of the response (do not combine with thelanguage
parameter); if you use this parameter, the corresponding fields in the response will be converted to dictionaries with the language code as the key. -
custom_id
- unique identifier you can set for your purpose (int) - can be used to handle network connection errors -
datetime
- timestamp in seconds (int) -
identification_timeout
- timeout limit in seconds (int, default20
seconds, max.20
seconds); if the identification takes longer than the given number of seconds, the identification info is returned without a suggestion -
prune_diseases
- boolean (optional) - if true: list of suggested diseases is limited to more specific diseases with general diseases such as "Abiotic" or "Water-related issue" removed.
See the request examples in different programming languages in our repository.
The result includes plant health status and a list of suggested diseases in JSON format. There are 9 root categories: Abiotic, Animalia, Bacteria, Canker, Chromista, Dead plant, Fungi, Senescence, and Viruses. Each suggestion includes:
-
entity_id
- a unique identifier for each disease that will not change over time -
name
- the name of the disease in our database (Latin or English), which may change over time -
probability
- level of certainty that the suggested disease is present in the image -
redundant
- a boolean value indicating that the class can be discarded when the difference between the predictedprobability
of parent (higher in the hierarchy) and child class (lower in the hierarchy) is insignificant; specifically, this feature in the response activates when theprobability
of the child class is at least 80% of theprobability
of the parent class (or less than two percentages in absolute numbers that aims to assess cases with aprobability
of less than 10%); for example, when theprobability
of a parent class (e.g. abiotic) is 95% and theprobability
of a child class (e.g. water-related issue) is at least 76%, then the attribute redundant:true will appear in the response -
similar_images
- a list of representative images of the identified disease selected by the model to resemble the input image; the list contains dictionaries with image data (id
,similarity
,url
,url_small
); similar images are included in the result only if you add the valuesimilar_image
in themodifiers
list in the request -
disease_details
- info you requested (if available) about suggested diseases, see Disease details documentation page
The information about health status contains a boolean attribute is_healthy
, which indicates whether the plant is healthy or sick, and is_healthy_probability
, which estimates the probability that the plant is sick.
See the JSON response example.
You can later retrieve the identification results using the identification ID
or CUSTOM_ID
.
Make sure that identification with the given ID
(or your CUSTOM_ID
) has already been processed.
URIs:
-
https://api.plant.id/v2/get_identification_result/ID
-
https://api.plant.id/v2/get_identification_result/custom_id/CUSTOM_ID
Request method:
- POST
Optional parameters:
-
disease_details
- see the Request section -
language
- see the Request section
https://api.plant.id/v2/get_identification_result/multiple
Get results from more identifications at once.
Request method:
- POST
Specify at least one of the following parameters:
-
ids
- list of ids from the result of the identification response -
custom_ids
- list of ids specified by you in the identification request
Optional parameters:
-
disease_details
- see the Request section -
language
- see the Request section