Code Monkey home page Code Monkey logo

neural_best_buddies's People

Contributors

kfiraberman avatar shimingyi avatar stnoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

neural_best_buddies's Issues

How to use CPU run this program?

Dear pro:
Hello, I download this and try to run it,but it seem use GPU acceleration by default. it met an error "RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at /pytorch/aten/src/THC/THCGeneral.cpp:74
"
My pc only support cpu env?could you tell me how to switch it?Thank you!

Remove the use in cv2

Remove the use in openCV. Use the points returned by the algorithm, instead of reading them from the files.

fyi, fork/ couple minor issues

hi guys,
thanks for the paper and code. I forked it and made quick hack to run it in jupyter notebook and add a pip installer; (https://github.com/xkunglu/neural_best_buddies) Im working on features and wanted to see what potential your methods have. The method is not rotation, scale invariant but it is domain invariant; so I agree that it could become part of a powerful descriptor.
If you guys want I do a pull request. But maybe my changes are too invasive for you and I do agree that they would need further factorization;
If you do put more work in this; I would love to see the following.

  • investigation on how this can be made to be faster.
  • clean separation between data IO/ visualization and process.

In case you think my changes dont go towards your path Ill put a list couple fixes that you may want to look at:

  1. I ran the code on LFW faces and I had to force scaling to 224x224 otherwise I ended up with some misshaped tensors - I didnt look into why too much. Perhaps theres something wrong with transforms.Resize and .Scale with torchvision 0.2.1 in python 3.6.5 -

  2. There were a couple pytorch deprecation warnings.
    line 95 of vgg19_model.py
    #replaced .data()[0] with .item() - deprecated in pytorch> 0.5
    error = loss_perceptual.item()
    util.py get_transforms
    #replaced .Scale by .Resize - deprecated in pytorch> 0.5
    transform_list.append(transforms.Resize(osize, Image.BICUBIC))
    regards
    xk

image morphing

can you release the code of automatic cross-domain Image morphing?
thx

About the image morphing

Hello, I want to thank you for giving this research and result. It is a very powerful method.
And I am interested in the image morphing process, so could you release the code about the image morphing process?
Thanks

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
mls.run_MLS_in_folder(root_folder=save_dir)
File "C:\Users\Dell\Desktop\neural_best_buddies\util\MLS.py", line 182, in run_MLS_in_folder
warp_AtoB, vxy_AtoB = mls_util.run_MLS(img_A, points_A, points_B)
File "C:\Users\Dell\Desktop\neural_best_buddies\util\MLS.py", line 168, in run_MLS
warp_image, vxy = self.warp_MLS(img, points_start, points_end)
File "C:\Users\Dell\Desktop\neural_best_buddies\util\MLS.py", line 141, in warp_MLS
warpped_image, vxy = self.mlsd_2d_warp(image, mlsd, points_end, grid_x, grid_y)
File "C:\Users\Dell\Desktop\neural_best_buddies\util\MLS.py", line 133, in mlsd_2d_warp
warped_image[x, y] = self.bilinear_interp(source_x, source_y, image)
File "C:\Users\Dell\Desktop\neural_best_buddies\util\MLS.py", line 43, in bilinear_interp
+ a * b * image[x_c, y_c]
IndexError: index -297 is out of bounds for axis 0 with size 284

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.