MarsTechHAN / keras2ncnn

A keras h5df to ncnn model converter
MIT License
89 stars 19 forks source link

Not same as the original model result #13

Closed rose-jinyang closed 3 years ago

rose-jinyang commented 3 years ago

Hello How are you? Thanks for your continuous updating. I converted a keras model for predicting a liveness score of face, which is a binary classification model in general. But the result from the ncnn model is NOT same as the original keras model. In other words, the result from the ncnn model is always 1.0 for both real and fake face images. I send the original keras model, the inference script and sample images. https://we.tl/t-A0orRSIWn8 Please check and fix the issue asap. Thanks.

rose-jinyang commented 3 years ago

Hi How are you? Not yet?

MarsTechHAN commented 3 years ago

It should work since f316f32. I find a bug on translation of the fused activation, I think that's the cause. I also compare the output from the ncnn and keras, they yield almost the same. (You can try the new debugger for yourself).

rose-jinyang commented 3 years ago

Thanks

rose-jinyang commented 3 years ago

Hi I checked but the result from the new ncnn model is too different from the original model.

The results from the Keras model are the following: the real face score: 0.31723082 the fake face score: 0.1382943

The results from the NCNN model are the following: the real face score: 0.68066406 the fake face score: 0.7392578

I send the original Keras model, the converted NCNN model, and the inference scripts. https://we.tl/t-vJESHtg4QF Could u check on your side again? Thanks