Main Content

Deploy Semantic Segmentation Network Using Dilated Convolutions on FPGA

This example shows how to deploy a trained semantic segmentation network that uses dilated convolutions to a Xilinx® Zynq® Ultrascale+™ ZCU102 SoC development kit. Semantic segmentation networks like DeepLab [1] make extensive use of dilated convolutions, also known as atrous convolutions because they can increase the receptive field of the layer without increasing the number of parameters or computations.

A semantic segmentation network classifies every pixel in an image,which results in an image that is segmented by class. Applications for semantic segmentation include road segmentation for autonomous driving and cancer cell segmentation for medical diagnosis.

The network attached to this example was created in the example Get Started with Semantic Segmentation Using Deep Learning (Computer Vision Toolbox).

To obtain an improved frames per second (FPS) performance, you can quantize the network. This example shows how to calibrate and deploy a quantized network and then compare the performance between the quantized network and a single data type network.

Load the Pretrained Network

To load the pretrained semantic segmentation network, enter:

load("trainedSemanticSegmentationNet.mat")

Use the analyzeNetwork function to view a graphical representation of the network and detailed parameter settings for the layers in the network.

analyzeNetwork(net)

Define FPGA Board Interface

Define the target FPGA board programming interface by using the dlhdl.Target object. Specify that the interface is for a Xilinx board with an Ethernet interface.

hTarget = dlhdl.Target('Xilinx','Interface','Ethernet');

To use the JTAG interface, install Xilinx Vivado® Design Suite 2022.1. To set the Xilinx Vivado tool path, enter:

hdlsetuptoolpath('ToolName', 'Xilinx Vivado', 'ToolPath', 'C:\Xilinx\Vivado\2022.1\bin\vivado.bat');

Prepare Network for Deployment

Prepare the network for deployment by creating a dlhdl.Workflow object and specifying the network and bitstream name. Ensure that the bitstream name matches the data type and FPGA board. In this example, the target FPGA board is the Xilinx ZCU102 SOC board and the bitstream uses a single data type.

wfObj = dlhdl.Workflow('network', net, 'Bitstream', 'zcu102_single','Target',hTarget);

To run the example on a Xilinx ZC706 board, enter:

hW = dlhdl.Workflow('Network', snet, 'Bitstream', 'zc706_single','Target',hTarget);

Compile Network

Run the compile method of the dlhdl.Workflow object to compile the network and generate the instructions, weights, and biases for deployment. Because the total number of frames exceeds the default value of 30, set the InputFrameNumberLimit to 64 to run predictions in chunks of 64 frames to prevent timeouts.

dn = compile(wfObj,'InputFrameNumberLimit',64)
### Compiling network for Deep Learning FPGA prototyping ...
### Targeting FPGA bitstream zcu102_single.
### An output layer called 'Output1_softmax' of type 'nnet.cnn.layer.RegressionOutputLayer' has been added to the provided network. This layer performs no operation during prediction and thus does not affect the output of the network.
### Optimizing network: Fused 'nnet.cnn.layer.BatchNormalizationLayer' into 'nnet.cnn.layer.Convolution2DLayer'
### Notice: The layer 'imageinput' of type 'ImageInputLayer' is split into an image input layer 'imageinput' and an addition layer 'imageinput_norm' for normalization on hardware.
### The network includes the following layers:

### Notice: The layer 'softmax' with type 'nnet.cnn.layer.SoftmaxLayer' is implemented in software.
### Notice: The layer 'Output1_softmax' with type 'nnet.cnn.layer.RegressionOutputLayer' is implemented in software.
### Compiling layer group: conv_1>>conv_4 ...
### Compiling layer group: conv_1>>conv_4 ... complete.

### Allocating external memory buffers:

          offset_name          offset_address     allocated_space  
    _______________________    ______________    __________________

    "InputDataOffset"           "0x00000000"     "1024.0 kB"       
    "OutputResultOffset"        "0x00100000"     "1024.0 kB"       
    "SchedulerDataOffset"       "0x00200000"     "80.0 kB"         
    "SystemBufferOffset"        "0x00214000"     "288.0 kB"        
    "InstructionDataOffset"     "0x0025c000"     "92.0 kB"         
    "ConvWeightDataOffset"      "0x00273000"     "84.0 kB"         
    "EndOffset"                 "0x00288000"     "Total: 2592.0 kB"

### Network compilation complete.
dn = struct with fields:
             weights: [1×1 struct]
        instructions: [1×1 struct]
           registers: [1×1 struct]
    syncInstructions: [1×1 struct]
        constantData: {{}  [1×4096 single]}
             ddrInfo: [1×1 struct]
       resourceTable: [6×2 table]

Program Bitstream onto FPGA and Download Network Weights

To deploy the network on the Xilinx ZCU102 SoC hardware, run the deploy method of the dlhdl.Workflow object. This function uses the output of the compile function to program the FPGA board and download the network weights and biases. The deploy function programs the FPGA device and displays progress messages, and the required time to deploy the network.

deploy(wfObj)
### Programming FPGA Bitstream using Ethernet...
### Attempting to connect to the hardware board at 172.21.88.150...
### Connection successful
### Programming FPGA device on Xilinx SoC hardware board at 172.21.88.150...
### Attempting to connect to the hardware board at 172.21.88.150...
### Connection successful
### Copying FPGA programming files to SD card...
### Setting FPGA bitstream and devicetree for boot...
# Copying Bitstream zcu102_single.bit to /mnt/hdlcoder_rd
# Set Bitstream to hdlcoder_rd/zcu102_single.bit
# Copying Devicetree devicetree_dlhdl.dtb to /mnt/hdlcoder_rd
# Set Devicetree to hdlcoder_rd/devicetree_dlhdl.dtb
# Set up boot for Reference Design: 'AXI-Stream DDR Memory Access : 3-AXIM'
### Programming done. The system will now reboot for persistent changes to take effect.
### Rebooting Xilinx SoC at 172.21.88.150...
### Reboot may take several seconds...
### Attempting to connect to the hardware board at 172.21.88.150...
### Connection successful
### Programming the FPGA bitstream has been completed successfully.
### Loading weights to Conv Processor.
### Conv Weights loaded. Current time is 28-Aug-2024 15:57:01

Load Test Image

Read the example image.

imgTest = imread('triangleTest.jpg');
figure
imshow(imgTest)

Run Prediction for Test Image

Segment the test image using semanticseg_FPGA and display the results using labeloverlay.

networkInputSize = net.Layers(1).InputSize(1:2);
imgTestSize = size(imgTest);

assert(all(mod(imgTestSize(1:2), networkInputSize)) == 0, 'The 2D image input size should be a multiple of network input size');

numberOfBlocks = imgTestSize./networkInputSize;
totalBlocks = prod(numberOfBlocks);

splitImage = mat2cell(imgTest, networkInputSize(1)*ones(1, numberOfBlocks(1)), networkInputSize(1)*ones(1, numberOfBlocks(2)));
multiFrameInput = zeros([networkInputSize 1 totalBlocks]);
for i=1:totalBlocks
    multiFrameInput(:,:,:,i) = splitImage{i};
end

multiFrameInput = dlarray(multiFrameInput,'SSCB');
result = semanticseg_FPGA(multiFrameInput, wfObj.Network, wfObj);
### Finished writing input activations.
### Running in multi-frame mode with 64 inputs.


              Deep Learning Processor Profiler Performance Results

                   LastFrameLatency(cycles)   LastFrameLatency(seconds)       FramesNum      Total Latency     Frames/s
                         -------------             -------------              ---------        ---------       ---------
Network                     253840                  0.00115                      64           16252946            866.3
    imageinput_norm           7511                  0.00003 
    conv_1                   25842                  0.00012 
    conv_2                   96988                  0.00044 
    conv_3                   97253                  0.00044 
    conv_4                   26227                  0.00012 
 * The clock frequency of the DL processor is: 220MHz

The performance of the single data type network is 866.3 frames per second. Concatenate the images to highlight the triangles identified in the input image.

concatenatedResult = [];
for i=1:numberOfBlocks(2)
    subset = result(:,:,numberOfBlocks(1)*(i-1)+1:i*numberOfBlocks(1));
    verticalConcatenation = [];
    for j=1:numberOfBlocks(1)
        verticalConcatenation = [verticalConcatenation; subset(:,:,j)];
    end
    concatenatedResult = [concatenatedResult verticalConcatenation];
end

croppedFinal = labeloverlay(imgTest, concatenatedResult);
figure
imshow(croppedFinal)

Prepare the Quantized Network for Deployment

Load the data. The data set includes 32-by-32 triangle images.

dataFolder = fullfile(toolboxdir('vision'),'visiondata','triangleImages');
imageFolderTrain = fullfile(dataFolder,'trainingImages');

Create an image datastore for the images by using an imageDatastore object.

imdsTrain = imageDatastore(imageFolderTrain);

