summaryrefslogtreecommitdiff
path: root/run-first.sh
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2018-05-18 02:41:00 +0200
committerjules@lens <julescarbon@gmail.com>2018-05-18 02:41:00 +0200
commit6d720b476868b8924a86d15cf2e5c9c1dff9c340 (patch)
tree55f237ea75669344eb8d1b917b19d22a80845620 /run-first.sh
parent56f6b067eca5b7f4ce34e12b1a91daedfc7e6919 (diff)
run-first script - build dataset from folder of images and run first epochs
Diffstat (limited to 'run-first.sh')
-rwxr-xr-xrun-first.sh54
1 files changed, 54 insertions, 0 deletions
diff --git a/run-first.sh b/run-first.sh
new file mode 100755
index 0000000..3f86619
--- /dev/null
+++ b/run-first.sh
@@ -0,0 +1,54 @@
+dataset=$1
+
+#/home/lens/Desktop/dataset-random.pl
+
+if [ ! -d "./datasets/$dataset/" ]; then
+ python datasets/combine_A_and_B.py \
+ --fold_A "$HOME/Desktop/thumbs/$dataset/A" \
+ --fold_B "$HOME/Desktop/thumbs/$dataset/B" \
+ --fold_AB "./datasets/$dataset/"
+fi
+
+if [ ! -f "./checkpoints/$dataset/latest_net_G.pth" ]; then
+ python train.py \
+ --dataroot "./datasets/$dataset" \
+ --name "$dataset" \
+ --model pix2pix \
+ --dataset_mode aligned \
+ --which_model_netG unet_256 \
+ --which_direction AtoB \
+ --loadSize 264 \
+ --fineSize 256 \
+ --lambda_B 100 \
+ --no_lsgan --norm batch --pool_size 0
+else
+ python train.py \
+ --dataroot "./datasets/$dataset" \
+ --name "$dataset" \
+ --model pix2pix \
+ --dataset_mode aligned \
+ --which_model_netG unet_256 \
+ --which_direction AtoB \
+ --loadSize 264 \
+ --fineSize 256 \
+ --lambda_B 100 \
+ --which_epoch latest \
+ --continue_train \
+ --no_lsgan --norm batch --pool_size 0
+fi
+
+#python test.py \
+# --dataroot "/home/lens/Desktop/thumbs/$dataset/A/train/" \
+# --name "$dataset" \
+# --start_img "/home/lens/Desktop/thumbs/$dataset/A/train/frame_1008.png" \
+# --how_many 1000 \
+# --model test \
+# --aspect_ratio 1.777777 \
+# --which_model_netG unet_256 \
+# --which_direction AtoB \
+# --dataset_mode recursive \
+# --norm batch
+# --loadSize 256 \
+# --fineSize 256 \
+
+