Skip to main content

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 like imagePullSecrets 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.

Giving Feedback and Reporting Bugs

If you are an SAP customer you can give feedback or report bugs by creating an incident via the SAP ONE Support Launchpad using the component ID "CA-ML-CV".

If you are not an SAP customer yet, you can give feedback or report bugs by registering with SAP Community and asking a question using the tag "SAP AI Core" in the field "SAP Managed Tags".

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page