LoginSignup
12
14

More than 5 years have passed since last update.

TensorFlow入門 - 画像認識編

Posted at

TensorFlow入門Hello World編に続きImageNetという学習データを使った画像認識を試してみました。

構文

(tensorflow)$ python classify_image.py --image_file [画像ファイル]

※classify_image.py のソースはここのソースをコピーペーストしてください。

ストーブの画像をwgetでダウンロードして以下のように実行してみました。

wget https://qiita-image-store.s3.amazonaws.com/0/26079/ef75a5b4-8ddd-0015-9b3d-194b55a6b88e.jpeg
python classify_image.py --image_file ef75a5b4-8ddd-0015-9b3d-194b55a6b88e.jpeg

表示結果

stove (score = 0.99871)
fire screen, fireguard (score = 0.00047)
space heater (score = 0.00021)
rotisserie (score = 0.00002)
table lamp (score = 0.00002)

stoveである確率が99%か!賢い

参考:
http://qiita.com/nkjm/items/a2dada74d48b29f0e5f4

12
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
14