Parcourir la source

Unique *.cache filenames fix (#2134)

* fix #2121

* Update test.py

* Update train.py

* Update autoanchor.py

* Update datasets.py

* Update log_dataset.py

* Update datasets.py

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
5.0
train255 GitHub il y a 3 ans
Parent
révision
e9b3de463a
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. +1
    -1
      utils/datasets.py

+ 1
- 1
utils/datasets.py Voir le fichier

@@ -372,7 +372,7 @@ class LoadImagesAndLabels(Dataset): # for training/testing

# Check cache
self.label_files = img2label_paths(self.img_files) # labels
cache_path = Path(self.label_files[0]).parent.with_suffix('.cache') # cached labels
cache_path = (p if p.is_file() else Path(self.label_files[0]).parent).with_suffix('.cache') # cached labels
if cache_path.is_file():
cache = torch.load(cache_path) # load
if cache['hash'] != get_hash(self.label_files + self.img_files) or 'results' not in cache: # changed

Chargement…
Annuler
Enregistrer