diff options
| author | jules <jules@asdf.us> | 2018-11-23 13:41:03 +0100 |
|---|---|---|
| committer | jules <jules@asdf.us> | 2018-11-23 13:41:03 +0100 |
| commit | 795f81ad95888631420e870dfec6aaf7425cc598 (patch) | |
| tree | 61655712fe56b6fb1767257b0fe0ffaca08cc534 | |
| parent | 1a48ac95160230049baf8e2e2de3305566ef68e8 (diff) | |
scripts
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | cleanup.sh | 5 | ||||
| -rw-r--r-- | crop_frames.py | 4 | ||||
| -rw-r--r-- | today.sh | 23 |
4 files changed, 33 insertions, 2 deletions
@@ -7,3 +7,6 @@ results .DS_Store *.h5 +*.mp4 +*.png + diff --git a/cleanup.sh b/cleanup.sh new file mode 100644 index 0000000..8d1072a --- /dev/null +++ b/cleanup.sh @@ -0,0 +1,5 @@ +#!/bin/bash +rm -rf results/16L/L/* +rm -rf results/28L/L/* +rm -rf results/52L/L/* +rm -rf inputs/L/* diff --git a/crop_frames.py b/crop_frames.py index 8314816..516ad37 100644 --- a/crop_frames.py +++ b/crop_frames.py @@ -36,7 +36,7 @@ def crop_dir(): w = min(args.step, width - x) h = min(args.step, height - y) crop_dir = "{}/crop_{}_{}_{}_{}".format(args.dir, x, y, w, h) - print("{}x{} {}x{}".format(x, y, w, h)) + #print("{}x{} {}x{}".format(x, y, w, h)) crop = img.crop((x, y, x + w, y + h)) crop.save("{}/{}".format(crop_dir, fn)) @@ -108,4 +108,4 @@ if __name__ == "__main__": if args.cmd == 'crop': crop_dir() else: - merge_dir()
\ No newline at end of file + merge_dir() diff --git a/today.sh b/today.sh new file mode 100644 index 0000000..aa7d7dd --- /dev/null +++ b/today.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +python crop_frames.py --overlap 16 crop aquarium +rm -rf inputs/L/* +mv aquarium/crop* inputs/L/ +python test.py 28 L "" +python crop_frames.py merge results/28L/L/ +cd results/28L/L/merged/ +ffmpeg -i ./frame_%05d.png -y -c:v libx264 -vf fps=25 -pix_fmt yuv420p aquarium_uprez.mp4 +scp aquarium_uprez.mp4 jules@lmno:asdf/neural/uprez/ +cd ../../../../ +mv results/28L/L/ aquarium/uprez/ + +python crop_frames.py --overlap 16 crop venice +rm -rf inputs/L/* +mv venice/crop* inputs/L/ +python test.py 28 L "" +python crop_frames.py merge results/28L/L/ +cd results/28L/L/merged/ +ffmpeg -i ./frame_%05d.png -y -c:v libx264 -vf fps=25 -pix_fmt yuv420p venice_uprez.mp4 +scp venice_uprez.mp4 jules@lmno:asdf/neural/uprez/ +cd ../../../../ + |
