Unable to up deploy a custom trained yolov5 model on robotflow
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python, pytorch
Línea de trabajo
Comienza en version.deploy(model_type, model_path, filename) y sigue la llamada a torch.load para los pesos de yolov5. Reproduce el fallo con la ruta de modelo personalizada proporcionada y compárala con el ejemplo funcional de torch.hub.load. Se considera completado cuando se puede cargar correctamente mediante deploy un archivo de pesos de yolov5 entrenado de forma personalizada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
``
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.
- Lenguaje dominante
- Python
- Estrellas
- 629
- Forks
- 140
- Merge medio
- 2 d 2 h
- PR fusionados (30 d)
- 5
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de roboflow/roboflow-python
-
RLE segmentation mask visible in dataset thumbnail, but invisible in annotation preview/editor Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
roboflow/roboflow-python#505 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
roboflow/roboflow-python#433 ·
-
Dataset Download Stuck Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
roboflow/roboflow-python#429 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
roboflow/roboflow-python#427 · 1 comentario ·
-
Inability to upload raw bytes Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
roboflow/roboflow-python#426 ·
Todos los issues de roboflow/roboflow-python
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
stephrobert/dsoxlab#238 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
sublimehq/package_control#1780 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
nwg-piotr/nwg-displays#145 ·