SAP Computer Vision Package
Project description
SAP Computer Vision Package
This package extends detectron2 and among other things it adds image classification and feature extraction functionalities. Additionally it offers an CLI to create SAP AI Core template for training and serving.
Supported use-cases
- Object Detection
- Image Classification
- Image Feature Extraction
- Model Training and Deployment on SAP AI Core
Installation
Prerequisites
Before installing the package detectron2
has to be installed. Please check the detectron2 installation guide to select the proper version.
Installation from Source
When building from source please use the setup_without_centaur.py
file. To allow local changes use:
python setup_with_centaur.py develop
Installation using pip
pip install sap-computer-vision-package
Getting Started
Python Library
If you are interested to use our package as a simple extension to detectron2
, we recommend running sap_cv examples <target_dir>
to copy our example notebooks to <target_dir>
and take a look at those.
AI Core Templates
To show all available templates run sap_cv show
. The command sap_cv show <pipeline_name>
shows detailed information about a specific pipeline.
The training pipelines are templates for AI Core execution. To run it under your tenant you need the template and the matching docker image:
- To create a template execute
sap_cv create-template <pipeline_name> -o/--output-file=<choose_name>.json
. The template contains several tenant specific entries likeimagePullSecrets
etc. Please adjust them by hand or use a pipeline config YAML (see section below). - To create a docker image execute
sap_cv create-template <pipeline_name> -t <tag/docker-image-target>
The template has to be pushed into the onboarded git repo (consult AI Core documentation to set it up) and the container to the onboarded docker repository.
Templates are built using metaflow
using a plugin to create Argo templates. Make sure that a proper metaflow
version (for the argo plugin install this fork: https://github.com/sappier/metaflow) is installed and that the storage is configured correctly.
Pipeline Config .yaml
Tenant specific values for the template can either be provided through the CLI through additional options. For more information execute sap_cv create-template <pipeline_name> --argo-help
. To simplify the command and make the creation of the template trackable in git it is possible to use a .yaml containing the values.
Example:
labels:
scenarios.ai.sap.com/id: "<scenario-id>"
ai.sap.com/version: "<version-number>"
annotations:
scenarios.ai.sap.com/name: "<scenario-name>"
executables.ai.sap.com/name: "<executable-name>"
image: <tag/docker-image-target>`
imagePullSecrets:
- name: "<docker-repo-secret>"
envFrom:
- secretRef:
name: "<object-store-secret>"
To use the pipeline config during the creation process use the --pipeline-config
options, e.g. sap_cv create-template <pipeline_name> -o/--output-file=<choose_name>.json --pipeline-config=pipeline_cfg.yaml
.
License
This package is distributed under the SAP Developers License, see LICENSE file in the package. The package uses several third party open source components. Please see file DISCLAIMER for more details on their licensing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for sap_computer_vision_package-1.0.18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f827411267705bd619179a23cd230b5569de9ef7e1818596e00773c153e8d9dd |
|
MD5 | 350dd5639c951df217dbc86fd60b5d91 |
|
BLAKE2b-256 | 64ff30c5857b3e00ff5011e557a1bfdbe4ec6aea81116d4f891cb592c63f860b |