Unable to up deploy a custom trained yolov5 model on robotflow
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python, pytorch
- Ambito
- computer-vision, machine-learning
Direzione di ricerca
Inizia da version.deploy(model_type, model_path, filename) e traccia la chiamata a torch.load per i pesi yolov5. Riproduci il problema con il percorso del modello personalizzato fornito e confrontalo con l’esempio funzionante di torch.hub.load. Il lavoro è completato quando un file di pesi yolov5 addestrato personalizzato può essere caricato correttamente tramite deploy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
``
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.
- Lingua principale
- Python
- Stelle
- 629
- Fork
- 140
- Merge medio
- 2g 2h
- PR unite (30g)
- 5
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di roboflow/roboflow-python
-
RLE segmentation mask visible in dataset thumbnail, but invisible in annotation preview/editor Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
roboflow/roboflow-python#505 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
roboflow/roboflow-python#433 ·
-
Dataset Download Stuck Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
roboflow/roboflow-python#429 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
roboflow/roboflow-python#427 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
roboflow/roboflow-python#426 ·
Tutte le issue di roboflow/roboflow-python
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·