方便開發者分析手繪圖像,Google釋出 A I塗鴉服務 Quick Draw API

方便開發者分析手繪圖像,Google釋出AI塗鴉服務Quick Draw API

News from: iThome & Google Open Source.

為了方便開發者取得手繪圖像資料做分析,Google最近釋出AI塗鴉服務Quick Draw API,讓網頁開發者可以用一行程式碼,指定圖像類別、呈現顏色和動畫時間,在網頁專案中呈現指定圖像。

Google近日針對AI塗鴉服務Quick Draw釋出API,讓網頁開發者可以用一行程式碼,指定圖像類別、呈現顏色和動畫時間,在網頁專案中呈現指定圖像,總共有超過4,600萬張塗鴉圖像,Google是透過Polymer 3元和Data API,回傳JSON物件或是HTML Canvas呈現圖像,使用者不需要下載所有資料,就能開始建立自己的專案,方便開發者取得圖像資料,作為分析資料庫。


Google的Creative實驗室在過去幾年中,與手寫辨識團隊合作,釋出多項塗鴉辨識的成果,AI塗鴨服務QuickDraw便是Google在2016年推出的遊戲,讓使用者用20秒的時間畫出指定的圖像,而使用者繪畫的過程中,系統會猜測使用者描繪的影像,直到使用者畫對或是20秒時間截止,QuickDraw主要是透過神經網路來辨識使用者畫出的圖像,推出之後Google收集到了超過10億張包含345種類別的手繪圖像資料,Google也隨後在GitHub上開源釋出5,000萬張圖像,提供全世界的開發者取得資料並投入研究。

Google UX工程師Ian Johnson表示,人們不同的繪畫方法就像不同人的標註,令人驚訝的是,透過重疊數百萬張手繪圖像,可以了解不同文化的人類會有什麼樣不一樣的行為,舉例來說,根據Quartz研究報告顯示,5萬個美國人中,86%的人會以逆時針的方式畫圓,而800個日本人中,有80%的人會用順時針的方式畫圓,這樣的繪畫方式可以從日本人寫字的順序發現,通常是由左上到右下。

另外一個有趣的結果是,美國和臺灣人畫椅子的方式完全不同,美國人會直觀的畫出椅子,臺灣人則是用透視角度畫出椅子,不只是臺灣,其實多半亞洲和東南亞國家的人都會用透視的方式畫出椅子,像是日本、韓國、香港、馬來西亞等。另外,臺灣、日本和韓國在畫笑臉時,與其他國家不同,會畫出彎彎的眼睛。從交通號誌車輛到冰淇淋甜筒等,因為受到文化和環境的影響,每個國家的人都有不同的詮釋。





-----------------------------------------------------------------------------------



Introducing a Web Component and Data API for Quick, Draw!

Thursday, November 15, 2018


Over the past couple years, the Creative Lab in collaboration with the Handwriting Recognition team have released a few experiments in the realm of “doodle” recognition.  First, in 2016, there was Quick, Draw!, which uses a neural network to guess what you’re drawing.  Since Quick, Draw! launched we have collected over 1 billion drawings across 345 categories.  In the wake of that popularity, we open sourced a collection of 50 million drawings giving developers around the world access to the data set and the ability to conduct research with it.

"The different ways in which people draw are like different notes in some universally human scale" - Ian Johnson, UX Engineer @ Google

Since the initial dataset was released, it has been incredible to see how graphs, t-sne clusters, and simply overlapping millions of these doodles have given us the ability to infer interesting human behaviors, across different cultures.  One example, from the Quartz study, is that 86% of Americans (from a sample of 50,000) draw their circles counterclockwise, while 80% of Japanese (from a sample of 800) draw them clockwise. Part of this pattern in behavior can be attributed to the strict stroke order in Japanese writing, from the top left to the bottom right.


It’s also interesting to see how the data looks when it’s overlaid by country, as Kyle McDonald did, when he discovered that some countries draw their chairs in perspective while others draw them straight on.


On the more fun, artistic spectrum, there are some simple but clever uses of the data like Neil Mendoza’s face tracking experiment and Deborah Schmidt’s letter collages.


See the video here of Neil Mendoza mapping Quick, Draw! facial features to your own face in front of a webcam


See the process video here of Deborah Schmidt packing QuickDraw data into letters using OpenFrameworks
Some handy tools have also been released from the community since the release of all this data, and one of those that we’re releasing now is a Polymer component that allows you to display a doodle in your web-based project with one line of markup:


The Polymer component is coupled with a Data API that layers a massive file directory (50 million files) and returns a JSON object or an HTML canvas rendering for each drawing.  Without downloading all the data, you can start creating right away in prototyping your ideas.  We’ve also provided instructions for how to host the data and API yourself on Google Cloud Platform (for more serious projects that demand a higher request limit).  

One really handy tool when hosting an API on Google Cloud is Cloud Endpoints.  It allowed us to launch a demo API with a quota limit and authentication via an API key.  

By defining an OpenAPI specification (here is the Quick, Draw! Data API spec) and adding these three lines to our app.yaml file, an Extensible Service Proxy (ESP) gets deployed with our API backend code (more instructions here):


We used a public Google Group as an access control list, so anyone who joins can then have the API available in their API library.



This component and Data API will make it easier for  creatives out there to manipulate the data for their own research.  Looking to the future, a potential next step for the project could be to store everything in a single database for more complex queries (i.e. “give me an recognized drawing from China in March 2017”).  Feedback is always welcome, and we hope this inspires even more types of projects using the data! More details on the project and the incredible research projects done using it can be found on our GitHub repo

By Nick Jonas, Creative Technologist, Creative Lab


留言

熱門文章