Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code error #23

Open
zhenhao-huang opened this issue Apr 21, 2022 · 3 comments
Open

Code error #23

zhenhao-huang opened this issue Apr 21, 2022 · 3 comments

Comments

@zhenhao-huang
Copy link

zhenhao-huang commented Apr 21, 2022

1.Data is augmented by three times, so line 123 of the train.py should be

positiveCount = len(positiveImageFiles)*3
negativeCount = len(negativeImageFiles)*3

2.The amount of FN and FP is reversed.

@amilkcar
Copy link

amilkcar commented May 8, 2022

Hi @zhenhao-huang , what you did with this "2.The amount of FN and FP is reversed."

@zhenhao-huang
Copy link
Author

I changed their location.

if y_test[i] == 0:
    if np.argmax(model_out[i, :]) == y_test[i]:
        TP = TP + 1
    else:
        FP = FP + 1
else:
    if np.argmax(model_out[i, :]) == y_test[i]:
        TN = TN + 1
    else:
        FN = FN + 1

@tkone2018
Copy link

@zhenhao-huang 你好,请问可以分享下你能够跑通的代码吗 包括推理一张图片的demo,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants