Skip to content

Instantly share code, notes, and snippets.

dog
bear
chair
car
keyboard
crate
crib
flagpole
iPod
boat
-- 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))
@jianweilin
jianweilin / deploy.prototxt
Created May 14, 2017 09:08 — forked from bogger/deploy.prototxt
GoogLeNet_cars
name: "GoogleNet"
input: "data"
input_dim: 10
input_dim: 3
input_dim: 224
input_dim: 224
# hierarchy 1
# conv -> relu -> pool -> lrn
@jianweilin
jianweilin / demo.py
Created March 21, 2017 12:50 — forked from twmht/demo.py
VGG Deep Face in python
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)
@jianweilin
jianweilin / demo.py
Created March 21, 2017 12:50 — forked from twmht/demo.py
VGG Deep Face in python
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)
@jianweilin
jianweilin / demo.py
Created March 21, 2017 12:42 — forked from tsingjinyun/demo.py
VGG Deep Face in python
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)