Giter Site home page Giter Site logo

shreyasatwork / acap-computer-vision-sdk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from axiscommunications/acap-computer-vision-sdk

0.0 0.0 0.0 167 KB

AXIS Camera Application Platform version 4 - ACAP Computer Vision SDK

Home Page: https://hub.docker.com/r/axisecp/acap-computer-vision-sdk

Shell 5.08% C++ 62.84% CMake 1.75% Python 25.09% Makefile 5.24%

acap-computer-vision-sdk's Introduction

acap-computer-vision-sdk

This repository holds the Dockerfile that create the ACAP Computer Vision SDK images. These images bundle computer vision libraries and packages that are compiled for the AXIS camera platforms. The full documentation on how to use the SDK can be found in the ACAP4 SDK documentation. Application examples, demonstrating e.g., object detection in Python, are available in the acap-computer-vision-sdk-examples repository. The SDK's Dockerfile itself can be used as a reference on how the SDK images are configured, or to rebuild select components with parameters that better fit your application.

The Computer Vision SDK image packages are located under this /axis directory. The directory of a package, e.g., /axis/opencv, contain the files needed for the applications as seen from the root of the application container. Thus, merging e.g., /axis/opencv with the root / of your container will add the package correctly. This is what is done with the COPY commands in the example Dockerfile below.

Dependencies between packages currently need to be handled manually. That is, e.g., python-numpy does not include python. Rather, both packages will have to be added to the application container to use the NumPy package.

Images

The SDK comes in two different flavours: runtime and devel. The devel-tagged image contains the SDK build environment and the full packages, including e.g., headers, to allow building and linking against the packages. The runtime-tagged image attempts to only retain the subset of files needed to run packages, which produces a significantly smaller image.

The available tags are latest-<ARCHITECTURE>, latest-<ARCHITECTURE>-<runtime/devel>, <VERSION_TAG>-<ARCHITECTURE> and <VERSION_TAG>-<ARCHITECTURE>-<runtime/devel>. The images that do not specify runtime or devel are set to be the smaller runtime images. The latest-tagged images are built per commit from the master branch, while the <VERSION_TAG>-tagged images are built per tagged release.

All CV SDK images are available on DockerHub at axisecp/acap-computer-vision-sdk.

Instructions

  1. Select a base image suitable for your camera platform, e.g., arm32v7/ubuntu:20.04 for running Ubuntu 20.04 natively on the ARTPEC-7 platform.
  2. Copy the packages needed for your application from the CV SDK, e.g., for an application running OpenCV in Python, the copied packages would include OpenCV, Python, NumPy (OpenCV-Python dependency) and OpenBLAS (optimized math functions).

Thus, the Dockerfile for your application could be set up as:

FROM axisecp/acap-computer-vision-sdk:latest-armv7hf AS cv-sdk
FROM arm32v7/ubuntu:20.04

# Add the CV packages
COPY --from=cv-sdk /axis/opencv /
COPY --from=cv-sdk /axis/python /
COPY --from=cv-sdk /axis/python-numpy /
COPY --from=cv-sdk /axis/openblas /

# Add your application files     
COPY app /app
WORKDIR /app
CMD ["python3", "some_computer_vision_script.py"]

Contents

  • /axis/opencv: OpenCV 4.5.1 with VDO
    • A computer vision library with functionality that covers many different fields within computer vision. The VDO integration allows accessing the camera's video streams through the OpenCV VideoCapture class. Compiled with OpenBLAS.
  • /axis/python: Python
    • A Python 3.8 installation to allow easy prototyping and development of applications.
  • Python packages
    • /axis/python-numpy: NumPy - Compiled with OpenBLAS.
    • /axis/python-scipy: SciPy - Compiled with OpenBLAS.
    • /axis/python-pytesseract: PyTesseract - A Python interface to the Tesseract OCR engine.
    • /axis/python-tfserving: A TensorFlow Serving inference client - Allows interfacing with a model server using the TensorFlow Serving prediction gRPC API.
  • /axis/tesseract: Tesseract
    • An OCR engine developed by Google. Requires model from e.g., tessdata to be downloaded and have its location specified in the application.
  • /axis/openblas: OpenBLAS
    • A library with optimized linear algebra operations which can accelerate many applications.
  • /axis/opencl: OpenCL
    • A general purpose parallel programming language.
    • Only available on the -devel image as the runtime files are mounted from the camera
  • /axis/tfproto: TensorFlow protobuf files
    • TensorFlow and TensorFlow Serving protobuf files for compiling applications that use their API. An example of how they are used is available in the object-detector-cpp example.
    • Only available on the -devel image as the proto files are only used for compilation

acap-computer-vision-sdk's People

Contributors

johanxmodin avatar shreyasatwork avatar carlcn avatar petterwa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.