diff options
| -rwxr-xr-x | dataset.sh | 2 | ||||
| -rw-r--r-- | datasets/combine_A_and_B.py | 6 | ||||
| -rwxr-xr-x | train.sh | 10 |
3 files changed, 16 insertions, 2 deletions
diff --git a/dataset.sh b/dataset.sh new file mode 100755 index 0000000..f331566 --- /dev/null +++ b/dataset.sh @@ -0,0 +1,2 @@ +python datasets/combine_A_and_B.py --fold_A /home/lens/Desktop/thumbs/woodscaled_4/A --fold_B /home/lens/Desktop/thumbs/woodscaled_4/B --fold_AB datasets/woodscaled_4/ + diff --git a/datasets/combine_A_and_B.py b/datasets/combine_A_and_B.py index 70907ad..dd28f21 100644 --- a/datasets/combine_A_and_B.py +++ b/datasets/combine_A_and_B.py @@ -42,7 +42,9 @@ for sp in splits: if args.use_AB: name_AB = name_AB.replace('_A.', '.') # remove _A path_AB = os.path.join(img_fold_AB, name_AB) - im_A = cv2.imread(path_A, cv2.CV_LOAD_IMAGE_COLOR) - im_B = cv2.imread(path_B, cv2.CV_LOAD_IMAGE_COLOR) + #im_A = cv2.imread(path_A, cv2.CV_LOAD_IMAGE_COLOR) + #im_B = cv2.imread(path_B, cv2.CV_LOAD_IMAGE_COLOR) + im_A = cv2.imread(path_A, cv2.IMREAD_COLOR) + im_B = cv2.imread(path_B, cv2.IMREAD_COLOR) im_AB = np.concatenate([im_A, im_B], 1) cv2.imwrite(path_AB, im_AB) diff --git a/train.sh b/train.sh new file mode 100755 index 0000000..754f4ce --- /dev/null +++ b/train.sh @@ -0,0 +1,10 @@ +python train.py \ + --dataroot ./datasets/woodscaled_4 \ + --name woodscaled_4_pix2pix \ + --model pix2pix \ + --which_model_netG unet_256 \ + --which_direction AtoB \ + --lambda_B 100 \ + --dataset_mode aligned \ + --no_lsgan --norm batch --pool_size 0 + |
