Moire-Pattern-Detection icon indicating copy to clipboard operation
Moire-Pattern-Detection copied to clipboard

Code error

Open zhenhao-huang opened this issue 2 years ago • 3 comments

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.

zhenhao-huang avatar Apr 21 '22 05:04 zhenhao-huang

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

amilkcar avatar May 08 '22 13:05 amilkcar

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

zhenhao-huang avatar May 09 '22 07:05 zhenhao-huang

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

world2025 avatar Jan 04 '23 06:01 world2025