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
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<link rel="stylesheet" href="main.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> | |
<title>Leaflet test page</title> | |
</head> | |
<body> |
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 numpy as np | |
from lib import get_scale_local_maximas_orignal, get_scale_local_maximas_vectorized | |
from compiled import get_scale_local_maximas_cython | |
lapl_dummy = np.random.rand(100,100,100) | |
coords = np.random.random_integers(0,99, size=(1000,3)) | |
%timeit get_scale_local_maximas_orignal(coords, lapl_dummy) | |
%timeit get_scale_local_maximas_cython(coords, lapl_dummy) |
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 numpy as np | |
input = np.zeros((2, 2), dtype=complex) | |
input[0, 0] = 0.5 + 250j | |
input[0, 1] = -0.5 | |
input[1, 0] = 0.5 | |
input[1, 1] = -0.5 + 250j | |
result = np.linalg.svd(input, full_matrices=True) |
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 numpy as np | |
cimport numpy as cnp | |
def get_scale_local_maximas_cython(cnp.ndarray[cnp.int_t, ndim=2] cube_coordinates, cnp.ndarray[cnp.double_t, ndim=3] laplacian_cube): | |
""" | |
Check provided cube coordinate for scale space local maximas. | |
Returns only the points that satisfy the criteria. | |
A point is considered to be a local maxima if its value is greater |
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
# Use local scikit-image | |
import sys | |
sys.path.insert(0, "/home/dan/University/projects/gsoc_face_detection/scikit-image/") | |
from skimage.feature import multiblock_local_binary_pattern | |
from skimage.transform import integral_image | |
import numpy as np | |
import skimage.io as io | |
import xml.etree.ElementTree as ET |
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 skimage.io as io | |
from skimage.transform import pyramid_gaussian, rescale | |
from skimage.util import view_as_windows | |
from opencv_trainfile_test import detect_face | |
from matplotlib import pyplot as plt | |
import matplotlib.patches as patches | |
current_img = io.imread('roi.jpg') |
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
%%cython -a | |
# cython: cdivision=True | |
# cython: boundscheck=False | |
# cython: nonecheck=False | |
# cython: wraparound=False | |
import numpy as np | |
cimport numpy as cnp | |
from skimage._shared.transform cimport integrate |
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
def intersection_ratio(rect_a, rect_b): | |
r_a_1 = rect_a["r"] | |
r_a_2 = rect_a["r"] + rect_a["height"] | |
c_a_1 = rect_a["c"] | |
c_a_2 = rect_a["c"] + rect_a["width"] | |
r_b_1 = rect_b["r"] | |
r_b_2 = rect_b["r"] + rect_b["height"] | |
c_b_1 = rect_b["c"] |
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
%%cython -a | |
# cython: cdivision=True | |
# cython: boundscheck=False | |
# cython: nonecheck=False | |
# cython: wraparound=False | |
# distutils: language = c++ | |
from libcpp.vector cimport vector | |
from libcpp.pair cimport pair | |
import skimage.io as io |
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
%matplotlib inline | |
from __future__ import division | |
import numpy as np | |
import tensorflow as tf | |
import sys | |
import os | |
from matplotlib import pyplot as plt | |
import urllib2 |
OlderNewer