Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    EthanDanton
    @EthanDanton
    only mvn clean install -pl cpython
    and now the simple.java run perfectly
    I do believe that running the entire tensorflow project with -Djavacpp.platform=linux-x86_64 -Djavacpp.platform.extension=python -Djavacpp.cppbuild.skip=false -am flags
    it basically run all the main project openblas, mkl-dnn, cpython, numpy and tensorflow in bulk
    with the 3 parameters for each build
    EthanDanton
    @EthanDanton
    and for some build maybe it doesnt like it
    I have assumed that it wouldnt have been a problem if I would have done the same as per tensorflow, worst case scenario, I thought, I would have had unused variables
    now Im recompiling all the project without parameters
    I'll let u know once i'm done
    EthanDanton
    @EthanDanton
    nope I sang too soon
    removing the parameters from the cppbuild allow me to run the samples from cpython and numpy on their own, but that's it
    EthanDanton
    @EthanDanton
    I dont know if this can help, but I tried to figure where the link between libtensorflow_cc.so and _pywrap_tensorflow_internal.so happen, and I found this block of code in the cppbuild.sh, so I added a few lines to see the listing and the current directory
    ls > list.txt
    ln -snf tensorflow-$TENSORFLOW_VERSION/bazel-bin/tensorflow/tools/pip_package/build_pip_package.runfiles/org_tensorflow ../python
    pwd > link.txt
    ln -sf python/_pywrap_tensorflow_internal.so bazel-bin/tensorflow/libtensorflow_cc.so
    EthanDanton
    @EthanDanton
    and I noticed I cant find any tensorflow-$TENSORFLOW_VERSION nor python directories in the listing when ln gets executed, Is it possible that build might have changed somehow the paths where the libs are supposed to be ?
    Samuel Audet
    @saudet
    The build succeeds, so there are no issues there, but like I said, if some dependencies like OpenSSL are missing, it's not going to work.
    EthanDanton
    @EthanDanton
    I do have it, I guess
    jay-kun@jaykun-MS-7A70:~$ openssl version
    OpenSSL 1.1.1 11 Sep 2018
    I'll update it, and I'll try again
    EthanDanton
    @EthanDanton
    even with the update of openssl, its still not working
    what other dependencies do I need to have ?
    btw now I get and exception on py_setpath, despite I build with the python extension flag setted
    EthanDanton
    @EthanDanton
    when I try to run all the other samples on their own, I get exception about the lack of libs,
    so I added this at the very begining of the main
    Loader.load(org.bytedeco.cpython.global.python.class);
    Loader.load(org.bytedeco.mkldnn.global.mkldnn.class);
    Loader.load(org.bytedeco.numpy.global.numpy.class);
     Loader.load(org.bytedeco.openblas.global.openblas.class);
     Loader.load(org.bytedeco.tensorflow.global.tensorflow.class);
    and they run smoothly
    with the only exception of keras
    I do believe that you @saudet mentioned above that py_setpath is supposed to load the libs and from what I saw they are supposed to be 6
    Samuel Audet
    @saudet
    It's supposed to do everything needed by Python, yes. As usual, relevant errors should show up in the debug log, but if they don't, it's going to be hard to debug for me because this doesn't happen here.
    mifritscher
    @mifritscher
    I suggested to use javacpp for chromium / CEF bindings ( maketechnology/chromium.swt#97 ) - only as a warning ;)
    Samuel Audet
    @saudet
    @mifritscher Thanks! Rust? How is that being used as a bridge? They generate JNI code using Rust?
    mifritscher
    @mifritscher
    if I see it correctly they build a dll with rust to simplify the interface and use that in Java
    Samuel Audet
    @saudet
    @EthanDanton I've created presets for SciPy as well: https://github.com/bytedeco/javacpp-presets/tree/master/scipy If you could try that and it doesn't work either, it would be a lot easier to debug than TensorFlow, and the cause could be the same, so we might be able to debug TF that way too.
    danokeeffe
    @danokeeffe
    Hi, quick question. What is the status of javacpp support for tensor flow or tensor flow lite on raspberry pi? Note that I am primarily interested in using a pretrained model for inference.
    In particular, does it just work out of the box on pi? I had some issues with e.g. opencv in the past on pi as the packages weren't available on maven.
    In the above link I don't see any linux-arm jars so I guess not supported out of the box? What would be the steps for e.g. compiling/cross-compiling the tensorflow packages to work on linux-arm?
    Just found the above, so I guess cross-compiling is the best approach? I can't find any linux-armhf jars in the sonatype snapshot repo.
    Samuel Audet
    @saudet
    No, there aren't any binaries for that platform, yet. You'll need to cross-compile, yes, but it shouldn't be too difficult. There are many guides available for that online, and @vb216 and I will be here to help you with any issues that come up.
    GOVINDA ALWANI
    @govi2010
    @saudet I want to compress image in opencv following is my code.
                    let outputPointer = new org.bytedeco.javacpp.BytePointer();
                    let main_image = this.OpenCv.ImageToMat(res);   ///////// this create MAT object from byteArray
                    let params40 = Array.create("int", 2);               ///Create int[]
                    params40[0] = org.bytedeco.opencv.global.opencv_imgcodecs.IMWRITE_JPEG_QUALITY;
                    params40[1] = 50;
    
                    org.bytedeco.opencv.global.opencv_imgcodecs.imencode(".jpg", main_image, outputPointer, new org.bytedeco.javacpp.IntPointer(params40));
                    let outputBuffer = Array.create("byte", outputPointer.limit()); //  new byte[outputPointer.limit()];
                    outputPointer.position(0);
                    outputPointer.get(outputBuffer);
    GOVINDA ALWANI
    @govi2010
    this line just crash my app.
    This is Nativescript project and Script/Code language is TypeScript
    Samuel Audet
    @saudet
    On which line exactly does it crash?
    GOVINDA ALWANI
    @govi2010
    @saudet it was my mistake your function works perfectly

    I have one question.
    My App has a signature pad. On which we write down some words and App uses Bytecode open cv package to do image processing.
    which works great.

    My problem is after I attempt my image processing 50-60 time App starts crashing by giving an error for memory allocation.

    Samuel Audet
    @saudet
    Make sure to deallocate all objects as soon as you don't need them. We can do that relatively easily with PointerScope. There is an example of that in this post: http://bytedeco.org/news/2018/07/17/bytedeco-as-distribution/
    GOVINDA ALWANI
    @govi2010
    @saudet I am using http://bytedeco.org/javacpp-presets/opencv/apidocs/org/bytedeco/opencv/opencv_core/Mat.html#release--
    release method. Will that work?
    Or I have to use PointerScope ?
    Samuel Audet
    @saudet
    That should work for Mat, but you're creating a lot of other objects in your code there. You'll need to do the same for all of them.
    GOVINDA ALWANI
    @govi2010
    Ok thank you @saudet I will try both approach.
    Arend Buchacher
    @buchacher_gitlab
    Hi, short question to the use of the -o command line argument.
    In an ancient version of javacpp (I think up to 1.3.1 or so), it produced a single file as output containing the definitions for both javacpp and my own library.
    Since then, it's always two files, right? "jnijavacpp.cpp" and <CLIArgument>.cpp, right? That is, except for using "jnijavacpp" as argument.
    Samuel Audet
    @saudet
    Yes, that's how it works if you're not asking it to compile anything. The problem is that some platforms like iOS and OSGi can't have those common definitions in jnijavacpp.cpp alongside user libraries, so it gives us the choice to ignore it that way.