I've been reading over the dl4j documentation over the past couple of days, not the easiest for me - coming from matlab and tensorflow. My java is many years in the past..

Has there been any thoughts to following: https://deeplearning4j.org/visualization and having the training/visualisation ui start up upon initialisation of dl4j in opencv?

The example model for zoo is sub-optimal for a lot of objects..

While it would perhaps be better to start this up outside of myrobotlab, and call this directly via a stub to then save as a seperate model (which I'm currently working on) it would be nice to have a 'one source' within myrobotlab for other users.

Keen to see other peoples thoughts.

kwatters

6 years 6 months ago

Hello Mimorikay!

  So.. quick answer is..  yes we can easily add the dl4j visualization of training.  That's only like 2 lines of code to add it (luckily)

  Longer answer.. the current deeplearning4j implementation in MyRobotLab is really to just expose it and make sure that the classpath is setup so that you can use DL4J within MyRobotLab.  There's really just a few place holder methods and I really haven't done much in the way of documentation for it , nor have I added many examples.  I do, however, plan to do this.

  So, good idea, we'll add the training gui.  Though I don't initally think that people will be training too many models with MyRobotLab  (I could be wrong, and I hope I am with that statement.)

  The good news is, however, that you can load models trainined by DL4J, tensorflow, caffe, torch, keras... etc and evaluate them in DL4J.  Initially I only focus on getting some of the "zoo" models working and easily exposed for users.  

  Most of the Zoo models are trained to handle image data, which is why I added an OpenCV filter for DL4J.  This model exposes the VGG16 ImageNet model.  That was kinda fun, but honestly, not as useful as the Yolo models.  So,  I added support (currently via OpenCV for Darknet Yolo classification)  I am in the process of exposing Yolo in the Deeplearning4J service.

  Now, it sounds like you have some experience with neural networks and training them if you've got a tensorlfow/matlab background.  The good news is that you can do the same thing in DL4J! 

  You'll want to start by defining a network by defining the layers of a neural network and the types of layers.  Additionally you can specify things like the number of inputs, number of outputs, and the activation functions in the layers.  

  Deeplearning4j uses a numeric libray called "ND4J" that provides the native execution of math functions so that they are just as fast as C code and it can use GPUs if available.  The ND4J library is functionally the same as NumPy , if you happen to be framiliar with that.  Additionally, Deeplearing4j has a framework for handling the input data for a neural network called DataVec.  This library is responsible for handling all of the vectorization of your data so it can be used as input into a neural network.  

Deeplearning4j also exposes the typical hyper-parameters that you might expect like learning rate, and the number of epochs to train the model.  It also supports doing cross validation of the model to produce accuracy, precision, recall and f1 scores.

If you would share a bit more about what exactly you're looking to do,  I'd be happy to help guide you in the right direction and even to help add some functionality to the DL4J service in MRL to make it easier to accomplish!

Welcome!

 

  

Hi,

Thank you for the well thought out answer. :) I'll have a look at datavec when I get to work. I have some tensorflow models I'd love to be able to use for image classification.

I'm honestly just playing with it thus far - no plan yet, currently building an inmoov so it made sense to become more familar with myrobotlab and java and came across dl4j and went 'Ooh'

You're doing excellent work btw, I'm aware I'm prodding away at it when it's not really ready for uat yet.

I'll try not to bug with too many dumb questions. :)

Thanks, 

Kay