On windows, enter the directory of project and type 'cmd' in the blank nevigate .Then type run command
gradle bootrun
Navigate to http://localhost:8080 and upload an image. The backend will categorize the image and output the result
Just clik on the botton classify
,the result will show like this
There are some problems for showing the locate and classify result,python code to call the function is below.
import requests
files={'app_id':(None,'123456'),
'version':(None,'2256'),
'platform':(None,'linux'),
'file':open('/home/tao/workspace/imgs/0_frame-0009417_o.jpg','rb')
}
url = "http://localhost:8080/api/locateAndClassify"
response=requests.post(url,files=files)
print("======= predict result ========")
print(response.content)
The current version is a CPU version, a Windows GPU Version is not ready till now. According to tensorflow official words, a tensorflow model cannot be read by Java till version 1.7.
Head to the blog post for the detail about how to do image classify.
Thanks to @mcjojos, a port to Kotlin is now available in a separate branch. Woot!