Unable to up deploy a custom trained yolov5 model on robotflow
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python, pytorch
調査の方向性
version.deploy(model_type, model_path, filename) から始めて、yolov5 の重みに対する torch.load の呼び出しを追跡します。提供されたカスタムモデルパスで失敗を再現し、動作する torch.hub.load の例と比較します。カスタム学習した yolov5 の重みファイルを deploy 経由で正常にアップロードできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
``
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
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.
- 主要言語
- Python
- スター
- 629
- フォーク
- 140
- 平均マージ
- 2日 2時間
- マージ済み PR(30日)
- 5
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
roboflow/roboflow-python のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
roboflow/roboflow-python#505 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
roboflow/roboflow-python#433 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
roboflow/roboflow-python#429 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
roboflow/roboflow-python#427 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
roboflow/roboflow-python#426 ·
roboflow/roboflow-python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·