Skip to content
Back to skills

Segmentation And Shapes

ASecurity

"Generate masks and synthetic shapes, clean and label them, and

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
documentationgoapi

Works with

  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill segmentation-and-shapes --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Segmentation And Shapes?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Segmentation And Shapes
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-segmentation-and-shapes/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-segmentation-and-shapes)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: segmentation-and-shapes
description: "Generate masks and synthetic shapes, clean and label them, and
  segment images with morphology, watershed, random walker, superpixels, graph
  helpers, and active contours."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# Segmentation and Shapes

Use this sub-skill when the task is about drawing masks, synthesizing labeled scenes, cleaning binary regions, or partitioning an image into segments. It owns the stable `skimage.draw`, `skimage.morphology`, `skimage.segmentation`, and `skimage.graph` workflows that turn pixels into regions. This route stops before feature extraction or geometric registration.

## Route Here For

- Drawing lines, polygons, disks, ellipses, rectangles, Bezier curves, and perimeters.
- Painting or filling masks with `set_color` and `polygon2mask`.
- Generating synthetic scenes with `random_shapes`, including overlap control, intensity ranges, and grayscale via `channel_axis=None`.
- Cleaning masks with binary morphology, small-object/hole removal, flooding, reconstruction, and skeletonization.
- Creating markers and segments with `watershed`, `random_walker`, `slic`, `felzenszwalb`, `quickshift`, `expand_labels`, `join_segmentations`, `clear_border`, and `relabel_sequential`.
- Building or visualizing region adjacency graphs with `RAG`, `rag_mean_color`, `rag_boundary`, `show_rag`, `cut_threshold`, `cut_normalized`, and `merge_hierarchical`.
- Using active contours and snakes with `chan_vese`, `active_contour`, `morphological_chan_vese`, `morphological_geodesic_active_contour`, `inverse_gaussian_gradient`, `checkerboard_level_set`, and `disk_level_set`.
- Handling legacy or experimental segmentation helpers from `skimage.future`, including manual and trainable segmentation.

## Use Other Sub-skills For

- Image loading, dtype conversion, and sample data: `../data-io/SKILL.md`.
- Denoising, threshold selection, and intensity/color prep: `../enhancement/SKILL.md`.
- Feature extraction, region measurement, and metrics: `../analysis/SKILL.md`.
- Geometric warps, transforms, and registration: `../transform-registration/SKILL.md`.

## Start Here

- Read `references/workflows.md` for concrete recipes and API selection.
- Read `references/troubleshooting.md` for markers, connectivity, `channel_axis`, and legacy-API caveats.
- Prefer tiny synthetic arrays and CPU-only smoke checks when validating a segmentation path.

## Safe Defaults

- Treat 0 as background or unlabeled unless the API says otherwise; keep positive integers as seeds or region IDs.
- Use `channel_axis=None` for grayscale images and an explicit channel axis for multichannel SLIC or random walker workflows.
- Seed synthetic examples with `rng=0` or another fixed value when reproducibility matters.
- Prefer `expand_labels` over dilation when growth must not overlap.
- Run `relabel_sequential` after joins, cuts, or manual edits when downstream code expects dense labels.
- Treat `skimage.future` helpers as legacy and expect warnings or missing support in `skimage2`.

## Acceptance Checks

- Can a future agent build a mask, clean it, segment it, and inspect boundaries without reopening the source docs?
- Can a future agent choose between watershed, random walker, SLIC, graph cuts, and active contours?
- Are legacy or interactive helpers clearly separated from the stable segmentation route?

Files in this skill

  • SKILL.md3.3 KB
  • references/troubleshooting.md7.8 KB
  • references/workflows.md10.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.