Tensorflow Java tutorial with Spring and Gradle. This is a simple example application what uses Yolo with TF Java API and Spring Framework.

License: WTFPL

Language: Java

Keywords: java, spring, tensorflow, tutorial

TensorFlow Java tutorial with Spring Framework and Gradle

Object detection server application

Object detection server side application sample program written in Java. It uses the TensorFlow Java API with a trained YOLO model. The server application is implemented with Spring Framework and it is built by Gradle.

How it works?

It provides a web user interface to upload images and detect objects. Please have a look at the following screenshots:

TensorFlow Java API home page
Step1: upload your image

TensorFlow Java API object detection page
Step2: display the recognized objects

Compile and run

Before compiling the source code you have to place the frozen graph and the label file into the ./graph/ directory. Download one of my graphs from my google drive. There are two graphs: tiny-yolo-voc.pb and yolo-voc.pb. The tiny-yolo.pb has a lower size, however it is less accurate than the yolo-voc.pb.

Compile the code by typing ./gradlew clean build in the terminal window.
Run it with the command ./gradlew bootRun

Open the http://localhot:8080 and you see the webpage.
If you want to understand better how the image recognition part works, have a look at my previous project here: Java Tensorflow example application

Demo application

Deployed to Google cloud:

Deployed to Heroku:
Unfortunatelly, only the tiny YOLO runs with 512M memory.

Project Statistics

Sourcerank 3
Repository Size 676 KB
Stars 3
Forks 4
Watchers 1
Open issues 0
Dependencies 0
Contributors 1
Tags 0
Last updated
Last pushed

Top Contributors See all

Zoltán Szabó

Something wrong with this page? Make a suggestion

Last synced: 2018-03-19 20:45:51 UTC

Login to resync this repository