ultralytics 8.0.11 bug fixes and performance improvements (#495)

Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Glenn Jocher
2023-01-19 16:16:17 +01:00
committed by GitHub
parent a86218b767
commit 6eec39162a
8 changed files with 51 additions and 7 deletions

View File

@ -493,7 +493,7 @@ class LoadImagesAndLabels(Dataset):
cache, exists = np.load(cache_path, allow_pickle=True).item(), True # load dict
assert cache['version'] == self.cache_version # matches current version
assert cache['hash'] == get_hash(self.label_files + self.im_files) # identical hash
except Exception:
except (FileNotFoundError, AssertionError):
cache, exists = self.cache_labels(cache_path, prefix), False # run cache ops
# Display cache

View File

@ -105,7 +105,7 @@ class YOLODataset(BaseDataset):
cache, exists = np.load(str(cache_path), allow_pickle=True).item(), True # load dict
assert cache["version"] == self.cache_version # matches current version
assert cache["hash"] == get_hash(self.label_files + self.im_files) # identical hash
except Exception:
except (FileNotFoundError, AssertionError):
cache, exists = self.cache_labels(cache_path), False # run cache ops
# Display cache