-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
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
About TP, TN, FP, FN #1201
Comments
@ferro07 you need to put breakpoints near these variables to understand what you're getting into, as these are large multidimensional matrices of 1's and 0's. I don't know what you want to do with them exactly but I doubt printing them to screen would be very useful. |
@glenn-jocher thanks for quick reply. |
@jaqub-manuel sure. Any code modifications are up to you. |
@glenn-jocher I want to talk about tp, fp, fn output to the screen, but I don't know how to modify the code. This is a difficult problem. |
@ferro07 Hi,Do you have solved this problem?I want to get the tp,fp,fn to analyze my problom,but I can not print them out to my terminal. |
@ZwNSW TP, FP are computed here: Lines 250 to 263 in c8c5ef3
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@ferro07 @jaqub-manuel good news 😃! Your original issue may now be fixed ✅ in PR #5727. This PR explicitly computes TP and FP from the existing Labels, P, and R metrics: TP = Recall * Labels
FP = TP / Precision - TP These TP and FP per-class vectors are left in val.py for users to access if they want: Line 240 in 36d12a5
To receive this update:
Thank you for spotting this issue and informing us of the problem. Please let us know if this update resolves the issue for you, and feel free to inform us of any other issues you discover or feature requests that come to mind. Happy trainings with YOLOv5 🚀! |
❔Question
Hi @glenn-jocher
Thanks for this great work.
I am trying to add Tp, Fp, Fn to the test results. Firstly, I am using this class for calling only tp : def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, fname='precision-recall_curve.png'):
On the test.py, adding tp to the # Compute statistics, but I am getting followings
raceback (most recent call last):
File "test.py", line 272, in
test(opt.data,
File "test.py", line 88, in test
s = ('%20s' + '%12s' * 6) % ('Class', 'Images', 'Targets', 'P', 'R', '[email protected]', '[email protected]:.95', 'tp')
TypeError: not all arguments converted during string formatting
Thanks in advance for your help
Additional context
The text was updated successfully, but these errors were encountered: