dvlab-research / PanopticFCN

Fully Convolutional Networks for Panoptic Segmentation (CVPR2021 Oral)
Apache License 2.0
391 stars 53 forks source link

How to train it with Cityscapes? #20

Closed ding-Chen closed 3 years ago

ding-Chen commented 3 years ago

Panoptic FCN is a great job and I'm very interested in it, so I want to train it. But when I used cityscapes to train it. An error occurred: ValueError: not enough values to unpack(expected 7, got 0). I realized that the output of the model might be different from the number of classes in my dataset. So I changed some parameters in panopticfcn / config. cfg.MODEL.POSITION_HEAD.THING.NUM_CLASSES = 8 , cfg.MODEL.POSITION_HEAD.STUFF.NUM_CLASSES = 12 and cfg.MODEL.SEM_SEG_HEAD.NUM_CLASSES = 12. It's very bad that there's another error: RuntimeError: Class values must be smaller than num_classes. I can't solve this problem, so I hope you can help me solve this problem.

thanks!

yanwei-li commented 3 years ago

Hi, please make sure you have already added cityscapes panoptic-related codes. And then set the category number cfg.MODEL.POSITION_HEAD.STUFF.NUM_CLASSES and cfg.MODEL.SEM_SEG_HEAD.NUM_CLASSES to 19, which utilizes all the semantic classes here. Other experimental settings on the cityscapes dataset can be found in the paper.

ding-Chen commented 3 years ago

Thanks for your reply, I'll try again.

ruizhaoz commented 2 years ago

I have the same issue, how did you solve it? @ding-Chen. I have panoptic related file for dataset and set the class number 19.

ZhaoNan1 commented 2 years ago

I have the same issue, how did you solve it? @ding-Chen. I have panoptic related file for dataset and set the class number 19.

I have the same problem, did you solve it?