phillipi/pix2pix

Prepare data/folder properly to evaluate labels2photos-on-cityscapes

alchemz opened this issue · 6 comments

Hi everyone,

I would like to implement the section of evaluating labels2photos-on-cityscapes.

But got very confused of what are the --cityscapes_dir, --result_dir, --output_dir

What I have now:
--cityscapes_dir: original cityscape images 256x256 without semantic map
--result_dir: predictions of generated street view images 256x256 without semantic map
--output_dir: evaluation_results.txt with on content.

I got the following as result, which does not look right at all. Can anyone tell me what is wrong with the above data/folder preparation?

Mean pixel accuracy: 0.000000
Mean class accuracy: 0.000000
Mean class IoU: 0.000000
************ Per class numbers below ************
road           : acc = 0.000000, iou = 0.000000
sidewalk       : acc = 0.000000, iou = 0.000000
building       : acc = 0.000000, iou = 0.000000
wall           : acc = 0.000000, iou = 0.000000
fence          : acc = 0.000000, iou = 0.000000
pole           : acc = 0.000000, iou = 0.000000
traffic light  : acc = 0.000000, iou = 0.000000
traffic sign   : acc = 0.000000, iou = 0.000000
vegetation     : acc = 0.000000, iou = 0.000000
terrain        : acc = 0.000000, iou = 0.000000
sky            : acc = 0.000000, iou = 0.000000
person         : acc = 0.000000, iou = 0.000000
rider          : acc = 0.000000, iou = 0.000000
car            : acc = 0.000000, iou = 0.000000
truck          : acc = 0.000000, iou = 0.000000
bus            : acc = 0.000000, iou = 0.000000
train          : acc = 0.000000, iou = 0.000000
motorcycle     : acc = 0.000000, iou = 0.000000
bicycle        : acc = 0.000000, iou = 0.000000

you should point cityscapes_dir to the root cityscapes directory which has subfolders for the frames as well as the semantic maps.

@tinghuiz Thank you very much for the reply.

The following is my current directory structure.
.
├── evaluated_results
│   └── evaluation_results.txt
├── original_cityscapes
│   ├── real_frames
│   │   ├── 10_real_B.png
│   │   └── 1_real_B.png
│   └── real_maps
│   ├── 10_real_A.png
│   └── 1_real_A.png
└── predicted_cityscapes
└── fake_frames
├── 10_fake_B.png
└── 1_fake_B.png

--cityscapes_dir == original_cityscapes
--result_dir == predicted_cityscapes
--output_dir == evaluated_results

I wonder if I need to change code somewhere to load the folders properly.

I do know how to change the cityscapes.py script to load the images properly

Are your predictions following the original Cityscapes naming convention (e.g., frankfurt_000001_038418_leftImg8bit.png)?

you also shouldn't change the names of the original frames and maps.

@tinghuiz In this case, I will change the name back to the original format. thanks for the advice!