Use the widget below to experiment with YOLOv5 Instance Segmentation. You can detect COCO classes such as people, vehicles, animals, household items.
YOLOv5 was released by Glenn Jocher on June 9, 2020 for object detection. Recently, YOLOv5 added support for instance segmentation (September 2022) and classification (August 2022).
Instance segmentation (also known as image segmentation) is the computer vision task of recognizing objects in images along with their associated shape. It's useful in cases where you need to measure the size of detected objects, cut them out of their background, or more accurately detect oblong rotated objects.
Find a free instance segmentation dataset to try YOLOv5 for instance segmentation.
If you have your own data, label your images for free using Roboflow Annotate.
YOLOv5 is regarded as smaller and generally easier to use in production thanks to being implemented in Pytorch. Read more about YOLOv5 performance.
YOLOv5 Instance Segmentation
is licensed under a
AGPL-3.0
license.
You can use Roboflow Inference to deploy a
YOLOv5 Instance Segmentation
API on your hardware. You can deploy the model on CPU (i.e. Raspberry Pi, AI PCs) and GPU devices (i.e. NVIDIA Jetson, NVIDIA T4).
Below are instructions on how to deploy your own model API.
You can run fine-tuned YOLOv5 instance segmentation models with Inference.
First, install Inference:
pip install inference
Retrieve your Roboflow API key and save it in an environment variable called ROBOFLOW_API_KEY
:
export ROBOFLOW_API_KEY="your-api-key"
To use your model, run the following code:
import inference
model = inference.load_roboflow_model("model-name/version")
results = model.infer(image="YOUR_IMAGE.jpg")
Above, replace:
YOUR_IMAGE.jpg
with the path to your image.model_id/version
with the YOLOv5 model ID and version you want to use. Learn how to retrieve your model and version ID