openseg-group / OCNet.pytorch

Please choose the openseg.pytorch project for the updated code that achieve SOTA on 6 benchmarks!
MIT License
812 stars 128 forks source link

Image pre-process in dataset #11

Open xxxfrank opened 6 years ago

xxxfrank commented 6 years ago

image The image open with cv2 is in bgr order. mean = (102.9801, 115.9465, 122.7717) also is in bgr order. my question : 1.what does this line mean?
image

2.the pretrained model resnet101 first conv layer was trained in bgr or rgb order?

I am looking forward your reply.thx

PkuRainBow commented 6 years ago

@xxxfrank I choose the method provided by https://github.com/CSAILVision/semantic-segmentation-pytorch/blob/ba3630cf5b3a23cc057912ca40c7f271ecd63849/dataset.py#L114

It seems a bug of my implementation. I will try to remove this line latter.

Ensuring that the training and testing settings the same maybe ok. I guess we can further improve the performance if we choose BGR?

The pre-trained model is provided by the https://github.com/CSAILVision/semantic-segmentation-pytorch