From 0c2cf402aff1b6eef47e8bdfae77472589c42e0c Mon Sep 17 00:00:00 2001 From: Joseph Redmon Date: Fri, 9 May 2014 15:35:58 -0700 Subject: [PATCH] Some small fixes for frame --- src/data.c | 1 + src/image.c | 1 + src/tests.c | 9 ++++----- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/data.c b/src/data.c index 6d2061ed..526d7af1 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; diff --git a/src/tests.c b/src/tests.c index 81054046..cfe969fe 100644 --- a/src/tests.c +++ b/src/tests.c @@ -651,9 +651,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]; @@ -774,13 +773,13 @@ int main(int argc, char *argv[]) // test_im2row(); //test_split(); //test_ensemble(); - test_nist(); + //test_nist(); //test_cifar10(); //test_vince(); //test_full(); //train_VOC(); - //features_VOC_image(argv[1], argv[2], argv[3], 0); - //features_VOC_image(argv[1], argv[2], argv[3], 1); + 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");