TreB1eN / InsightFace_Pytorch

Pytorch0.4.1 codes for InsightFace
MIT License
1.73k stars 423 forks source link

Disordered RGB Channels after Running "python prepare_data.py" (fixed). #35

Closed ZhaoJ9014 closed 5 years ago

ZhaoJ9014 commented 5 years ago

After running "python prepare_data.py" I can get the image data as described in your repo. However, I found that the images may have disordered RGB channels. The faces are all blue and nearly all images have this problem. I have found the issue causing this, which can be solved by simply inserting "img = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)" to line 92 right before "img = Image.fromarray(img)" in the script ./data/data_pipe.py

TreB1eN commented 5 years ago

please check on this issue