DeadSix27 / waifu2x-converter-cpp

Improved fork of Waifu2X C++ using OpenCL and OpenCV
MIT License
792 stars 86 forks source link

Not really an issue, but a question. #7

Closed GiRaFa-SM closed 7 years ago

GiRaFa-SM commented 7 years ago

My R9 280 recently died and I can't use waifu2x anymore, I have an Nvidia Quadro FX 580 laying around here but when I try to upscale something using this video card waifu2x crashes.. My question is, is this GPU incompatible with Waifu2x libraries? (probably it is) if yes, can you make it compatible (or tell me a way to do this)? . Please. I wasn't expecting this, (this video card is 1 year and 3 months old)

DeadSix27 commented 7 years ago

The issue is, that this build has no nVidia support (as I have no nVidia card)

And what do you mean by waifu2x libraries?

GiRaFa-SM commented 7 years ago

You remember that i changed some files and making possible to use waifu2x through koroshell's interface? I was thinking about downloading OpenCV 2.xxx.dll, renaming and pasting on the folder and see if it works.

So it's impossible to make this compatible with nVidia video cards? I've seen a waifu2x build CUDA compatible, but the minimum requeriments are an GPU compatible with GPU Computing 3.0.

My R9 280 have OpenCL 1.2 support and OpenGL 4.5 support. My nVidia Quadro has OpenCL 1.0 support and OpenGL 3.3 support.

Source: https://www.techpowerup.com/gpudb/1324/quadro-fx-580 https://www.techpowerup.com/gpudb/b2880/gigabyte-r9-280-windforce-3x-oc

max20091 commented 7 years ago

You should switch to waifu2x-caffe since it have much faster CUDA speed and use newer model which improve both speed and quality: https://github.com/lltcggie/waifu2x-caffe And nVidia isn't update OpenCL for a very long time ago so it much slower than AMD GPU

GiRaFa-SM commented 7 years ago

Ok the page it says: requeriment:GPU computing 2.0-3.0, which I belive it's CUDA 2.0. This video card supports CUDA 1.1.

In short, it's not compatible with my current GPU. I've tried making it work in the past ironically because I was concerned about the lifespan of my R9 280.

DeadSix27 commented 7 years ago

You can not use OpenCV 2 with this build. use max20091's build, i switched to v3 in mine, for nVidia support, use caffe like max said its using a newer model too

max20091 commented 7 years ago

Both me and DeadSix don't use nVidia GPU so we don't build any version that include CUDA So just use OpenCL instead :)

GiRaFa-SM commented 7 years ago

As i said: lltcggie CUDA Version dont work. Your version dont work. The version by Max 20091 dont work too. Can you guys explain me why i cant use OpenCL with this GPU even though it has OpenCL support? My R9 280 had 1.2 OpenCL support and my nVidia Quadro has 1.1..

DeadSix27 commented 7 years ago

@GiRaFa-SM It's probably because I did not compile it with the nvidia SDK, I have no idea, I just can't test it without an nVidia GPU, if a nVidia User with cmake & c++ knowledge wants to fix it, he can just add a pull request and ill merge it in.

EDIT: btw it doesn't show any error, right?

GiRaFa-SM commented 7 years ago

Nope, it just shows "scaling 1x, scaling 2x" and seconds after this it just shows a pop up saying that the applicaton stopped working. Yes, no errors, just FC. If i had knowledge on programing i would do that, university will start soon but i doubt i'll learn language programming in the beggining. Depending where you live i can sent one of my (4) quadros to you.. i dunno. Can i locate logs of this somewhere on my system?

DeadSix27 commented 7 years ago

@GiRaFa-SM its just a crash, I just wondered if it would say something specific.

and no, there should be no logs. You can try debugging it in Visual studio, altho I don't know how, I am only used to debugging in Linux.

Can you just try building it yourself with the nvidia sdk? https://github.com/DeadSix27/waifu2x-converter-cpp/blob/master/BUILDING.md

I will look into that later (I have barely any time currently)

GiRaFa-SM commented 7 years ago

Sorry for the delay, but i have some doubts.. nVidia doesnt have a OpenCL/GL toolkit, they have an CUDA Toolkit, i really need to download CUDA Toolkit or i need to download just the tools you provided in the link above and try to compile? (even tho looks like this are tools meant to be used on AMD video cards) I'm asking because my internet isnt that fast and download the Visual Studio will take some time for me.

Thank you for the patience, as you see my english isnt great and sometimes its complicated to transmit my messages.

DeadSix27 commented 7 years ago

the guide is fully meant for AMD; yes not nVidia, but based on the guide you can try out using the (in this case apparently CUDA toolkit, (which I hope contains OpenCL libraries)) to compile it.

GiRaFa-SM commented 7 years ago

HI, its been 4 months? I wanted to give a look on this again but because of reasons i didnt. I have few questions..

I tried to compile what you sent me above through command line, no luck, tried with CMake and got these errors:

The C compiler identification is MSVC 19.10.25019.0 The CXX compiler identification is MSVC 19.10.25019.0 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) CMake Warning (dev) at CMakeLists.txt:22 (link_directories): This command specifies the relative path

OFF/lib

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the source dir. Run "cmake --help-policy CMP0015" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

Looking for C++ include opencv2/opencv.hpp Looking for C++ include opencv2/opencv.hpp - not found Adding OFF/includeopencv2/opencv.hpp not found, you can try compiling with OVERRIDE_OPENCV set to true then make sure to set OPENCV_PREFIX as well Looking for CL_VERSION_2_0 Looking for CL_VERSION_2_0 - not found Looking for CL_VERSION_1_2 Looking for CL_VERSION_1_2 - found Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/Win32/OpenCL.lib (found version "1.2") Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found version "8.0") CMake Warning at CMakeLists.txt:68 (message): VC14 found, which is NOT FULLY tested.

CMake Warning (dev) at CMakeLists.txt:90 (link_directories): This command specifies the relative path

OFF/x86/vc14/lib

as a link directory.

Policy CMP0015 is not set: link_directories() treats paths relative to the source dir. Run "cmake --help-policy CMP0015" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it.

Configuring done Generating done

I'm using VS Community 2017 Using nVidia SDK 8.0 Using OpenCV 3.2. Using AMD SDK linked above.

What am i doing wrong? Also, nVidia Driver didnt detected VisualStudio Integration (Nsight) even though i have the latest version installed on my sistem ( I got a Quadro 600)

Also, if it compiled, where can i locate the compiled files? How i can edit the code (to make the program minimized while upscaling pics). I looked in the folders in Master but the codes are small, these are the codes?

Thanks.

YukihoAA commented 7 years ago

@GiRaFa-SM Hi, GiRaFa-SM You have to follow BUILDING.md to build this project. It seems to be you didn't set proper OPENCV_PREFIX. OPENCV_PREFIX is has to be set to your OpenCV 3.2's Directory.

and Some warning will not be shown if you use latest cmake script what I just committed few minutes ago.

DeadSix27 commented 7 years ago

@GiRaFa-SM Please report back if @YukihoAA 's PR fixed it.

GiRaFa-SM commented 7 years ago

YukihoAA was right, i wasnt setting the OpenCV prefix correctly.

Now i get these errors:

The C compiler identification is MSVC 19.10.25019.0 The CXX compiler identification is MSVC 19.10.25019.0 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) Looking for C++ include opencv2/opencv.hpp Looking for C++ include opencv2/opencv.hpp - not found Adding I:/Waifu2X/opencv/includeopencv2/opencv.hpp not found, you can try compiling with OVERRIDE_OPENCV set to true then make sure to set OPENCV_PREFIX as well Looking for CL_VERSION_2_0 Looking for CL_VERSION_2_0 - not found Looking for CL_VERSION_1_2 Looking for CL_VERSION_1_2 - found Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/Win32/OpenCL.lib (found version "1.2") Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found version "8.0") CMake Warning at CMakeLists.txt:68 (message): VC14 found, which is NOT FULLY tested.

Configuring done

I believe this has something to do with the fact that CMake isnt detecting OpenCV binaries, right?

EDIT: i set "OVERRIDE_OPENCV=1" and now i get this messages bellow and i cant open the project.

The C compiler identification is MSVC 19.10.25019.0 The CXX compiler identification is MSVC 19.10.25019.0 Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.10.25017/bin/HostX86/x86/cl.exe -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Detecting CXX compile features Detecting CXX compile features - done Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) OpenCV detection overridden Found OpenCV Looking for CL_VERSION_2_0 Looking for CL_VERSION_2_0 - not found Looking for CL_VERSION_1_2 Looking for CL_VERSION_1_2 - found Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/Win32/OpenCL.lib (found version "1.2") Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found version "8.0") CMake Warning at CMakeLists.txt:68 (message): VC14 found, which is NOT FULLY tested.

YukihoAA commented 7 years ago

@GiRaFa-SM It seems you didn't Pull new cmake scripts from master brench. My PR#13 will show "Found OpenCV" message if you choose proper OpenCV directory. My new scripts will not show "VC14 is not fully tested" message also.

YukihoAA commented 7 years ago

and You have to run msbuild on Visual Stuio X64 Native cmd Tools which is not X86 cmd Tool (this is might be not related to your problem, this is just a tip)