ultralytics 8.1.40 search in Python sets {} for speed (#9450)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
30484d5925
commit
ea527507fe
41 changed files with 97 additions and 93 deletions
|
|
@ -351,7 +351,7 @@ def test_labels_and_crops():
|
|||
crop_dirs = [p for p in (save_path / "crops").iterdir()]
|
||||
crop_files = [f for p in crop_dirs for f in p.glob("*")]
|
||||
# Crop directories match detections
|
||||
assert all([r.names.get(c) in [d.name for d in crop_dirs] for c in cls_idxs])
|
||||
assert all([r.names.get(c) in {d.name for d in crop_dirs} for c in cls_idxs])
|
||||
# Same number of crops as detections
|
||||
assert len([f for f in crop_files if im_name in f.name]) == len(r.boxes.data)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue