Skip to content

Commit 3f725b6

Browse files
committed
reran everything to make sure its reproducible and added a few plots
1 parent 8762f54 commit 3f725b6

29 files changed

+2303
-1276
lines changed

Create Animations.ipynb

+393-5
Large diffs are not rendered by default.

Get Results.ipynb

+1,578-950
Large diffs are not rendered by default.

Networks/best_bars_dae.h5

-2.55 MB
Binary file not shown.

Networks/best_bars_dae_train_multi.h5

2.04 KB
Binary file not shown.

Networks/best_corners_dae.h5

-2.22 MB
Binary file not shown.
-2.22 MB
Binary file not shown.

Networks/best_mnist_shape_dae.h5

-1.82 KB
Binary file not shown.
-58.8 KB
Binary file not shown.

Networks/best_multi_mnist_dae.h5

8.2 MB
Binary file not shown.
-1.35 KB
Binary file not shown.

Networks/best_shapes_dae.h5

-2.78 MB
Binary file not shown.
-2.23 MB
Binary file not shown.

Networks/best_simple_superpos_dae.h5

-185 KB
Binary file not shown.

Plots.ipynb

+231-255
Large diffs are not rendered by default.

README.md

+56-21
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,11 @@
11
# Binding by Reconstruction Clustering
22

