File tree 6 files changed +33
-14
lines changed
6 files changed +33
-14
lines changed Original file line number Diff line number Diff line change
1
+ * .pyc
2
+ data /cifar10
3
+ init_weights /vgg_cnn_f_rmlast.h5
4
+ experiments
Original file line number Diff line number Diff line change @@ -8,17 +8,29 @@ Learning-based hash has been widely used for large-scale similarity retrieval du
8
8
9
9
10
10
## Prerequisites
11
- * python3.5
11
+ * python2.7
12
12
* keras2.3.0
13
13
* tensorflow1.13.1
14
+ * scikit-learn0.20.4
14
15
15
16
Use the following command to install all requirements:
16
17
``` bash
17
18
$ pip install -r requirements.txt
18
19
```
19
20
21
+ If you want to evaluate the image retrieval performance, you need matlab as well.
22
+
23
+
20
24
## Usage
21
25
26
+ ### Preparing data
27
+
28
+ ### Training
29
+
30
+ ### Testing
31
+
32
+ ### Evaluation (matlab required)
33
+
22
34
23
35
## Citation
24
36
Please cite following paper if these codes help your research:
Original file line number Diff line number Diff line change 1
1
tensorflow-gpu == 1.13.1
2
2
keras == 2.3.0
3
+ scikit-learn == 0.20.4
Original file line number Diff line number Diff line change 1
1
[16bits.model]
2
2
k = 1.0
3
- save_period = 50
4
- max_epochs = 250
3
+ save_period = 100
4
+ max_epochs = 200
5
5
patience = 50
6
6
7
7
[16bits.optim]
8
8
optimizer = Adam
9
9
lr = 0.00001
10
- decay = 1e-6
10
+ decay = 1e-4
11
11
12
12
13
13
[24bits.model]
14
14
k = 1.0
15
- save_period = 50
16
- max_epochs = 250
15
+ save_period = 100
16
+ max_epochs = 200
17
17
patience = 50
18
18
19
19
[24bits.optim]
20
20
optimizer = Adam
21
21
lr = 0.00001
22
- decay = 1e-6
22
+ decay = 1e-4
23
23
24
24
25
25
[32bits.model]
26
26
k = 1.0
27
- save_period = 50
28
- max_epochs = 250
27
+ save_period = 100
28
+ max_epochs = 200
29
29
patience = 50
30
30
31
31
[32bits.optim]
32
32
optimizer = Adam
33
33
lr = 0.00001
34
- decay = 1e-6
34
+ decay = 1e-4
35
35
36
36
37
37
[48bits.model]
38
38
k = 1.0
39
- save_period = 50
40
- max_epochs = 250
39
+ save_period = 100
40
+ max_epochs = 200
41
41
patience = 50
42
42
43
43
[48bits.optim]
44
44
optimizer = Adam
45
45
lr = 0.00001
46
- decay = 1e-6
46
+ decay = 1e-4
Original file line number Diff line number Diff line change 5
5
import importlib
6
6
import tensorflow as tf
7
7
import keras .backend as K
8
+ from pathlib2 import Path
8
9
from keras import optimizers
9
10
from keras .models import load_model
10
11
from keras .engine import Model
@@ -46,7 +47,8 @@ def run_train(args, optim_args):
46
47
47
48
## Initial preparation
48
49
model_dir = os .path .join (args .exp_dir , 'models' , args .config_opt )
49
- os .makedirs (model_dir , exist_ok = True )
50
+ # os.makedirs(model_dir, exist_ok=True)
51
+ Path (model_dir ).mkdir (parents = True , exist_ok = True )
50
52
model_check_point = ModelCheckpoint (os .path .join (model_dir , '{epoch:03d}.h5' ),
51
53
period = args .save_period )
52
54
csv_logger = CSVLogger (os .path .join (model_dir , 'log.csv' ))
You can’t perform that action at this time.
0 commit comments