fix pycaffe input processing
authorEvan Shelhamer <shelhamer@imaginarynumber.net>
Thu, 31 Jul 2014 23:19:20 +0000 (16:19 -0700)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>
Wed, 6 Aug 2014 06:17:59 +0000 (23:17 -0700)
commitd5c3cef47155b5c2aad146465187364a2b41fd99
tree8ebaf286f71556f3f182251664f95997b6661120
parentf1eb9821ba717a55b684d42ef8c87125e855b402
fix pycaffe input processing

- load an image as [0,1] single / np.float32 according to Python convention
- fix input scaling during preprocessing:
  - scale input for preprocessing by `raw_scale` e.g. to map an image
    to [0, 255] for the CaffeNet and AlexNet ImageNet models
  - scale feature space by `input_scale` after mean subtraction
  - switch examples to raw scale for ImageNet models
  - fix #525
- preserve type after resizing.
- resize 1, 3, or K channel images with special casing between
  skimage.transform (1 and 3) and scipy.ndimage (K) for speed
examples/detection.ipynb
examples/filter_visualization.ipynb
examples/imagenet_classification.ipynb
examples/net_surgery.ipynb
python/caffe/_caffe.cpp
python/caffe/classifier.py
python/caffe/detector.py
python/caffe/io.py
python/caffe/pycaffe.py
python/classify.py
python/detect.py