forked from meituan/YOLOv6
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggest largest when choose ap50 best conf
- Loading branch information
1 parent
f6eb2b2
commit 5ac5344
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,7 +202,7 @@ def predict_model(self, model, dataloader, task): | |
|
||
from yolov6.utils.metrics import ap_per_class | ||
p, r, ap, f1, ap_class = ap_per_class(*stats, plot=self.plot_curve, save_dir=self.save_dir, names=model.names) | ||
AP50_F1_max_idx = f1.mean(0).argmax() | ||
AP50_F1_max_idx = len(f1.mean(0)) - f1.mean(0)[::-1].argmax() -1 | ||
LOGGER.info(f"IOU 50 best mF1 thershold near {AP50_F1_max_idx/1000.0}.") | ||
ap50, ap = ap[:, 0], ap.mean(1) # [email protected], [email protected]:0.95 | ||
mp, mr, map50, map = p[:, AP50_F1_max_idx].mean(), r[:, AP50_F1_max_idx].mean(), ap50.mean(), ap.mean() | ||
|