The source code of 'Visual Attribute Transfer through Deep Image Analogy'.

Overview

Deep Image Analogy

The major contributors of this repository include Jing Liao, Yuan Yao, Lu Yuan, Gang Hua and Sing Bing Kang at Microsoft Research.

Introduction

Deep Image Analogy is a technique to find semantically-meaningful dense correspondences between two input images. It adapts the notion of image analogy with features extracted from a Deep Convolutional Neural Network.

Deep Image Analogy is initially described in a SIGGRAPH 2017 paper

image

Disclaimer

This is an official C++ combined with CUDA implementation of Deep Image Analogy. It is worth noticing that:

  • Our codes are based on Caffe.
  • Our codes only have been tested on Windows 10 and Windows Server 2012 R2 with CUDA 8 or 7.5.
  • Our codes only have been tested on several Nvidia GPU: Titan X, Titan Z, K40, GTX770.
  • The size of input image is limited, mostly should not be large than 700x500 if you use 1.0 for parameter ratio.

License

© Microsoft, 2017. Licensed under a MIT license.

Citation

If you find Deep Image Analogy (include deep patchmatch) helpful for your research, please consider citing:

@article{Liao:2017:VAT:3072959.3073683,
 author = {Liao, Jing and Yao, Yuan and Yuan, Lu and Hua, Gang and Kang, Sing Bing},
 title = {Visual Attribute Transfer Through Deep Image Analogy},
 journal = {ACM Trans. Graph.},
 issue_date = {July 2017},
 volume = {36},
 number = {4},
 month = jul,
 year = {2017},
 issn = {0730-0301},
 pages = {120:1--120:15},
 articleno = {120},
 numpages = {15},
 url = {http://doi.acm.org/10.1145/3072959.3073683},
 doi = {10.1145/3072959.3073683},
 acmid = {3073683},
 publisher = {ACM},
 address = {New York, NY, USA},
 keywords = {deep matching, image analogy, transfer},
} 

Application

Photo to Style

One major application of our code is to transfer the style from a painting to a photo.

Style to Style

It can also swap the styles between two artworks.

image

Style to Photo

The most challenging application is converting a sketch or a painting to a photo.

Photo to Photo

It can do color transfer between two photos, such as generating time lapse.

image

Getting Started

Prerequisite

  • Windows 7/8/10 (for linux or mac os x user, please check branch linux.)
  • CUDA 8 or 7.5
  • Visual Studio 2013

Build

  • Build Caffe at first. Just follow the tutorial here.
  • Edit deep_image_analogy.vcxproj under windows/deep_image_analogy to make the CUDA version in it match yours .
  • Open solution Caffe and add deep_image_analogy project.
  • Build project deep_image_analogy.

Download models

You need to download models VGG-19 model before start to run a demo. Go to windows/deep_image_analogy/models/vgg19/ folder and download:

Demo

Open main.cpp in windows/deep_image_analogy/source/ to see how to run a demo. You need to set several parameters which have been mentioned in the paper. To be more specific, you need to set

  • path_model, where the VGG-19 model is.
  • path_A, the input image A.
  • path_BP, the input image BP.
  • path_output, the output path.
  • GPU Number, GPU ID you want to run this experiment.
  • Ratio, the ratio to resize the inputs before sending them into the network.
  • Blend Weight, the level of weights in blending process.
  • Flag of WLS Filter, if you are trying to do photo style transfer, we recommend to switch this on to keep the structure of original photo.

Direct Run

We also provide a pre-built executable file in folder windows/deep_image_analogy/exe/, don't hesitate to try it.

To run this deep_image_analogy.exe, you need to write a command line as:

deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0

which means

  • path_model=../models/
  • path_A=../demo/content.png
  • path_BP=../demo/style.png
  • path_output=../demo/output/
  • GPU Number=0
  • Ratio=0.5
  • Blend Weight=2
  • Flag of WLS Filter=0( 0: WLS filter disabled, 1: WLS filter enabled, only required for the case of photo to photo)

Tips

  • We often test images of size 600x400 and 448x448.
  • We set ratio to 1.0 by default. Specifically, for face (portrait) cases, we find ratio = 0.5 often make the results better.
  • Blend weight controls the result appearance. If you want the result to be more like original content photo, please increase it; if you want the result more faithful to the style, please reduce it.
  • For the four applications, our settings are mostly (but not definitely):
    • Photo to Style: blend weight=3, ratio=0.5 for face and ratio=1 for other cases.
    • Style to Style: blend weight=3, ratio=1.
    • Style to Photo: blend weight=2, ratio=0.5.
    • Photo to Photo: blend weight=3, ratio=1.

Acknowledgments

Our codes acknowledge Eigen, PatchMatch, CudaLBFGS and Caffe. We also acknowledge to the authors of our image and style examples but we do not own the copyrights of them.

Comments
  • Demo fails (CUDNN_STATUS_SUCCESS (8 vs. 0))

    Demo fails (CUDNN_STATUS_SUCCESS (8 vs. 0))

    I have downloaded the model and installed CUDA, but the demo still does not run. In another issue, it was mentioned that this project doesn't need cuDNN, but I have it extracted anyway.

    >C:\Deep-Image-Analogy\windows\deep_image_analogy\exe>deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0
    
    [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message.  If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
    [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192
    [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message.  If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
    [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv5_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv4_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv3_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv2_1.
    F0705 13:44:12.492667 10008 cudnn_conv_layer.cu:28] Check failed: status == CUDNN_STATUS_SUCCESS (8 vs. 0)  CUDNN_STATUS_EXECUTION_FAILED
    
    opened by Poyo-SSB 9
  • failed to run pre-built executable

    failed to run pre-built executable

    deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0 [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192 [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192 Finding nearest neighbor field using PatchMatch Algorithm at layer:conv5_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv4_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv3_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv2_1. F1024 12:10:34.443341 32020 cudnn_conv_layer.cu:28] Check failed: status == CUDNN_STATUS_SUCCESS (8 vs. 0) CUDNN_STATUS_EXECUTION_FAILED *** Check failure stack trace: ***

    opened by enhulu 5
  • Demo File Location

    Demo File Location

    I cannot find executable file "demo" in folder. (UBUNTU 16.04) I have installed all dependencies, with cuda and cudnn. Now I want to execute demo file to get test result by using command ./demo deep_image_analogy/models/ deep_image_analogy/demo/content.png deep_image_analogy/demo/style.png deep_image_analogy/demo/output/ 0 0.5 2 0 as you mentioned ... but I cannot find executable file "demo" in folder... Can u help me to find its location... Or How can i build it... Thanks and regards

    opened by brainstormapps 4
  • Pre-built Executable Error == cudaSuccess (8 vs. 0)  invalid device function

    Pre-built Executable Error == cudaSuccess (8 vs. 0) invalid device function

    Hi,

    I've successfully built and now rebuilt Caffe with the following parameters:

            <CpuOnlyBuild>false</CpuOnlyBuild>
            <UseCuDNN>true</UseCuDNN>
            <CudaVersion>7.5</CudaVersion>
            <!-- NOTE: If Python support is enabled, PythonDir (below) needs to be
             set to the root of your Python installation. If your Python installation
             does not contain debug libraries, debug build will not work. -->
            <PythonSupport>true</PythonSupport>
            <!-- NOTE: If Matlab support is enabled, MatlabDir (below) needs to be
             set to the root of your Matlab installation. -->
            <MatlabSupport>true</MatlabSupport>
            <CudaDependencies></CudaDependencies>
    
            <!-- Set CUDA architecture suitable for your GPU.
             Setting proper architecture is important to mimize your run and compile time. -->
            <CudaArchitecture>compute_30,sm_30;compute_35,sm_35;compute_50,sm_50</CudaArchitecture>
    
            <!-- CuDNN 4 and 5 are supported -->
            <CuDnnPath></CuDnnPath>
    

    I left empty but I unpacked the CuDNNv4 downloaded zip to the %CUDA_PATH% location (in my case C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5).

    I have not done any of the deep_image_analogy build steps:

    • Edit deep_image_analogy.vcxproj under windows/deep_image_analogy to make the CUDA version in it match yours .
    • Open solution Caffe and add deep_image_analogy project.
    • Build project deep_image_analogy.

    When executing the provided pre-built executable file:

    deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0

    It results in the following error:

    [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192 [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192 F1005 13:11:47.450531 6872 pooling_layer.cu:212] Check failed: error == cudaSuccess (8 vs. 0) invalid device function *** Check failure stack trace: ***

    I'm running CUDA 7.5, cuDNN 4, Visual Studio 2013, MATLAB R2014b and Windows 10 with GeForce GTX 770 GPU.

    From what I've read invalid device function indicates a CUDA / GPU incompatibility.

    The GeForce GTX 770 GPU has compute capability 3.0 https://developer.nvidia.com/cuda-gpus, so when building Caffe, setting <CudaArchitecture>compute_30,sm_30;compute_35,sm_35;compute_52,sm_52</CudaArchitecture> should be correct, no?

    Any info or assistance resolving this would be greatly appreciated.

    opened by jason061938 4
  • macOS / Linux compile help

    macOS / Linux compile help

    First off, thanks to the whole team for sharing the project!

    Unfortunately (only concerning this particular project) i have a desktop machine with macOS and couldn't find a way to open/convert the .vcxproj files. I've tried MS Visual Studio and Visual Studio Code for Mac, but it didn't let me compile the project. These Apps are only shrinked down versions of the original Visual Studio .

    Then i tried some tricks and tools to convert the .vcxproj content to regular make or cmake instruction files:

    All ended with errors, some didn't even get past the first few files in the compile queue... Sadly i have no idea how to write a makefile (or make-config) myself – otherwise i wouldn't bother you.

    So my question is: Did anyone of your team try to compile and run it on Linux or macOS? If so, could you please ask them to write down a few steps or a small guide on how to compile it on other systems?


    I've waited eagerly to try out the project since the first announcement of the paper on reddit and was a little bit disappointed when i saw that the files were only usable on Windows. But don't get me wrong – i'm still glad that the source files are available!

    I have already compiled Caffe (from the official site) a few times with python2 & 3.x support, but for some reason with this project's version i can't get past the last steps of the build (some problem with missing functions for hdf5: "Undefined symbols for architecture x86_64: "_H5LTfind_dataset" and more).

    And even if i did get Caffe running, i wouldn't know how to configure and make/compile the files in the windows/deep_image_analogy/source folder. I've tried to compile everything with nvcc but its either missing some include files – or when i include them manually it throws a lot of errors.

    So any kind of help is deeply appreciated!

    opened by subzerofun 4
  • libgdk-x11-2.0.so.0: undefined reference to `XRRFreeMonitors'

    libgdk-x11-2.0.so.0: undefined reference to `XRRFreeMonitors'

    hello,

    when i run "sh scripts/make_deep_image_analogy.sh" to compile deep_image_analogy, there is an error happened:

    /lib64/libgdk-x11-2.0.so.0: undefined reference to `XRRFreeMonitors'
    /lib64/libgdk-x11-2.0.so.0: undefined reference to `XRRGetMonitors'
    

    how should I fix this error?

    thanks

    opened by fen328199260 3
  • Error runnning the exe

    Error runnning the exe

    C:\deep_image_analogy\exe>deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0 [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192 [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total number of bytes read was 574671192 Finding nearest neighbor field using PatchMatch Algorithm at layer:conv5_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv4_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv3_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv2_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv1_1. Saving flow result. Finished finding ann. Time : 43.575 WARNING: Logging before InitGoogleLogging() is written to STDERR F0526 19:49:36.182569 10584 syncedmem.hpp:31] Check failed: error == cudaSuccess (4 vs. 0) unspecified launch failure *** Check failure stack trace: ***

    opened by CJHFUTURE 3
  • cannot run the exe

    cannot run the exe

    when running "./deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0 " on windows i am getting protobuf errors: https://gist.github.com/aycgit/fcd70d15eb48ea701291dc04256716bf

    I am likely just very silly but i found this project interesting and wanted to try it

    opened by Wqrld 2
  • NVCC can't link to opencv's lib correctly.

    NVCC can't link to opencv's lib correctly.

    I have installed caffe with CUDA successfully, but when i compile deep_image_analogy by sh scripts/make_deep_image_analogy.sh Error occurs: /usr/bin/ld: /tmp/tmpxft_00001a5c_00000000-41_DeepAnalogy.o: undefined reference to symbol '_ZN2cv7imwriteERKNS_6StringERKNS_11_InputArrayERKSt6vectorIiSaIiEE' /usr/local/lib/libopencv_imgcodecs.so.3.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status I search it on the Net, it said that this may be related to my multy opencv version. I had opencv 2.4 and 3.2 in my ubuntu. Below are files in "/usr/local/lib" related to libopencv_improc: 1 But i built caffe with opencv3.2. How can i solve it ? I've been stucked here for 2 days.

    opened by daili0015 2
  • /usr/include/c++/5/bits/stl_iterator_base_types.h(156): error: name followed by

    /usr/include/c++/5/bits/stl_iterator_base_types.h(156): error: name followed by "::" must be a class or namespace name

    hi ,first of all,thanks for your great job ,I am trying to build your linux version Deep-Image-Analogy,I following your build scripts,but some errors come: Do u know what problem is ,I am using the cmake ,the cmake command is something like this:

    cmake .. -DCUDA_NVCC_FLAGS=" -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES -D__STRICT_ANSI__" -DCMAKE_CXX_FLAGS=' -D_MWAITXINTRIN_H_INCLUDED -D_FORCE_INLINES -D__STRICT_ANSI__'

    [ 18%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_recurrent_layer.cu.o /usr/include/c++/5/bits/stl_iterator_base_types.h(154): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" /home/public/git/LDeep-Image-Analogy/src/caffe/layers/box_annotator_ohem_layer.cu(55): here

    /usr/include/c++/5/bits/stl_iterator_base_types.h(155): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" /home/public/git/LDeep-Image-Analogy/src/caffe/layers/box_annotator_ohem_layer.cu(55): here

    /usr/include/c++/5/bits/stl_iterator_base_types.h(156): error: name followed by "::" must be a class or namespace name detected during: instantiation of class "std::__iterator_traits<_Iterator, void> [with _Iterator=int]" (163): here instantiation of class "std::iterator_traits<_Iterator> [with _Iterator=int]" /home/public/git/LDeep-Image-Analogy/src/caffe/layers/box_annotator_ohem_layer.cu(55): here

    /usr/include/c++/5/bits/stl_iterator_base_types.h(157): error: name followed by "::" must be a class or namespace name

    opened by andyhx 2
  • demo keeps running

    demo keeps running

    I followed all the procedure as proposed in Linux and run the demo. But the demo keeps running for over 10 minutes. And the gpu usage stays at 0%. What could be the problem?

    opened by rickyim 1
  • What are the visual attributes considered here?

    What are the visual attributes considered here?

    I am currently reading the paper and confused on what is actually considered as an attribute to transfer. It lists three things: color transfer, texture transfer, and style transfer.

    In the example image of monalisa and avatar, looking at the image A', I made the following observation:

    • it transferred the color, eyes and lips.

    Then why didn't it transfer ears and nose?

    What I understand is, it should only transfer color in this set of images. Eyes, lips, ears and nose are individual attributes of that person itself and it shouldn't change. Yes, it may be able to transfer style, i.e. if B' is a photo of girl with tiara headband, then it should transfer this style to A producing A'. But this isn't the case here..

    In short, are we actually controlling the attributes to transfer? Or the model takes decisions on its own?

    Thank you..

    opened by ParikhKadam 1
  • which version of protoc can be used in this project?

    which version of protoc can be used in this project?

    At first, I install protoc-2.6.1, but I get an error:

    In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:0: .build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is #error This file was generated by a newer version of protoc which is ^ .build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update ^ .build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers. #error your headers. ^ In file included from .build_release/src/caffe/proto/caffe.pb.cc:4:0: .build_release/src/caffe/proto/caffe.pb.h:23:35: fatal error: google/protobuf/arena.h: No such file or directory compilation terminated. Makefile:582: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

    Then I install protoc-3.6.1 instead, but the error still exists.

    I think this is because the protocol compiler (protoc) and the library header (/usr/include/google/protobuf) are inconsistent.

    % protoc --version libprotoc 3.6.1 % grep GOOGLE_PROTOBUF_VERSION /usr/include/google/protobuf/stubs/common.h #define GOOGLE_PROTOBUF_VERSION 2006001

    I am not the user of root, and the protoc is installed at my own dir. So anyone could help me solve this problem? Thanks!

    opened by JixiangGao 0
  • Minimal GPU requirements for demo

    Minimal GPU requirements for demo

    Hello,

    What are the minimal requirements for the GPU to run the demo: deep_image_analogy.exe ../models/ ../demo/content.png ../demo/style.png ../demo/output/ 0 0.5 2 0 ?

    I have nVIdia GTX 970 and Windows 8.1, and it crashes unfortunately somewhere in CUDA with the log:

    [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dang erously large protocol message. If the message turns out to be larger than 2147 483647 bytes, parsing will be halted for security reasons. To increase the limi t (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total num ber of bytes read was 574671192 [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:537] Reading dang erously large protocol message. If the message turns out to be larger than 2147 483647 bytes, parsing will be halted for security reasons. To increase the limi t (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING ..\src\google\protobuf\io\coded_stream.cc:78] The total num ber of bytes read was 574671192 Finding nearest neighbor field using PatchMatch Algorithm at layer:conv5_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv4_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv3_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv2_1. Finding nearest neighbor field using PatchMatch Algorithm at layer:conv1_1. Saving flow result. Finished finding ann. Time : 37.588 WARNING: Logging before InitGoogleLogging() is written to STDERR F0827 15:12:08.460532 6884 syncedmem.hpp:31] Check failed: error == cudaSuccess (30 vs. 0) unknown error

    This is both for exe-from-git, and for build by myself.

    In Debug build I see the error: Finding nearest neighbor field using PatchMatch Algorithm at layer:conv5_1. F0827 15:41:30.334332 4332 pooling_layer.cu:212] Check failed: error == cudaSuc cess (7 vs. 0) too many resources requested for launch

    Best regards, Fedor

    opened by FedorChe 1
  • linux : demo crashing free(): invalid pointer: 0x0000000002281d10

    linux : demo crashing free(): invalid pointer: 0x0000000002281d10

    hello and thanks for the code this is happening on KDE neon user (Ubuntu 16.04) I tried to recompile caffe without cudnn but same problem happens

    ./demo deep_image_analogy/models/ deep_image_analogy/demo/content.png deep_image_analogy/demo/style.png deep_image_analogy/demo/output/ 0 0.1 2 1
    [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message.  If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
    [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192
    [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message.  If the message turns out to be larger than 2147483647 bytes, parsing will be halted for security reasons.  To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
    [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv5_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv4_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv3_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv2_1.
    Finding nearest neighbor field using PatchMatch Algorithm at layer:conv1_1.
    Refining photo transfer.
    Saving flow result.
    Finished finding ann. Time : 121.885
    *** Error in `./demo': free(): invalid pointer: 0x0000000002281d10 ***
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f00373a67e5]
    /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f00373af37a]
    /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f00373b353c]
    /usr/lib/x86_64-linux-gnu/libprotobuf.so.9(_ZN6google8protobuf8internal28DestroyDefaultRepeatedFieldsEv+0x1f)[0x7f002eb5e8af]
    /usr/lib/x86_64-linux-gnu/libprotobuf.so.9(_ZN6google8protobuf23ShutdownProtobufLibraryEv+0x8b)[0x7f002eb5db3b]
    /usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3(+0x233b9)[0x7f001d3ea3b9]
    /lib64/ld-linux-x86-64.so.2(+0x10de7)[0x7f003cdc9de7]
    /lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7f0037368ff8]
    /lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7f0037369045]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7f003734f837]
    ./demo[0x407729]
    
    opened by lulu1315 1
Owner
MSRA CVer
Computer vision fanatics from Microsoft Research Asia
MSRA CVer
This is an open-source project for the aesthetic evaluation of images based on the deep learning-caffe framework, which we completed in the Victory team of Besti.

This is an open-source project for the aesthetic evaluation of images based on the deep learning-caffe framework, which we completed in the Victory team of Besti.

The Victory Group of Besti 102 Dec 15, 2022
Visual Memorability with Caffe Model

Visual Memorability with Caffe Model @inproceedings{ICCV15_Khosla, author = "Aditya Khosla and Akhil S. Raju and Antonio Torralba and Aude Oliva", tit

Miya Wang 17 Feb 18, 2022
🌅 iOS11 demo application for visual sentiment prediction.

Sentiment Vision Demo A Demo application using Vision and CoreML frameworks to detect the most likely sentiment of the given image. Model This demo is

Cocoa AI 34 Jan 29, 2022
On-device wake word detection powered by deep learning.

Porcupine Made in Vancouver, Canada by Picovoice Porcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening

Picovoice 2.8k Dec 30, 2022
A Swift deep learning library with Accelerate and Metal support.

Serrano Aiming to offering popular and cutting edge techs in deep learning area on iOS devices, Serrano is developed as a tool for developers & resear

pcpLiu 51 Nov 17, 2022
DL4S provides a high-level API for many accelerated operations common in neural networks and deep learning.

DL4S provides a high-level API for many accelerated operations common in neural networks and deep learning. It furthermore has automatic differentiati

DL4S Team 2 Dec 5, 2021
Shallow and Deep Convolutional Networks for Saliency Prediction

Shallow and Deep Convolutional Networks for Saliency Prediction Paper accepted at 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVP

Image Processing Group - BarcelonaTECH - UPC 183 Jan 5, 2023
Automatic spoken language identification (LID) using deep learning.

iLID Automatic spoken language identification (LID) using deep learning. Motivation We wanted to classify the spoken language within audio files, a pr

Thomas Werkmeister 85 Apr 3, 2022
A simple deep learning library for estimating a set of tags and extracting semantic feature vectors from given illustrations.

Illustration2Vec illustration2vec (i2v) is a simple library for estimating a set of tags and extracting semantic feature vectors from given illustrati

Masaki Saito 661 Dec 12, 2022
Detecting Text in Natural Image with Connectionist Text Proposal Network (ECCV'16)

Detecting Text in Natural Image with Connectionist Text Proposal Network The codes are used for implementing CTPN for scene text detection, described

Tian Zhi 1.3k Dec 22, 2022
🖼 iOS11 demo application for image style classification.

Styles Vision Demo A Demo application using Vision and CoreML frameworks to detect the most likely style of the given image. Model This demo is based

Cocoa AI 47 Oct 22, 2022
Sample code for Core ML using ResNet50 provided by Apple and a custom model generated by coremltools.

CoreML-samples This is the sample code for Core ML using ResNet50 provided by Apple. ResNet50 can categorize the input image to 1000 pre-trained categ

Yuta Akizuki 39 Nov 11, 2022
Unreachable code path optimization hint for Swift

Unreachable is a Swift µframework that allows for letting the compiler know when a code path is unreachable. Build Status Installation Compatibility S

Nikolai Vazquez 102 Nov 17, 2022
This component allows for the transfer of data items between collection views through drag and drop

Drag and Drop Collection Views Written for Swift 4.0, it is an implementation of Dragging and Dropping data across multiple UICollectionViews. Try it

Michael Michailidis 508 Dec 19, 2022
This component allows for the transfer of data items between collection views through drag and drop

Drag and Drop Collection Views Written for Swift 4.0, it is an implementation of Dragging and Dropping data across multiple UICollectionViews. Try it

Michael Michailidis 508 Dec 19, 2022
Discover, download, compile & launch different image processing & style transfer CoreML models on iOS.

⚠️ ⚠️ ⚠️ IMPORTANT: I'm no longer maintaining Awesome-ML. Awesome ML is an iOS app that is made to demonstrate different image processing CoreML model

eugene 171 Nov 8, 2022
Awesome-ML - Discover, download, compile & launch different image processing & style transfer CoreML models on iOS.

⚠️ ⚠️ ⚠️ IMPORTANT: I'm no longer maintaining Awesome-ML. Awesome ML is an iOS app that is made to demonstrate different image processing CoreML model

eugene 171 Nov 8, 2022
An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind

Composable Navigator An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind Vanilla S

Bahn-X 539 Jan 8, 2023
An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind

Composable Navigator An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind Vanilla S

Bahn-X 538 Dec 8, 2022
Automatic colorization using deep neural networks. Colorful Image Colorization. In ECCV, 2016.

Colorful Image Colorization [Project Page] Richard Zhang, Phillip Isola, Alexei A. Efros. In ECCV, 2016. + automatic colorization functionality for Re

Richard Zhang 3k Dec 27, 2022