Create a quantized network by using dlquantizer. Set the target execution environment to FPGA.

dlQuantObj = dlquantizer(net,'ExecutionEnvironment','FPGA');

Use the calibrate function to exercise the network and collect range information for the learnable parameters in the network layers.

dlQuantObj.calibrate(imdsTrain); 

Prepare the network for deployment by creating a dlhdl.Workflow object. Specify the network and bitstream name. Ensure that the bitstream name matches the data type and FPGA board. In this example the target FPGA board is the Xilinx ZCU102 SOC board. The bitstream uses an int8 data type.

wfObj_int8 = dlhdl.Workflow('Network', dlQuantObj, 'Bitstream', 'zcu102_int8', 'Target', hTarget);

Compile and Deploy the Quantized Network

Run the compile method of the dlhdl.Workflow object to compile the network and generate the instructions, weights, and biases for deployment. Because the total number of frames exceeds the default value of 30, set the InputFrameNumberLimit to 64 to run predictions in chunks of 64 frames to prevent timeouts.

dn = compile(wfObj_int8,'InputFrameNumberLimit',64)
### Compiling network for Deep Learning FPGA prototyping ...
### Targeting FPGA bitstream zcu102_int8.
### An output layer called 'Output1_softmax' of type 'nnet.cnn.layer.RegressionOutputLayer' has been added to the provided network. This layer performs no operation during prediction and thus does not affect the output of the network.
### Optimizing network: Fused 'nnet.cnn.layer.BatchNormalizationLayer' into 'nnet.cnn.layer.Convolution2DLayer'
### The network includes the following layers:

### Notice: The layer 'imageinput' with type 'nnet.cnn.layer.ImageInputLayer' is implemented in software.
### Notice: The layer 'softmax' with type 'nnet.cnn.layer.SoftmaxLayer' is implemented in software.
### Notice: The layer 'Output1_softmax' with type 'nnet.cnn.layer.RegressionOutputLayer' is implemented in software.
### Compiling layer group: conv_1>>conv_4 ...
### Compiling layer group: conv_1>>conv_4 ... complete.

### Allocating external memory buffers:

          offset_name          offset_address     allocated_space  
    _______________________    ______________    __________________

    "InputDataOffset"           "0x00000000"     "512.0 kB"        
    "OutputResultOffset"        "0x00080000"     "512.0 kB"        
    "SchedulerDataOffset"       "0x00100000"     "0.0 kB"          
    "SystemBufferOffset"        "0x00100000"     "88.0 kB"         
    "InstructionDataOffset"     "0x00116000"     "52.0 kB"         
    "ConvWeightDataOffset"      "0x00123000"     "28.0 kB"         
    "EndOffset"                 "0x0012a000"     "Total: 1192.0 kB"

### Network compilation complete.
dn = struct with fields:
             weights: [1×1 struct]
        instructions: [1×1 struct]
           registers: [1×1 struct]
    syncInstructions: [1×1 struct]
        constantData: {}
             ddrInfo: [1×1 struct]
       resourceTable: [6×2 table]

To deploy the network on the Xilinx ZCU102 SoC hardware, run the deploy method of the dlhdl.Workflow object. This function uses the output of the compile function to program the FPGA board and download the network weights and biases. The deploy function programs the FPGA device and displays progress messages, and the required time to deploy the network.

deploy(wfObj_int8)
### Programming FPGA Bitstream using Ethernet...
### Attempting to connect to the hardware board at 172.21.88.150...
### Connection successful
### Programming FPGA device on Xilinx SoC hardware board at 172.21.88.150...
### Attempting to connect to the hardware board at 172.21.88.150...
### Connection successful
### Copying FPGA programming files to SD card...
### Setting FPGA bitstream and devicetree for boot...
# Copying Bitstream zcu102_int8.bit to /mnt/hdlcoder_rd
# Set Bitstream to hdlcoder_rd/zcu102_int8.bit
# Copying Devicetree devicetree_dlhdl.dtb to /mnt/hdlcoder_rd
# Set Devicetree to hdlcoder_rd/devicetree_dlhdl.dtb
# Set up boot for Reference Design: 'AXI-Stream DDR Memory Access : 3-AXIM'
### Programming done. The system will now reboot for persistent changes to take effect.
### Rebooting Xilinx SoC at 172.21.88.150...
### Reboot may take several seconds...
### Attempting to connect to the hardware board at 172.21.88.150...
### Connection successful
### Programming the FPGA bitstream has been completed successfully.
### Loading weights to Conv Processor.
### Conv Weights loaded. Current time is 28-Aug-2024 15:59:49

Run Prediction

Segment the test image using semanticseg_FPGA and display the results using labeloverlay.

networkInputSize = net.Layers(1).InputSize(1:2);
imgTestSize = size(imgTest);


assert(all(mod(imgTestSize(1:2), networkInputSize)) == 0, 'The 2D image input size should be a multiple of network input size');

numberOfBlocks = imgTestSize./networkInputSize;
totalBlocks = prod(numberOfBlocks);


splitImage = mat2cell(imgTest, networkInputSize(1)*ones(1, numberOfBlocks(1)), networkInputSize(1)*ones(1, numberOfBlocks(2)));
multiFrameInput = zeros([networkInputSize 1 totalBlocks]);
for i=1:totalBlocks
    multiFrameInput(:,:,:,i) = splitImage{i};
end

multiFrameInput = dlarray(multiFrameInput,'SSCB')
multiFrameInput = 
  32(S) × 32(S) × 1(C) × 64(B) dlarray


(:,:,1,1) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   236   255   251   245   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   246   255   237   255   255   244   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   246   255   255   247   255   243   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   252   245   255   252     0   255   241   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   245   248   255   248     0     3   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   237   255    12   253     0   246   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248     0   242   255     0   253   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   252   251   255     0   255   255     0   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   254   251   255   247   248   255   253   242   255     0   236   255   255   246     0   240   255   239   254   255   243   249   255
   255   255   255   255   255   255   255   255   242   255   255   255   255   255   248   255   255     0   255   255   238   255   254    18   255   248   255   242   241   255   255   242
   255   255   255   255   255   255   255   255   255   252   255   242   250   236   255   250   243     8   254   252   255   254   255   240     0   244   236   255   254   255   243   255
   255   255   255   255   255   255   255   255   251   249   255   255   255   255   234   255    13   255   244   255   253   244   254   255     8   255   255   245   251   249   246   255
   255   255   255   255   255   255   255   255   248   255   255   248   252   251   255     0   243   255   250   249   255   255   252   255     0   246   255   255   252   255   255   255
   255   255   255   255   255   255   255   255   250   255   252   249   255   255   255     5   253   252   255   255   253   244   238   255   255     0   246   232   255   255   243   251
   255   255   255   255   255   255   255   255   255   253   253   255   242   254     0   254   255   234   255   232   255   253    17     0    11     0   255   255   241   255   252   255
   255   255   255   255   255   255   255   255   255   247   255   249   255   252    10   255     9     0     5     2     0     2   251   255   251   253   255   246   255   253   250   255
   255   255   255   255   255   255   255   255   255   252   255   255   245     0    15     0   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   243   255   248   253   255   239   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   251   255   250   255   240   246   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   243   255   255   255   255   243   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   254   255   255   236   254   241   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   244   255   250   255   255   255   255   248   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   238   254   255   249   249   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   247   250   255   252   255   249   249   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,2) =

   255   243   254   250   253   255   246   255   255   255   255   254   255   253   255   254   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   251   255   255   255   255   244   255   254   254   243   244   255   255   247   252   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   246   255   242   254   239   255   246   253   253   255   255   255   219   255   255   252   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   248   242   255   255   255   253   244   250   255   255   255   245   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   246   255   243   251   255   250    19   239   253   255   251   252   255   255   223   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   254   255   249   249   255     0     6   248   255   251   255   251   239   255   245   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   250   255   250   250   255     0   243   255     8     7   242   251   248   255   254   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   253   248   255   249     0   255   237   253   249     7   248   255   255   254   254   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   249   255   245   250   255     2   246   255   255     8   247   255   255   242   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   241   255   255   232    14   255     0     0   248   255   254   255   251   255   251   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   249   255   250   247     8   236     2   255   255   247   249   255   236   253   252   252   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   254   250   255    13     0   252   254   251   252   255   233   255   255   249   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   249   253   255   243     0   255   255   249   255   255   236   255   255   242   252   246   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   253   255   255   252   242   243   231   252   255   255   252   255   252   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   252   255   255   242   249   244   255   255   255   255   250   246   255   236   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   246   255   255   255   246   248   250   248   255   255   248   255   255   246   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,3) =

   255   255   255   255   255   255   255   255   244   255   255   251   255   255   243   255   255   236   250   255   250   255   240   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   249   246   250   255   255   253   245   255   253   253     0   255   255   249   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   251   250   255   255   242   255   240   255   255   255     0    19   243   243   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   252   252   255   253   251   255   255   249   235     0   255   244    10   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   251   255   255   235   251   255   245   249   255   255     0   255   255     0   255   248   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   248   254   255   255   255   255   243   255   254     0   255   245   243     0   253   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   239   255   255   251   255   241     0   255   249   255   255     0   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   246   255   240   255   250   255   241    13   253   248   255   241   255   255     0   252   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   254   252   255   255   242   255     0   255   244   255   255   255   244    10   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   243   255   255   255   249   255     0    11     4     8    12     0     0    13     0   250   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   250   249   237   255   255   252   253   255   250   250   255   255   255   239   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   248   255   255   244   255   240   255   242   246   255   255   255   246   236   255   253   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   249   255   249   255   238   255   255   255   243   251   255   255   255   245   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   249   245   246   255   255   245   255   249   243   255   251   255   254   254   249   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   241   235   255   239   255   255   255   255   255   255   252   253   251   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   247   255   255   255   251   255   252   255   248   255   253   255   242   255   249   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,4) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   250   255   250   255   253   254   249   248   255   247   252   255   247   255   252
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   247   255   248   255   246   235   255   255   255   255   255   247   246   255   255   250
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   243   255   255   240   255     0   253   237   255   255   251   250   248   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   253   237   255   237   250   255     0     0   255   255   244   250   255   255   253   254
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   250   255   255   238   246    15   253     0   238   255   255   252   246   255   253
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   255   235   255   255    17   237   255     1   255   255   241   255   255   255   246
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   247   255   255   251   246     0   254   251     0   252   251   255   255   245   251   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   252   243   254    10   245   255   255     6   249   255   255   246   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   240   255   255     0   254   254   255   255     0   255   251   255   255   248   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   233   255   250     0   255   255   237   251   232    35   250   241   255   255   255   253
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   254     0     6     0     8    13     3     0   240   255   255   243   251   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   250   255   255   253   249   255   255   246   255   236   255   249   254   255   255   242
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   237   250   252   255   241   255   250   240   255   254   250   247   246   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   255   255   255   255   249   251   255   255   255   255   255   255   255   248   245
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   250   255   243   252   250   255   245   255   253   241   248   247   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   254   255   255   250   255   255   246   255   255   250   255   255   252   255   251   253
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,5) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   247   246   253   255   255   252   255   254   255   243   247   255   255   255   251
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   249   255   255   246   240   253   255   255   255   243   255   255   247   251   255   253
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   249   255   246   250   255   255   236   254   255   252   255   243   250   255   248   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   245   255   255   230   252   255   248   255   249   242   255   255   255     0     3
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   244   255   255   245   250   245   255   247   255     0     0     3   255     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   241   255   251   253   255   250   255   255   245     0    13   255   254   244   252     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   246   250   255   233   255   234     4    17   247   241   249   253   255   243    15
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   246   255   250   255   255   249   255   251     0   255   255   242   255   238   255     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255     0   255   255   245   255   254     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   249   245     0   252   255   251   255     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255     4   236   244   253     6
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   238   255   240     0   255   255   255     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   252    17   252   251     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   255   235   253     5   255     1
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   247   255   255   252   250     0     0
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   249   255   255   246   249   255   245     5


