diff --git a/src/cnn.c b/src/cnn.c index 0acc842c..cac11494 100644 --- a/src/cnn.c +++ b/src/cnn.c @@ -655,9 +655,8 @@ void visualize_cat() cvWaitKey(0); } -void features_VOC_image(char *image_file, char *image_dir, char *out_dir, int flip) +void features_VOC_image(char *image_file, char *image_dir, char *out_dir, int flip, int interval) { - int interval = 4; int i,j; network net = parse_network_cfg("cfg/voc_imagenet.cfg"); char image_path[1024]; @@ -785,6 +784,9 @@ int main(int argc, char *argv[]) //tune_VOC(); //features_VOC_image(argv[1], argv[2], argv[3], 0); //features_VOC_image(argv[1], argv[2], argv[3], 1); + //train_VOC(); + //features_VOC_image(argv[1], argv[2], argv[3], 0, 4); + //features_VOC_image(argv[1], argv[2], argv[3], 1, 4); //features_VOC_image_size(argv[1], atoi(argv[2]), atoi(argv[3])); //visualize_imagenet_features("data/assira/train.list"); //visualize_imagenet_topk("data/VOC2012.list"); diff --git a/src/data.c b/src/data.c index a2432af1..30ee9ecb 100644 --- a/src/data.c +++ b/src/data.c @@ -37,6 +37,7 @@ data load_data_image_paths(char **paths, int n, char **labels, int k, int h, int d.shallow = 0; d.X.rows = n; d.X.vals = calloc(d.X.rows, sizeof(float*)); + d.X.cols = 0; d.y = make_matrix(n, k); for(i = 0; i < n; ++i){ diff --git a/src/image.c b/src/image.c index 453919fb..e2c451b7 100644 --- a/src/image.c +++ b/src/image.c @@ -199,6 +199,7 @@ void show_image_collapsed(image p, char *name) image make_empty_image(int h, int w, int c) { image out; + out.data = 0; out.h = h; out.w = w; out.c = c;