Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kalen Michael <kalenmike@gmail.com>
This commit is contained in:
Glenn Jocher
2023-01-09 23:22:33 +01:00
committed by GitHub
parent 6feba17760
commit 422c49d439
97 changed files with 224 additions and 757 deletions

View File

@ -1,3 +1,5 @@
# Ultralytics YOLO 🚀, GPL-3.0 license
import json
import platform
from collections import OrderedDict, namedtuple
@ -65,6 +67,7 @@ class AutoBackend(nn.Module):
names = model.module.names if hasattr(model, 'module') else model.names # get class names
model.half() if fp16 else model.float()
self.model = model # explicitly assign for to(), cpu(), cuda(), half()
pt = True
elif pt: # PyTorch
from ultralytics.nn.tasks import attempt_load_weights
model = attempt_load_weights(weights if isinstance(weights, list) else w,

View File

@ -1,4 +1,4 @@
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license
# Ultralytics YOLO 🚀, GPL-3.0 license
"""
Common modules
"""

View File

@ -1,3 +1,5 @@
# Ultralytics YOLO 🚀, GPL-3.0 license
import contextlib
from copy import deepcopy