この文書の現在のバージョンと選択したバージョンの差分を表示します。
次のリビジョン | 前のリビジョン | ||
pythonメモ [2017/08/09] adash333 作成 |
pythonメモ [2018/10/07] (現在) |
||
---|---|---|---|
ライン 1: | ライン 1: | ||
===== pythonメモ ===== | ===== pythonメモ ===== | ||
+ | いくらKerasが簡単と言っても、自前データである程度自由に機械学習を行う場合は、ある程度pythonと機械学習の勉強が必要です。 | ||
+ | |||
+ | 機械学習のおすすめの本は、繰り返しになりますが、以下の本を10回ほど繰り返して読んで手を動かすのが一番だと思われます。 | ||
+ | |||
+ | <html> | ||
+ | <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//rcm-fe.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=twosquirrel-22&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=4873117585&linkId=29b7673d63d4fea6bf61b5a2b0b060ed"></iframe> | ||
+ | </html> | ||
+ | |||
+ | pythonの勉強には、以下の本の第1章から第4章までを繰り返すのがおすすめですが、こちらのページに、最低限の機械学習関連のメモをまとめたもののリンクを貼らせていただきます。 | ||
+ | |||
+ | <html> | ||
+ | <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//rcm-fe.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=twosquirrel-22&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=487311778X&linkId=493a97f9d6dfe99c3219480d17e1276d"></iframe> | ||
+ | </html> | ||
+ | |||
+ | ==== 機械学習プログラミングで必要なpythonメモ ==== | ||
+ | |||
+ | pythonで機械学習をしていると、import numpyとかよく出てくる。 | ||
+ | |||
+ | プログラミングど素人の私にはさっぱりわからないので、少しずつまとめていきたい。 | ||
+ | |||
+ | <python一般> | ||
+ | |||
+ | "import cv2" | ||
+ | |||
+ | http://twosquirrel.mints.ne.jp/?p=20039 | ||
+ | |||
+ | "リスト[]とタプル()" | ||
+ | |||
+ | http://twosquirrel.mints.ne.jp/?p=20084 | ||
+ | |||
+ | "import os " | ||
+ | |||
+ | http://twosquirrel.mints.ne.jp/?p=20115 | ||
+ | |||
+ | "from PIL import Image" | ||
+ | |||
+ | http://twosquirrel.mints.ne.jp/?p=20135 | ||
+ | |||
+ | "import numpy as np" | ||
+ | |||
+ | http://twosquirrel.mints.ne.jp/?p=20153 | ||
+ | |||
+ | "%matplotlib inline" | ||
+ | "import matplotlib.pyplot as plt" | ||
+ | |||
+ | https://qiita.com/samacoba/items/81093984605abfed70d1 | ||
+ | |||
+ | "import struct" | ||
+ | |||
+ | http://komaken.me/blog/2014/05/30/python%E3%81%AEstruct%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%92%E8%A7%A6%E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B/">http://komaken.me/blog/2014/05/30/python%E3%81%AEstruct%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%82%92%E8%A7%A6%E3%81%A3%E3%81%A6%E3%81%BF%E3%82%8B/ | ||
+ | |||
+ | |||
+ | |||
+ | |||
pythonでは、配列を、大かっこ[]で表し、「リスト」という名前がついている。 | pythonでは、配列を、大かっこ[]で表し、「リスト」という名前がついている。 | ||
ライン 6: | ライン 60: | ||
+ | |||
+ | |||
+ | |||
+ | ===== 参考 ===== | ||
+ | http://qiita.com/ukwksk/items/483d1b9e525667b77187\\ | ||
+ | python3系でのPython Image Libraryの使用方法 | ||
+ | |||
+ | http://www.mwsoft.jp/programming/computer_vision_with_python/1_1_pil.html\\ | ||
+ | Pillow(Python Imaging Library)のインストールと簡単なサンプルコード | ||
+ | |||
+ | http://python-remrin.hatenadiary.jp/entry/2017/05/20/181211\\ | ||
+ | 20170520 PILの使い方(1) | ||
+ | |||
+ | http://matthiaseisen.com/pp/patterns/p0202/\\ | ||
+ | Crop Images with PIL/Pillow | ||
+ | |||
+ | 画像の切り抜きは、crop | ||
+ | |||
+ | thumbnailは、破壊的、元画像がなくなるので、あらかじめコピーを作っておいたほうが良い | ||
+ | |||
+ | resize | ||
+ | |||
+ | |||
+ | http://qiita.com/zaburo/items/5637b424c655b136527a\\ | ||
+ | Matplotlibで画像を表示 | ||
+ | zaburo | ||
+ | 2015年12月27日に投稿 | ||
===== メモ ===== | ===== メモ ===== | ||
(作成中) | (作成中) | ||
+ | |||