ultralytics 8.0.56 PyTorch 2.0 support and minor fixes (#1538)
Co-authored-by: N-Friederich <127681326+N-Friederich@users.noreply.github.com> Co-authored-by: Uhrendoktor <36703334+Uhrendoktor@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Aman Agarwal <amanag.11@gmail.com> Co-authored-by: ExtReMLapin <3909752+ExtReMLapin@users.noreply.github.com> Co-authored-by: Nadav Eidelstein <30617226+nodeav@users.noreply.github.com>
This commit is contained in:
parent
8c8c43922c
commit
28e48be5b6
18 changed files with 149 additions and 88 deletions
|
|
@ -125,7 +125,10 @@ class YOLODataset(BaseDataset):
|
|||
self.label_files = img2label_paths(self.im_files)
|
||||
cache_path = Path(self.label_files[0]).parent.with_suffix('.cache')
|
||||
try:
|
||||
import gc
|
||||
gc.disable() # reduce pickle load time https://github.com/ultralytics/ultralytics/pull/1585
|
||||
cache, exists = np.load(str(cache_path), allow_pickle=True).item(), True # load dict
|
||||
gc.enable()
|
||||
assert cache['version'] == self.cache_version # matches current version
|
||||
assert cache['hash'] == get_hash(self.label_files + self.im_files) # identical hash
|
||||
except (FileNotFoundError, AssertionError, AttributeError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue