Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Tutorial #9521

Merged

Conversation

paulguerrie
Copy link
Contributor

@paulguerrie paulguerrie commented Sep 21, 2022

Added a tutorial.ipynb to segment/ to demonstrate training, validation, and prediction for YOLOv5 Segmentation.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

New Jupyter notebook tutorial for YOLOv5 segmentation capabilities.

📊 Key Changes

  • Addition of a comprehensive tutorial notebook (tutorial.ipynb) for YOLOv5 segmentation.
  • Tutorial covers setup, prediction examples, validation on COCO dataset, training, and visualization.

🎯 Purpose & Impact

  • Ease of Use: Allows users to follow step-by-step instructions to use YOLOv5 for segmentation tasks.
  • Educational Value: Helps new users understand YOLOv5's segmentation process, from installation to training and inference.
  • Performance Verification: Users can validate model accuracy on standard segmentation datasets, ensuring reliability and robustness.
  • Customizability: The tutorial demonstrates training on custom datasets with Roboflow, fostering adaptation to diverse usage scenarios.
  • Reproducibility: Integrated logging and third-party platforms (Comet, ClearML) support experiment tracking and model training reproducibility.

@glenn-jocher
Copy link
Member

@paulguerrie awesome, looks much better :)

@glenn-jocher
Copy link
Member

glenn-jocher commented Oct 31, 2022

Uploading result for use in notebook

unnamed

@glenn-jocher glenn-jocher merged commit a83d2a5 into ultralytics:master Oct 31, 2022
@Sarveshsh8
Copy link

How to run a inference just like object detection?
model = torch.hub.load()
is there any method to run a inference like this for segmentation?

@glenn-jocher
Copy link
Member

@Sarveshsh8 yes, for segmentation you can run inference by loading a model and passing inputs through it. Here's an example using the YOLOv5 model:

import torch
from PIL import Image

# Load the model
model = torch.hub.load('ultralytics/yolov5', 'custom', path_or_model='best.pt')

# Load an image
img = Image.open('path/to/image.jpg')

# Perform inference
results = model(img)

# Display results
results.show()

For more detailed usage, check out the official Ultralytics YOLOv5 documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants