Closed xzqjack closed 7 years ago
do you using the pre-trainned model or trainned by yourself? another, the newes mxnet changed some default behavior, such as the pooling shape, so it may bring some big difference. i'm also not very sure whether io.imread is the same as cv2.imread or not.
@tornadomeet
Thanks for your reply.
I have just made a test and found that the image read by cv2.imread
is different from the image read by skimage.io.imread
about pixel values. The difference is about 20, whcih is so large that would have huge influence (maybe bad influence) on training and testing results. That means the way of reading image is a big problems in Python. Is there union choice? For example, all researchers use cv2.imread or PIL or some other ways.
By the way, i changed to use cv2.imread
and get the same results as your predict.txt
@xzqjack en, i think different image library(read) should get the same result if used in the right way. so we need to check why it comes the difference, :)
@tornadomeet
The reason is that the order of color channel is different. In cv2.imread
and skimage.io.imread
, one of them is rbg
and another is bgr
. The difference is worth paying attention to.
About converting color image to gray image, cv2
is different from skimage.io
too. There is still huge difference on some pixel values, which still affect the training results and test results(maybe some kind of adversary noise).
Hi, i have run
verification/test.sh
again with your provided data 'aligin-lfw dataset'. The new predicted result is different your verification/predict.txt and its acc is very bad.The only change is that
newest mxnet
, not your providedface_mxnet
;io.imread
instead of 'cv2.imread'Is there any import notice i ignore? Any hits will be appreciated. Thank you.