Xilinx is now part ofAMDUpdated Privacy Policy

VMAF Video Quality Metric Hardware Accelerator

Pulsar-VMAF is a fixed functional hardware accelerator leveraging Xilinx Alveo Cards to offer the highest computational efficiency for VMAF Video Quality Metric. It can be used to optimize the encoding ladder and to monitor video in real-time to help maintain consistent quality for all frames. 

Vendor: BLUEDOT

Last Update: Sept 10, 2021

Size: 743 MB

Container version: hubxilinx/bluedot_pulsar-vmaf-u50

Try or Buy

Obtain an entitlement to evaluate or purchase this product.


Begin a free trial and run the application example below.


Deployment Options

This application is containerized and can be easily run in a few minutes in the cloud, or on-premises

On Premises
Alveo U50
View & Buy Product
  • Xilinx Runtime: 2020.2.10.15
  • Target Platform: xilinx_u50_gen3x16_xdma_201920_3
Cloud Service
AWS
  • Xilinx Runtime: AWS AMI5
  • Target Platform:

 


Start Evaluation

Follow the instructions based on your deployment method.

Alveo U50

1.

Obtain Evaluation Access Key

Create and download the cred.json file from the Xilinx App store (https://appstore.xilinx.com/).

  • Login to the Xilinx App Store Portal
  • Click the button labeled "Manage Account" to view entitlements.
  • Click the "Access Key" link on the left side menu
  • Click the "Create an Access Key" button.
  • Download the resulting file "cred.json" to /tmp directory

2.

Host Setup

The Xilinx Runtime (XRT) host application is supported on Ubuntu 16.04 /18.04 and CentOS 7.x. With sudo access, use the following command to download and run the setup script: 

Note : This flow assumes only one target card installed in your system and it is installed in slot "0".


2.1 Clone GitHub Repository for Xilinx Base Runtime

    git clone https://github.com/Xilinx/Xilinx_Base_Runtime.git && cd Xilinx_Base_Runtime

2.2 Run the Host Setup Script

    ./host_setup.sh -v 2020.2 -p alveo-u50

Note

  • Please wait for the installation to complete.  During this time you may need press [Y] to continue the host setup.
  • If you choose to flash the FPGA, you will need to cold reboot the local machine after the installation is completed to load the new image on the FPGA.
  • The script for host setup can be used to setup other versions XRT and shell. Please check https://github.com/Xilinx/Xilinx_Base_Runtime for more details.

Install Docker (If not installed yet)

With sudo access, use the following command to run the utility script to install docker.


2.3 Go to Xilinx_Base_Runtime utilities directory

    cd Xilinx_Base_Runtime/utilities

2.4 Run the Docker installation script

    ./docker_install.sh

3.

Application Execution

Enter the following commands in a terminal window to run the application:


3.1 Setup Environment Variables by script from Xilinx_Base_Runtime

    source Xilinx_Base_Runtime/utilities/xilinx_docker_setup.sh

3.2 Pull the Docker Image

    docker pull hubxilinx/bluedot_pulsar-vmaf-u50

3.3 Run the Docker Image

    docker run -v /tmp/cred.json:/app/cred.json -v /dev/shm:/data -w /app $XILINX_DOCKER_DEVICES hubxilinx/bluedot_pulsar-vmaf-u50 
 "-i 2160_dst.mp4 -vsync 0 -i 2160.mp4 -vsync 0 -lavfi libbdvmaf=model_path=vmaf_4k_v0.6.1.json:kernel_path=u50_binary.xclbin:coreno=1:log_path=/data/test.log -f null –”

Description of command arguments:

  • -v /tmp/cred.json:/app/cred.json  - Map local cred.json dir : container dir
  • -v /dev/shm:/data -  Map the local dir : container dir for the generated output file
  • $XILINX_DOCKER_DEVICES  - Environment variable set by the host setup script

4.

Results

VMAF score for each frame is reported "/dev/shm/test.log“ 

    No     ,VMAF_SCORE,      ADM,      MPCD,      VIF0,     VIF1,     VIF2,     VIF3
       1, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       2, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       3, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       4, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       5, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       6, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       7, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       8, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
       9, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      10, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      11, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      12, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      13, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      14, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      15, 100.000000, 0.999393, -0.013368, 1.000000, 1.000000, 1.000000, 1.000000
      16,  97.566488, 0.989950,  0.016739, 0.966534, 0.971284, 0.966479, 0.956362
      17,  95.701617, 0.955964,  0.047799, 0.920853, 0.968059, 0.976636, 0.980954
      18,  91.206519, 0.915715,  0.047799, 0.888859, 0.950970, 0.964046, 0.972741
      19,  89.406490, 0.900099,  0.044391, 0.864948, 0.941914, 0.958319, 0.969590
      20,  87.550198, 0.884437,  0.044391, 0.851716, 0.933523, 0.950860, 0.964334
      21,  88.349822, 0.890306,  0.036409, 0.844602, 0.937484, 0.956597, 0.969954
      22,  87.973880, 0.902339,  0.036409, 0.831304, 0.921736, 0.936173, 0.943120
      23,  89.972499, 0.910653,  0.029094, 0.836976, 0.935244, 0.953273, 0.966493
AWS

1.

Obtain Evaluation Access Key (Get a credential file)

An access key is required to authenticate a user and grant them access to the application based on their entitlements. To obtain your account access key, follow these steps:

  • Login to the Xilinx App Store Portal
  • Click the button labeled "Manage Account" to view entitlements.
  • Click the "Access Key" link on the left side menu
  • Click the "Create an Access Key" button
  • Download the resulting file "cred.json" to the location ABC

Note: The resulting access key will enable all entitlements within your account. If you have not yet obtained entitlements from the "TRY OR BUY" section above, you must do so before following these steps for generating your access key.'


2.

Create a F1 instance

2.1 Create an instance from f1.2xlarge from community image "FPGA Dev AMI"

  • Login to AWS
  • Go to https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:
  • Search "FPGA" then select "FPGA Developer AMI"

2.2 Choose "f1.2xlarge" as instance type

If you want to try it with multiple instances of ffmpeg simultaneously, you can choose f1.4xlarge or f1.16xlarge.

The Pulsar-VMAF provides two cores per device.

Click "Review and Launch" button at the bottom of page.


2.3 Launch a F1 instance

Click "Lauch button" at the Review path

 

Select an existing key pair or create a new key pair then save it as pem file for ssh suck like "aws.pem".


2.4 Login the instance

    ```bash
ssh -i aws.pem centos@<public_ip_address>
```

You can find the public IP address of instance in the EC2 console.


3.

Setup

3.1 Environment variables

    ```bash
git clone https://github.com/Xilinx/Xilinx_Base_Runtime.git
source Xilinx_Base_Runtime/utilities/xilinx_aws_docker_setup.sh
```

3.2 Install software packages

**AWS FPGA**

    ```bash
git clone https://github.com/aws/aws-fpga.git
cd aws-fpga/
source vitis_runtime_setup.sh
cd ..
```

**Docker**

    ```bash
sudo Xilinx_Base_Runtime/utilities/docker_install.sh
```


4.

Execution

4.1 Executing docker with ffmpeg parameter

    ```bash
sudo docker run -v /var/tmp:/var/tmp -v /opt:/opt -v /${HOME}/cred.json:/app/cred.json -v ${PWD}/data:/data -w /app $XILINX_AWS_DOCKER_DEVICES hubxilinx/bluedot_pulsar-vmaf-aws-f1:latest "-i 2160_dst.mp4 -vsync 0 -i 2160.mp4 -vsync 0 -lavfi libbdvmaf=model_path=vmaf_4k_v0.6.1.json:kernel_path=f1_binary.xclbin:log_path=/data/test.xml -f null -"
```

4.2 Multiple ffmpeg instances

To execute mutiple of ffmpeg instances, just run docker command line.

Note: The Pulsar-VMAF provides two cores a device.

Run first instance

    ```bash
sudo docker run -v /var/tmp:/var/tmp -v /opt:/opt -v /${HOME}/cred.json:/app/cred.json -v ${PWD}/data:/data -w /app $XILINX_AWS_DOCKER_DEVICES hubxilinx/bluedot_pulsar-vmaf-aws-f1:latest "-i 2160_dst.mp4 -vsync 0 -i 2160.mp4 -vsync 0 -lavfi libbdvmaf=model_path=vmaf_4k_v0.6.1.json:kernel_path=f1_binary.xclbin:log_path=/data/test_1.xml -f null -"
```

Open a new terminal and run second instance

    ```bash
sudo Xilinx_Base_Runtime/utilities/docker_install.sh

sudo docker run -v /var/tmp:/var/tmp -v /opt:/opt -v /${HOME}/cred.json:/app/cred.json -v ${PWD}/data:/data -w /app $XILINX_AWS_DOCKER_DEVICES hubxilinx/bluedot_pulsar-vmaf-aws-f1:latest "-i 2160_dst.mp4 -vsync 0 -i 2160.mp4 -vsync 0 -lavfi libbdvmaf=model_path=vmaf_4k_v0.6.1.json:kernel_path=f1_binary.xclbin:log_path=/data/test_2.xml -f null -"
```