Mushoom ID est une API d'identification de champignons basée sur la reconnaissance d'images par apprentissage automatique. Obtenez votre clé API et commencez votre implémentation.
Envoyez-nous vos images de champignons et obtenez une liste de suggestions d'espèces possibles avec des informations supplémentaires.
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 ()
Même exemple en python pur
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