isl-org / PhotorealismEnhancement

Code & Data for Enhancing Photorealism Enhancement
1.3k stars 104 forks source link

Datasets, txt and csv files. #60

Open Baronins opened 7 months ago

Baronins commented 7 months ago

Hi!

I need assistance with setting up the system. As I am pretty new to programming, I kinda do not understand how to prepare correct .txt files and .csv files. I have prepared everything else, just need assistance to get the system going.

Can someone provide an example how the files should look and where to put them, and where I have to replace the paths in the code?

Much appreciated!

Baronins commented 7 months ago

What file format has to be the G-Buffers?

The fake g-buffer generator makes them .npz

If I have the G-Buffer layers as .png, should I compress them to .npz? And add the path to that .npz in the text file?

stefanos50 commented 5 months ago

Hi, depending on the resolution and the number of channels that each G-Buffer has, you need a tensor of size HxWxC. Let's say you have five images in 960x540 resolution and three channels each; then you should provide the model with a G-Buffer tensor/matrix of size 540x960x15. You should load the (.png) images (keep only one channel for grayscale G-Buffers) and stack them always in a specific sequence in a single matrix, and then export the result as a npz array (numpy).

The txt files should contain for each set of data (each row) the paths as: Frame, Robust label maps, G-Buffers, Semantic Segmentation.

The .csv files are generated during the patch-matching procedure that is already described in the readme. For the procedures described above, you need to create your own small scripts.

Depending on your semantic segmentation labeling scheme, you may also need to modify the mask mapping and grouping inside the \epe\dataset\pdf.py.