Skip to content

Mushroom ID documentation with code examples. For more info se the product page: web.plant.id/mushroom-id.

License

Notifications You must be signed in to change notification settings

flowerchecker/mushroom-id-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mushroom-id-API

Mushoom ID is a mushroom identification API based on machine learning image recognition. Get your API key and get started with your implementation.

Mushroom Identification 🍄

Send us your fungi images, and get a list of possible species suggestions with additional information.

pip install kindwise-api-client
from kindwise import MushroomApi

api = MushroomApi('your_api_key')
identification = api.identify('../images/unknown_mushroom.jpg', details=['url', 'common_names'])

for suggestion in identification.result.classification.suggestions:
    print(suggestion.name)
    print(f'probability {suggestion.probability:.2%}')
    print(suggestion.details['url'])
    print(suggestion.details['common_names'])
    print()

Same example in pure python

import base64
import requests

# encode images to base64
with open('unknown_mushroom.jpg', 'rb') as file:
    images = [base64.b64encode(file.read()).decode('ascii')]

response = requests.post(
    'https://mushroom.kindwise.com/api/v1/identification?details=common_names,url',
    json={
        'images': images,
        'similar_images': True,
    },
    headers={
        'Content-Type': 'application/json',
        'Api-Key': '-- ask for one: https://admin.kindwise.com/signup --',
    }).json()

for suggestion in response['result']['classification']['suggestions']:
    print(suggestion['name'])                     # Lactarius deterrimus
    print(suggestion['details']['common_names'])  # orange milkcap
    print(suggestion['details']['url'])           # https://en.wikipedia.org/wiki/Lactarius_deterrimus

About

Mushroom ID documentation with code examples. For more info se the product page: web.plant.id/mushroom-id.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages