For example, [Taro Onion](https://www.google.co.jp/search?q=%E7%8E%89%E8%91%B1%E3%81%95%E3%82%93%E5 % A4% AA% E9% 83% 8E & source = lnms & tbm = isch & sa = X & ei = ZPFOVMnwHo3x8gWk1YKYCQ & ved = 0CAgQ_AUoAQ & biw = 1096 & bih = 593) Try sending a request like this.
import docomocv as d
client = d.DocomoCVClient(<YOUR_API_KEY>)
client.recognize('./tamanegi.jpg', d.Recog.food)
Such a result can be obtained.
{'candidates': [{'sites': [{'imageUrl': 'http://ecx.images-amazon.com/images/I/61t%2BbGIlK2L._SX385_.jpg', 'url': 'http://www.amazon.co.jp/gp/product/B0094BL1RM', 'title': 'Amazon.co.jp:Yaokin Onion-san Taro 15g x 300 bags:Food&Beverage'}], 'itemId': 'food_0000193194', 'imageUrl': 'http://ecx.images-amazon.com/images/I/61t%2BbGIlK2L._SX385_.jpg', 'category': 'food', 'score': 1728.025390625, 'detail': {'releaseDate': '2012/09/03', 'quantity': '300', 'itemName': 'Yaokin Onion-san Taro 15g x 300 bags', 'maker': 'Yaokin', 'brand': 'Yaokin', 'weight': '8 Kg', 'dimension': '61.4 x 57 x 43.2 cm'}}], 'recognitionId': '61486d30-5e3d-11e4-84c4-065d0f977797'}
>
You are recognized as Mr. Onion Taro!
Recommended Posts