summaryrefslogtreecommitdiff
path: root/build_dataset.pl
diff options
context:
space:
mode:
Diffstat (limited to 'build_dataset.pl')
-rwxr-xr-xbuild_dataset.pl13
1 files changed, 10 insertions, 3 deletions
diff --git a/build_dataset.pl b/build_dataset.pl
index f007038..f88b818 100755
--- a/build_dataset.pl
+++ b/build_dataset.pl
@@ -39,12 +39,19 @@ my $dir;
my $src;
my $dst;
for ($i = 0; $i < $count; $i++) {
- if (($i % $test_split) != ($test_split-1)) {
- $dir = $thumbs_dir . "train_";
- } else {
+ if (($i % $test_split) = ($test_split-1)) {
$dir = $thumbs_dir . "test_";
+
+ $src = $images_dir . $images[$i];
+ $dst = $dir . sprintf("A/frame_%05d.png", $i);
+ system("ln", "-s", $src, $dst);
+
+ $src = $images_dir . $images[$i+1];
+ $dst = $dir . sprintf("B/frame_%05d.png", $i);
+ system("ln", "-s", $src, $dst);
}
+ $dir = $thumbs_dir . "train_";
$src = $images_dir . $images[$i];
$dst = $dir . sprintf("A/frame_%05d.png", $i);
system("ln", "-s", $src, $dst);