How to get images with ground truth information in Unreal

Hi, everyone.
I want to generate some synthetic images with Unreal engine with ground truth information. These images will be used in computer vision fields. In fact, I have already seen some guys did this kind of things. Like this.

It can generate not only realistic images, but also object mask, normal and depth information. This ground truth information are useful for train and test computer vision algorithms.

I know this kind of information are store in G-buffers of Unreal engine, but I have not idea about how to access and where to start.
I’m not professional on Unreal engine. Does anyone has any idea about how to realize this kind of thing, or is there any document or tutorial introduce how to do it?
I’m grateful for any suggestion!