diff options
| author | jules@lens <julescarbon@gmail.com> | 2018-09-05 11:58:53 +0200 |
|---|---|---|
| committer | jules@lens <julescarbon@gmail.com> | 2018-09-05 11:58:53 +0200 |
| commit | a9e6407ed7c9e074ec41099131949c8cf3812a94 (patch) | |
| tree | ef4153c6f5fe1d2cf2215b8e81bdb0ef477f8c6b /build_dataset.pl | |
| parent | 00b926f8eddb40a703dade8cec16794bcab129ec (diff) | |
| parent | 0df8723fd140c893ec4177ffe2e53b9ce3db3b4e (diff) | |
Merge branch 'master' of asdf.us:pix2pixhd
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); |
