This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dog | |
bear | |
chair | |
car | |
keyboard | |
crate | |
crib | |
flagpole | |
iPod | |
boat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Xception model | |
-- a Torch7 implementation of: https://arxiv.org/abs/1610.02357 | |
-- E. Culurciello, October 2016 | |
require 'nn' | |
local nClasses = 1000 | |
function nn.SpatialSeparableConvolution(nInputPlane, nOutputPlane, kW, kH) | |
local block = nn.Sequential() | |
block:add(nn.SpatialConvolutionMap(nn.tables.oneToOne(nInputPlane), kW,kH, 1,1, 1,1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "GoogleNet" | |
input: "data" | |
input_dim: 10 | |
input_dim: 3 | |
input_dim: 224 | |
input_dim: 224 | |
# hierarchy 1 | |
# conv -> relu -> pool -> lrn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import caffe | |
import numpy as np | |
# http://stackoverflow.com/questions/33828582/vgg-face-descriptor-in-python-with-caffe | |
img = caffe.io.load_image( "ak.png" ) | |
img = img[:,:,::-1]*255.0 # convert RGB->BGR | |
avg = np.array([129.1863,104.7624,93.5940]) | |
img = img - avg # subtract mean (numpy takes care of dimensions :) | |
img = img.transpose((2,0,1)) | |
img = img[None,:] # add singleton dimension | |
net = caffe.Net("VGG_FACE_deploy.prototxt","VGG_FACE.caffemodel", caffe.TEST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import caffe | |
import numpy as np | |
# http://stackoverflow.com/questions/33828582/vgg-face-descriptor-in-python-with-caffe | |
img = caffe.io.load_image( "ak.png" ) | |
img = img[:,:,::-1]*255.0 # convert RGB->BGR | |
avg = np.array([129.1863,104.7624,93.5940]) | |
img = img - avg # subtract mean (numpy takes care of dimensions :) | |
img = img.transpose((2,0,1)) | |
img = img[None,:] # add singleton dimension | |
net = caffe.Net("VGG_FACE_deploy.prototxt","VGG_FACE.caffemodel", caffe.TEST) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import caffe | |
import numpy as np | |
# http://stackoverflow.com/questions/33828582/vgg-face-descriptor-in-python-with-caffe | |
img = caffe.io.load_image( "ak.png" ) | |
img = img[:,:,::-1]*255.0 # convert RGB->BGR | |
avg = np.array([129.1863,104.7624,93.5940]) | |
img = img - avg # subtract mean (numpy takes care of dimensions :) | |
img = img.transpose((2,0,1)) | |
img = img[None,:] # add singleton dimension | |
net = caffe.Net("VGG_FACE_deploy.prototxt","VGG_FACE.caffemodel", caffe.TEST) |