Closed lvvvmd closed 5 years ago
I'm not sure, I didn't use this dataset, but I think if bgr or rgb channels are mistaken, the image would look much weirder ... You can try to manipulate the channels to have a look.
Hi all,
This is BGR format image, which is easy to verify. All images under folder /faces_emore/imgs are BGR images too.
I'm confused too. All images under folder /faces_emore/imgs are BGR format and I dont find the RGB transpose in this training code. However, I found these code in face_verify.py: image = Image.fromarray(frame[...,::-1]) #bgr to rgb
data_pipe.py +line 59 img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR).
Yeah, that's true. But it is different, right?
That's why I'm confused.
Hi, guys, after check on the codes, the conclusion is all the traning and evaluation image are all in bgr format, so the main codes are ok. The problem is I shouldn't change the format during inference, so I have updated the following codes image = Image.fromarray(frame[...,::-1]) #bgr to rgb to: image = Image.fromarray(frame) #bgr input format in face_verify.py and infer_on_video.py
Got it, thank you @TreB1eN
Yeah, that's true. But it is different, right?
- Line59 in data_pipe.py is used for preprocessing data which is validation data such as lfw, cfp_fp. This operation can transform these data from rgb to bgr. So, that means the data used for networks is in BGR format.
- However, in face_verify.py, RGB data is used. It's strange, right? It must be a transform in some place, but I dont find where it is.
That's why I'm confused.
Line92 in data_pipe.py is used for saving face images which used for training in RGB format. So, that means the data used for training is in RGB format???!!!
Hi, Thanks for your great contribute on this open source work! But I have a few questions! Firstly, I downloaded the faces_webface_112x112.zip from InsightFace Dataset zoo. Then I unzipped the data and followed your instruction to generate training imgs but I got such images! It looks like an issue about RGB channel and BGR channel. So i wonder whether its color is correct. Thank you!