Skip to content
Back to skills

Model Api

ASecurity

"Use Pytorch-UNet model architecture and checkpoint APIs for binary

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
businessapi

Works with

  • cli
  • api

Security analysis

A100/100

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

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill model-api --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Api?

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

Security grade badge for Model Api
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-model-api-3a6b4c31/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-model-api-3a6b4c31)

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: model-api
description: "Use Pytorch-UNet model architecture and checkpoint APIs for binary
  or multiclass semantic segmentation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: GPL 3.0
---

# model-api

Use this sub-skill when the task is about constructing, loading, checking, or adapting the Pytorch-UNet model API itself.

## Route here for

- Creating `UNet(n_channels, n_classes, bilinear=False)` for binary or multiclass semantic segmentation.
- Explaining the encoder/decoder blocks: `DoubleConv`, `Down`, `Up`, and `OutConv`.
- Choosing input channels, output classes, bilinear upsampling, or transposed-convolution upsampling.
- Loading raw checkpoint `state_dict` files, including checkpoints that carry a non-parameter `mask_values` entry.
- Using `torch.hub` `unet_carvana` weights with the supported pretrained scale choices and network-download caution.
- Running a safe CPU or optional CUDA forward-pass smoke check before training, prediction, or evaluation work.

## Do not use this sub-skill for

- Dataset directory layout, mask scanning, transforms, train/validation splitting, or the training CLI; route to `data-training`.
- Prediction image I/O, mask image conversion workflows, CLI output naming, or evaluation dataloaders and Dice reporting; route to `prediction-evaluation`.
- Downloading Kaggle/Carvana data or executing credentialed/network data scripts.

## Read next

- [references/api-reference.md](references/api-reference.md) for the distilled model API, architecture blocks, tensor contracts, and checkpoint conventions.
- [references/workflows.md](references/workflows.md) for common construction, checkpoint loading, torch.hub, and smoke-check workflows.
- [references/troubleshooting.md](references/troubleshooting.md) for channel/class mismatches, checkpoint loading failures, CUDA/AMP issues, and torch.hub download failures.

## Bundled safe check

Run the bundled script [scripts/model_smoke.py](scripts/model_smoke.py) from an environment where the Pytorch-UNet package or checkout is importable. It imports `UNet`, creates a tiny tensor, validates the output shape, and prints JSON. CPU is sufficient for functional checks; CUDA and AMP are optional accelerators.

Files in this skill

  • SKILL.md2.2 KB
  • references/api-reference.md8 KB
  • references/troubleshooting.md3.6 KB
  • references/workflows.md5.3 KB
  • scripts/model_smoke.py6.8 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.