summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjules@lens <julescarbon@gmail.com>2018-04-18 12:35:19 +0200
committerjules@lens <julescarbon@gmail.com>2018-04-18 12:35:19 +0200
commitd7ed19821513928670114ac18338ff3374ef49c4 (patch)
tree05394bf708ad03283834e8fcd3a6ea802e82aad2
parent1fd836eb35924e9771253ad6fa8f74ed16a62f0b (diff)
fix opencv bug
-rwxr-xr-xdataset.sh2
-rw-r--r--datasets/combine_A_and_B.py6
-rwxr-xr-xtrain.sh10
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
+