In [1]:
import matplotlib
matplotlib.use("nbagg")
import skimage
import skimage.filters
import skimage.morphology
import math
import numpy.linalg as la
import numpy as np
import matplotlib.pyplot as plt
import sklearn
import cv2
import scipy
import scipy.io as sio
import re, os, glob, pickle, shutil
from shutil import *
import sys
import random
sys.path.append('../roi_pooling/theano-roi-pooling/')
sys.path.append('./POM')


import hickle as hkl

os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,device=gpu3,floatX=float32"
from theano import *

import theano.tensor as T
theano.__version__
from theano.sandbox.cuda import dnn

import theano

import pandas as pd
from theano import tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams

import cPickle, gzip
from theano.tensor.nnet.conv import conv2d

from random import randint
from theano.compile.nanguardmode import NanGuardMode
import time

from PIL import Image

#from pom_funcs import *
from pom_room import POM_room
from pom_evaluator import POM_evaluator
config.allow_gc =False

import Config
%load_ext autoreload
%autoreload 2


Using gpu device 3: GeForce GTX TITAN Z (CNMeM is disabled, cuDNN 5110)
/home/baque/.local/lib/python2.7/site-packages/theano/sandbox/cuda/__init__.py:600: UserWarning: Your cuDNN version is more recent than the one Theano officially supports. If you see any problems, try updating Theano or downgrading cuDNN to version 5.
  warnings.warn(warn)
/home/baque/.local/lib/python2.7/site-packages/theano/tensor/signal/downsample.py:6: UserWarning: downsample module has been moved to the theano.tensor.signal.pool module.
  "downsample module has been moved to the theano.tensor.signal.pool module.")

In [2]:
import UnariesNet
uNet = UnariesNet.unariesNet()


Preparing room
Initializing Unaries Network
UnariesNet.py:133: UserWarning: theano.function was asked to create a function computing outputs given certain inputs, but the provided input variable at index 2 is not part of the computational graph needed to compute the outputs: dropout.
To make this warning into an error, you can pass the parameter on_unused_input='raise' to theano.function. To disable it completely, use on_unused_input='ignore'.
  allow_input_downcast=True,on_unused_input='warn')
loading pretrained params

In [3]:
uNet.run_bulk_features(save_features = False)


