Skip to content

Instantly share code, notes, and snippets.

@mtrth
mtrth / tiff_to_lmdb.py
Last active September 26, 2016 12:06
import numpy as np
import deepdish as dd
import lmdb
import caffe
import glob
import random
import tifffile
#creates a numpy array data
fdata = glob.glob("/data/*.tif")
name: "VGG_ILSVRC_16_layer"
layer {
name: "data"
type: "Data"
top: "data"
data_param {
source: "data_lmdb" # Change this to the absolute path to your
batch_size: 1 # Change this number to a batch size that will fit on your GPU
backend: LMDB
}
import numpy as np
import matplotlib.pyplot as plt
import os.path
import json
import scipy
import argparse
import math
import pylab
from sklearn.preprocessing import normalize
caffe_root = '/SegNet/caffe-segnet/' # Change this to the absolute directoy to SegNet Caffe
I1122 14:39:02.817577 11005 net.cpp:192] conv4_bn needs backward computation.
I1122 14:39:02.817584 11005 net.cpp:192] conv4 needs backward computation.
I1122 14:39:02.817591 11005 net.cpp:192] pool3 needs backward computation.
I1122 14:39:02.817597 11005 net.cpp:192] relu3 needs backward computation.
I1122 14:39:02.817605 11005 net.cpp:192] conv3_bn needs backward computation.
I1122 14:39:02.817613 11005 net.cpp:192] conv3 needs backward computation.
I1122 14:39:02.817620 11005 net.cpp:192] pool2 needs backward computation.
I1122 14:39:02.817626 11005 net.cpp:192] relu2 needs backward computation.
I1122 14:39:02.817633 11005 net.cpp:192] conv2_bn needs backward computation.
I1122 14:39:02.817639 11005 net.cpp:192] conv2 needs backward computation.