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
from skimage.segmentation import active_contour | |
from skimage import io, color, transform, filters, util | |
import numpy as np | |
import matplotlib.pyplot as plt | |
image = io.imread('statue.jpg') | |
print('Rescaling image...') | |
image = transform.rescale(image, 0.05) |
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 skimage import io, restoration | |
from skimage import img_as_float | |
from scipy import ndimage | |
def hysteresis_thresholding(im, high_threshold=0.5, low_threshold=0.2): | |
""" | |
Hysteresis thresholding, using two thresholds. |
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 | |
import inspect | |
from skimage import exposure, feature, filters, measure, morphology, \ | |
restoration, segmentation, transform, util | |
def only_one_nondefault(args): | |
""" | |
Returns True if the function has only one non-keyword parameter, | |
False otherwise. |
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 sklearn.externals.joblib import Parallel, delayed | |
def apply_parallel(func, data, *args, chunk=100, overlap=10, n_jobs=4, | |
**kwargs): | |
""" | |
Apply a function in parallel to overlapping chunks of an array. | |
joblib is used for parallel processing. |
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 | |
import inspect | |
from skimage import exposure, feature, filters, measure, morphology, \ | |
restoration, segmentation, transform, util, data, color | |
from timeit import default_timer | |
import pandas as pd | |
import cv2 | |
import time | |
###this python script returns a csv of function runtimes |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from dash.dependencies import Input, Output | |
import plotly.graph_objs as go | |
import numpy as np | |
from skimage import data | |
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 dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
from dash.dependencies import Input, Output | |
import plotly.graph_objs as go | |
import numpy as np | |
from skimage import data | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 dash | |
from dash.dependencies import Input, Output | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import plotly.graph_objects as go | |
import plotly.express as px | |
gapminder = px.data.gapminder().query("year == 2007").reset_index() | |
app = dash.Dash(__name__) |
OlderNewer