Skip to content

Plant.id Health Assessment

Dominika Lauko edited this page Oct 18, 2022 · 35 revisions

⚠️ This version is depracated! See the documentation of the current version.

Plant.id Health Assessment is a feature of Plant.id API. Plant diseases identification API provides information about the plant's health and identifies specific problems.

Request

To get plant health information, be sure to include one of the following modifiers in your identification request:

  • "health_probability" - get only is_healthy_probability and is_healthy in response (see below)
  • "health_all" - get plant health information (costs additional identification credit)
  • "health_auto" - get plant health information only in case the plant is not healthy (costs additional identification credit, only when the plant is not healthy)

To get additional information about the suggested diseases (like disease description and treatment), specify the required info in the following parameter in your request:

Use modifier disease_similar_images to get similar images of the plant health issue more info here.

requests.post(
    "https://api.plant.id/v2/identify",
    json={
        "images": images,
        "modifiers": ["health_all", "disease_similar_images"],
        # "modifiers": ["health_auto", "disease_similar_images"],
        # "modifiers": ["health_probability"],
        "plant_details": ["common_names", "url", "wiki_description", "taxonomy"],
        "disease_details": ["classification", "common_names", "description", "treatment", "url"]},
    headers={
        "Content-Type": "application/json",
        "Api-Key": "Ask for one: https://web.plant.id/api-access-request/"}
    ).json()

Response

The result in the JSON format contains information about the health status of the plant and a list of suggestions of possible diseases. There are 9 root categories: Abiotic, Animalia, Bacteria, Canker, Chromista, Dead plant, Fungi, Senescence, and Viruses. Each suggestion contains:

  • 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)
  • probability - certainty level that the suggested disease is in the picture
  • redundant - a boolean value indicating that the class can be discarded when the difference between the predicted probability of parent (higher in the hierarchy) and child class (lower in the hierarchy) is insignificant
  • similar_images - a list of representative images of the identified disease carefully selected by the model so it resembles the input image (Similar images are included in the result only if you add the value similar_image in the modifiers list in the request.), the list contains dictionaries with image data (id, similarity, url, url_small)
  • disease_details - info you requested (if available) about suggested diseases, see Disease details documentation page

The information about health status contains is_healthy_probability (the probability that the plant has a disease) and a boolean attribute is_healthy, suggesting whether the plant is healthy or sick.

The following JSON structure will be part of the Plant.id API response:

 "health_assessment":{
      "is_healthy_probability":0.11249713499999991,
      "is_healthy":false,
      "diseases":[
         {
            "entity_id":456,
            "name":"abiotic",
            "probability":0.8812629195,
            "redundant":true,
            "similar_images":[
               {
                  "id":"6019f286ea314130898a7eccbc011ce7",
                  "similarity":0.35322799808153865,
                  "url":"https://plant...11ce7.jpg",
                  "url_small":"https://plant...11ce7.small.jpg"
               },
               {
                  "id":"4f4c9f23e5e844bca0bca33b106df1fe",
                  "similarity":0.31670296768175343,
                  "url":"https://plant...f1fe.jpg",
                  "url_small":"https://plant...f1fe.small.jpg"
               }
            ],
            "disease_details":{
                "cause":null,
                "classification":[
                  
               ],
               "common_names":[
                  "abiotic disorder",
                  "physiological plant disorder"
               ],
               "description":"Abiotic disorders ....",
               "treatment":{
                  "prevention":[
                     "Choose a ....",
                     "Grow plants ....",
                     "Grow less ...."
                  ]
               },
               "url":"https://en.wikipedia.org/wiki/Physiological_plant_disorder",
               "local_name":"abiotic",
               "language":"en"
            }
         },
         {
            "entity_id":941,
            "name":"water-related issue",
            "probability":0.755133271,
            "redundant":true,
            "similar_images":[
               {
                  "id":"8c4f6e0396e34ffc8edc3838dd3855b0",
                  "similarity":0.32370444036413903,
                  "url":"https://plant...55b0.jpg",
                  "url_small":"https://plant...55b0.small.jpg"
               },
               {
                  "id":"0a006fc5499c4f97be23be94fb686a41",
                  "similarity":0.2883316909054816,
                  "url":"https://plant...6a41.jpg",
                  "url_small":"https://plant...6a41.small.jpg"
               }
            ],
            "disease_details":{
                "cause":null,
                "classification":[
                  "abiotic"
               ],
               "common_names":null,
               "description":"Water-related abiotic ...",
               "treatment":{
                  "biological":[
                     "Maintain....",
                     "Replant the ...",
                     "Select appropriate ....",
                     "Temporarily move ..."
                  ],
                  "prevention":[
                     "Avoid ...",
                     "Grow less ..."
                  ]
               },
               "url":"https://en.wikipedia.org/wiki/Houseplant_care#Water_requirement",
               "local_name":"water-related issue",
               "language":"en"
            }
         },
         {
            "entity_id":899,
            "name":"water excess or uneven watering",
            "probability":0.6154770555,
            "similar_images":[
               {
                  "id":"89a28ad7ab4248ddb45626227b394026",
                  "similarity":0.33341763538604297,
                  "url":"https://plant...4026.jpg",
                  "url_small":"https://plant...4026.small.jpg"
               },
               {
                  "id":"6bc8144cc00d46e49510fba143c1353c",
                  "similarity":0.3130629863192067,
                  "url":"https://plant...353c.jpg",
                  "url_small":"https://plant...353c.small.jpg"
               }
            ],
            "disease_details":{
                "cause":null,
                "classification":[
                  "abiotic",
                  "water-related issue"
               ],
               "common_names":[
                  "overwatering"
               ],
               "description":"Water excess ....",
               "treatment":{
                  "biological":[
                     "Maintain ...",
                     "Select ...",
                     "Temporarily move ..."
                  ],
                  "prevention":[
                     "Improve ...",
                     "Avoid ...",
                     "Grow less ..."
                  ]
               },
               "url":"https://www.missouribotanicalgarden.org/gardens-gardening/your-garden/help-for-the-home-gardener/advice-tips-resources/pests-and-problems/environmental/overwatering.aspx",
               "local_name":"water excess or uneven watering",
               "language":"en"
            }
         },
      ]
   }