how to get image thru src pad of nvinfer

I want to get meta-data and corresponding frame image to create training dataset. do you know how to do.

I checked nvinfer element:

Pad Templates:
SINK template: ‘sink’
Availability: Always
Capabilities:
video/x-raw(memory:NVMM)
format: { (string)NV12 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]
video/x-raw
format: { (string)NV12 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

SRC template: ‘src’
Availability: Always
Capabilities:
video/x-raw(memory:NVMM)
format: { (string)NV12 }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

Hello,

This is not a TensorRT topic. To extract image meta-data, consider using PIL/Pilllow module.
https://pillow.readthedocs.io/en/5.3.x/