Skip to content
forked from ROCm/rocAL

The AMD rocAL is designed to efficiently decode and process images and videos from a variety of storage formats and modify them through a processing graph programmable by the user.

License

Notifications You must be signed in to change notification settings

fiona-gladwin/rocAL

 
 

Repository files navigation

MIT licensed

The AMD ROCm Augmentation Library (rocAL) is designed to efficiently decode and process images and videos from a variety of storage formats and modify them through a processing graph programmable by the user. rocAL currently provides C API. For more details, go to rocAL user guide page.

Documentation

Run the steps below to build documentation locally.

  • Sphinx documentation
cd docs
pip3 install -r sphinx/requirements.txt
python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
  • Doxygen
doxygen .Doxyfile

Supported Operations

rocAL can be currently used to perform the following operations either with randomized or fixed parameters:

Blend Blur (Gaussian 3x3) Brightness Color Temperature
ColorTwist Contrast Crop Crop Mirror Normalization
CropResize Exposure Modification Fisheye Lens Flip (Horizontal, Vertical and Both)
Fog Gamma Hue Jitter
Lens Correction Pixelization Raindrops Random Crop
Resize Resize Crop Mirror Rotation Salt And Pepper Noise
Saturation Snowflakes Vignette Warp Affine

Prerequisites

Build instructions

Prerequisites setup script for Linux - rocAL-setup.py

For the convenience of the developer, we here provide the setup script which will install all the dependencies required by this project.

NOTE: This script only needs to be executed once.

Prerequisites for running the script

  • Linux distribution

    • Ubuntu - 20.04 / 22.04
    • CentOS - 7 / 8
    • RedHat - 8 / 9
    • SLES - 15-SP4
  • ROCm supported hardware

  • Install ROCm with --usecase=graphics,rocm

    usage:

    python rocAL-setup.py     --directory [setup directory - optional (default:~/)]
                              --opencv    [OpenCV Version - optional (default:4.6.0)]
                              --protobuf  [ProtoBuf Version - optional (default:3.12.4)]
                              --pybind11  [PyBind11 Version - optional (default:v2.10.4)]
                              --reinstall [Remove previous setup and reinstall (default:no)[options:yes/no]]
                              --backend   [rocAL Dependency Backend - optional (default:HIP) [options:OCL/HIP]]
                              --rocm_path [ROCm Installation Path - optional (default:/opt/rocm) - ROCm Installation Required]
    

    Note:

    • ROCm upgrade requires the setup script rerun.

Using rocAL-setup.py

  • Install ROCm with --usecase=graphics,rocm

  • Use the below commands to set up and build rocAL

    • Clone rocAL source code
    git clone https://github.com/ROCm/rocAL.git
    cd rocAL
    

    Note: rocAL supports CPU and two GPU backends: OPENCL/HIP:

    • Building rocAL with default HIP backend:

      • run the setup script to install all the dependencies required
      • run the below commands to build rocAL & test
      • run tests - test option instructions
    python rocAL-setup.py
    mkdir build-hip
    cd build-hip
    cmake ../
    make -j8
    sudo cmake --build . --target PyPackageInstall
    sudo make install
    make test

Note: sudo is required to build rocAL_pybind package (only supported on HIP backend)

Note:

  • rocAL_pybind is not supported on OPENCL backend
  • rocAL cannot be installed for both GPU backends in the same default folder (i.e., /opt/rocm/)
  • if an app interested in installing rocAL with both GPU backends, then add -DCMAKE_INSTALL_PREFIX in the cmake commands to install rocAL with OPENCL and HIP backends into two separate custom folders.

Tested Configurations

  • Linux distribution
    • Ubuntu - 20.04 / 22.04
    • CentOS - 7
    • RedHat - 8 / 9
    • SLES - 15-SP4
  • ROCm: rocm-core - 5.7.0.50700-6
  • RPP - rpp & rpp-dev/rpp-devel
  • MIVisionX - mivisionx & mivisionx-dev/mivisionx-devel
  • Protobuf - V3.12.4
  • OpenCV - 4.6.0
  • FFMPEG - n4.4.2
  • RapidJSON- master
  • PyBind11 - v2.10.4
  • rocAL Setup Script - V1.1.0
  • Dependencies for all the above packages

About

The AMD rocAL is designed to efficiently decode and process images and videos from a variety of storage formats and modify them through a processing graph programmable by the user.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 78.7%
  • Python 11.7%
  • CMake 5.4%
  • Shell 1.9%
  • Dockerfile 1.0%
  • C 1.0%
  • Groovy 0.3%