diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-02 22:09:49 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-02 22:09:49 +0200 |
| commit | fd3198c0c799e7943f7f27758e97670535c94979 (patch) | |
| tree | ce10c703f63a74c0d077c75cb52cf6f6f77cd3cc /build_dataset.pl | |
| parent | d52f2fa369ae4c1df766ce288520ce82f0d984ff (diff) | |
augment script
Diffstat (limited to 'build_dataset.pl')
| -rwxr-xr-x | build_dataset.pl | 13 |
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); |
