Please enable JavaScript.
Coggle requires JavaScript to display documents.
DJL: Testing Deep Learning Object Detection using Java and Spring Boot -…
DJL: Testing Deep Learning Object Detection using Java and Spring Boot
Applications
Computer Vision
Image Classification
Object Detection
COCO 2017 (
https://cocodataset.org
)
Semantic Segmentation
Instance Segmentation
Pose Estimation
Action Recognition
Word Recognition
Image Generation
Image Enhancement
NLP (Natural Language Processing)
Question and Answer
Text Classification
Sentiment Analysis
Word Embedding
Machine Translation
Multiple Choice
Text Embedding
Tabular
Linear Regression
Softmax regression
TensorFlow Hub:
https://tfhub.dev/
Tests
Windows 11
CUDA 11 not supported. Installed CUDA 10.2 instead
Running on Windows cmd works better than running from WSL
Models doesn't run on Eclipse Console with CUDA
Models Format
TFLite
TFLite is a more efficient format to work on small devices
Binary is smaller than PB format
Inference is faster
DJL does not support this format yet
https://www.tensorflow.org/lite/guide?hl=pt-br
PB
SavedModel Format (
https://www.tensorflow.org/guide/saved_model
)
Only TF model format supported in DJL
https://djl.ai/docs/tensorflow/how_to_import_tensorflow_models_in_DJL.html
Object Detection
https://tfhub.dev/tensorflow/centernet/resnet50v2_512x512_kpts/1
https://tfhub.dev/tensorflow/faster_rcnn/resnet152_v1_640x640/1
https://tfhub.dev/tensorflow/retinanet/resnet101_v1_fpn_1024x1024/1
https://tfhub.dev/tensorflow/faster_rcnn/resnet101_v1_800x1333/1
https://tfhub.dev/tensorflow/efficientdet/d3/1
Spring Boot
Loading a model: download and load it to memory takes time
Pre-load
Model as a Bean
Predictor as a Bean
Inject the predictor as a Supplier
https://github.com/pedrocavalero/commit-hop-demo
Docker
Spring Boot has its own docker command but it fails
The font used to create the boxes is missing
Created a customized Dockerfile, adding the fonts needed
https://github.com/AdoptOpenJDK/openjdk-docker/issues/75
https://spring.io/guides/gs/spring-boot-docker/
DL Engines
TensorFlow
MXNet
PyTorch
DJL: Deep learning Java Library
Created by Amazon
https://djl.ai/