(:,:,1,6) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   255   255   255   244   249   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   243   244   253   245   255   246   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   254   255   255   255   255   241   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255     0   255   250   239   251   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255     0     0   252   255   255   240   250   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255     0   255   255     0   242   255   249   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255    11   241   250     6   255   240   254   251   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255     0   255   255   251     0   255   246   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   251   255   241   255   255   241     7   255   255   249   255   241     0   254   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   245   235   255   255   255   251     0   255   249   253     0    18   255   251   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   244   255   255   255   242   244   255     0   250     7     9   254   245   247   252   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   253   255   244   255   255     0     2     0   255   247   248   255   248   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   245   255   250   255   245    11   255   255   243   255   249   255   249   255   247   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   240   255   252   255   245   250   235   255   252   255   255   255   245   253   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   251   249   242   255   255   255   255   242   255   249   242   255   255   250   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   254   246   255   255   255   245   255   249   249   254   255   252   255   250   246   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,7) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   254   255   251   251   255   245   255   250   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   254   242   253   255   255   254   250   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   251   254   248   245   255   243   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   249   247   244   255   255   255   248   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   250   255   255   243   249   250   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   252   242   239   255     0    11     0   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   238   255     0    21     0   255   254     2   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   236     6   253   255   252     0   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   251   255     7   253   255     0   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   251   255     0   251     0   251   251   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   239     0   255     0   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   246   255   255   255     2   255   245   248   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   247   255   240     0   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   243   247   255   243   255   253   247   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   248   255   251   245   255   255   249   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   241   255   255   252   255   255   250   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,8) =

   255   255   255   255   255   255   255   255   255   254   248   255   245   252   255   254   255   249   255   255   247   247   254   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   244   255   255   255   255   255   234     6   245   255   246   235   255   255   255   249   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   245   249   248     3     1   253   255   255   255   246   255   250   253   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   252   244   252   255   255    11   255   253     0   245   242   254   248   244   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   240   255     0   239   253   255     0   250   255   251   255   247   255   245   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   246   255   252   242    16   255   243   255     8   251   244   249   253   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   252   255   254    13   233   237   255   252     0   255   255   255   255   241   251   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   237     7   248   255   255   246   255   253     0   255   239   255   255   247   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255     2     0     7     0   255   243   255   250    12   255   250   255   255   244   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   244   255   251   244   255     8     0    10     3     0   248   255   247   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   249   249   250   255   255   252   247   255   239   255   245   249   255   255   250   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   247   247   255   255   235   255   255   255   245   255   255   255   255   240   241   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   240   253   255   241   251   253   255   255   246   243   255   255   255   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   250   255   255   223   255   253   255   255   255   255   252   246   255   255   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   250   254   246   255   255   253   249   252   255   241   248   255   255   255   242   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   254   255   249   243   253   255   255   254   255   247   255   255   255   245   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,9) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   250   255   247   248   255   255   248   251   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   249   255   255   224   255   255   253   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   240   255   255   255   249   242   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   245   255   255   244   250   255   255   249   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   253   255   255   250   255   240   255    17   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   247   255   251   255     0     0   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   248   253     0   252    12   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   252   255     4   244   255     0   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   251   254   255     0   246   255   255   249     0   250   255   255   252   254   250   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   248   255   247    19   246   238   255    11   249   244   249   255   255   253   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   253   255   254   249   254     0    26   252     0   255   255   255   254   243   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   238   255   255   254   242     0    11   255   255   246   255   255   255   238   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   254   255   255   250   248   255   255   255     6   216   255   255   255   244   255   254   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   242   255   255   236   255   255   236   255   255   255   250   244   255   252   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   253   255   247   255   255   255   255   247   243   241   255   255   255   255   246   253   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   233   255   243   247   255   255   253   255   245   255   247   243   255   255   251   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255