FID 0
(36, 2084, 4)
(36, 2084, 4)
(36, 2084, 4)
(36, 2084, 4)
FID 1
(36, 2247, 4)
(36, 2247, 4)
(36, 2247, 4)
(36, 2247, 4)
FID 2
(36, 2141, 4)
(36, 2141, 4)
(36, 2141, 4)
(36, 2141, 4)
FID 3
(36, 1938, 4)
(36, 1938, 4)
(36, 1938, 4)
(36, 1938, 4)
FID 4
(36, 1949, 4)
(36, 1949, 4)
(36, 1949, 4)
(36, 1949, 4)
FID 5
(36, 2012, 4)
(36, 2012, 4)
(36, 2012, 4)
(36, 2012, 4)
FID 6
(36, 2068, 4)
(36, 2068, 4)
(36, 2068, 4)
(36, 2068, 4)
FID 7
(36, 2080, 4)
(36, 2080, 4)
(36, 2080, 4)
(36, 2080, 4)
FID 8
(36, 2215, 4)
(36, 2215, 4)
(36, 2215, 4)
(36, 2215, 4)
FID 9
(36, 2127, 4)
(36, 2127, 4)
(36, 2127, 4)
(36, 2127, 4)
FID 10
(36, 2210, 4)
(36, 2210, 4)
(36, 2210, 4)
(36, 2210, 4)
FID 11
(36, 2227, 4)
(36, 2227, 4)
(36, 2227, 4)
(36, 2227, 4)
FID 12
(36, 2237, 4)
(36, 2237, 4)
(36, 2237, 4)
(36, 2237, 4)
FID 13
(36, 2014, 4)
(36, 2014, 4)
(36, 2014, 4)
(36, 2014, 4)
FID 14
(36, 2116, 4)
(36, 2116, 4)
(36, 2116, 4)
(36, 2116, 4)
FID 15
(36, 1948, 4)
(36, 1948, 4)
(36, 1948, 4)
(36, 1948, 4)
FID 16
(36, 2076, 4)
(36, 2076, 4)
(36, 2076, 4)
(36, 2076, 4)
FID 17
(36, 2031, 4)
(36, 2031, 4)
(36, 2031, 4)
(36, 2031, 4)
FID 18
(36, 2053, 4)
(36, 2053, 4)
(36, 2053, 4)
(36, 2053, 4)
FID 19
(36, 2121, 4)
(36, 2121, 4)
(36, 2121, 4)
(36, 2121, 4)
FID 20
(36, 2255, 4)
(36, 2255, 4)
(36, 2255, 4)
(36, 2255, 4)
FID 21
(36, 2273, 4)
(36, 2273, 4)
(36, 2273, 4)
(36, 2273, 4)
FID 22
(36, 2152, 4)
(36, 2152, 4)
(36, 2152, 4)
(36, 2152, 4)
FID 23
(36, 2116, 4)
(36, 2116, 4)
(36, 2116, 4)
(36, 2116, 4)
FID 24
(36, 2136, 4)
(36, 2136, 4)
(36, 2136, 4)
(36, 2136, 4)
FID 25
(36, 2112, 4)
(36, 2112, 4)
(36, 2112, 4)
(36, 2112, 4)
FID 26
(36, 2344, 4)
(36, 2344, 4)
(36, 2344, 4)
(36, 2344, 4)
FID 27
(36, 2212, 4)
(36, 2212, 4)
(36, 2212, 4)
(36, 2212, 4)
FID 28
(36, 2121, 4)
(36, 2121, 4)
(36, 2121, 4)
(36, 2121, 4)
FID 29
(36, 2214, 4)
(36, 2214, 4)
(36, 2214, 4)
(36, 2214, 4)
FID 30
(36, 2103, 4)
(36, 2103, 4)
(36, 2103, 4)
(36, 2103, 4)
FID 31
(36, 2005, 4)
(36, 2005, 4)
(36, 2005, 4)
(36, 2005, 4)
FID 32
(36, 2041, 4)
(36, 2041, 4)
(36, 2041, 4)
(36, 2041, 4)
FID 33
(36, 2034, 4)
(36, 2034, 4)
(36, 2034, 4)
(36, 2034, 4)
FID 34
(36, 1906, 4)
(36, 1906, 4)
(36, 1906, 4)
(36, 1906, 4)
FID 35
(36, 2102, 4)
(36, 2102, 4)
(36, 2102, 4)
(36, 2102, 4)
FID 36
(36, 2076, 4)
(36, 2076, 4)
(36, 2076, 4)
(36, 2076, 4)
FID 37
(36, 2100, 4)
(36, 2100, 4)
(36, 2100, 4)
(36, 2100, 4)
FID 38
(36, 2222, 4)
(36, 2222, 4)
(36, 2222, 4)
(36, 2222, 4)
FID 39
(36, 2117, 4)
(36, 2117, 4)
(36, 2117, 4)
(36, 2117, 4)
FID 40
(36, 2141, 4)
(36, 2141, 4)
(36, 2141, 4)
(36, 2141, 4)
FID 41
(36, 2142, 4)
(36, 2142, 4)
(36, 2142, 4)
(36, 2142, 4)
FID 42
(36, 2254, 4)
(36, 2254, 4)
(36, 2254, 4)
(36, 2254, 4)
FID 43
(36, 2147, 4)
(36, 2147, 4)
(36, 2147, 4)
(36, 2147, 4)
FID 44
(36, 2343, 4)
(36, 2343, 4)
(36, 2343, 4)
(36, 2343, 4)
FID 45
(36, 2102, 4)
(36, 2102, 4)
(36, 2102, 4)
(36, 2102, 4)
FID 46
(36, 2187, 4)
(36, 2187, 4)
(36, 2187, 4)
(36, 2187, 4)
FID 47
(36, 2242, 4)
(36, 2242, 4)
(36, 2242, 4)
(36, 2242, 4)
FID 48
(36, 2081, 4)
(36, 2081, 4)
(36, 2081, 4)
(36, 2081, 4)
FID 49
(36, 2068, 4)
(36, 2068, 4)
(36, 2068, 4)
(36, 2068, 4)
FID 50
(36, 1993, 4)
(36, 1993, 4)
(36, 1993, 4)
(36, 1993, 4)
FID 51
(36, 2038, 4)
(36, 2038, 4)
(36, 2038, 4)
(36, 2038, 4)
FID 52
(36, 2063, 4)
(36, 2063, 4)
(36, 2063, 4)
(36, 2063, 4)
FID 53
(36, 2102, 4)
(36, 2102, 4)
(36, 2102, 4)
(36, 2102, 4)
FID 54
(36, 2144, 4)
(36, 2144, 4)
(36, 2144, 4)
(36, 2144, 4)
FID 55
(36, 2226, 4)
(36, 2226, 4)
(36, 2226, 4)
(36, 2226, 4)
FID 56
(36, 2186, 4)
(36, 2186, 4)
(36, 2186, 4)
(36, 2186, 4)
FID 57
(36, 2128, 4)
(36, 2128, 4)
(36, 2128, 4)
(36, 2128, 4)
FID 58
(36, 1984, 4)
(36, 1984, 4)
(36, 1984, 4)
(36, 1984, 4)
FID 59
(36, 2135, 4)
(36, 2135, 4)
(36, 2135, 4)
(36, 2135, 4)
FID 60
(36, 1883, 4)
(36, 1883, 4)
(36, 1883, 4)
(36, 1883, 4)
FID 61
(36, 1953, 4)
(36, 1953, 4)
(36, 1953, 4)
(36, 1953, 4)
FID 62
(36, 1968, 4)
(36, 1968, 4)
(36, 1968, 4)
(36, 1968, 4)
FID 63
(36, 2155, 4)
(36, 2155, 4)
(36, 2155, 4)
(36, 2155, 4)
FID 64
(36, 2196, 4)
(36, 2196, 4)
(36, 2196, 4)
(36, 2196, 4)
FID 65
(36, 2019, 4)
(36, 2019, 4)
(36, 2019, 4)
(36, 2019, 4)
FID 66
(36, 2145, 4)
(36, 2145, 4)
(36, 2145, 4)
(36, 2145, 4)
FID 67
(36, 1929, 4)
(36, 1929, 4)
(36, 1929, 4)
(36, 1929, 4)
FID 68
(36, 2158, 4)
(36, 2158, 4)
(36, 2158, 4)
(36, 2158, 4)
FID 69
(36, 2169, 4)
(36, 2169, 4)
(36, 2169, 4)
(36, 2169, 4)
FID 70
(36, 2191, 4)
(36, 2191, 4)
(36, 2191, 4)
(36, 2191, 4)
FID 71
(36, 2157, 4)
(36, 2157, 4)
(36, 2157, 4)
(36, 2157, 4)
FID 72
(36, 2034, 4)
(36, 2034, 4)
(36, 2034, 4)
(36, 2034, 4)
FID 73
(36, 2129, 4)
(36, 2129, 4)
(36, 2129, 4)
(36, 2129, 4)
FID 74
(36, 2259, 4)
(36, 2259, 4)
(36, 2259, 4)
(36, 2259, 4)
FID 75
(36, 2289, 4)
(36, 2289, 4)
(36, 2289, 4)
(36, 2289, 4)
FID 76
(36, 2273, 4)
(36, 2273, 4)
(36, 2273, 4)
(36, 2273, 4)
FID 77
(36, 2241, 4)
(36, 2241, 4)
(36, 2241, 4)
(36, 2241, 4)
FID 78
(36, 2252, 4)
(36, 2252, 4)
(36, 2252, 4)
(36, 2252, 4)
FID 79
(36, 2154, 4)
(36, 2154, 4)
(36, 2154, 4)
(36, 2154, 4)
FID 80
(36, 2252, 4)
(36, 2252, 4)
(36, 2252, 4)
(36, 2252, 4)
FID 81
(36, 2368, 4)
(36, 2368, 4)
(36, 2368, 4)
(36, 2368, 4)
FID 82
(36, 2139, 4)
(36, 2139, 4)
(36, 2139, 4)
(36, 2139, 4)
FID 83
(36, 2230, 4)
(36, 2230, 4)
(36, 2230, 4)
(36, 2230, 4)
FID 84
(36, 2126, 4)
(36, 2126, 4)
(36, 2126, 4)
(36, 2126, 4)
FID 85
(36, 2175, 4)
(36, 2175, 4)
(36, 2175, 4)
(36, 2175, 4)
FID 86
(36, 2194, 4)
(36, 2194, 4)
(36, 2194, 4)
(36, 2194, 4)
FID 87
(36, 2132, 4)
(36, 2132, 4)
(36, 2132, 4)
(36, 2132, 4)
FID 88
(36, 2250, 4)
(36, 2250, 4)
(36, 2250, 4)
(36, 2250, 4)
FID 89
(36, 2291, 4)
(36, 2291, 4)
(36, 2291, 4)
(36, 2291, 4)
FID 90
(36, 2355, 4)
(36, 2355, 4)
(36, 2355, 4)
(36, 2355, 4)
FID 91
(36, 2399, 4)
(36, 2399, 4)
(36, 2399, 4)
(36, 2399, 4)
FID 92
(36, 2207, 4)
(36, 2207, 4)
(36, 2207, 4)
(36, 2207, 4)
FID 93
(36, 2292, 4)
(36, 2292, 4)
(36, 2292, 4)
(36, 2292, 4)
FID 94
(36, 2181, 4)
(36, 2181, 4)
(36, 2181, 4)
(36, 2181, 4)
FID 95
(36, 2268, 4)
(36, 2268, 4)
(36, 2268, 4)
(36, 2268, 4)
FID 96
(36, 2142, 4)
(36, 2142, 4)
(36, 2142, 4)
(36, 2142, 4)
FID 97
(36, 2153, 4)
(36, 2153, 4)
(36, 2153, 4)
(36, 2153, 4)
FID 98
(36, 2137, 4)
(36, 2137, 4)
(36, 2137, 4)
(36, 2137, 4)
FID 99
(36, 2069, 4)
(36, 2069, 4)
(36, 2069, 4)
(36, 2069, 4)
FID 100
(36, 2036, 4)
(36, 2036, 4)
(36, 2036, 4)
(36, 2036, 4)
FID 101
(36, 2067, 4)
(36, 2067, 4)
(36, 2067, 4)
(36, 2067, 4)
FID 102
(36, 2153, 4)
(36, 2153, 4)
(36, 2153, 4)
(36, 2153, 4)
FID 103
(36, 1999, 4)
(36, 1999, 4)
(36, 1999, 4)
(36, 1999, 4)
FID 104
(36, 2120, 4)
(36, 2120, 4)
(36, 2120, 4)
(36, 2120, 4)
FID 105
(36, 2408, 4)
(36, 2408, 4)
(36, 2408, 4)
(36, 2408, 4)
FID 106
(36, 2165, 4)
(36, 2165, 4)
(36, 2165, 4)
(36, 2165, 4)
FID 107
(36, 2064, 4)
(36, 2064, 4)
(36, 2064, 4)
(36, 2064, 4)
FID 108
(36, 2112, 4)
(36, 2112, 4)
(36, 2112, 4)
(36, 2112, 4)
FID 109
(36, 2085, 4)
(36, 2085, 4)
(36, 2085, 4)
(36, 2085, 4)
FID 110
(36, 1983, 4)
(36, 1983, 4)
(36, 1983, 4)
(36, 1983, 4)
FID 111
(36, 2114, 4)
(36, 2114, 4)
(36, 2114, 4)
(36, 2114, 4)

In [13]:
print  len(Config.img_index_list)


50

In [13]:
print uNet.run_features(0,0).shape


(63, 11026, 4)
(3714, 1024)

In [14]:
plt.imshow(uNet.run_features(0,0))
plt.show()


(63, 11026, 4)

In [2]:
from PIL import Image

In [8]:
im = Image.open('/cvlabdata1/cvlab/datasets_people_tracking/ETH/day_2/annotation_final/cvlab_camera2/begin/00000100.png')

In [9]:
%matplotlib inline
import matplotlib
matplotlib.use("nbagg")
import matplotlib.pyplot as plt

plt.imshow(im)
plt.show()



In [ ]: