SlideShare a Scribd company logo
Zoran Sevarac - Univ of Belgrade - @zsevarac
Frank Greco - NYJavaSIG - @frankgreco
JSR 381
Visual Recognition for Java
Finally,
A Java-Friendly ML API
Gran Sasso
Frank Greco
@frankgreco
Chair
NYJavaSIG - NY Java User Group
JC, Cloud/Mobile Architect
NullPointerExceptional
Zoran Severac
@zsevarac
AI Researcher
Univ of Belgrade, Serbia
JC
Session Topics
● Why JSR 381 (VisRec)?
● Patterns and Machine Learning (ML)
● VisRec Architecture and Implementation
● VisRec API
● Examples
Why JSR381?
Machine Learning - Huge Impact on Everything...
Artificial Intelligence
Machine Learning
Deep Learning
A type of algorithm(s) that allows a machine to
emulate aspects of intelligent human behavior
A type of AI that allows a machine to learn from
experience/data
A type of ML that uses powerful computing resources and
advanced neural networks to more-accurately solve
non-linear, highly-dimensional problems with large
amounts of data (eg, visrec)
Learning a Foreign Language
Understand All Rules Observe/Follow Patterns
Patterns...
1995
1987 - Kent Beck and Ward Cunningham - OOPSLA - “Using Pattern languages for OOP”
1977
Directly led to Ward
Cunningham’s creation
of the first wiki
Influenced the
development of Agile
https://en.wikipedia.org/wiki/Christopher_Alexander
1000AD
1200AD
8500BC
1850AD
Building Construction Patterns
ii V I
I IV V
“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”
The Core of Machine Learning
The Core of Machine Learning
Recognizing PATTERNS in data
and
Making PREDICTIONS against
that data.
Recognizing patterns in your data, anticipating
the likely future behavior of similar data and
taking steps to maximize ethical business
benefit based on those predictions.
The Core of Machine Learning for Enterprises
You can write your Machine
Learning app in any language
you want, as long as it’s Python.
You can write your Machine
Learning app in any language
you want, as long as it’s Python.
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
What the Hey!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
HEY!
~10M Java Devs
Java Needs to be a First Class Citizen for ML
1. Don’t want another JavaScript Doomsday Scenario occurring in our Lifetime
2. Python is a good language. There should be others to express the world’s
creativity.
3. Java is a great language with a huge ecosystem with 12M developers
4. Existing ML APIs aren’t Java-friendly or AppDev-friendly
https://bit.ly/2RAKgqa
Solution:
...We need to promote Java for ML...
“The best way to predict the future is to invent it.” - Alan Kay
Solution:
...We need to promote Java for ML...
“The best way to predict the future is to invent it.” - Alan Kay
Make ML more approachable for Java developers!
Everyone we talked was interested to collaborate
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)
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)
JSR #381 - Visual Recognition API
● Java-friendly standard API for computer vision tasks using ML
● Also provides generic ML API
● Designed for Java app devs
● Multiple implementations
● High level abstractions
● More readable and easier to use
VisRec JSR #381
https://github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
JSR381 API,
Architecture, Implementations,
and Examples
Issues with Existing Offerings
● Each has different set of APIs
● Different sets of algorithms, image classes, native
dependencies
● Complex for Avg Java Developer
● Not Java-friendly (C flavor)
VisRec Design goals and principles
● Easy to use by non-experts in VisRec/ML domain
● Enable Java Developers to leverage their Java skills
● Easy to implement for existing ML and imaging libraries
● Reusable design for applied ML applicable to other domains
What Can you Do with It?
1) Classify images and data/objects
classification task / differentiate
between categories
2) Estimate value
regression task
3) Object Detection
classification + regression(position)
Generic ML Layer
Visual
Recognition
Image
Abstraction
VisRec Public API
Apps/Libs
Visual Recognition Layer
JSR381
Service Provider Interface
ML Engine 1
Service Provider Impl
ML Engine 2
Service Provider Impl
JSR 381
Architecture
Core Classes & Design
Generic ML Layer
(common abstractions,
interfaces for general ML
tasks)
Visual Rec Layer
(specialization of generic ML tasks for
specific objects / domain)
Implementation
Based on specific ML engine
DataSet<E> ImageSet extends
DataSet<ExampleImage>
Classifier<T, R>
BinaryClassifier<T>
MutliClassClassifier<T, R>
ImageClassifier<IMAGE_CLASS>
AbstractImageClassifier<IMAGE_CLASS
, MODEL> implements
ImageClassifier<IMAGE_CLASS>
ImageClassifierNetwork extends
AbstractImageClassifier<BufferedImage,
ConvolutionalNetwork>
Regressor<T, R>
SimpleLinearRegression<
MODEL_CLASS>
implements
Regressor<Float, Float>,
SimpleLinearRegressionNetwork extends
SimpleLinearRegression<FeedForwardN
etwork>
Hot Dog or Not Hot Dog
Demo: Hot Dog or Not Hot Dog
Scene from TV show Silicon Valley https://www.youtube.com/watch?v=vIci3C4JkL0
<dependencies>
<dependency>
<groupId>javax.visrec</groupId>
<artifactId>visrec-api</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>javax.visrec</groupId>
<artifactId>visrec-ri</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
Maven Dependencies
Building the classifier
Full source at GitHub https://github.com/sevarac/HotDogNotHotDog
Training process
What happens during the training:
● Example images are presented to the classifier iteratively
● Internal parameters are automatically tuned in order to minimize error
● Error should go DOWN through the epochs
● Accuracy should go UP through the epochs
How to use the trained model
Actual recognition is performed here
Full source at GitHub https://github.com/sevarac/HotDogNotHotDog
Under the hood: Convolutional Neural Network
Automated image preprocessing and feature extraction + Classifier
Minimal Configuration for Building an Image Classifier
● Image class
● Image dimensions
● Image category labels (labels file)
● List of image files with corresponding category labels (index file)
● Architecture of convolutional neural network
● File name to export the trained model
● Optionally training parameters (max epochs, max error, learning rate)
● Many different incompatible data formats
● Many different machine learning algorithms
● Many confusing configuration parameters
● Clear task oriented interface that hides implementation details
● Usage does not require understanding of implementation and
configuration (like Collections.sort())
● Simple and portable integration into existing Java apps and
devices
Pains, barriers and preferences for ML in Java
SOLVED!
Reference Implementation
•Reference implementation of VisRec API is based on
Deep Netts Community Edition which is a Java based
deep learning library provided by www.deepnetts.com
More info: https://www.deepnetts.com/blog/deep-netts-community-edition
• DeepNetts has released community edition of their deep learning
engine, and contributing their experience through this JSR
as a part of their open source strategy
How to get started
github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
JSR381 Information
• JCP.org https://jcp.org/en/jsr/detail?id=381
• JSR project on GitHub github.com/JavaVisRec
• Getting Started
github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
• API github.com/JavaVisRec/visrec-api
• RI github.com/JavaVisRec/visrec-ri
• Examples github.com/JavaVisRec/jsr381-examples
• Mailing list visrec@groups.io
JSR 381
Visual Recognition for Java
Finally,
A Java-Friendly ML API
Please provide feedback
and contribute!
Java is a great language
for ML!
Thanks!
Questions / Comments?
@frankgreco
@zsevarac

More Related Content

What's hot

우아한 모노리스
우아한 모노리스우아한 모노리스
우아한 모노리스
Arawn Park
 
Spring Security
Spring SecuritySpring Security
Spring Security
Sumit Gole
 
ウェブセキュリティのありがちな誤解を解説する
ウェブセキュリティのありがちな誤解を解説するウェブセキュリティのありがちな誤解を解説する
ウェブセキュリティのありがちな誤解を解説する
Hiroshi Tokumaru
 
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
if kakao
 
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Amazon Web Services Korea
 
Extending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss ForgeExtending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss Forge
Antoine Sabot-Durand
 
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and LinkerdService Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Kai Wähner
 
Keycloakのステップアップ認証について
Keycloakのステップアップ認証についてKeycloakのステップアップ認証について
Keycloakのステップアップ認証について
Hitachi, Ltd. OSS Solution Center.
 
Spring boot Under Da Hood
Spring boot Under Da HoodSpring boot Under Da Hood
Spring boot Under Da Hood
Michel Schudel
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
Jonathan Holloway
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Scrum Breakfast Vietnam
 
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
Muneaki Nishimura
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
Bo-Yi Wu
 
Scala Crash Course
Scala Crash Course Scala Crash Course
Scala Crash Course
Haim Michael
 
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
Red Hat Developers
 
Secure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with KeycloakSecure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with Keycloak
Red Hat Developers
 
金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG
金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG
金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG
Nat Sakimura
 
Microservices: The Right Way
Microservices: The Right WayMicroservices: The Right Way
Microservices: The Right Way
Daniel Woods
 
Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and Prometheus
Weaveworks
 
Spring cloud on kubernetes
Spring cloud on kubernetesSpring cloud on kubernetes
Spring cloud on kubernetes
SangSun Park
 

What's hot (20)

우아한 모노리스
우아한 모노리스우아한 모노리스
우아한 모노리스
 
Spring Security
Spring SecuritySpring Security
Spring Security
 
ウェブセキュリティのありがちな誤解を解説する
ウェブセキュリティのありがちな誤解を解説するウェブセキュリティのありがちな誤解を解説する
ウェブセキュリティのありがちな誤解を解説する
 
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
카카오 광고 플랫폼 MSA 적용 사례 및 API Gateway와 인증 구현에 대한 소개
 
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 학습 방법 소개::최영준, 솔루션즈 아키텍트 AI/ML 엑스퍼트, AWS::AWS AIML 스페셜 웨비나
 
Extending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss ForgeExtending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss Forge
 
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and LinkerdService Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
 
Keycloakのステップアップ認証について
Keycloakのステップアップ認証についてKeycloakのステップアップ認証について
Keycloakのステップアップ認証について
 
Spring boot Under Da Hood
Spring boot Under Da HoodSpring boot Under Da Hood
Spring boot Under Da Hood
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
 
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
OWASP Testing Guide からはじめよう - セキュリティ診断技術の共有、そして横展開
 
Introduction to GitHub Actions
Introduction to GitHub ActionsIntroduction to GitHub Actions
Introduction to GitHub Actions
 
Scala Crash Course
Scala Crash Course Scala Crash Course
Scala Crash Course
 
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech TalkArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
ArgoCD and Tekton: Match made in Kubernetes heaven | DevNation Tech Talk
 
Secure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with KeycloakSecure Spring Boot Microservices with Keycloak
Secure Spring Boot Microservices with Keycloak
 
金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG
金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG
金融 API 時代のセキュリティ: OpenID Financial API (FAPI) WG
 
Microservices: The Right Way
Microservices: The Right WayMicroservices: The Right Way
Microservices: The Right Way
 
Kubernetes and Prometheus
Kubernetes and PrometheusKubernetes and Prometheus
Kubernetes and Prometheus
 
Spring cloud on kubernetes
Spring cloud on kubernetesSpring cloud on kubernetes
Spring cloud on kubernetes
 

Similar to JSR381 Visual Recognition for Java.pdf

jChampions JSR381 Visual recognition for java
jChampions   JSR381 Visual recognition for javajChampions   JSR381 Visual recognition for java
jChampions JSR381 Visual recognition for java
Zoran Sevarac, PhD
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav Srivastav
Vaibhav Srivastav
 
Java1
Java1Java1
Java
Java Java
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
kanchanmahajan23
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
PawanMM
 
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Máté Nádasdi
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
Hitesh-Java
 
CAR SHOWROOM SYSTEM
CAR SHOWROOM SYSTEMCAR SHOWROOM SYSTEM
CAR SHOWROOM SYSTEM
Abhishek Shakya
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
DevaKumari Vijay
 
Introducing Android Programming
Introducing Android ProgrammingIntroducing Android Programming
Introducing Android Programming
Arif Huda
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
Ivo Andreev
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJs
Luca Galli
 
summer file - Copy
summer file - Copysummer file - Copy
summer file - Copy
Rakesh Kumar
 
Installing Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGLInstalling Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGL
Corey Clark, Ph.D.
 
Vijay_Rajput
Vijay_RajputVijay_Rajput
Vijay_Rajput
VIJAY RAJPUT
 
Resume - Shashesh Silwal
Resume - Shashesh SilwalResume - Shashesh Silwal
Resume - Shashesh Silwal
Shashesh Silwal
 
AI on the Edge
AI on the EdgeAI on the Edge
AI on the Edge
Jared Rhodes
 
Persian MNIST in 5 Minutes
Persian MNIST in 5 MinutesPersian MNIST in 5 Minutes
Persian MNIST in 5 Minutes
Shahriar Yazdipour
 
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best Practices
Solstice Mobile Argentina
 

Similar to JSR381 Visual Recognition for Java.pdf (20)

jChampions JSR381 Visual recognition for java
jChampions   JSR381 Visual recognition for javajChampions   JSR381 Visual recognition for java
jChampions JSR381 Visual recognition for java
 
JAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav SrivastavJAVA Developer_Resume_Vaibhav Srivastav
JAVA Developer_Resume_Vaibhav Srivastav
 
Java1
Java1Java1
Java1
 
Java
Java Java
Java
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 
Session 02 - Elements of Java Language
Session 02 - Elements of Java LanguageSession 02 - Elements of Java Language
Session 02 - Elements of Java Language
 
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
Ustream vs Legacy, It's never too late to start your fight! #Jsist 2014
 
Elements of Java Language
Elements of Java Language Elements of Java Language
Elements of Java Language
 
CAR SHOWROOM SYSTEM
CAR SHOWROOM SYSTEMCAR SHOWROOM SYSTEM
CAR SHOWROOM SYSTEM
 
Unit1 introduction to Java
Unit1 introduction to JavaUnit1 introduction to Java
Unit1 introduction to Java
 
Introducing Android Programming
Introducing Android ProgrammingIntroducing Android Programming
Introducing Android Programming
 
Autonomous Machines with Project Bonsai
Autonomous Machines with Project BonsaiAutonomous Machines with Project Bonsai
Autonomous Machines with Project Bonsai
 
Introduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJsIntroduction to html5 game programming with ImpactJs
Introduction to html5 game programming with ImpactJs
 
summer file - Copy
summer file - Copysummer file - Copy
summer file - Copy
 
Installing Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGLInstalling Games Sucks, Learn WebGL
Installing Games Sucks, Learn WebGL
 
Vijay_Rajput
Vijay_RajputVijay_Rajput
Vijay_Rajput
 
Resume - Shashesh Silwal
Resume - Shashesh SilwalResume - Shashesh Silwal
Resume - Shashesh Silwal
 
AI on the Edge
AI on the EdgeAI on the Edge
AI on the Edge
 
Persian MNIST in 5 Minutes
Persian MNIST in 5 MinutesPersian MNIST in 5 Minutes
Persian MNIST in 5 Minutes
 
Innovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best PracticesInnovation Generation - The Mobile Meetup: Android Best Practices
Innovation Generation - The Mobile Meetup: Android Best Practices
 

Recently uploaded

Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 

Recently uploaded (20)

Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 

JSR381 Visual Recognition for Java.pdf

  • 1. Zoran Sevarac - Univ of Belgrade - @zsevarac Frank Greco - NYJavaSIG - @frankgreco JSR 381 Visual Recognition for Java Finally, A Java-Friendly ML API Gran Sasso
  • 2. Frank Greco @frankgreco Chair NYJavaSIG - NY Java User Group JC, Cloud/Mobile Architect NullPointerExceptional Zoran Severac @zsevarac AI Researcher Univ of Belgrade, Serbia JC
  • 3. Session Topics ● Why JSR 381 (VisRec)? ● Patterns and Machine Learning (ML) ● VisRec Architecture and Implementation ● VisRec API ● Examples
  • 5. Machine Learning - Huge Impact on Everything...
  • 6. Artificial Intelligence Machine Learning Deep Learning A type of algorithm(s) that allows a machine to emulate aspects of intelligent human behavior A type of AI that allows a machine to learn from experience/data A type of ML that uses powerful computing resources and advanced neural networks to more-accurately solve non-linear, highly-dimensional problems with large amounts of data (eg, visrec)
  • 7. Learning a Foreign Language Understand All Rules Observe/Follow Patterns
  • 9. 1995 1987 - Kent Beck and Ward Cunningham - OOPSLA - “Using Pattern languages for OOP”
  • 10. 1977 Directly led to Ward Cunningham’s creation of the first wiki Influenced the development of Agile https://en.wikipedia.org/wiki/Christopher_Alexander
  • 12. ii V I I IV V
  • 13. “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”
  • 14. The Core of Machine Learning
  • 15. The Core of Machine Learning Recognizing PATTERNS in data and Making PREDICTIONS against that data.
  • 16. Recognizing patterns in your data, anticipating the likely future behavior of similar data and taking steps to maximize ethical business benefit based on those predictions. The Core of Machine Learning for Enterprises
  • 17. You can write your Machine Learning app in any language you want, as long as it’s Python.
  • 18. You can write your Machine Learning app in any language you want, as long as it’s Python. HEY!
  • 20. Java Needs to be a First Class Citizen for ML 1. Don’t want another JavaScript Doomsday Scenario occurring in our Lifetime 2. Python is a good language. There should be others to express the world’s creativity. 3. Java is a great language with a huge ecosystem with 12M developers 4. Existing ML APIs aren’t Java-friendly or AppDev-friendly
  • 22. Solution: ...We need to promote Java for ML... “The best way to predict the future is to invent it.” - Alan Kay
  • 23. Solution: ...We need to promote Java for ML... “The best way to predict the future is to invent it.” - Alan Kay Make ML more approachable for Java developers!
  • 24. Everyone we talked was interested to collaborate
  • 25. 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)
  • 26. 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)
  • 27.
  • 28. JSR #381 - Visual Recognition API ● Java-friendly standard API for computer vision tasks using ML ● Also provides generic ML API ● Designed for Java app devs ● Multiple implementations ● High level abstractions ● More readable and easier to use VisRec JSR #381 https://github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
  • 30. Issues with Existing Offerings ● Each has different set of APIs ● Different sets of algorithms, image classes, native dependencies ● Complex for Avg Java Developer ● Not Java-friendly (C flavor)
  • 31. VisRec Design goals and principles ● Easy to use by non-experts in VisRec/ML domain ● Enable Java Developers to leverage their Java skills ● Easy to implement for existing ML and imaging libraries ● Reusable design for applied ML applicable to other domains
  • 32. What Can you Do with It? 1) Classify images and data/objects classification task / differentiate between categories 2) Estimate value regression task 3) Object Detection classification + regression(position)
  • 33. Generic ML Layer Visual Recognition Image Abstraction VisRec Public API Apps/Libs Visual Recognition Layer JSR381 Service Provider Interface ML Engine 1 Service Provider Impl ML Engine 2 Service Provider Impl JSR 381 Architecture
  • 34. Core Classes & Design Generic ML Layer (common abstractions, interfaces for general ML tasks) Visual Rec Layer (specialization of generic ML tasks for specific objects / domain) Implementation Based on specific ML engine DataSet<E> ImageSet extends DataSet<ExampleImage> Classifier<T, R> BinaryClassifier<T> MutliClassClassifier<T, R> ImageClassifier<IMAGE_CLASS> AbstractImageClassifier<IMAGE_CLASS , MODEL> implements ImageClassifier<IMAGE_CLASS> ImageClassifierNetwork extends AbstractImageClassifier<BufferedImage, ConvolutionalNetwork> Regressor<T, R> SimpleLinearRegression< MODEL_CLASS> implements Regressor<Float, Float>, SimpleLinearRegressionNetwork extends SimpleLinearRegression<FeedForwardN etwork>
  • 35. Hot Dog or Not Hot Dog Demo: Hot Dog or Not Hot Dog Scene from TV show Silicon Valley https://www.youtube.com/watch?v=vIci3C4JkL0
  • 37. Building the classifier Full source at GitHub https://github.com/sevarac/HotDogNotHotDog
  • 38. Training process What happens during the training: ● Example images are presented to the classifier iteratively ● Internal parameters are automatically tuned in order to minimize error ● Error should go DOWN through the epochs ● Accuracy should go UP through the epochs
  • 39. How to use the trained model Actual recognition is performed here Full source at GitHub https://github.com/sevarac/HotDogNotHotDog
  • 40. Under the hood: Convolutional Neural Network Automated image preprocessing and feature extraction + Classifier
  • 41. Minimal Configuration for Building an Image Classifier ● Image class ● Image dimensions ● Image category labels (labels file) ● List of image files with corresponding category labels (index file) ● Architecture of convolutional neural network ● File name to export the trained model ● Optionally training parameters (max epochs, max error, learning rate)
  • 42. ● Many different incompatible data formats ● Many different machine learning algorithms ● Many confusing configuration parameters ● Clear task oriented interface that hides implementation details ● Usage does not require understanding of implementation and configuration (like Collections.sort()) ● Simple and portable integration into existing Java apps and devices Pains, barriers and preferences for ML in Java SOLVED!
  • 43. Reference Implementation •Reference implementation of VisRec API is based on Deep Netts Community Edition which is a Java based deep learning library provided by www.deepnetts.com More info: https://www.deepnetts.com/blog/deep-netts-community-edition • DeepNetts has released community edition of their deep learning engine, and contributing their experience through this JSR as a part of their open source strategy
  • 44. How to get started github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide
  • 45. JSR381 Information • JCP.org https://jcp.org/en/jsr/detail?id=381 • JSR project on GitHub github.com/JavaVisRec • Getting Started github.com/JavaVisRec/visrec-api/wiki/Getting-Started-Guide • API github.com/JavaVisRec/visrec-api • RI github.com/JavaVisRec/visrec-ri • Examples github.com/JavaVisRec/jsr381-examples • Mailing list visrec@groups.io
  • 46. JSR 381 Visual Recognition for Java Finally, A Java-Friendly ML API Please provide feedback and contribute! Java is a great language for ML!