Hello Guys,
I have uploaded the images, created dataset and annotations with roboflow. After that, i trained model with google colab according to example " How to Train YOLOv8 Object Detection on a Custom Dataset" without problem. When i tried to upload the model with command :
project.version(dataset.version).deploy(model_type="yolov8", model_path=f"{HOME}/runs/detect/train/")
An error occured when getting the model upload URL: This version already has a trained model. Please generate and train a new version in order to upload model to Roboflow.
I got the error and when i checked the Versions page of my project :
I got
MODEL UPLOAD REQUEST RECEIVED - PROCESSING...
Your uploaded model will be ready to use soon!
and deploy page :
Model upload is processing.
This page will automatically update when it's ready to use.
since Monday. Is there something wrong or model upload process still continues ?
Best Regard
Fatih
Our development team pushed a fix that should resolve this.
You’ll need to regenerate the version, train, and upload weights to it.
Or, if you have saved the weights, you won’t have to retrain, but you’ll still need to generate a new untrained version to upload the weights to.
Hello Mohammed,
Thank you for your answer. I followed the step you mentioned and successfully create and deploy model.
Best Regards
Fatih
Ultralytics YOLOv8.0.49 Python-3.8.10 torch-1.13.1+cu116 CUDA:0 (NVIDIA A100-SXM4-40GB, 40514MiB)
Setup complete (12 CPUs, 83.5 GB RAM, 28.0/166.8 GB disk)
Hey there, I seem to be having a similar error on Colab. The model deployment is taking forever on roboflow. I uploaded models > 24hrs ago and the website has not received them. I do not get the URL error.
When I run
project.version(PROJECT_VERSION).deploy(model_type=“yolov8”, model_path=f"{HOME}/runs/segment/train/")
I get…
Dependency ultralytics<=8.0.20 is required but found version=8.0.49, to fix: pip install ultralytics<=8.0.20
View the status of your deployment at: Sign in to Roboflow
Share your model with the world at: https://universe.roboflow.com/starseg/star-seg/model/9
Downgrading causes there to be weird errors with the data loader during training and does not fix my problem.
I’ve generated new versions twice and not had any upload success. I’ve had the same issue for two seperate projects.
Hi @willem_weertman - we don’t yet accept model weights upload for YOLOv8 instance segmentation, only object detection.
In terms of the product roadmap, we’re exploring adding the other models for weights upload. Be on the lookout for updates as to when this could happen.
That would be good, I guess I overlooked that in the documentation. Bummer. It seems to me that if it is not aloud there should be an error message that reads out so users are left thinking it is roboflow having unreliable servers or someother non-sense.
I’m curious as to where the deploy code was found, but the model types it works for wasn’t?
Can you let me know where you found that weights upload was possible with the specific deploy function?
I want to make sure it’s explicitly written what it works for, as well. The training notebook shouldn’t have had any references to weights upload organically, for instance segmentation, at least.
Hey I’m facing a similar issue. I saved my model like so:
version = project.version(1)
version.deploy("yolo11m-seg", "/content/runs/segment/train")
The code given in Upload custom weights
but while inference.
code:
import os
import glob
import cv2
from IPython.display import Image as IPyImage, display
import supervision as sv
import inference
model_path = "/content/drive/MyDrive/seg-m-150epochs.pt"
model_id = project.id.split("/")[1] + "/" + dataset.version
model = inference.get_model(model_id, userdata.get('ROBOFLOW_API_KEY'))
image_directory = 'Images'
test_images = glob.glob(os.path.join(image_directory, '*.jpg'))
for img_path in test_images:
print("Processing:", img_path)
image = cv2.imread(img_path)
results = model.infer(image)[0]
detections = sv.Detections.from_inference(results)
mask_annotator = sv.MaskAnnotator()
label_annotator = sv.LabelAnnotator()
annotated_image = mask_annotator.annotate(scene=image, detections=detections)
annotated_image = label_annotator.annotate(scene=annotated_image, detections=detections)
_, ret = cv2.imencode('.jpg', annotated_image)
display(IPyImage(data=ret))
print("\n")
I’m getting this error:
SupervisionWarnings: BoundingBoxAnnotator is deprecated: `BoundingBoxAnnotator` is deprecated and has been renamed to `BoxAnnotator`. `BoundingBoxAnnotator` will be removed in supervision-0.26.0.
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/inference/core/roboflow_api.py in wrapper(*args, **kwargs)
86 try:
---> 87 return function(*args, **kwargs)
88 except (requests.exceptions.ConnectionError, ConnectionError) as error:
7 frames
HTTPError: 500 Server Error: Internal Server Error for url: https://api.roboflow.com/ort/segmentation-i23cz/1?nocache=true&device=8f7141230c68&dynamic=true&api_key=Nd***jP
The above exception was the direct cause of the following exception:
RoboflowAPIUnsuccessfulRequestError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/inference/core/roboflow_api.py in wrapper(*args, **kwargs)
99 if error_handler is not None:
100 error_handler(error)
--> 101 raise RoboflowAPIUnsuccessfulRequestError(
102 f"Unsuccessful request to Roboflow API with response code: {status_code}"
103 ) from error
RoboflowAPIUnsuccessfulRequestError: Unsuccessful request to Roboflow API with response code: 500
and also in my console under Visualize Model: Model upload is processing.
This page will automatically update when it’s ready to use.
Am I doing something wrong. When can I use my model then?
I am having similar troubles, trying to infer my finetuned model. I deployed it with reference to Upload Custom weights, like so:
version = project.version(1)
version.deploy("yolo11m-seg", "/content/runs/segment/train")
Now I’m trying to infer my model by testing with some images.
import os
import glob
import cv2
from IPython.display import Image as IPyImage, display
import supervision as sv
import inference
model_path = "/content/drive/MyDrive/Training logs/Yolo/best-seg-m-150epochs.pt"
model_id = project.id.split("/")[1] + "/" + dataset.version
model = inference.get_model(model_id, userdata.get('ROBOFLOW_API_KEY'))
image_directory = '/content/drive/MyDrive/CBIR/Images_and_Tests/test_images/query'
test_images = glob.glob(os.path.join(image_directory, '*.jpg'))
for img_path in test_images:
print("Processing:", img_path)
image = cv2.imread(img_path)
results = model.infer(image)[0]
detections = sv.Detections.from_inference(results)
mask_annotator = sv.MaskAnnotator()
label_annotator = sv.LabelAnnotator()
annotated_image = mask_annotator.annotate(scene=image, detections=detections)
annotated_image = label_annotator.annotate(scene=annotated_image, detections=detections)
_, ret = cv2.imencode('.jpg', annotated_image)
display(IPyImage(data=ret))
print("\n")
error:
SupervisionWarnings: BoundingBoxAnnotator is deprecated: `BoundingBoxAnnotator` is deprecated and has been renamed to `BoxAnnotator`. `BoundingBoxAnnotator` will be removed in supervision-0.26.0.
---------------------------------------------------------------------------
HTTPError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/inference/core/roboflow_api.py in wrapper(*args, **kwargs)
86 try:
---> 87 return function(*args, **kwargs)
88 except (requests.exceptions.ConnectionError, ConnectionError) as error:
7 frames
HTTPError: 500 Server Error: Internal Server Error for url: https://api.roboflow.com/ort/segmentation-i23cz/1?nocache=true&device=8f7141230c68&dynamic=true&api_key=Nd***jP
The above exception was the direct cause of the following exception:
RoboflowAPIUnsuccessfulRequestError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/inference/core/roboflow_api.py in wrapper(*args, **kwargs)
99 if error_handler is not None:
100 error_handler(error)
--> 101 raise RoboflowAPIUnsuccessfulRequestError(
102 f"Unsuccessful request to Roboflow API with response code: {status_code}"
103 ) from error
RoboflowAPIUnsuccessfulRequestError: Unsuccessful request to Roboflow API with response code: 500
And when I check my roboflow projects and the dataset. The visualize model section says:
Model upload is processing.
This page will automatically update when it’s ready to use.
How long will it take??