Skip to content

Instantly share code, notes, and snippets.

/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java -Xmx10g -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA 14 CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre/lib/h
elastix is started at Fri Mar 25 16:08:57 2016.
-------------------------------------------------------------------------
Running elastix with parameter map 0
Current time: Fri Mar 25 16:08:57 2016.
Installing all components.
InstallingComponents was successful.
{
"cells": [
{
"cell_type": "code",
"execution_count": 44,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
@mongoose54
mongoose54 / gist:71e174587fbec8c2fe970e8a1c14eff4
Created February 21, 2017 03:23
Calculate dice score for arbitrary number of classes (beyond 2)
#to_categorical() acquired from Keras implementation
#dice_coef() inspired by Marco Jocic's implementation: https://github.com/jocicmarko/ultrasound-nerve-segmentation/blob/master/train.py
def to_categorical(y, nb_classes=None):
"""Converts a class vector (integers) to binary class matrix.
E.g. for use with categorical_crossentropy.
# Arguments
y: class vector to be converted into a matrix
(integers from 0 to nb_classes).
____________________________________________________________________________________________________
convolution2d_134 (Convolution2D (None, 2, 64, 80) 66 convolution2d_133[0][0]
____________________________________________________________________________________________________
permute_5 (Permute) (None, 64, 80, 2) 0 convolution2d_134[0][0]
____________________________________________________________________________________________________
reshape_7 (Reshape) (None, 5120, 2) 0 permute_5[0][0]
____________________________________________________________________________________________________
activation_6 (Activation) (None, 5120, 2) 0 reshape_7[0][0]
@mongoose54
mongoose54 / gist:2420a55ef51a8561eb6a3a2930ca4520
Created February 22, 2017 21:33
UNet with cross-entropy
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mongoose54
mongoose54 / UNet_Segmentation.ipynb
Created April 3, 2017 23:10
3D UNet 30 to 1 ratio
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.