LoginSignup
2
3

More than 3 years have passed since last update.

preprocess_input()のメモ

Last updated at Posted at 2020-01-12

preprocess_input()

画像の標準化を行う。
preprocess_inputはVGG16のような学習済みモデルで使用する。

翻訳:「画像のバッチをエンコードするテンソルまたはNumpy配列を前処理します。
参考:https://github.com/keras-team/keras-applications/blob/976050c468ff949bcbd9b9cf64fe1d5c81db3f3a/keras_applications/imagenet_utils.py#L36

VGG16の場合

パラメータ
dataformat:'channels_last'
mode:'cafe'

翻訳:caffe:画像をRGBからBGRに変換し、スケーリングせずにImageNetデータセットに対して各カラーチャネルをゼロ中心にします。
参考:https://github.com/tensorflow/tensorflow/blob/ada7cad7514b1641a58cbc333dba1ed92f5e513c/tensorflow/python/keras/applications/imagenet_utils.py#L36

「新たに推論または学習する画像をVGG16の学習に使った画像の平均で引いて、分散で割る」ってことかな。

その他

image.png

参考:https://medium.com/@sci218mike/%E5%9C%96%E7%89%87%E9%A0%90%E8%99%95%E7%90%86%E4%BD%BF%E7%94%A8keras-applications-%E7%9A%84-preprocess-input-6ef0963a483e

2
3
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
2
3