Skip to content

Instantly share code, notes, and snippets.

View jaderberg's full-sized avatar

Max Jaderberg jaderberg

View GitHub Profile
#!/usr/bin/env python
# Max Jaderberg 21/5/14
# this replaces weights from a matlab file
from proto import caffe_pb2
import numpy as np
import scipy.io
import os
# path to the net
net_path = './caffe_imagenet_train_iter_755000'
@jaderberg
jaderberg / gputest.lua
Created September 4, 2013 12:40
GPU Torch Benchmark
-- Max Jaderberg 4/9/13
-- GPU Effectiveness test
require 'torch'
require 'sys'
require 'nn'
require 'xlua'
cmd = torch.CmdLine()
cmd:text()
@misc{hundict,
title="https://issues.apache.org/ooo/show\_bug.cgi?id=92383"
}
@misc{youtube,
title="http://www.youtube.com/"
}
@misc{tesseract,
title="https://code.google.com/p/tesseract-ocr/"
% Max Jaderberg 10/11/12
% Computes the Stroke Width Transform (SWT) of an image using CCV.
% Need to specify bright to dark or dark to bright. Most applications do
% both. direction should be 0 (dark to bright) or 1 (bright to dark).
function im_swt = swt(im, direction, size, low_thresh, high_thresh, visualize)
% default direction is dark to bright (direction=0)
function visualindex_plot_matches(matches, im1, im2, sz1, sz2, offset)
h1 = size(im1,1) ; w1 = size(im1,2) ;
h2 = size(im2,1) ; w2 = size(im2,2) ;
if ~exist('sz1','var'), sz1 = [w1;h1] ; end
if ~exist('sz2','var'), sz2 = [w2;h2] ; end
s1 = w1 / sz1(1) ;
s2 = w2 / sz2(1) ;
@jaderberg
jaderberg / no_ransac.m
Created February 27, 2012 12:37
An implementation of noRANSAC
% noRANSAC
% Max Jaderberg 27/2/12
function [score H ok] = no_RANSAC(f1, f2, thresh)
X1 = f1(1:2,:) ;
X2 = f2(1:2,:) ;
X1(3,:) = 1 ;
X2(3,:) = 1 ;
@jaderberg
jaderberg / bootstrap.sh
Created September 24, 2011 15:38 — forked from anonymous/bootstrap.sh
Django on Heroku with Celery and Sentry
virtualenv --no-site-packages .
source bin/activate
bin/pip install Django psycopg2 django-sentry
bin/pip freeze > requirements.txt
bin/django-admin.py startproject mysite
cat >.gitignore <<EOF
bin/
include/
lib/
EOF