profile
viewpoint

karllessard/tensorflow-java-sandbox 2

Experimenting on TensorFlow Java client modularization

saudet/ViZDoom 2

Doom-based AI Research Platform for Reinforcement Learning from Raw Visual Information. :godmode:

rillomas/cadmis 0

A webapp to gamify college admission.

saudet/deeplearning4j 0

Deeplearning4j, ND4J, DataVec and more - deep learning & linear algebra for Java/Scala with GPUs + Spark

saudet/deeplearning4j-docs 0

Documentation for Deeplearning4j - Deep Learning for the JVM, Java & Scala

saudet/gluon-samples 0

Gluon sample projects

saudet/graal 0

GraalVM: Run Programs Faster Anywhere :rocket:

saudet/tensorflow-java 0

Java bindings for TensorFlow

saudet/veoffload 0

SX-Aurora TSUBASA Vector Engine Offloading (VEO)

saudet/veos 0

SX-Aurora TSUBASA Vector Engine Operating System core

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

Well, VariableValue isn't defined, but if I give it a C++ class like this:

class VariableValue {
};

This this works just fine:

infoMap.put(new Info("basic/containers").cppTypes("std::unordered_multimap"));
infoMap.put(new Info("std::unordered_multimap<std::string,modsecurity::VariableValue*,modsecurity::MyHash,modsecurity::MyEqual>").pointerTypes("MyMap").define());
wpzybyq

comment created time in 6 hours

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

A simple header file that should work but doesn't work is probably the only thing I need to check this. Thanks

wpzybyq

comment created time in 7 hours

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

Well, you probably made a typo somewhere. It works with std::map right? If you want me to debug your code, you'll need to give it to me...

wpzybyq

comment created time in 9 hours

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

You'll need to put the template parameters inside < ... >

wpzybyq

comment created time in 9 hours

issue closedbytedeco/javacpp

writing my presets,how to write my InfoMap?

my .h file like this:class ClassA: public std::unordered_multimap<std::string,ClassB *, StructA, StructB>,how to write my InfoMap? i add Info Like this: infoMap.put(new Info("std::unordered_multimap<std::string,ClassB *, StructA, StructB>").pointerTypes("String").define());,but get error info:std::unordered_multimapstd::string,ClassB*,StructA,StructB.java:[18,127] <identifier> expected

closed time in 9 hours

wpzybyq

issue commentbytedeco/javacpp

writing my presets,how to write my InfoMap?

Duplicate of https://github.com/bytedeco/javacpp-presets/issues/905

wpzybyq

comment created time in 9 hours

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

You'll need to remove spaces in the template parameters. The parser isn't too robust in that sense: https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes#creating-instances-of-c-templates

wpzybyq

comment created time in 9 hours

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

Try this: https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes#defining-wrappers-for-basic-c-containers

wpzybyq

comment created time in 13 hours

issue commentbytedeco/javacpp-presets

writing my presets,how to write my InfoMap?

Please start by reading this page: https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes

wpzybyq

comment created time in a day

issue commentbytedeco/javacpp

writing my presets,how to write my InfoMap?

Please start by reading this page: https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes

wpzybyq

comment created time in a day

issue commentbytedeco/javacpp-presets

ffmpeg-platform not updated in mvnrepository

No, that's no the right way, read http://bytedeco.org/builds/#other-options

nanguantong

comment created time in 2 days

issue commentbytedeco/javacpp-presets

ffmpeg-platform not updated in mvnrepository

You'll need to wait a couple of days to be able to consume the snapshots directly with Gradle like that. If you can't wait, please use Mave as explained here: http://bytedeco.org/builds/

nanguantong

comment created time in 2 days

push eventbytedeco/javacpp

Samuel Audet

commit sha 8a0b08d2c1870fee666af6af6dc7334bac77a26f

* Fix `Generator` for cases when a `FunctionPointer` returns another `FunctionPointer`

view details

push time in 2 days

issue commentbytedeco/javacpp-presets

libpostal doesn't build on the latest version of MSYS2

/cc @Maurice-Betzel

kyrill007

comment created time in 3 days

issue commentbytedeco/javacpp-presets

libpostal doesn't build on the latest version of MSYS2

Please report upstream!

If you don't need to use the latest version of mingw-w64 though, downgrade to a known good version and it will work: https://github.com/bytedeco/javacpp-presets/blob/master/ci/install-windows.sh#L156

kyrill007

comment created time in 3 days

issue commenteclipse/deeplearning4j

Reduce apk size using nd4j

Please read https://github.com/bytedeco/javacpp-presets/wiki/Reducing-the-Number-of-Dependencies

mattiaachilli

comment created time in 3 days

push eventbytedeco/javacpp-presets

Samuel Audet

commit sha 37177414ede28e2cf206b7e678f64ffb785c7f81

