{"id":1284,"date":"2017-02-21T00:00:32","date_gmt":"2017-02-20T15:00:32","guid":{"rendered":"http:\/\/bezelie.com\/blog\/?page_id=1284"},"modified":"2017-10-09T11:49:13","modified_gmt":"2017-10-09T02:49:13","slug":"%e3%80%90%e3%81%9d%e3%81%ae%ef%bc%91%ef%bc%94%e3%80%91%e3%80%80google-vision-api%e3%81%a7%e7%94%bb%e5%83%8f%e8%aa%8d%e8%ad%98%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"page","link":"http:\/\/bezelie.com\/blog\/?page_id=1284","title":{"rendered":"BPK-12 : Google Vision API\u3067\u753b\u50cf\u8a8d\u8b58\u3057\u3066\u307f\u308b"},"content":{"rendered":"<div align=\"center\"><img decoding=\"async\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2017\/02\/IMG_1943.jpg\" width=\"320\" \/><\/div>\n<ul>\n<li>Google\u306f\u69d8\u3005\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b89\u4fa1\u3067\u63d0\u4f9b\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u4eca\u5e74\u306f\u3055\u3089\u306bRaspberry Pi\u5411\u3051\u30c4\u30fc\u30eb\u306b\u529b\u3092\u5165\u308c\u3066\u304f\u308c\u308b\u3089\u3057\u3044\u3067\u3059\u3002<a href=\"http:\/\/jp.techcrunch.com\/2017\/01\/26\/20170125google-planning-ai-tools-for-pi-makers-this-year\/\">Google\u304cRaspberry Pi\u7528\u306eAI\u30c4\u30fc\u30eb\/\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u63d0\u4f9b\u3092\u5145\u5b9f<\/a>\u3000\u3053\u3053\u3067\u306fGoogle Cloud Vision API\u3092\u4f7f\u3063\u3066\u753b\u50cf\u8a8d\u8b58\u3059\u308b\u30ed\u30dc\u30c3\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\u3002<\/li>\n<li>Vision API\u3092\u4f7f\u3046\u65b9\u6cd5\u306fREST\u65b9\u5f0f\u3068Cloud SDK\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u3088\u308a\u7c21\u5358\u306b\u59cb\u3081\u3089\u308c\u308bREST\u65b9\u5f0f\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/ghxp1DsWFFI\" width=\"560\" height=\"314\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h2>\u4e8b\u524d\u306e\u6e96\u5099<\/h2>\n<ul>\n<li><a href=\"http:\/\/bezelie.com\/blog\/?page_id=941\">BPK-08 AquesTalk Pi\u3067\u558b\u3089\u305b\u3066\u307f\u308b<\/a>\u3092\u5b8c\u4e86\u3055\u305b\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002\u65e5\u672c\u8a9e\u97f3\u58f0\u5408\u6210\u30c4\u30fc\u30eb\u300cAquesTalkPi\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30b9\u30d4\u30fc\u30ab\u30fc\u306e\u8a2d\u5b9a\u3092\u7d42\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li><a href=\"http:\/\/bezelie.com\/blog\/?page_id=574\">BPK-ex2 : \u58f0\u3092\u9332\u97f3\u3057\u3066\u3001\u305d\u306e\u307e\u307e\u518d\u751f<\/a>\u3092\u53c2\u7167\u3057\u3001\u30de\u30a4\u30af\u306e\u8a2d\u5b9a\u3092\u7d42\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li><a href=\"http:\/\/bezelie.com\/blog\/?page_id=1108\">BPK-13 : Julius\u3067\u97f3\u58f0\u8a8d\u8b58\u3057\u3066\u307f\u308b<\/a>\u3092\u5b8c\u4e86\u3055\u305b\u3066\u304f\u3060\u3055\u3044\u3002\u97f3\u58f0\u8a8d\u8b58\u30c4\u30fc\u30eb\u300cJulius\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li><a href=\"http:\/\/bezelie.com\/blog\/?page_id=1265\">BPK-ex5 : Alexa\u306b\u6307\u793a\u3092\u51fa\u3059\u30ed\u30dc\u30c3\u30c8<\/a>\u3092\u53c2\u7167\u3057\u3001\u82f1\u8a9e\u97f3\u58f0\u5408\u6210\u30c4\u30fc\u30eb\u300cflite\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<h2>Google Developers Console\u3067\u306e\u8a2d\u5b9a<\/h2>\n<ul>\n<li>google\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u3072\u3068\u306f\u4f5c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<a href=\"https:\/\/accounts.google.com\/SignUp\">Google \u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u4f5c\u6210<\/a><\/li>\n<li><a href=\"https:\/\/console.developers.google.com\/\">Google Developers Console<\/a>\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u3053\u3053\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3001\u8ab2\u91d1\u3092\u6709\u52b9\u5316\u3057\u3001\u300cCloud Vision API\u300d\u3092\u6709\u52b9\u5316\u3057\u3001API\u30ad\u30fc\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/li>\n<li>\u65e5\u672c\u8a9e\u3067\u3068\u3066\u3082\u5206\u304b\u308a\u3084\u3059\u304f\u8aac\u660e\u3057\u3066\u3044\u308b\u30da\u30fc\u30b8\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3053\u3061\u3089\u3092\u53c2\u8003\u306b\u9032\u3081\u308b\u3068\u826f\u3044\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<a href=\"https:\/\/syncer.jp\/cloud-vision-api\">syncer.jp : Cloud Vision API\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081<\/a><\/li>\n<li>\u3053\u3053\u3067\u4f5c\u6210\u3057\u305fAPI\u30ad\u30fc\u306f\u3053\u306e\u3042\u3068\u4f7f\u3046\u306e\u3067\u30b3\u30d4\u30fc\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u767b\u9332\u958b\u59cb\u304b\u3089\uff16\uff10\u65e5\u9593\u306f\uff13\u4e07\u5186\u307e\u3067\u7121\u6599\u3067\u4f7f\u3048\u307e\u3059\u3002<\/li>\n<\/ul>\n<h2>git\u30ec\u30dd\u30b8\u30c8\u30ea\u306e\u66f4\u65b0<\/h2>\n<ul>\n<li>git\u3067\u516c\u958b\u3057\u3066\u3044\u308bbezelie\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u304c\u3001\u3068\u304d\u3069\u304d\u66f4\u65b0\u3057\u3066\u307e\u3059\u306e\u3067\u3001\u4ee5\u524d\u30af\u30ed\u30fc\u30f3\u3057\u305f\u304b\u305f\u3082\u6539\u3081\u3066\u66f4\u65b0\uff08git pull\uff09\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<pre><code>$ cd\n$ cd bezelie\/pi\n$ sudo git pull\n<\/code><\/pre>\n<h2>API\u30ad\u30fc\u306e\u57cb\u3081\u8fbc\u307f<\/h2>\n<ul>\n<li>\u5148\u307b\u3069\u53d6\u5f97\u3057\u305fAPI\u30ad\u30fc\u3092\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002<\/li>\n<li>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u30fc\u3067\u958b\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<pre><code>$ sudo nano sampleVision1.py\n<\/code><\/pre>\n<ul>\n<li>\uff11\uff16\u884c\u76ee\u3042\u305f\u308a\u306b\u3042\u308b\u300cAPI_KEY = &#8221; \u300d\u306e\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u9593\u306bAPI\u30ad\u30fc\u3092\u30da\u30fc\u30b9\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u30a8\u30c7\u30a3\u30bf\u30fc\u3092\u4fdd\u5b58\u7d42\u4e86\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n<h2>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c<\/h2>\n<ul>\n<li>\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306f\u5fc5\u9808\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30ab\u30e1\u30e9\u306e\u8996\u754c\u306b\u5bfe\u8c61\u7269\u3092\u3057\u3063\u304b\u308a\u5165\u308c\u308b\u305f\u3081\u306b\u306f\u3001\u3042\u3063\u305f\u307b\u3046\u304c\u3088\u3044\u3067\u3059\u3002<\/li>\n<\/ul>\n<pre><code>$ python sampleVision1.py\n<\/code><\/pre>\n<ul>\n<li>\u300c\u3053\u308c\u306a\u3042\u306b\uff1f\u300d\u300c\u3053\u308c\u306a\u3093\u3060\uff1f\u300d\u300c\u3053\u308c\u306f\u4f55\uff1f\u300d\u306a\u3069\u3068\u8a71\u3057\u304b\u3051\u308b\u3068\u3001\u30ed\u30dc\u30c3\u30c8\u304c\u300c\u3069\u308c\u3069\u308c\u300d\u3068\u8a00\u3046\u306e\u3067\u3001\u30ab\u30e1\u30e9\u306e\u524d\u306b\u5bfe\u8c61\u7269\u3092\u63b2\u3052\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u6700\u5927\uff13\u3064\u306e\u89e3\u7b54\u5019\u88dc\u304c\u82f1\u8a9e\u3067\u767a\u58f0\u304a\u3088\u3073\u753b\u9762\u306b\u6587\u5b57\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>Ctrl+C\u3067\u7d42\u4e86\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<\/ul>\n<div align=\"center\"><img decoding=\"async\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2017\/02\/IMG_1946.jpg\" width=\"320\" \/><\/div>\n<h2>\u5fdc\u7528<\/h2>\n<ul>\n<li><a href=\"https:\/\/cloud.google.com\/vision\/docs\/requests-and-responses\">\u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08\u65e5\u672c\u8a9e\uff09<\/a><\/li>\n<li>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u753b\u50cf\u306b\u6620\u3063\u3066\u3044\u308b\u7269\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u540d\u3092\u8868\u793a\u3059\u308b\u300cLABEL_DETECTION\u300d\u3068\u3044\u3046\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u304c\u3001\uff14\uff12\u884c\u76ee\u3042\u305f\u308a\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3042\u308b\u300cTEXT_DETECTION\u300d\u300cLOGO_DETECTION\u300d\u3082\u3001\u307b\u307c\u304a\u306a\u3058\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u300cTEXT_DETECTION\u300d\u306f\u6587\u5b57\u8a8d\u8b58\uff08OCR\uff09\u3001\u300cLOGO_DETECTION\u300d\u306f\u30ed\u30b4\u8a8d\u8b58\u3067\u3059\u3002<\/li>\n<li>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u8a8d\u8b58\u7d50\u679c\u3092\uff13\u3064\u8a00\u308f\u305b\u3066\u3044\u307e\u3059\u304c\u3001\uff11\u3064\u3067\u3044\u3044\u3084\u3068\u3044\u3046\u5834\u5408\u306f\uff17\uff12\u884c\u76ee\u3042\u305f\u308a\u306b\u3042\u308b\u300cfor i in range(3):\u300d\u306e\u6570\u5b57\u3092\uff11\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Google\u306f\u69d8\u3005\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b89\u4fa1\u3067\u63d0\u4f9b\u3057\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u4eca\u5e74\u306f\u3055\u3089\u306bRaspberry Pi\u5411\u3051\u30c4\u30fc\u30eb\u306b\u529b\u3092\u5165\u308c\u3066\u304f\u308c\u308b\u3089\u3057\u3044\u3067\u3059\u3002Google\u304cRaspberry Pi\u7528\u306eAI\u30c4\u30fc\u30eb\/\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u63d0\u4f9b\u3092\u5145\u5b9f\u3000\u3053\u3053 &hellip; <a href=\"http:\/\/bezelie.com\/blog\/?page_id=1284\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;BPK-12 : Google Vision API\u3067\u753b\u50cf\u8a8d\u8b58\u3057\u3066\u307f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":792,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1284","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/1284","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1284"}],"version-history":[{"count":10,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/1284\/revisions"}],"predecessor-version":[{"id":1368,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/1284\/revisions\/1368"}],"up":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/792"}],"wp:attachment":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1284"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}