Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using tensorflow models in web applications

So I've recently became very interested in machine learning, and have been using tensorflow (python) in some of my projects at work.

However, I've now found a use for digit classification in one of my web projects which is all written in PHP for server-side code. Ideally, I'd like to be able to upload a picture via a Javascript interface, and on the PHP receiving end process the picture, slide a window to find the set of digits I'm looking for, and then process this through my trained neural network. I guess I'll summarise in one question: is this possible? Thank you!

like image 498
Keir Simmons Avatar asked Jan 16 '17 02:01

Keir Simmons


2 Answers

Tensorflow provides serving project for communication, so you need to implement gRPC client for PHP, then use it to talk to Tensorflow serving environment.

That's how I work with Ruby and Tensorflow, it should be working for you as well!

like image 192
simsicon Avatar answered Oct 15 '22 06:10

simsicon


You can try one of these PHP extensions:

https://github.com/absalomedia/tensile

https://github.com/wan2land/php-tensorflow

like image 28
Yuri Korolov Avatar answered Oct 15 '22 08:10

Yuri Korolov