Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krystianity/keras-serving
bring keras-models to production with tensorflow-serving and nodejs + docker :pizza:
https://github.com/krystianity/keras-serving
cpp docker grpc keras network neuronal nodejs production python serving tensorflow
Last synced: 9 days ago
JSON representation
bring keras-models to production with tensorflow-serving and nodejs + docker :pizza:
- Host: GitHub
- URL: https://github.com/krystianity/keras-serving
- Owner: krystianity
- License: apache-2.0
- Created: 2017-05-19T22:58:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T16:54:32.000Z (almost 2 years ago)
- Last Synced: 2024-04-15T07:39:12.379Z (7 months ago)
- Topics: cpp, docker, grpc, keras, network, neuronal, nodejs, production, python, serving, tensorflow
- Language: Python
- Homepage:
- Size: 20.7 MB
- Stars: 153
- Watchers: 16
- Forks: 27
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# keras-serving
keras->tensorflow+grpc+docker=>nodejs :whale::fire:
- example of bringing a keras model to production using tensorflow serving
- using custom XOR model with tensor.proto dimensions example
- building & training of the model works with python2.7 on the workstation
- exported model is served via grpc in a C++ server using a Docker-Container
- a nodejs server wraps the grpc api for a simple http POST endpoint
- also ships an advanced multi-model face (emotion, gender) detection example `/face-recog`
- and and advanced google bigquery (as dataaset) example `/bigquery`# Overview
* XOR Setup below
* [Face-Recog Setup](face-recog/)
* [BigQuery Setup](bigquery/)# Workflow (Unix - testen on Ubuntu 16.04 64bit)
## You will need
```
python
pip
docker (docker-compose)
```## 1. Install Requirements
```
./prepare.sh
# installs python dependencies via pip
# builds the docker image for tensorflow_serving (takes a while ~ 30 minutes)
# image size ~ 3.5 GB
```
checkout [build troubleshoot](build.md) if you are having trouble## 2. Build, Train and Serialise Keras Model
```
python train.py
# results will be in (/result)
```## 3. Load and export Model as Tensorflow Graph
```
python export.py
# results will be in (/export)
```## 4. Build & Run Containers via docker-compose
```
./start-servers.sh
# ./stop-servers.sh
```## 5. Test API via curl
```
curl -X POST \
http://localhost:8080/predict-xor \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{"inputs": [0,1]}'
```