forked from ultralytics/yolov5
-
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.
Rename 'labels' to 'instances' (ultralytics#9066)
* Rename labels to instances * Rename labels to instances * align val
- Loading branch information
1 parent
1eae290
commit 0477dc8
Showing
2 changed files
with
4 additions
and
4 deletions.
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
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 |
---|---|---|
|
@@ -186,7 +186,7 @@ def run( | |
if isinstance(names, (list, tuple)): # old format | ||
names = dict(enumerate(names)) | ||
class_map = coco80_to_coco91_class() if is_coco else list(range(1000)) | ||
s = ('%20s' + '%11s' * 6) % ('Class', 'Images', 'Labels', 'P', 'R', '[email protected]', '[email protected]:.95') | ||
s = ('%22s' + '%11s' * 6) % ('Class', 'Images', 'Instances', 'P', 'R', '[email protected]', '[email protected]:.95') | ||
dt, p, r, f1, mp, mr, map50, map = (Profile(), Profile(), Profile()), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 | ||
loss = torch.zeros(3, device=device) | ||
jdict, stats, ap, ap_class = [], [], [], [] | ||
|
@@ -270,7 +270,7 @@ def run( | |
nt = np.bincount(stats[3].astype(int), minlength=nc) # number of targets per class | ||
|
||
# Print results | ||
pf = '%20s' + '%11i' * 2 + '%11.3g' * 4 # print format | ||
pf = '%22s' + '%11i' * 2 + '%11.3g' * 4 # print format | ||
LOGGER.info(pf % ('all', seen, nt.sum(), mp, mr, map50, map)) | ||
if nt.sum() == 0: | ||
LOGGER.warning(f'WARNING: no labels found in {task} set, can not compute metrics without labels ⚠️') | ||
|