Fix import issue with YoloV5 export models (#30)

This commit is contained in:
Drago 2022-09-06 15:37:44 -03:00 committed by GitHub
parent 8a56d64275
commit 115a454637
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -539,7 +539,7 @@ class DetectMultiBackend(nn.Module):
@staticmethod
def _model_type(p='path/to/model.pt'):
# Return model type from model path, i.e. path='path/to/model.onnx' -> type=onnx
from export import export_formats
from yolov5.export import export_formats
suffixes = list(export_formats().Suffix) + ['.xml'] # export suffixes
check_suffix(p, suffixes) # checks
p = Path(p).name # eliminate trailing separators