neural_best_buddies
neural_best_buddies copied to clipboard
Run in Win10
Hi KFIR, I tried to run in windows but fail. I says:
(python35) C:\Users\Dell\Desktop\neural_best_buddies>python main.py --datarootA ./images/original_A.png --datarootB ./images/original_B.png --name lion_cat --k_final 10
------------ Options -------------
batchSize: 1
beta1: 0.5
border_size: 7
convergence_threshold: 0.001
datarootA: ./images/original_A.png
datarootB: ./images/original_B.png
fast: False
gamma: 1
gpu_ids: [0]
imageSize: 224
input_nc: 3
k_final: 10
k_per_level: inf
lr: 0.05
name: lion_cat
niter_decay: 100
results_dir: ./results
save_path: None
tau: 0.05
-------------- End ----------------
D:\Anaconda3\envs\python35\lib\site-packages\torchvision\transforms\transforms.py:188: UserWarning: The use of the transforms.Scale transform is deprecated, please use transforms.Resize instead.
"please use transforms.Resize instead.")
Saving original images...
Starting algorithm...
Finding best-buddies for the 5-th level
Drawing correspondence...
D:\Anaconda3\envs\python35\lib\site-packages\torch\nn\functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='elementwise_mean' instead.
warnings.warn(warning.format(ret))
D:\Anaconda3\envs\python35\lib\site-packages\torch\nn\modules\upsampling.py:122: UserWarning: nn.Upsampling is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.Upsampling is deprecated. Use nn.functional.interpolate instead.")
Finding best-buddies for the 4-th level
Drawing correspondence...
Finding best-buddies for the 3-th level
Drawing correspondence...
Finding best-buddies for the 2-th level
Drawing correspondence...
Finding best-buddies for the 1-th level
Drawing correspondence...
No. of correspondence: 160
Calculating K-means...
### Traceback (most recent call last):
File "main.py", line 19, in
I don't know why x_c or y_c is a negative number. Could you please give me some idea? Must I run this code in Linux or macOS instead of Windows?
Best Regard, Jiajing Chan.
I found that this error came from line 134 in MLS.py, when source_x < 0 or source_y <0. My pull request #16 contains a simple fix for this issue.