(:,:,1,10) =

   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   251   255   243   255   242   255   255   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   253   255   255   242   255   255   255   244   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   241   255   255   239   251   251   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   253   250   255   255   255   255   253   255   255   255   255   255   255   255   255   255
   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   255   243   255   250   235   255   255   255   244   255   255   255   255   255   255   255   255
result_int8 = semanticseg_FPGA(multiFrameInput, wfObj_int8.Network, wfObj_int8);
### Finished writing input activations.
### Running in multi-frame mode with 64 inputs.


              Deep Learning Processor Profiler Performance Results

                   LastFrameLatency(cycles)   LastFrameLatency(seconds)       FramesNum      Total Latency     Frames/s
                         -------------             -------------              ---------        ---------       ---------
Network                      85470                  0.00034                      64            5473553           2923.1
    conv_1                   13598                  0.00005 
    conv_2                   29710                  0.00012 
    conv_3                   29907                  0.00012 
    conv_4                   12236                  0.00005 
 * The clock frequency of the DL processor is: 250MHz

The quantized network has a performance of 2923.1 frames per second. Concatenate the images to highlight the triangles identified in the input image.

concatenatedResult_int8 = [];
for i=1:numberOfBlocks(2)
    subset = result_int8(:,:,numberOfBlocks(1)*(i-1)+1:i*numberOfBlocks(1));
    verticalConcatenation_int8 = [];
    for j=1:numberOfBlocks(1)
        verticalConcatenation_int8 = [verticalConcatenation_int8; subset(:,:,j)];
    end
    concatenatedResult_int8 = [concatenatedResult_int8 verticalConcatenation_int8];
end

croppedFinal_int8 = labeloverlay(imgTest, concatenatedResult_int8);
figure
imshow(croppedFinal_int8)

References

[1] Chen, Liang-Chieh, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. “Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation.” arXiv, August 22, 2018. http://arxiv.org/abs/1802.02611.

See Also

| | | | | |