From d1e9adbf6eb85147f34efbf3efc057e4c9ca458d Mon Sep 17 00:00:00 2001 From: Artsiom Sanakoyeu Date: Sat, 24 Oct 2015 19:37:13 +0200 Subject: [PATCH 1/2] BUGFIX. Unused variable removed, that caused quadratic running time of esvm_mine_negatives --- internal/esvm_mine_negatives.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/esvm_mine_negatives.m b/internal/esvm_mine_negatives.m index 83d8e11c7..a4f095b73 100644 --- a/internal/esvm_mine_negatives.m +++ b/internal/esvm_mine_negatives.m @@ -108,7 +108,7 @@ if supersize > 0 addon=sprintf(', max = %.3f',max(cellfun(@(x)max_or_this(x,-1000),scores))); end - total = sum(cellfun(@(x)x.num_visited,mining_queue)); + fprintf(1,'Found %04d windows, image:%05d (#seen=%05d/%05d%s)\n',... supersize, index, ... length(imageset)-length(mining_queue)+i, length(imageset), addon); From a090910588b71c85fe48c759022792d52e214c22 Mon Sep 17 00:00:00 2001 From: Artsiom Sanakoyeu Date: Sat, 24 Oct 2015 19:51:49 +0200 Subject: [PATCH 2/2] Optimized method for updating mining queue update_mq_onepass --- internal/esvm_mine_negatives.m | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/esvm_mine_negatives.m b/internal/esvm_mine_negatives.m index a4f095b73..4f4bee262 100644 --- a/internal/esvm_mine_negatives.m +++ b/internal/esvm_mine_negatives.m @@ -214,17 +214,10 @@ function mining_queue = update_mq_onepass(mining_queue, violating_images, ... empty_images) -%% Take the violating images and remove them from queue -mover_ids = find(cellfun(@(x)ismember(x.index,violating_images), ... - mining_queue)); - +%% Take the violating and empty images and remove them from queue +mover_ids = 1:(length(violating_images) + length(empty_images)); mining_queue(mover_ids) = []; -%% We now take the empty images and remove them from queue -mover_ids = find(cellfun(@(x)ismember(x.index,empty_images), ... - mining_queue)); - -mining_queue(mover_ids) = []; function mining_queue = update_mq_front_violators(mining_queue,... violating_images, ...