Skip to content
Agentmart
Submit a tool

attention-gated-networks

Guides Attention-Gated Networks PyTorch medical imaging workflows for ultrasound classification, attention-gated U-Net segmentation, data layout, CUDA setup…

Skill by VectorSpaceLab

IndexedMIT★ 341
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vectorspacelab-attention-gated-networks

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Guides Attention-Gated Networks PyTorch medical imaging workflows for ultrasound classification, attention-gated U-Net segmentation, data layout, CUDA setup, and visualization helpers.

Use cases: data, ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/attention-gated-networks

What's inside

Skill name
attention-gated-networks
Description
Guides Attention-Gated Networks PyTorch medical imaging workflows for ultrasound classification, attention-gated U-Net segmentation, data layout, CUDA setup, and visualization helpers.
License
MIT
Metadata
disco-role: operating
Instructions
106 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (20)

  • SKILL.md
  • package-overview.md · references/
  • repo-provenance.md · references/
  • repo-routing-metadata.json · references/
  • troubleshooting.md · references/
  • check_env.py · scripts/
  • SKILL.md · sub-skills/classification/
  • api-reference.md · sub-skills/classification/references/
  • data-layout.md · sub-skills/classification/references/
  • troubleshooting.md · sub-skills/classification/references/
  • workflows.md · sub-skills/classification/references/
  • export_attention_overlay.py · sub-skills/classification/scripts/
  • run_classifier.py · sub-skills/classification/scripts/
  • SKILL.md · sub-skills/segmentation/
  • api-reference.md · sub-skills/segmentation/references/
  • data-layout.md · sub-skills/segmentation/references/
  • troubleshooting.md · sub-skills/segmentation/references/
  • workflows.md · sub-skills/segmentation/references/
  • run_segmentation.py · sub-skills/segmentation/scripts/
  • validate_and_export_maps.py · sub-skills/segmentation/scripts/

SKILL.md (first lines)

# Attention-Gated Networks

Use this repo skill when a task involves the `Attention-Gated-Networks` PyTorch
repository or its medical imaging workflows: ultrasound scan-plane
classification, Sononet Grid Attention, Attention U-Net style segmentation,
NIfTI/HDF5 data layouts, CUDA setup, and attention or feature-map visualization.

## Start here

- Read [package-overview.md](references/package-overview.md) for package
  purpose, installation guidance, config families, generated helpers, and the
  CUDA policy.
- Read [troubleshooting.md](references/troubleshooting.md) for cross-cutting
  install/import, CUDA, Visdom, dependency, and config portability failures.
- Read [repo-provenance.md](references/repo-provenance.md) before deciding
  whether this skill is current for a checkout or before running a refresh.
- Use [repo-routing-metadata.json](references/repo-routing-metadata.json) only
  for router/import metadata.
- Run [check_env.py](scripts/check_env.py) after installation to verify imports,
  CUDA, and tiny model smokes.

## Route map

| User request | Read |
| --- | --- |
| Train, test, debug, or configure ultrasound scan-plane classification | [classification](sub-skills/classification/SKILL.md) |
| Use Sononet, Sononet2, Sononet Grid Attention, aggregated classifier, or attention overlays | [classification](sub-skills/classification/SKILL.md) |
| Arrange ultrasound HDF5 splits, labels, class weights, or samplers | [classification data layout](sub-skills/classification/references/data-layout.md) |
| Train, validate, or configure 2D/3D U-Net segmentation models | [segmentation](sub-skills/segmentation/SKILL.md) |
| Use CT deep supervision, multi-attention U-Net, non-local blocks, or NIfTI outputs | [segmentation](sub-skills/segmentation/SKILL.md) |
| Export 3D attention maps, feature maps, NIfTI predictions, or validation metrics | [segmentation workflows](sub-skills/segmentation/references/workflows.md) |
| Diagnose shared install, CUDA, dependency, or config issues | [troubleshooting](references/troubleshooting.md) |

## Minimal install check

After installing the repository and dependencies, run:

```bash
python scripts/check_env.py --repo-root /path/to/Attention-Gated-Networks --mode all
```

If the package is installed and importable without a checkout on `sys.path`, the
helper can still run from any working directory; `--repo-root` is only needed to
point at a local checkout during development or editable installs.

Successful output should include import success, CUDA availability, a tiny
classification output, an attention-classifier output, a tiny segmentation
output, and `check-env-ok`.

## Runtime and external inputs

The helpers require the repository checkout on `--repo-root` (or an installed
`AttentionGatedNetworks` package) plus the legacy runtime dependencies listed in
[package-overview.md](references/package-overview.md). Datasets and trained
weights/checkpoints are external inputs; this skill does not fabricate or
bundle them. Stock configs contain private historical `/vol/...` paths and must
be copied with `data_path.*` and output/checkpoint paths overridden.

For a config supplied as a relative path, always pass `--repo-root`; the helper
resolves the config from that root and any relative data path from the config's
parent, never from the process cwd. Validate before running:

```bash
python scripts/check_env.py --repo-root /path/to/Attention-Gated-Networks \
  --config configs/config_sononet_grid_att_8.json --mode imports
```

This intentionally fails fast on private or missing data paths. The original
`train_classifaction.py` also contains a 10-hour final-epoch sleep; it is left
untouched as source evidence, while the bundled runner omits that hold.

## Important defaults

- Distribution: `AttentionGatedNetworks` version `1.0`.
- Import packages: `models`, `dataio`, `utils`.
- Required backend for the selected workflows: CUDA. The unmodified wrappers
  call `.cuda()` for models and tensors.
- Core dependencies: PyTorch, torchvision, torchsample, NumPy/SciPy,
  matplotlib, scikit-image, h5py, pandas, tqdm, Visdom, nibabel,
  scikit-learn, OpenCV, dominate, and SimpleITK for validation exports.
- Configs contain historical machine-specific dataset paths; copy the field
  structure but replace paths and output directories before use.
- Use the bundled scripts under this generated skill rather than hard-coded
  source visualization/validation scripts.

## Bundled helpers

- `scripts/check_env.py`: import, CUDA, classification, attention-classifier,
  and segmentation smoke checks.
- `sub-skills/classification/scripts/run_classifier.py`: training/testing
  replacement for classification workflows.
- `sub-skills/classification/scripts/export_attention_overlay.py`: safe
  attention overlay export for grid-attention classifiers.
- `sub-skills/segmentation/scripts/run_segmentation.py`: training replacement
  for segmentation workflows.
- `sub-skills/segmentation/scripts/validate_and_export_maps.py`: validation,
  NIfTI export, and feature/attention-map helper.

## Avoid when

Do not use this skill for unrelated modern MONAI/nnU-Net/TorchIO workflows
unless the task explicitly names Attention-Gated Networks or needs to port ideas
from this repository. Do not use it as proof that CPU-only execution works; the
selected repo workflows were verified as CUDA-required.

From VectorSpaceLab/AREX-Skill, MIT.

More from VectorSpaceLab/AREX-Skill

Signals

Stars
341
Forks
26
Open issues
0
Last commit (this folder)
Aug 26, 2026 (2 months ago)
Last release
Sep 2, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from VectorSpaceLab

Cite this page

attention-gated-networks skill. Agent Mart. https://agentmart.dev/skills/vectorspacelab-attention-gated-networks (last updated 2026-10-24)