Muhoom ID adalah API identifikasi jamur berdasarkan pengenalan gambar pembelajaran mesin. Dapatkan kunci API Anda dan mulai penerapannya.
Kirimkan gambar jamur Anda kepada kami, dan dapatkan daftar kemungkinan saran spesies dengan informasi tambahan.
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 ()
Contoh yang sama di python murni
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