Because prediction["probability"] stores values of probability in string type, not float
when finding the highest probability with the code below, it will find that value like 3.4567e-05is greater than 0.9999 and results in wrong name of the predicted class.
Because
prediction["probability"]
stores values of probability instring
type, notfloat
when finding the highest probability with the code below, it will find that value like3.4567e-05
is greater than0.9999
and results in wrong name of the predicted class.https://github.com/blue-oil/blueoil/blob/446f9eb362cc863ea05914c2228252c113117fa7/lmnet/lmnet/utils/predict_output/output.py#L222
To solve it, I think the code below should convert probability to float.
https://github.com/blue-oil/blueoil/blob/446f9eb362cc863ea05914c2228252c113117fa7/lmnet/lmnet/utils/predict_output/output.py#L221