Skip to content

Instantly share code, notes, and snippets.

@bbabenko
bbabenko / inceptionism ipython notebook
Last active August 29, 2015 14:23
inceptionism using caffe's reference imagenet model
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@bbabenko
bbabenko / gist:a27a0e071bdeb969fdb8
Created November 29, 2014 21:37
detecting beads
# see this quora post: http://www.quora.com/How-do-I-locate-the-centers-of-the-beads-in-this-video
import cv2
import numpy as np
from matplotlib import pyplot as plt
from PIL import Image
from skimage.feature import peak_local_max, match_template
blur = lambda img, sigma: cv2.GaussianBlur(img, (0, 0), sigma, None, sigma, cv2.BORDER_DEFAULT)
img = np.array(Image.open('beads.png'))
img_float = img.astype('float32')