补全yolov5的代码

This commit is contained in:
2025-03-13 17:48:59 +08:00
parent 6daea23f0a
commit 9d369b9898
42 changed files with 8571 additions and 171 deletions

View File

@ -7,7 +7,7 @@ import numpy as np
import torch
import torch.nn as nn
from utils.downloads import attempt_download
from yolov5.utils.downloads import attempt_download
class Sum(nn.Module):
@ -91,7 +91,7 @@ def attempt_load(weights, device=None, inplace=True, fuse=True):
Example inputs: weights=[a,b,c] or a single model weights=[a] or weights=a.
"""
from models.yolo import Detect, Model
from yolov5.models.yolo import Detect, Model
model = Ensemble()
for w in weights if isinstance(weights, list) else [weights]: