tensorturnBETA
HomeUse Cases

How to Build an Image Segmentation Model Without Code

To build an image segmentation model with no code, upload images with mask or polygon annotations (COCO segmentation or YOLO-seg format, auto-detected), tell the chat which objects to segment, and TensorTurn runs Ultralytics YOLO segmentation training on an isolated cloud GPU, self-heals errors, and deploys the weights as a /predict API that returns per-object masks. Segmentation labels every pixel that belongs to an object rather than just a box around it; with a few hundred cleanly outlined instances per class, mask mAP50 of 0.70 to 0.90 is achievable, and thin or overlapping shapes land lower.

Segmentation vs. detection vs. classification

These three vision tasks answer different questions. Classification labels the whole image ('this is a defective part'). Detection draws a bounding box around each object ('a scratch is here'). Segmentation goes further and marks the exact pixels of each object, giving you a precise mask and therefore accurate area, shape and boundaries. Choose segmentation when a box is too coarse — measuring the area of a lesion, the coverage of a crop, the outline of a road, or the exact footprint of a defect. TensorTurn trains instance segmentation with Ultralytics YOLO, which outputs one mask per detected object.

What data you need

Run the image health check first

Before training, TensorTurn's automated image health check finds exact and near-duplicate images with perceptual hashing, blurry and over/under-exposed shots, corrupt files and odd resolutions, and runs a DINOv2 semantic pass for near-duplicates, train/test leakage where the same scene sits in both splits, and likely-mislabeled images. Cleaning these first matters, because a segmentation model trained on leaked or mislabeled examples reports an inflated score that collapses in production.

How to build an image segmentation model with TensorTurn (no code)

Algorithm, data and metrics at a glance

AspectWhat it looks like for segmentation
Problem typeInstance segmentation — one pixel mask per object
FrameworkUltralytics YOLO segmentation (YOLO-seg)
Data you needImages with polygon/mask labels (COCO or YOLO-seg)
Key metricsMask mAP50, mask mAP50-95, per-class precision/recall, IoU
Watch out forLoose polygon edges, near-duplicate leakage, tiny/thin objects
OutputMasks, classes and confidences per image via /predict

How accurate can it be?

Mask accuracy is driven by label precision and object size. For clear, well-outlined objects, mask mAP50 of 0.80 to 0.92 is realistic; for thin, small, overlapping or fuzzy-edged shapes, expect 0.50 to 0.70, and too few instances per class produces unreliable masks. Read mAP50-95 rather than mAP50 alone — it rewards masks that are tight at the boundary, which is usually the whole point of segmenting instead of detecting. If results disappoint, the fix is almost always more and better-outlined examples of the hard cases, not a bigger model.

Deploy as an API

Save the best weights and publish an authenticated /predict endpoint on Modal that scales to zero when idle, secured with a SHA-256-hashed Bearer key and per-call logging. The playground provides cURL, JavaScript, Python and Rust snippets so you can send an image and get back masks, classes and confidences to drive measurement, cropping or downstream analysis. Segmentation training is compute-heavy, so if you prefer you can connect your own GPU with a single outbound-HTTPS-only command that works behind any firewall.

Start building free

Frequently asked questions

What is the difference between segmentation and object detection?

Detection draws a bounding box around each object; segmentation marks the exact pixels of each object as a mask, so you get precise shape, area and boundaries. Use segmentation when a box is too coarse.

What annotation format do I need for segmentation?

Polygon or mask annotations in COCO segmentation JSON or YOLO-seg txt, both auto-detected. You do not convert formats manually before uploading.

How many labeled instances do I need?

Roughly 200 to 500 per class as a starting point. Thin, small or highly variable shapes need considerably more to produce tight, reliable masks.

Which model does TensorTurn train for segmentation?

It runs Ultralytics YOLO instance segmentation. You describe the classes in chat and TensorTurn generates and runs the training notebook, self-healing any errors.

How is segmentation accuracy measured?

With mask-based mean average precision — mAP50 and the stricter mAP50-95 — plus per-class precision and recall. mAP50-95 rewards masks that are accurate right at the object boundary.

Can I deploy the segmentation model as an API?

Yes. Publish a /predict endpoint that serves the weights and returns masks, classes and confidences per image, with copy-paste inference snippets. It scales to zero when idle.