Open sylenola opened 3 months ago
π Hello @sylenola, thank you for raising an issue about Ultralytics HUB π! Please visit our HUB Docs to learn more:
If this is a π Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix.
If this is a β Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response.
We try to respond to all issues as promptly as possible. Thank you for your patience!
@sylenola hi there!
Great to hear that you've successfully trained your model using Ultralytics HUB! Deploying your trained model to detect objects in a series of images online is straightforward. Here's how you can do it:
Export Your Model: First, ensure your trained model is exported. You can do this directly from the Ultralytics HUB. Navigate to your project, select the trained model, and look for the export options. You can export the model in various formats like ONNX, TorchScript, or CoreML depending on your deployment needs.
Use Ultralytics HUB API: Ultralytics HUB provides an API that allows you to perform inference on images. You can upload your images and get predictions using this API. Hereβs a basic example of how you can use the API to detect objects in images:
import requests
# Define the API endpoint and your API key
api_url = 'https://hub.ultralytics.com/api/v1/predict'
api_key = 'your_api_key_here'
# Load your image
image_path = 'path_to_your_image.jpg'
with open(image_path, 'rb') as image_file:
image_data = image_file.read()
# Make the request
response = requests.post(
api_url,
headers={'Authorization': f'Bearer {api_key}'},
files={'file': image_data}
)
# Check the response
if response.status_code == 200:
predictions = response.json()
print(predictions)
else:
print(f"Error: {response.status_code}, {response.text}")
Web Application Integration: If you want to integrate this into a web application, you can use frameworks like Flask or Django (for Python) to create an endpoint that handles image uploads, calls the Ultralytics HUB API, and returns the predictions.
Ultralytics HUB App: You can also use the Ultralytics HUB App to preview and test your model directly on the platform. This is a great way to quickly validate your model's performance on new images.
For more detailed information, you can refer to the Ultralytics HUB Quickstart Guide.
If you encounter any issues or have further questions, feel free to ask. We're here to help! π
Search before asking
Question
Hi, I have finished training model using Ultralytics HUB online. Then how can I use this trained model to detect a series images ?
It would be better if this can be done online.
Additional
No response