Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Unable to up deploy a custom trained yolov5 model on robotflow

Đang mở
#351 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python, pytorch

Hướng nghiên cứu

Bắt đầu từ version.deploy(model_type, model_path, filename) và lần theo lệnh gọi torch.load cho các trọng số yolov5. Tái hiện lỗi với đường dẫn mô hình tùy chỉnh được cung cấp và so sánh với ví dụ torch.hub.load đang hoạt động. Hoàn thành khi có thể tải lên thành công tệp trọng số yolov5 được huấn luyện tùy chỉnh thông qua deploy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

``
It has been impossible to upload a yolov5 model trained on a custom dataset. My folder


rf = roboflow.Roboflow(api_key="..")
project = rf.workspace().project("...")

version = project.version(2)

version.deploy("yolov5", "yolov5/runs/train/exp2")

I've got this error

popi

It' an issue that arise as resulting of calling the function torch.load on the parameter : os.path.join(model_path, filename). This function attempts to load the yolov5 model using the same argument used as input for the function deploy. Recall the functions deploy inputs :

(method) def deploy(
model_type: str,
model_path: str,
filename: str = "weights/best.pt"
) -> None
Uploads provided weights file to Roboflow.

Args:
model_type (str): The type of the model to be deployed.
model_path (str): File path to the model weights to be uploaded.
filename (str, optional): The name of the weights file. Defaults to "weights/best.pt".

I tried :

torch.load(os.path.join("yolov5/runs/train/exp2", "weights/best.pt"))

but still getting the same error. According to my research, loading former yolo model versions has usually been done using torch.hub.load rather than torch.load. In fact

torch.hub.load('.', 'custom', path='/path/to/yolov5/runs/train/exp5/weights/best.pt', source='local')

works fine.

Ngôn ngữ chính
Python
Star
629
Fork
140
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
5

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của roboflow/roboflow-python

Tất cả issue của roboflow/roboflow-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.