kice / vs_mxnet

Use MXNet to accelerated Image-Processing in VapourSynth.
Mozilla Public License 2.0
31 stars 2 forks source link

feature request: build in linux systems #2

Open sl1pkn07 opened 5 years ago

sl1pkn07 commented 5 years ago

Hi

seems the project is windows centric (pull windows.h headers)

any chance for make compatible with linux?

greetings

kice commented 5 years ago

I need to dynamically load libmxnet.dll or it will take more than 2GB space in your plugins folder.

If you need to use this filter under linux, you may use mxnet statically. I only use mxnet's predictor API, which just around 5 functions, it is easy to make the change.

Check here if you want to build it yourself. https://github.com/apache/incubator-mxnet/tree/master/example/image-classification/predict-cpp

sl1pkn07 commented 5 years ago

the main problem is with mxdll.h and pdll.h. seems is for only windows

i found this https://theopnv.com/dynamic-loading/, but i'm not coder for adapt it

greetings

monarc99 commented 5 years ago

@sl1pkn07 look at the fork here: https://github.com/chriskretler/vs_mxnet

his commit: https://github.com/chriskretler/vs_mxnet/commit/4bb0f4043d1042e8fa92ac998887b79c72f4ed74

have not tried it, but seems linux only. a version, that compiles on linux&windows would be nice

sl1pkn07 commented 5 years ago

not works for me

g++ -c -fPIC -march=native -O2 -pipe -fno-plt -D_FORTIFY_SOURCE=2 -I. -I/usr/include/mxnet -I/usr/include/vapoursynth -I/usr/include/opencv4  -o vsMXNet.o vs_mxnet/vsMXNet.cpp
In file included from vs_mxnet/vsMXNet.cpp:24:
vs_mxnet/MXDll.h:48:8: error: ISO C++ forbids declaration of 'MXnet' with no type [-fpermissive]
  MXnet();
        ^
vs_mxnet/MXDll.h: In member function 'virtual bool MXNet::IsInit()':
vs_mxnet/MXDll.h:41:11: error: 'm_dllHandle' was not declared in this scope
   return (m_dllHandle != NULL);
           ^~~~~~~~~~~
vs_mxnet/MXDll.h:41:11: note: suggested alternative: 'NDListHandle'
   return (m_dllHandle != NULL);
           ^~~~~~~~~~~
           NDListHandle
vs_mxnet/vsMXNet.cpp: At global scope:
vs_mxnet/vsMXNet.cpp:114:24: error: no matching function for call to 'MXNet::MXNet(const char [13])'
 MXNet mx("libmxnet.dll");
                        ^
In file included from vs_mxnet/vsMXNet.cpp:24:
vs_mxnet/MXDll.h:17:7: note: candidate: 'constexpr MXNet::MXNet()'
 class MXNet
       ^~~~~
vs_mxnet/MXDll.h:17:7: note:   candidate expects 0 arguments, 1 provided
vs_mxnet/MXDll.h:17:7: note: candidate: 'constexpr MXNet::MXNet(const MXNet&)'
vs_mxnet/MXDll.h:17:7: note:   no known conversion for argument 1 from 'const char [13]' to 'const MXNet&'
vs_mxnet/MXDll.h:17:7: note: candidate: 'constexpr MXNet::MXNet(MXNet&&)'
vs_mxnet/MXDll.h:17:7: note:   no known conversion for argument 1 from 'const char [13]' to 'MXNet&&'
make: *** [Makefile:2: all] Error 1