README.md

SKIL: Deep learning model lifecycle management for humans

License

R client for Skymind's intelligence layer (SKIL)

SKIL is an end-to-end deep learning platform. Think of it as a unified front-end for your deep learning training and deployment process. SKIL supports many popular deep learning libraries, such as Keras, TensorFlow and Deeplearning4J. SKIL decreases time-to-value of your AI applications by closing the common gap between experiments and production - bringing models to production fast and keeping them there. SKIL effectively acts as middleware for your AI applications and solves a range of common production problems, namely:

Installation

To install SKIL itself, head over to skymind.ai. Probably the easiest way to get started is by using docker:

docker pull skymindops/skil-ce
docker run --rm -it -p 9008:9008 skymindops/skil-ce bash /start-skil.sh

To use SKIL's R client, you have to install our Python client from PyPI first:

pip install skil

Next, you can install and load the R client from GitHub like this:

devtools::install_github("SkymindIO/skilr")
library("skilr")

Getting started:

In this section you're going to deploy a state-of-the-art object detection application. As a first step, download the TensorFlow model we pre-trained for you and store it locally as yolo.pb. As the name suggests, this model is a You Only Look Once (YOLO) model.If you haven't done already, install and start SKIL as described in the last section.

For this quick example you only need three (self-explanatory) concepts from SKIL. You first create a SKIL Model from the model file yolo.pb you just downloaded. This Model becomes a SKIL Service by deploying it to a SKIL Deployment. That's all there is to it:

library("skilr")

model <- Model('yolo.pb', model_id='yolo_42', name='yolo_model')
deployment <- Deployment()
service <- model$deploy(deployment, input_names=c('input'), output_names=c('output'))

Your YOLO object detection app is now live! You can send images to it using the detect_objects method of your service. We use OpenCV, imported as cv (through Python's cv2 library, using reticulate for interfacing with R), to load, annotate and write images. The full example (including model and images) is located here for your convenience.

library(reticulate)

cv <- import("cv2")
image <- cv$imread("say_yolo_again.jpg")
detection <- service$detect_objects(image)
image <- skil.utils.yolo.annotate_image(image, detection)
cv$imwrite('annotated.jpg', image)

Next, have a look at the SKIL UI at http://localhost:9008 to see how everything you just did is automatically tracked by SKIL. The UI is mostly self-explanatory and you shouldn't have much trouble navigating it. After logging in (use "admin" as user name and password), you will see that SKIL has created a workspace for you in the "Workspaces" tab. If you click on that workspace, you'll find a so called experiment, which contains the yolo model you just loaded into SKIL. Each SKIL experiment comes with a notebook that you can work in. In fact, if you click on "Open notebook" next to the experiment, you will be redirected to a live notebook that contains another interesting example that shows how to deploy Keras and DL4J models (the former in Python, the latter in Scala - all in the same notebook). If you like notebooks and a managed environment that provides you with everything you need out of the box, you can SKIL's notebooks for all your workload. For instance, you could copy and paste the 7 lines of code for the above YOLO app in a SKIL notebook and it will work the same way!

In the "Deployments" tab of the UI, you can see your deployed YOLO service, which consists of just one model, and you'll see that it is "Fully deployed". If you click on the deployment you'll see more details of it, for instance you can explicitly check the endpoints your service is available at. You could, among other things, also re-import the model again through the UI (in case you have a better version or needed to make other changes).

This completes your very first SKIL example.



SkymindIO/skilr documentation built on May 26, 2019, 1:42 a.m.