33
This is the code repository complementing the paper ["Binding by Reconstruction Clustering"](http://arxiv.org/abs/1511.06418).
4+
Everything from the paper starting from the datasets all the way to the plots can be
5+
reproduced from this repository.
46

5-
## Demo Images
6-
Here are some animations of the convergence behaviour of Reconstruction Clustering.
7-
8-
### Shapes
97
![shapes animation](animations/shapes.gif)
108

11-
### Multi MNIST
12-
![Multi-MNIST animation](animations/multi_mnist.gif)
13-
14-
### Corners
15-
![Corners animation](animations/corners.gif)
16-
17-
### Bars
18-
![Bars animation](animations/bars.gif)
19-
20-
### MNIST + Shape
21-
![MNIST + Shape animation](animations/mnist_shape.gif)
22-
23-
### Simple Superposition
24-
![Simple Superposition animation](animations/simple_superpos.gif)
25-
269
## Dependencies and Setup
2710

2811
* brainstorm == 0.5
@@ -59,7 +42,7 @@ To get the best networks we used in the paper for each dataset run `run_best_net
5942
It will save a `Networks/DATASET_best_dae.h5` network for each dataset. This shouldn't take more than half an hour.
6043

6144
Alternatively you can use your own best results from the random search by running the
62-
last cell in the `Get_Search_Results.ipynb`.
45+
corresponding cells in the `Get_Search_Results.ipynb`.
6346

6447
These files are needed for the following steps.
6548

@@ -68,10 +51,62 @@ Next we use these networks for Reconstruction Clustering and store all of the re
6851

6952
run_evaluation.py
7053

71-
NOTE: This should take about an hour and use about 26 GBytes of disk space.
54+
NOTE: This should take about an hour and use ca 21 GBytes of disk space.
7255

7356
## Plots
7457
The `Plots.ipynb` notebook generates all the figures used in the paper.
7558
Once you've run all the other steps you should be able to able to generate them
7659
all yourself.
7760

61+
## Database Dump
62+
With the file ``dump.zip`` we've included a dump of the MongoDB that contains all the information about
63+
all the experimental runs we did.
64+
65+
66+
67+
## Demo Images
68+
69+
### Regular (soft) Reconstruction Clustering
70+
These animations show the cluster assignment during a run of RC on 120
71+
different test images.
72+
For each dataset we used the best DAE trained on single object images.
73+
74+
#### Shapes
75+
![shapes animation](animations/shapes.gif)
76+
77+
#### Multi MNIST
78+
![Multi-MNIST animation](animations/multi_mnist.gif)
79+
80+
#### Corners
81+
![Corners animation](animations/corners.gif)
82+
83+
#### Bars
84+
![Bars animation](animations/bars.gif)
85+
86+
#### MNIST + Shape
87+
![MNIST + Shape animation](animations/mnist_shape.gif)
88+
89+
#### Simple Superposition
90+
![Simple Superposition animation](animations/simple_superpos.gif)
91+
92+
93+
### Hard Reconstruction Clustering
94+
These animations show the hard cluster assignment during a run of RC on 120
95+
different test images.
96+
To improve visibility we toned down the brightness on the background pixels.
97+
Here we used the best DAE trained on **multi object** images.
98+
99+
#### Shapes
100+
![shapes animation](animations/shapes_train_multi.gif)
101+
102+
#### Multi MNIST
103+
![Multi-MNIST animation](animations/multi_mnist_train_multi.gif)
104+
105+
#### Corners
106+
![Corners animation](animations/corners_train_multi.gif)
107+
108+
#### Bars
109+
![Bars animation](animations/bars_train_multi.gif)
110+
111+
#### MNIST + Shape
112+
![MNIST + Shape animation](animations/mnist_shape_train_multi.gif)

Run Random Search.ipynb

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": 2,
19+
"execution_count": 5,
2020
"metadata": {
2121
"collapsed": true
2222
},
2323
"outputs": [],
2424
"source": [
25-
"cluster_nodes = ['your', 'dispy', 'cluster', 'nodes']\n",
25+
"cluster_nodes = ['put', 'your', 'nodes', 'here']\n",
2626
"\n",
2727
"mongo_db = {\n",
28-
" 'url': 'INSERT_MONGO_DB_IP_HERE:27017',\n",
28+
" 'url': 'DATABASE_IP_HERE:27017',\n",
2929
" 'db': 'binding_via_rc'\n",
3030
"}"
3131
]
@@ -41,8 +41,8 @@
4141
"name": "stderr",
4242
"output_type": "stream",
4343
"text": [
44-
"2016-01-15 19:47:31,652 - dispy - Storing fault recovery information in \"_dispy_20160115194731\"\n",
45-
"INFO:dispy:Storing fault recovery information in \"_dispy_20160115194731\"\n"
44+
"2016-01-16 17:57:08,627 - dispy - Storing fault recovery information in \"_dispy_20160116175708\"\n",
45+
"INFO:dispy:Storing fault recovery information in \"_dispy_20160116175708\"\n"
4646
]
4747
}
4848
],
@@ -60,7 +60,7 @@
6060
{
6161
"data": {
6262
"text/plain": [
63-
"ClusterStatus(nodes=[<dispy.DispyNode object at 0x7f65016af908>], jobs_pending=0)"
63+
"ClusterStatus(nodes=[<dispy.DispyNode object at 0x7fb865659d30>], jobs_pending=0)"
6464
]
6565
},
6666
"execution_count": 4,

animations/bars.gif

-1.14 MB
Loading

animations/bars_train_multi.gif

3.7 MB
Loading

animations/corners.gif

158 KB
Loading

animations/corners_train_multi.gif

2.01 MB
Loading

animations/mnist_shape.gif

-287 KB
Loading
1.36 MB
Loading

animations/multi_mnist.gif

-1.43 MB
Loading
1.83 MB
Loading

animations/shapes.gif

79.1 KB
Loading

animations/shapes_train_multi.gif

1.53 MB
Loading

animations/simple_superpos.gif

-446 KB
Loading

dump.zip

5.94 MB
Binary file not shown.

run_best_nets.py

+39-39
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
from __future__ import division, print_function, unicode_literals
44
from dae import ex
55

6-
76
@ex.named_config
87
def best_bars():
98
dataset = {
109
'name': 'bars',
11-
'salt_n_pepper': 0.1
10+
'salt_n_pepper': 0.0
1211
}
1312
training = {
14-
'learning_rate': 0.0788887811150988
13+
'learning_rate': 0.768014586935404
1514
}
16-
seed = 915841892
17-
network_spec = "Ft1000"
15+
seed = 459182787
16+
network_spec = "Fr100"
1817
net_filename = 'Networks/best_bars_dae.h5'
1918

2019
ex.run(named_configs=['best_bars'])
@@ -24,13 +23,13 @@ def best_bars():
2423
def best_corners():
2524
dataset = {
2625
'name': 'corners',
27-
'salt_n_pepper': 0.2
26+
'salt_n_pepper': 0.0
2827
}
2928
training = {
30-
'learning_rate': 0.11338088391400022
29+
'learning_rate': 0.0019199822609484764
3130
}
32-
seed = 820141270
33-
network_spec = "Fs500"
31+
seed = 158253144
32+
network_spec = "Fr100"
3433
net_filename = 'Networks/best_corners_dae.h5'
3534

3635
ex.run(named_configs=['best_corners'])
@@ -40,13 +39,13 @@ def best_corners():
4039
def best_shapes():
4140
dataset = {
4241
'name': 'shapes',
43-
'salt_n_pepper': 0.3
42+
'salt_n_pepper': 0.4
4443
}
4544
training = {
46-
'learning_rate': 0.06701641168189125
45+
'learning_rate': 0.08314720669724956
4746
}
48-
seed = 533867354
49-
network_spec = "Ft1000"
47+
seed = 845841083
48+
network_spec = "Ft500"
5049
net_filename = 'Networks/best_shapes_dae.h5'
5150

5251
ex.run(named_configs=['best_shapes'])
@@ -56,13 +55,13 @@ def best_shapes():
5655
def best_multi_mnist():
5756
dataset = {
5857
'name': 'multi_mnist',
59-
'salt_n_pepper': 0.8
58+
'salt_n_pepper': 0.6
6059
}
6160
training = {
62-
'learning_rate': 0.004194304163542453
61+
'learning_rate': 0.011361917579645924
6362
}
64-
seed = 708383804
65-
network_spec = "Fr500"
63+
seed = 498470020
64+
network_spec = "Fr1000"
6665
net_filename = 'Networks/best_multi_mnist_dae.h5'
6766

6867
ex.run(named_configs=['best_multi_mnist'])
@@ -72,13 +71,13 @@ def best_multi_mnist():
7271
def best_mnist_shape():
7372
dataset = {
7473
'name': 'mnist_shape',
75-
'salt_n_pepper': 0.5
74+
'salt_n_pepper': 0.6
7675
}
7776
training = {
78-
'learning_rate': 0.011252506237215505
77+
'learning_rate': 0.0316848152096582
7978
}
80-
seed = 17521051
81-
network_spec = "Fr250"
79+
seed = 166717815
80+
network_spec = "Fs250"
8281
net_filename = 'Networks/best_mnist_shape_dae.h5'
8382

8483
ex.run(named_configs=['best_mnist_shape'])
@@ -91,10 +90,10 @@ def best_simple_superpos():
9190
'salt_n_pepper': 0.1
9291
}
9392
training = {
94-
'learning_rate': 0.20713360779738232
93+
'learning_rate': 0.36662702472680564
9594
}
96-
seed = 563758549
97-
network_spec = "Fr500"
95+
seed = 848588405
96+
network_spec = "Fr100"
9897
net_filename = 'Networks/best_simple_superpos_dae.h5'
9998

10099
ex.run(named_configs=['best_simple_superpos'])
@@ -105,13 +104,13 @@ def best_bars_train_multi():
105104
dataset = {
106105
'name': 'bars',
107106
'train_set': 'train_multi',
108-
'salt_n_pepper': 0.9
107+
'salt_n_pepper': 0.8
109108
}
110109
training = {
111-
'learning_rate': 0.07009646428972773
110+
'learning_rate': 0.01219213699462807
112111
}
113-
seed = 100618159
114-
network_spec = "Ft100"
112+
seed = 141786426
113+
network_spec = "Fs100"
115114
net_filename = 'Networks/best_bars_dae_train_multi.h5'
116115

117116
ex.run(named_configs=['best_bars_train_multi'])
@@ -122,13 +121,13 @@ def best_corners_train_multi():
122121
dataset = {
123122
'name': 'corners',
124123
'train_set': 'train_multi',
125-
'salt_n_pepper': 0.5
124+
'salt_n_pepper': 0.7
126125
}
127126
training = {
128-
'learning_rate': 0.07329485079040306
127+
'learning_rate': 0.02603487482829947
129128
}
130-
seed = 242923369
131-
network_spec = "Fr500"
129+
seed = 872544498
130+
network_spec = "Fr100"
132131
net_filename = 'Networks/best_corners_dae_train_multi.h5'
133132

134133
ex.run(named_configs=['best_corners_train_multi'])
@@ -142,10 +141,10 @@ def best_shapes_train_multi():
142141
'salt_n_pepper': 0.9
143142
}
144143
training = {
145-
'learning_rate': 0.023890872422966537
144+
'learning_rate': 0.049401835193689486
146145
}
147-
seed = 900380945
148-
network_spec = "Ft500"
146+
seed = 702200962
147+
network_spec = "Fs100"
149148
net_filename = 'Networks/best_shapes_dae_train_multi.h5'
150149

151150
ex.run(named_configs=['best_shapes_train_multi'])
@@ -159,9 +158,9 @@ def best_multi_mnist_train_multi():
159158
'salt_n_pepper': 0.9
160159
}
161160
training = {
162-
'learning_rate': 0.0040886980876061
161+
'learning_rate': 0.001785591525476118
163162
}
164-
seed = 66747176
163+
seed = 632224571
165164
network_spec = "Fs250"
166165
net_filename = 'Networks/best_multi_mnist_dae_train_multi.h5'
167166

@@ -176,11 +175,12 @@ def best_mnist_shape_train_multi():
176175
'salt_n_pepper': 0.6
177176
}
178177
training = {
179-
'learning_rate': 0.014119758147665773
178+
'learning_rate': 0.033199614969711265
180179
}
181-
seed = 767374347
180+
seed = 900543563
182181
network_spec = "Fr1000"
183182
net_filename = 'Networks/best_mnist_shape_dae_train_multi.h5'
184183

185184
ex.run(named_configs=['best_mnist_shape_train_multi'])
186185

186+

0 commit comments

Comments
 (0)