-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcollect_train_subset.m
36 lines (28 loc) · 1.37 KB
/
collect_train_subset.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
function [] = collect_train_subsets()
% function [] = collect_train_subsets()
%
% Collects the train subsets given by list_train_subset.txt and
% list_train_subset_2.txt which both contain 100 images hand chosen such
% that multiple different scenes are represented in both subsets.
%
% David Stutz <david.stutz@rwth-aachen.de>
load list_train_subset.txt
baseDir = './NYUDepthV2/cropped-original/data';
imageSubDir = sprintf('%s/images/train_subset', baseDir);
if ~exist(imageSubDir)
system(sprintf('mkdir %s', imageSubDir));
end;
depthSubDir = sprintf('%s/depth/train_subset', baseDir);
if ~exist(depthSubDir)
system(sprintf('mkdir %s', depthSubDir));
end;
groundTruthSubDir = sprintf('%s/groundTruth/train_subset', baseDir);
if ~exist(groundTruthSubDir)
system(sprintf('mkdir %s', groundTruthSubDir));
end;
for i = 1: size(list_train_subset, 1)
system(sprintf('cp %s/images/train/%08d.jpg %s/images/train_subset/%08d.jpg', baseDir, list_train_subset(i), baseDir, list_train_subset(i)));
system(sprintf('cp %s/groundTruth/train/%08d.mat %s/groundTruth/train_subset/%08d.mat', baseDir, list_train_subset(i), baseDir, list_train_subset(i)));
system(sprintf('cp %s/depth/train/%08d.png %s/depth/train_subset/%08d.png', baseDir, list_train_subset(i), baseDir, list_train_subset(i)));
end;
end