This commit is contained in:
Glenn Jocher
2018-09-10 15:50:37 +02:00
parent 873abaeef4
commit c1492ae4fb
4 changed files with 9 additions and 19 deletions
+1 -1
View File
@@ -11,4 +11,4 @@ gsutil cp gs://ultralytics/fresh9_5_e201.pt yolov3/checkpoints
python3 detect.py
# Test
python3 test.py -img_size 416 -weights_path checkpoints/latest.pt
python3 test.py -img_size 416 -weights_path checkpoints/yolov3.weights
+2 -2
View File
@@ -105,7 +105,7 @@ def ap_per_class(tp, conf, pred_cls, target_cls):
ap = []
for c in unique_classes:
i = pred_cls == c
nGT = sum(target_cls == c) # Number of ground truth objects
n_gt = sum(target_cls == c) # Number of ground truth objects
if sum(i) == 0:
ap.append(0)
@@ -115,7 +115,7 @@ def ap_per_class(tp, conf, pred_cls, target_cls):
tpa = np.cumsum(tp[i])
# Recall
recall = tpa / (nGT + 1e-16)
recall = tpa / (n_gt + 1e-16)
# Precision
precision = tpa / (tpa + fpa)