JSR 381 is a standard Java API for Machine learning, design with the goal to simplify machine learning in Java for non-experts, and make easier intergration with existing Java applications.
2. Frank Greco
@frankgreco
Chair
NYJavaSIG - NY Java User Group
JC, Cloud/Mobile Architect
Zoran Severac
@neuroph
AI Researcher
Univ of Belgrade, Serbia
JC, Apache NetBeans PMC
NullPointerExceptional
3. Session Topics
● Patterns and Machine Learning (ML)
● Why is ML Different than Conventional Programming
● Java and ML
● VisRec JSR 381
● VisRec Architecture and Implementation
● Examples
8. “One of the most interesting aspects of
the world is that it can be considered to
be made up of patterns”
Norbert Wiener - 1894-1964 - MIT
Cybernetics (1948) - early steps to modern AI
This was AI before it was called “AI”
16. Session Topics
● Patterns and Machine Learning (ML)
● Why is ML Different than Conventional Programming
● Java and ML
● VisRec JSR 381
● VisRec Architecture and Implementation
● Examples
21. ML - Basic Workflow
Obtaining, Organizing,
Cleaning, Removing Bias,
etc.
Selecting ML Algorithm, Parameter
Experimentation, Analyze Errors
Deploy Model
with jar/container
22. ML - Basic Workflow
Obtaining, Organizing,
Cleaning, Removing Bias,
etc.
Selecting ML Algorithm, Parameter
Experimentation, Analyze Errors
Deploy Model
with jar/container
23. ML - Basic Workflow
Obtaining, Organizing,
Cleaning, Removing Bias,
etc.
Selecting ML Algorithm, Parameter
Experimentation, Analyze Errors
Deploy Model
with jar/container
24. Session Topics
● Patterns and Machine Learning (ML)
● Why is ML Different than Conventional Programming
● Java and ML
● VisRec JSR 381
● VisRec Architecture and Implementation
● Examples
25. You can write your Machine
Learning app in any language
you want as long as its Python.
26. You can write your Machine
Learning app in any language
you want as long as its Python.
HEY!
28. Java Needs to be a First Class Citizen for ML
● Don’t want another JavaScript “Doomsday” Scenario occurring in
our Lifetime
● Python is a very good language. There should be others to
express the ML world’s creativity
● Java is a great language with a huge ecosystem with 12M
developers
● Existing ML APIs aren’t Java-friendly or AppDev-friendly
30. Session Topics
● Patterns and Machine Learning (ML)
● Why is ML Different than Conventional Programming
● Java and ML
● VisRec JSR 381
● VisRec Architecture and Implementation
● Examples
31. Don’t boil the ocean… [heat up some coffee first]
VisRec - JSR #381 Visual Recognition for Java
Spec Leads and Expert Group
Zoran Sevarac (ML researcher - Univ of Belgrade)
Frank Greco (NYJavaSIG, Consultant)
Kevin Berendsen (OpenValue, Senior Software Eng)
32. Other contributors and Advisors
● Frank Liu (Amazon)
● Constantin Drabo
● Amit Nagesh
● Marissa Staller
● Eric Bruno
● Anakar Parida
● Nikita Ivanov (Gridgain)
● James Weaver (IBM)
● Werner Keil
● Jyoti Buddha
● Guillaume Laforge (Google)
● Ed Burns (fmr Oracle)
● Nishant Raut (Mumbai JUG)
● Sandhya Kapoor (fmr IBM)
34. JSR #381 - Visual Recognition API
●
●
●
●
●
● More readable and easier to use
VisRec JSR #381
https://github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
37. What Can you Do with It?
1) Classify images and data/objects
classification task
2) Estimate numeric value
regression task
3) Object Detection
classification + regression(position)
42. Minimal Configuration
● Image class
● Image dimensions
● Category labels (labels file)
● List of image files with corresponding category labels (index
file)
● Convolutional neural network architecture for image
classification
● Training parameters (max error, max epochs, learning rate)
● File name for the trained model
43. Under the hood: Convolutional Neural Network for Image Recognition
High dimensional data + automated preprocessing and feature extraction
44. Reference Implementation: Deep Netts
● Pure Java implementation of main Deep Learning algorithms:
convolutional and feed forward neural networks
● Open source (LGPL) and professional edition
● Pro Edition includes Deep Learning IDE
○ Visual ML Tools, Wizards and
● Starting today Pro Edition is available
Under FREE DEVELOPMENT license!
https://www.deepnetts.com/download
45. Image classification - Convolutional network using Deep Netts API
ConvolutionalNetwork neuralNet = ConvolutionalNetwork.builder()
.addInputLayer(imageWidth, imageHeight, 3)
.addConvolutionalLayer(3, 3, 12)
.addMaxPoolingLayer(2, 2)
.addFullyConnectedLayer(30)
.addFullyConnectedLayer(20)
.addOutputLayer(labelsCount, ActivationType.SOFTMAX)
.hiddenActivationFunction(ActivationType.TANH)
.lossFunction(LossType.CROSS_ENTROPY)
.randomSeed(123)
.build();
46.
47. Next Steps for You!
github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
48. JSR 381
Visual Recognition for Java
Finally,
A Java-Friendly ML API
Please provide feedback
and contribute!
No reason why Java
cannot be used for ML!