-
Notifications
You must be signed in to change notification settings - Fork 0
/
selective_search_for_pororo.m
40 lines (31 loc) · 1.21 KB
/
selective_search_for_pororo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
%% make selective search data for pororo
% train
load('imdb/cache/imdb_voc_pororo_train.mat');
images = imdb.image_ids';
boxes = cell(1, length(images));
for i = 1:length(boxes)
im = imread(['/home/kmkim/Downloads/rcnn-master/datasets/VOCdevkit_pororo/VOC_pororo/JPEGImages/' images{i} '.bmp']);
box = selective_search_boxes(im);
boxes{1,i} = box;
end
save('data/selective_search_data/voc_pororo_train.mat', 'images', 'boxes');
% val
load('imdb/cache/imdb_voc_pororo_val.mat');
images = imdb.image_ids';
boxes = cell(1, length(images));
for i = 1:length(boxes)
im = imread(['/home/kmkim/Downloads/rcnn-master/datasets/VOCdevkit_pororo/VOC_pororo/JPEGImages/' images{i} '.bmp']);
box = selective_search_boxes(im);
boxes{1,i} = box;
end
save('data/selective_search_data/voc_pororo_val.mat', 'images', 'boxes');
% test
load('imdb/cache/imdb_voc_pororo_test.mat');
images = imdb.image_ids';
boxes = cell(1, length(images));
for i = 1:length(boxes)
im = imread(['/home/kmkim/Downloads/rcnn-master/datasets/VOCdevkit_pororo/VOC_pororo/JPEGImages/' images{i} '.bmp']);
box = selective_search_boxes(im);
boxes{1,i} = box;
end
save('data/selective_search_data/voc_pororo_test.mat', 'images', 'boxes');