* Virtualize `IInt8Calibrator` plus subclasses from TensorRT to allow customization (issue #902)

view details

Samuel Audet

commit sha 563db9283fe071e8d6b4762d268a0b610910e5de

* Upgrade presets for DNNL 1.5.1, SciPy 1.5.1, CUDA 11.0.2, NCCL 2.7.6, MXNet 1.7.0.rc0, Skia 2.80.0

view details

push time in 3 days

pull request commenttensorflow/tensorflow

Direct feed from GPU memory in Java

As long as it's exposed to the C API, the SIG-JVM will be happy to merge this.

/cc @karllessard

okdzhimiev

comment created time in 3 days

push eventKonduitAI/deeplearning4j

Samuel Audet

commit sha b9f59f0fb646c0d06fa16397f1cf14ed48f463ff

Remove macosx-x86_64-gpu from nd4j-tests-tensorflow

view details

push time in 4 days

issue commentbytedeco/javacv

JVM Crash : EXCEPTION_ACCESS_VIOLATION (0xc0000005)

Please try again with JavaCV 1.5.4-SNAPSHOT: http://bytedeco.org/builds/

mabin

comment created time in 4 days

issue commentbytedeco/javacv

JVM Crash : EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ff8e4901b3f, pid=22840, tid=0x0000000000005984

Please try again with JavaCV 1.5.4-SNAPSHOT: http://bytedeco.org/builds/

mabin

comment created time in 4 days

pull request commenttensorflow/java

Renaming `tensorflow-tools` to `ndarray`

From a branding perspective, putting it in another repository makes sense I think, but from a technical perspective, if the API still isn't stable, it will entail additional burden on the part of developers whenever the API changes. Have you weighted this in your decision? Trust me, syncing multiple repositories manually all the time isn't pretty. You need to be sure about this.

BTW, I think what I like about "java-ndarray" is the fact that it can refer to a project that is named "Java NdArray at the TensorFlow organization". If we don't put "java" everywhere, it ends up being the "NdArray project at the TensorFlow organization", which doesn't have the same ring to it... In any case, as I mentioned many times already, I don't think that a 100% pure Java NumPy-like library is going to be useful. We need native backends...

karllessard

comment created time in 6 days

issue commentbytedeco/javacpp-presets

when to release 1.5.4?

Ok, I've released 1.5-1.5.3: https://repo1.maven.org/maven2/org/bytedeco/dnnl/1.5-1.5.3/ Enjoy!

ericxsun

comment created time in 7 days

create barnchbytedeco/javacpp-presets

branch : dnnl

created branch time in 8 days

delete branch KonduitAI/deeplearning4j

delete branch : ab2002_rl4j_updateRule

delete time in 8 days

push eventKonduitAI/deeplearning4j

Alexandre Boulanger

commit sha 1dae4a32d8dd17ef8ab09cbffaf9bd4e09afb042

RL4J: Add generic update rule (#502) Signed-off-by: Alexandre Boulanger <aboulang2002@yahoo.com>

view details

push time in 8 days

PR merged KonduitAI/deeplearning4j

Reviewers
RL4J - Added generic update rule

What changes were proposed in this pull request?

In this PR, I removed the temporary DQNNeuralNetUpdateRule and replaced it with a generic version that delegates the computation of gradients/labels and the network(s) update. Also, I copied the n-step q-learning algorithm from async learning and fixed an issue there. I needed it to make sure gradient-based updates works. Also, it will be useful soon when I add async support.

Summary of changes:

  • Added classes Gradients and FeaturesLabels

  • Neural Nets:

    • Changed params of fit() to FeaturesLabels
    • Added computeGradients() and applyGradients()
  • Added UpdateRule

  • Changed NeuralNetUpdater to LabelsNeuralNetUpdater (that uses network.fit(FeaturesLabels)) and GradientsNeuralNetUpdater (that uses computeGradients() and applyGradients())

  • Moved sync DQN computation algorithm to package org.deeplearning4j.rl4j.agent.learning.algorithm

  • Duplicated code of QLearningUpdateAlgorithm to NStepQLearning (and fixed an issue where R should be computed with target and not current according to S2 of https://arxiv.org/pdf/1602.01783.pdf)

The code below will train cartpole using n-step q-learning. You should see a majority of 200.0 score episodes by episode 1200-1400.

package org.deeplearning4j.rl4j;

import org.datavec.api.transform.Operation;
import org.deeplearning4j.rl4j.agent.AgentLearner;
import org.deeplearning4j.rl4j.agent.learning.algorithm.IUpdateAlgorithm;
import org.deeplearning4j.rl4j.agent.learning.algorithm.NStepQLearning;
import org.deeplearning4j.rl4j.agent.learning.algorithm.dqn.DoubleDQN;
import org.deeplearning4j.rl4j.agent.learning.behavior.ILearningBehavior;
import org.deeplearning4j.rl4j.agent.learning.behavior.LearningBehavior;
import org.deeplearning4j.rl4j.agent.learning.update.FeaturesLabels;
import org.deeplearning4j.rl4j.agent.learning.update.Gradients;
import org.deeplearning4j.rl4j.agent.learning.update.IUpdateRule;
import org.deeplearning4j.rl4j.agent.learning.update.UpdateRule;
import org.deeplearning4j.rl4j.agent.learning.update.updater.GradientsNeuralNetUpdater;
import org.deeplearning4j.rl4j.agent.learning.update.updater.INeuralNetUpdater;
import org.deeplearning4j.rl4j.agent.learning.update.updater.LabelsNeuralNetUpdater;
import org.deeplearning4j.rl4j.environment.Environment;
import org.deeplearning4j.rl4j.experience.ExperienceHandler;
import org.deeplearning4j.rl4j.experience.ReplayMemoryExperienceHandler;
import org.deeplearning4j.rl4j.experience.StateActionExperienceHandler;
import org.deeplearning4j.rl4j.experience.StateActionPair;
import org.deeplearning4j.rl4j.learning.sync.Transition;
import org.deeplearning4j.rl4j.mdp.CartpoleEnvironment;
import org.deeplearning4j.rl4j.network.ITrainableNeuralNet;
import org.deeplearning4j.rl4j.network.configuration.DQNDenseNetworkConfiguration;
import org.deeplearning4j.rl4j.network.dqn.DQNFactory;
import org.deeplearning4j.rl4j.network.dqn.DQNFactoryStdDense;
import org.deeplearning4j.rl4j.network.dqn.IDQN;
import org.deeplearning4j.rl4j.observation.transform.TransformProcess;
import org.deeplearning4j.rl4j.policy.DQNPolicy;
import org.deeplearning4j.rl4j.policy.EpsGreedy;
import org.deeplearning4j.rl4j.policy.INeuralNetPolicy;
import org.deeplearning4j.rl4j.policy.IPolicy;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.learning.config.Adam;

public class AgentLearnerCartpole {

    public static DQNFactoryStdDense.Configuration CARTPOLE_NET =
            DQNFactoryStdDense.Configuration.builder()
                    .l2(0.001).updater(new Adam(0.0005)).numHiddenNodes(16).numLayer(3).build();

    public static void main(String[] args) {
        // Build the network
        DQNDenseNetworkConfiguration netConf = DQNDenseNetworkConfiguration.builder()
                .numLayers(3)
                .numHiddenNodes(16)
                .l2(0.001)
                .updater(new Adam(0.0005))
                .build();
        DQNFactory factory = new DQNFactoryStdDense(netConf);
        IDQN network = factory.buildDQN(new int[] { 4 }, 2);

        // Build the environment and the TransformProcess
        Environment<Integer> cartpoleEnv = new CartpoleEnvironment();
        TransformProcess transformProcess = TransformProcess.builder()
                .transform("data", new ArrayToINDArrayTransform())
                .build("data");

        // Build the policies -- a greedy policy wrapped around an epsilon-greedy one
        INeuralNetPolicy<Integer> policy = new DQNPolicy<Integer>(network);

        // Build the learning behavior
        ITrainableNeuralNet target = network.clone();

        // DQN
        /*
        IPolicy<Integer> epsGreedyPolicy = EpsGreedy.<Integer>builder()
                .policy(policy)
                .actionSchema(cartpoleEnv.getSchema().getActionSchema())
                .minEpsilon(0.1)
                .epsilonNbStep(3000)
                .rnd(Nd4j.getRandomFactory().getNewRandomInstance(123))
                .build();
        ExperienceHandler<Integer, Transition<Integer>> experienceHandler = new ReplayMemoryExperienceHandler(10000, 64, Nd4j.getRandom());
        IUpdateAlgorithm<FeaturesLabels, Transition<Integer>> updateAlgorithm = new DoubleDQN(network, target, 0.99);
        INeuralNetUpdater<FeaturesLabels> updater = new LabelsNeuralNetUpdater(network, target, 50);
        IUpdateRule<Transition<Integer>> updateRule = new UpdateRule<FeaturesLabels, Transition<Integer>>(updateAlgorithm, updater);
        ILearningBehavior<Integer> learningBehavior = LearningBehavior.<Integer, Transition<Integer>>builder()
                .experienceHandler(experienceHandler)
                .updateRule(updateRule)
                .build();
        */

        // N-Step Q-Learning
        IPolicy<Integer> epsGreedyPolicy = EpsGreedy.<Integer>builder()
                .policy(policy)
                .actionSchema(cartpoleEnv.getSchema().getActionSchema())
                .minEpsilon(0.1)
                .epsilonNbStep(75000)
                .rnd(Nd4j.getRandomFactory().getNewRandomInstance(123))
                .build();
        ExperienceHandler<Integer, StateActionPair<Integer>> experienceHandler = new StateActionExperienceHandler<Integer>(5);
        IUpdateAlgorithm<Gradients, StateActionPair<Integer>> updateAlgorithm = new NStepQLearning(network, target, 2, 0.99);
        INeuralNetUpdater<Gradients> updater = new GradientsNeuralNetUpdater(network, target, 50);
        IUpdateRule<StateActionPair<Integer>> updateRule = new UpdateRule<Gradients, StateActionPair<Integer>>(updateAlgorithm, updater);
        ILearningBehavior<Integer> learningBehavior = LearningBehavior.<Integer, StateActionPair<Integer>>builder()
                .experienceHandler(experienceHandler)
                .updateRule(updateRule)
                .build();

        // Build the AgentLearner
        AgentLearner<Integer> agentLearner = AgentLearner.builder(cartpoleEnv, transformProcess, epsGreedyPolicy, learningBehavior)
                .maxEpisodeSteps(200)
                .build();

        // Train for 100 episodes
        for(int i = 0; i < 10000; ++i) {
            agentLearner.run();
            System.out.println(String.format("%d : %f", i, agentLearner.getReward()));
        }
    }

    public static class ArrayToINDArrayTransform implements Operation<double[], INDArray> {
        @Override
        public INDArray transform(double[] data) {
            return Nd4j.create(data);
        }
    }
}

How was this patch tested?

Manual tests and unit tests

Quick checklist

The following checklist helps ensure your PR is complete:

  • [X] Eclipse Contributor Agreement signed, and signed commits - see IP Requirements page for details
  • [X] Reviewed the Contributing Guidelines and followed the steps within.
  • [X] Created tests for any significant new code additions.
  • [X] Relevant tests for your changes are passing.
+916 -204

0 comment

42 changed files

aboulang2002

pr closed time in 8 days

push eventKonduitAI/deeplearning4j

Samuel Audet

commit sha 92666f79bb7daf7bc38c3ca474c7762e0ce0dac6

* Update version of JavaCPP Presets for CPython

view details

push time in 8 days

issue commentbytedeco/javacpp

PointerPointer's ambiguous constructor

Something similar happens with the array constructor for IntPointer, LongPointer, etc.

/cc @treo

oneengineer

comment created time in 8 days

issue commentbytedeco/javacpp-presets

when to release 1.5.4?

Thanks! And you're OK without 1.5.1?

ericxsun

comment created time in 9 days

issue commentbytedeco/javacpp-presets

when to release 1.5.4?

Ok, could inquire about when they plan to release 1.5.1 or 1.6? If it's like next week, we'll wait a bit.

ericxsun

comment created time in 9 days

issue commentbytedeco/javacpp-presets

when to release 1.5.4?

Well, if you're only interested in DNNL, we can make a release of just that for 1.5.3...

ericxsun

comment created time in 10 days

issue commenteclipse/deeplearning4j

Document Microsoft Visual C++ Redestributable dependencies in jnind4jcuda.dll

Fixed in commit https://github.com/bytedeco/javacpp/commit/524c8ec9f08c84f4fbb0bd843d5b6a5ee3f7ddd8.

Dris101

comment created time in 11 days

issue commenttensorflow/java

Is it possible to build the libtensorflow first?

Yes, that's what the snapshots are for. Make sure you're building with mvn -Pdev ...

GerScau

comment created time in 11 days

issue commenttensorflow/java

Cannot run model using tensorflow-text ops

It's probably because we're building against CentOS, which uses the old C++ ABI of GCC: https://bugzilla.redhat.com/show_bug.cgi?id=1546704 libstdc++ is backward compatible, so we can run TensorFlow compiled that way on Ubuntu no problem, but anything that interacts with the C++ API also needs to be compiled that way.

samuelotter

comment created time in 11 days

issue commentbytedeco/javacv

PNG images are not getting compressed correctly

It looks like Leptonica supports encoding to PNG with a palette: https://tpgit.github.io/Leptonica/pngio_8c_source.html So you might want to try that instead: http://bytedeco.org/javacpp-presets/leptonica/apidocs/org/bytedeco/leptonica/global/lept.html#pixWriteStreamPng-org.bytedeco.javacpp.Pointer-org.bytedeco.leptonica.PIX-float-

saketsneha

comment created time in 12 days

issue commentbytedeco/javacv

The temporary CPU rate is too high use FFmpegFrameGrabber and FFmpegFrameRecorder

There are known issues with grabPacket() and recordPacket(), see issue #818.

yangqx

comment created time in 12 days

issue commentbytedeco/javacv

PNG images are not getting compressed correctly

Is this a duplicate of https://github.com/opencv/opencv/issues/17718 ?

saketsneha

comment created time in 12 days

issue commentbytedeco/javacpp-presets

IInt8EntropyCalibrator2 is difficult to use

IInt8Calibrator related classes: IInt8EntropyCalibrator IInt8EntropyCalibrator2 IInt8MinMaxCalibrator IInt8LegacyCalibrator

Ok, I've added those to the last commit. Please try it with the snapshots after the builds are done in a day or two: http://bytedeco.org/builds/

In case someone wants to implement pure java custom layer: IPluginLayer IPluginV2Layer IPluginV2 IPluginV2Ext IPluginV2IOExt IPluginCreator

and some classes I have not yet used, but seems relevant: IOutputDimensionsFormula IAlgorithmIOInfo IAlgorithmVariant IAlgorithmContext IAlgorithm IAlgorithmSelector IGpuAllocator

Everything from that list, expect maybe IPluginCreator, seems to be either deprecated or mentions the following in comment:

//! \warning Do not inherit from this class, as doing so will break forward-compatibility of the API and ABI.

It looks like the only other classes that should be implemented are things related to plugins like IPlugin. I'm not sure if it makes sense to implement plugins in Java...? Let's come back to that later if it turns out to be useful for something...

lpaatero

comment created time in 12 days

push eventbytedeco/javacpp-presets

Samuel Audet

commit sha 37177414ede28e2cf206b7e678f64ffb785c7f81

* Virtualize `IInt8Calibrator` plus subclasses from TensorRT to allow customization (issue #902)

view details

push time in 12 days

issue closedbytedeco/javacv

The temporary CPU rate is too high use FFmpegFrameGrabber and FFmpegFrameRecorder

I wanted to record some video from the video stream to store, but found the program's temporary CPU was too high (used 40%,i5-8265U@1.80GHz).if i use "Process p = run.exec(cmd); " I found CPU was very low (used 1.5%), why ? How can I reduce CPU usage use FFmpegFrameGrabber and FFmpegFrameRecorder?

This is my code snippet:

    FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(url);
    grabber.setOption("rtsp_transport", "tcp");
    grabber.setOption("c","copy");
    grabber.setFrameRate(24);
    grabber.setPixelFormat(AV_PIX_FMT_YUVJ420P);
    grabber.setOption("stimeout", "10000000");// 10 seconds
    FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(outputFile, 3840, 2160,audioChannel);

    recorder.setFormat("flv"); 
    recorder.setFrameRate(25);
    recorder.setPixelFormat(0); // yuv420p
    recorder.setOption("c","copy");
    grabber.start();
    recorder.start();
    Frame frame = null;
    while (status&& (frame = grabber.grabFrame()) != null) {
            recorder.record(frame);
    }

closed time in 13 days

yangqx

issue commentbytedeco/javacv

The temporary CPU rate is too high use FFmpegFrameGrabber and FFmpegFrameRecorder

To copy packets without reencoding, use grabPacket() and recordPacket() like this: https://github.com/bytedeco/javacv/blob/master/samples/PacketRecorderTest.java

yangqx

comment created time in 13 days

issue commentbytedeco/javacv

avio_open2 error() error -541478725: Could not open 'null'

Make sure you're not setting the maximumSize to a small value like 0. Try to use a large value for maximumSize.

ai641843909

comment created time in 13 days

issue commentbytedeco/javacv

OpenCVDemo in DeepLearningFaceDetection:error: (-215:Assertion failed) nch == 1 in function 'blobFromImages'

This error apparently means that it doesn't support images with 2 channels: https://github.com/opencv/opencv/issues/9747

Make sure your image doesn't have 2 channels, and try images with 1, 3, or 4 channels.

bbbBBBSG

comment created time in 13 days

issue commentbytedeco/javacv

java.lang.UnsatisfiedLinkError: no jniopenblas_nolapack in java 11

@HGuillemet When javafx-maven-plugin gets updated, please also update opencv-stitching-jlink! Thank you very much

jkolobok

comment created time in 13 days

push eventbytedeco/javacpp-presets

Samuel Audet

commit sha 706a65bd2c637f6bcddb9a7d764a40a5dc8e477c

* Upgrade presets for CPython 3.7.8, cuDNN 8.0.1

view details

push time in 13 days

issue commentKonduitAI/konduit-serving

Image(BufferedImage) --> Image(Mat) is slow

Java 2D in general is slow. It should be used only for legacy support or for where performance isn't a problem.

AlexDBlack

comment created time in 13 days

issue commentbytedeco/javacv

Inefficient Java2DFrameConverter

@b005t3r BTW, it's now easier to use the snapshots with Gradle: http://bytedeco.org/builds/ There's also a Gradle plugin we can use to make it even easier: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin So please do send pull requests with your enhancements! Thanks

b005t3r

comment created time in 14 days

issue commentbytedeco/javacpp-presets

IInt8EntropyCalibrator2 is difficult to use

That would happen if it were "virtualized", but it's currently not tagged that way. While we're at it, could you give me a list of classes that are meant to be subclassed by users this way? Thanks!

lpaatero

comment created time in 14 days

issue commentbytedeco/javacv

Image is distorted when converting from OpenCVFrameConverter.ToOrgOpenCvCoreMat using a mp4 video

Actually, it looks like the Java API was fixed. There's a new constructor that we can use to set the stride here: http://bytedeco.org/javacpp-presets/opencv/apidocs/org/opencv/core/Mat.html#Mat-int-int-int-java.nio.ByteBuffer-long- I've updated OpenCVFrameConverter in the last commit. Please give it a try with the snapshots: http://bytedeco.org/builds/

AKMANSoft

comment created time in 14 days

push eventbytedeco/javacv

Samuel Audet

commit sha a40e886c9c01d5279f86ff98dabf0d35272391b4

* Update `OpenCVFrameConverter.convertToOrgOpenCvCoreMat()` with new API to set the stride (issue #1460)

view details

push time in 14 days

issue commentbytedeco/javacv

Image is distorted when converting from OpenCVFrameConverter.ToOrgOpenCvCoreMat using a mp4 video

Like I said, this is a problem with the Java API of OpenCV. There is no such limitations with the C++ API of OpenCV. Instead of using Java API, please use the C++ API, and you will not have this issue.

If you cannot use the C++ API of OpenCV, there is nothing else I can do here. Please report this issue upstream.

AKMANSoft

comment created time in 15 days

issue commentbytedeco/javacv

how to decode the undecoded-AVPacket data?

That's part of FFmpeg's API. Documentation for that is available here: https://ffmpeg.org/documentation.html

daxue2017

comment created time in 15 days

issue commentbytedeco/javacv

Image is distorted when converting from OpenCVFrameConverter.ToOrgOpenCvCoreMat using a mp4 video

That's a known limitation of the official Java API. Don't use it if you need custom strides like this, or please report upstream.

AKMANSoft

comment created time in 15 days

push eventbytedeco/javacpp-presets

Samuel Audet

commit sha 2f0bd18fb0f5b67ff06e02b789edb5b4940d990f

* Upgrade presets for DNNL 1.5, OpenBLAS 0.3.10, NumPy 1.19.0, SciPy 1.5.0, TensorRT 7.1, ONNX Runtime 1.3.1

view details

Frankie Robertson

commit sha 5a13d718efa355067a89c436e80da5c1925a3214

* Add presets for OpenPose 1.6.0 (pull #898)

view details

HGuillemet

commit sha 754d1be522d49ea88232f7882bf72255562f1211

* Replace `requires` with `requires static` in JPMS `.platform` modules (pull #900)

view details

Samuel Audet

commit sha 706a65bd2c637f6bcddb9a7d764a40a5dc8e477c

* Upgrade presets for CPython 3.7.8, cuDNN 8.0.1

view details

push time in 15 days

push eventKonduitAI/deeplearning4j

Alexandre Boulanger

commit sha 4190c9ee0f6c764ecb3b3a1a658466ed1c342da7

RL4J: Add NeuralNetUpdater (#500) Signed-off-by: Alexandre Boulanger <aboulang2002@yahoo.com>

view details

push time in 15 days

delete branch KonduitAI/deeplearning4j

delete branch : ab2002_rl4j_neuralNetUpdater

delete time in 15 days

PR merged KonduitAI/deeplearning4j

Reviewers
RL4J - Added NeuralNetUpdater

What changes were proposed in this pull request?

A minimum viable increment adding a NeuralNetUpdater that updates a network and sync a target netwrok. Presently only supports feature-labels updates. Also added a ITrainableNeuralNet; an interface describing the trainable aspect of a RL4J neural network. Currently uses a DataSet to fit() but this will change in a future PR.

How was this patch tested?

Manual and unit tests

Quick checklist

The following checklist helps ensure your PR is complete:

  • [X] Eclipse Contributor Agreement signed, and signed commits - see IP Requirements page for details
  • [X] Reviewed the Contributing Guidelines and followed the steps within.
  • [X] Created tests for any significant new code additions.
  • [X] Relevant tests for your changes are passing.
+323 -96

0 comment

21 changed files

aboulang2002

pr closed time in 15 days

push eventbytedeco/javacpp-presets

HGuillemet

commit sha 754d1be522d49ea88232f7882bf72255562f1211

* Replace `requires` with `requires static` in JPMS `.platform` modules (pull #900)

view details

push time in 15 days

PR merged bytedeco/javacpp-presets

Remove requires in *-platform modules

This PR allows an app to have a *-platform module in its module graph without bringing into the graph all existing implementations of the native library.

Meant to work with the use of javacpp.plaform property and the new additions to javafx-maven-plugin.

See Add option to populate module path with all maven dependencies #91

+352 -352

2 comments

57 changed files

HGuillemet

pr closed time in 15 days

push eventHGuillemet/javacpp-presets

Samuel Audet

commit sha b12a2d6c2e7624d35b19b03e71c629cc90c88e6e

Update CHANGELOG.md and add missing `requires static`

view details

push time in 15 days

issue commentbytedeco/javacpp

PointerPointer's ambiguous constructor

BTW, an easier more efficient way to do the right thing without having to create an array is by calling the put() method like this:

PointerPointer params = new PointerPointer(1).put(c_neg1);
oneengineer

comment created time in 16 days

issue commentbytedeco/javacpp

PointerPointer's ambiguous constructor

There are a lot of small issues like that, it's not easy to map C++ APIs to something usable in Java. Breaking backward compatibility for one small change like that isn't worth it, so this will have to wait for the next major release. If you have any concrete suggestions though, please provide more details or a pull request.

oneengineer

comment created time in 16 days

issue commentbytedeco/javacpp-presets

Configure the embedded Python so that file contents can be obtained from memory (not disk)

BTW, it looks like there would be a way to do something like tmpfs on Windows:

Windows also has a rough analog to tmpfs in the form of "temporary files". Files created with both FILE_ATTRIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE are held in memory and only written to disk if the system experiences high memory pressure.[27] In this way they behave like tmpfs, except the files are written to the specified path during low memory situations, rather than to swap space. This technique is often used by servers along with TransmitFile to render content to a buffer before sending to the client.

https://en.wikipedia.org/wiki/List_of_RAM_drive_software#Native

fcunilim

comment created time in 17 days

issue commentbytedeco/javacpp-presets

Configure the embedded Python so that file contents can be obtained from memory (not disk)

I think that would be pretty difficult to do, but you're welcome to look into it.

fcunilim

comment created time in 17 days

issue commentbytedeco/javacpp-presets

Configure the embedded Python so that file contents can be obtained from memory (not disk)

That depends on your OS, for example, it's possible with tmpfs on Linux, yes. Set the "org.bytedeco.javacpp.cachedir" system property to a path within tmpfs.

fcunilim

comment created time in 17 days

pull request commentbytedeco/javacpp-presets

Remove requires in *-platform modules

I'm not sure if it's normal than the requires towards the macos module is commented out in the cuda presets.

Yes, CUDA no longer supports Mac, but some users may want to backport some stuff to older versions, you never know...

HGuillemet

comment created time in 17 days

issue commentbytedeco/javacv

java.lang.UnsatisfiedLinkError: no jniopenblas_nolapack in java 11

Sounds good! Let's use "requires static" just for good measure. :) Thanks!!

jkolobok

comment created time in 17 days

issue commentbytedeco/javacpp-presets

Unsatisfied link error when I try to run app build for arm64, x86_x64 while arm version is working fine.

There is also now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

faisal3413

comment created time in 17 days

issue commentbytedeco/javacpp-presets

Java module errors: no jnilept in java.library.path / cannot access class TessBaseAPI

BTW, there is now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

breandan

comment created time in 17 days

issue commentbytedeco/javacpp-presets

missing maven packages

There is also now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

farfromrefug

comment created time in 17 days

issue commentbytedeco/javacpp-presets

How to use arm64-v8a architecture version on Android

There is also now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

duck123456

comment created time in 17 days

issue commentbytedeco/javacv

couldn't find "libjniavutil.so"

There is now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

gilserrancoli

comment created time in 17 days

issue commentbytedeco/javacv

Reduce app size

There is now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

u136865

comment created time in 17 days

issue commentbytedeco/javacv

Dynamic Loading generate .so Files

BTW, there is now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

Hosseinyzr

comment created time in 17 days

issue commentbytedeco/javacpp-presets

how to just include arm lib use gradle

There is now a plugin for Gradle to exclude by platform names: https://github.com/bytedeco/gradle-javacpp#the-platform-plugin If you try it out and find anything missing, please let me know!

xiedeacc

comment created time in 17 days

issue commentbytedeco/javacv

OpenCVDemo in DeepLearningFaceDetection:error: (-215:Assertion failed) nch == 1 in function 'blobFromImages'

Sounds like that doesn't support color images?

bbbBBBSG

comment created time in 18 days

issue commentbytedeco/javacv

avio_open error() error -5: Could not open 'null'

The group name changed: http://bytedeco.org/news/2019/04/11/beyond-java-and-cpp/

alyk

comment created time in 18 days

push eventKonduitAI/deeplearning4j

Alexandre Boulanger

commit sha fb578fdecd18a183ae2914a2990fe7f674501f4e

RL4J: Use directly NeuralNet instances in DoubleDQN and StandardDQN (#499) Signed-off-by: Alexandre Boulanger <aboulang2002@yahoo.com>

view details

push time in 18 days

delete branch KonduitAI/deeplearning4j

delete branch : ab2002_rl4j_inplace_dqn_algos

delete time in 18 days

PR merged KonduitAI/deeplearning4j

Reviewers
RL4J - Changed DoubleDQN and StandardDQN to use neural net instances instead of getter interfaces

What changes were proposed in this pull request?

In this PR, I removed the interfaces QNetworkSource and TargetQNetworkSource, and adjusted algos under TDTargetAlgorithm to use neural net instances instead of having to use getters. This will help change DQNNeuralNetUpdateRule into something generic.

How was this patch tested?

Manual and unit tests

Quick checklist

The following checklist helps ensure your PR is complete:

  • [X] Eclipse Contributor Agreement signed, and signed commits - see IP Requirements page for details
  • [X] Reviewed the Contributing Guidelines and followed the steps within.
  • [X] Created tests for any significant new code additions.
  • [X] Relevant tests for your changes are passing.
+126 -159

0 comment

11 changed files

aboulang2002

pr closed time in 18 days

issue commentbytedeco/javacv

avio_open error() error -5: Could not open 'null'

If you're using threads, make sure to use JavaCV 1.5.4-SNAPSHOT: http://bytedeco.org/builds/. There's been a few things fixed/enhanced for that. There could also be bugs in libx264 about that, so make sure to try and disable its multithreading.

alyk

comment created time in 18 days

issue commentbytedeco/javacv

avio_open error() error -5: Could not open 'null'

If you're missing an "Output", that probably means you didn't call start()...

alyk

comment created time in 18 days

pull request commenttensorflow/java

Renaming `tensorflow-tools` to `ndarray`

Thinking about this some more, and from a strictly branding point of view, the fact that it's "TensorFlow" clearly isn't causing any issues for TensorFlow.js and its non-native backends, so I don't think this is the problem here either. It's more about emphasizing its state as "100% pure Java", so what about naming the module "tensorflow-java-ndarray"? That is like the "Java NdArray" project from the TensorFlow organization. I feel it contrasts enough with the other modules too:

  • tensorflow-java-ndarray
  • tensorflow-core-api
  • tensorflow-core-platform
  • tensorflow-framework
  • ...

We could also have a tensorflow-java parent module containing tensorflow-java-ndarray and other potential pure Java modules...

karllessard

comment created time in 18 days

PR merged bytedeco/javacpp-presets

Add preset for OpenPose

This PR adds a preset for OpenPose. Currently I have only built the CPU version. It would be nice to have the CUDA version and other platforms too, but as it is it suffices for my needs and I have other things to be getting on with.

It gets everything it can out of the Caffe cppbuild since it has some of the same dependencies.

+6127 -5

0 comment

46 changed files

frankier

pr closed time in 19 days

push eventbytedeco/javacpp-presets

Frankie Robertson

commit sha 5a13d718efa355067a89c436e80da5c1925a3214

* Add presets for OpenPose 1.6.0 (pull #898)

view details

push time in 19 days

push eventfrankier/javacpp-presets

Samuel Audet

commit sha 2e18a7c440815026bc2b60ff29a3e9a2ffd2aff6

Fix Boost install for Linux on Travis CI

view details

push time in 19 days

issue commentbytedeco/javacv

avio_open error() error -5: Could not open 'null'

If you don't see anything displayed on the console, make sure FFmpegLogCallback.set() gets called.

alyk

comment created time in 19 days

issue commentbytedeco/javacv

avio_open error() error -5: Could not open 'null'

That's a problem with your server. Check the log for more information.

alyk

comment created time in 19 days

issue commentbytedeco/javacv

Automatic conversion to supported format in FFmpegFrameRecorder?

Yes, and yes, sounds good! Thanks

b005t3r

comment created time in 19 days

push eventfrankier/javacpp-presets

Samuel Audet

commit sha 9ddc5947913715b724d95e47ad399f8ce232cb28

* Upgrade presets for CUDA 11.0, cuDNN 8.0.0, NCCL 2.7.3

view details

Samuel Audet

commit sha d8c0c1b9fe6ac0571452e60a7c76ed1f8111dc98

* Add comparison against MKL in `llvm/samples/polly/MatMulBenchmark.java`

view details

Brad Hards

commit sha 8bc554c894a4ceb07e9aac75ed2a38967647f8f6

* Upgrade presets for FFmpeg 4.3 (pull #891)

view details

Samuel Audet

commit sha a276070198818fd695b0546e2e69e76e0b41f2c8

Fix ccache for Linux on Travis CI and remove Mac for CUDA

view details

Samuel Audet

commit sha 2f0bd18fb0f5b67ff06e02b789edb5b4940d990f

* Upgrade presets for DNNL 1.5, OpenBLAS 0.3.10, NumPy 1.19.0, SciPy 1.5.0, TensorRT 7.1, ONNX Runtime 1.3.1

view details

Samuel Audet

commit sha 90f0a1bfa6fbbb891e55eff717694969d3628a76

Merge branch 'master' into add-openpose

view details

push time in 19 days

push eventfrankier/javacpp-presets

Samuel Audet

commit sha dd3576118f13d85c0993a5b926ba597bed60a205

Fix build for Linux, include build for Mac, and add to Travis CI

view details

push time in 19 days

issue commentbytedeco/javacv

Automatic conversion to supported format in FFmpegFrameRecorder?

@b005t3r What about now? :)

b005t3r

comment created time in 19 days

issue commentbytedeco/javacpp-presets

presets for libgcc or libllvm?

If you'd like to work on something more, please start here: https://github.com/bytedeco/helloworld https://github.com/bytedeco/javacpp/wiki/Mapping-Recipes https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets

zcaudate

comment created time in 20 days

issue closedbytedeco/javacpp-presets

presets for libgcc or libllvm?

I'd like to be able to package either one of these compilers into a javacpp preset. What's the best place to start?

closed time in 20 days

zcaudate

issue closedbytedeco/javacv

A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xfffffff4 in tid 25352

Hi developer,

I add below dependency in my gradle file. implementation group: 'org.bytedeco', name: 'javacv', version: '1.5.3' implementation 'org.bytedeco:opencv:4.3.0-1.5.3:android-arm' and meet the crash as the title.

and I found this issue was reported in Opencv Issue: https://github.com/opencv/opencv/issues/14906

it was solved in https://github.com/opencv/opencv/pull/15970/commits/af21a3f8f6fc78c89c1a823f56157f84921118d2

And merged in master branch in https://github.com/opencv/opencv/commit/ad0ab4109aec8173b34ee68d25bb488fbcfe5286

I want to know do the ''org.bytedeco:opencv:4.3.0-1.5.3:android-arm' contains this commit? This arm library crashed also in arm64-v8 devices.

closed time in 20 days

michael-destiny

issue closedbytedeco/javacv

java.lang.NullPointerException: This pointer address is NULL.

Hey! Thanks for providing FFmpeg, JavaCV and JavaCPP for Android. After some tests using the snapshots at https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/ I discovered a problem with the latest JavaCV snapshot for Android.

When I trying to record Audio with this method: try { if (frameRecorder != null && audioData != null) { frameRecorder.recordSamples(48000, 2, audioData); //record audio! } } catch (FrameRecorder.Exception e) { handleError(e.getMessage()); //handle error! }

So get I this error message: java.lang.NullPointerException: This pointer address is NULL. at org.bytedeco.javacpp.ShortPointer.put(Native Method) at org.bytedeco.javacv.FFmpegFrameRecorder.recordSamples(FFmpegFrameRecorder.java:1111)

When I downgraded back to Javacv 1.5.3 everything worked fine without any error messages. So there seems to be a bug on the latest JavaCv snapshots.

Best Regards Benjamin

closed time in 20 days

swedishdeveloper

issue commentbytedeco/javacpp-presets

presets for libgcc or libllvm?

LLVM is already available: https://github.com/bytedeco/javacpp-presets/tree/master/llvm

zcaudate

comment created time in 20 days

pull request commentKonduitAI/deeplearning4j

Add support for CUDA 11.0

@saudet any chance we could merge this?

Anytime you want, but we should probably fix deeplearning4j-cuda first:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project deeplearning4j-cuda-11.0: Compilation failure: Compilation failure: 
[ERROR] /home/saudet/projects/konduit/deeplearning4j/deeplearning4j/deeplearning4j-cuda/src/main/java/org/deeplearning4j/cuda/convolution/CudnnConvolutionHelper.java:[259,53] cannot find symbol
[ERROR]   symbol:   variable CUDNN_CONVOLUTION_BWD_FILTER_NO_WORKSPACE
[ERROR]   location: class org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
[ERROR] /home/saudet/projects/konduit/deeplearning4j/deeplearning4j/deeplearning4j-cuda/src/main/java/org/deeplearning4j/cuda/convolution/CudnnConvolutionHelper.java:[260,31] cannot find symbol
[ERROR]   symbol:   variable CUDNN_CONVOLUTION_BWD_FILTER_PREFER_FASTEST
[ERROR]   location: class org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
[ERROR] /home/saudet/projects/konduit/deeplearning4j/deeplearning4j/deeplearning4j-cuda/src/main/java/org/deeplearning4j/cuda/convolution/CudnnConvolutionHelper.java:[265,53] cannot find symbol
[ERROR]   symbol:   variable CUDNN_CONVOLUTION_BWD_DATA_NO_WORKSPACE
[ERROR]   location: class org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
[ERROR] /home/saudet/projects/konduit/deeplearning4j/deeplearning4j/deeplearning4j-cuda/src/main/java/org/deeplearning4j/cuda/convolution/CudnnConvolutionHelper.java:[266,31] cannot find symbol
[ERROR]   symbol:   variable CUDNN_CONVOLUTION_BWD_DATA_PREFER_FASTEST
[ERROR]   location: class org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
[ERROR] /home/saudet/projects/konduit/deeplearning4j/deeplearning4j/deeplearning4j-cuda/src/main/java/org/deeplearning4j/cuda/convolution/CudnnConvolutionHelper.java:[467,31] cannot find symbol
[ERROR]   symbol:   variable CUDNN_CONVOLUTION_FWD_NO_WORKSPACE
[ERROR]   location: class org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
[ERROR] /home/saudet/projects/konduit/deeplearning4j/deeplearning4j/deeplearning4j-cuda/src/main/java/org/deeplearning4j/cuda/convolution/CudnnConvolutionHelper.java:[467,68] cannot find symbol
[ERROR]   symbol:   variable CUDNN_CONVOLUTION_FWD_PREFER_FASTEST
[ERROR]   location: class org.deeplearning4j.cuda.convolution.CudnnConvolutionHelper
[ERROR] -> [Help 1]
saudet

comment created time in 20 days

push eventKonduitAI/deeplearning4j

Samuel Audet

commit sha 3b353702a5abfb3b5d7fc72b860778c5e33fd48b

* Update versions of JavaCPP Presets for FFmpeg, OpenBLAS, and NumPy

view details

push time in 20 days

more