Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcogdepinto/panoramamodelserving
Using Java and deeplearning4j to serve a Keras model.
https://github.com/marcogdepinto/panoramamodelserving
deep-learning deep-neural-networks deeplearning deeplearning4j java keras python
Last synced: 17 days ago
JSON representation
Using Java and deeplearning4j to serve a Keras model.
- Host: GitHub
- URL: https://github.com/marcogdepinto/panoramamodelserving
- Owner: marcogdepinto
- Created: 2019-08-04T13:33:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-10-05T19:31:25.000Z (about 2 years ago)
- Last Synced: 2024-10-30T06:05:52.939Z (2 months ago)
- Topics: deep-learning, deep-neural-networks, deeplearning, deeplearning4j, java, keras, python
- Language: Java
- Homepage:
- Size: 563 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Keras model deploying with Java
Starting from another project I made to classify images using Keras (https://github.com/marcogdepinto/ScenarioClassifier), I had the idea to work on a Deploy class in Java.
Deploy means placing the model in production: this class can be, for example, included in a Spring Boot Application and consumed via API calls.
The library used is [DeepLearning4j](https://deeplearning4j.org/).
# Model
Please download the model from [this link](https://drive.google.com/open?id=1jPDQcqQeh7r-_yQgn9jJzc8yVXEOgkvk) (it exceeds 100 megabytes so it can't stay on Github) and place it in the resource folder.
# Output
![city](https://github.com/marcogdepinto/Java-KerasDLModelServing/blob/master/city2.jpg)
Passing the above picture as input, the class will return the following information
```
[city, desert, mountain, nature, sea, universe]
[[ 1.0000, 0, 0, 0, 0, 0]]
[1.0, 0.0, 0.0, 0.0, 0.0, 0.0]
city
```**Output explanation**
- The first line is an array with the labels.
- The second line includes an array with the predicted percentage per class.
- The third line is given as output to match the labels and the array of predictions.
- The forth line is the prediction in human-readable language.