dltk
Route DLTK 0.2.1 medical-imaging workflows across legacy TensorFlow 1.x data, models, Estimators, and deployment utilities.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- dltk
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route DLTK 0.2.1 medical-imaging workflows across legacy TensorFlow 1.x data, models, Estimators, and deployment utilities.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/compatibility-and-installation.md2.9 KB
- 参考文档references/repo-provenance.md1.9 KB
- 参考文档references/repo-routing-metadata.json479 B
- 参考文档references/troubleshooting.md2.7 KB
- 脚本scripts/check_environment.py4.1 KB
03 SKILL.md 正文
DLTK
Use this skill when a task names DLTK or asks for its medical-image readers, preprocessing, 3-D TensorFlow networks, Estimator applications, SavedModel prediction, or sliding-window segmentation utilities. This is a compatibility- first operating graph for the public DLTK 0.2.1 surface, not a maintainer or full-training guide.
First gate: preserve the legacy runtime
DLTK uses TensorFlow 1.x graph APIs including tf.Session, tf.layers,
tf.contrib, tf.train, and tf.estimator. A known compatible reference is
Python 3.7 with TensorFlow 1.15 and legacy-compatible NumPy/SciPy/protobuf
versions. Do not claim TensorFlow 2.x compatibility or repair one missing
symbol with tensorflow.compat.v1 and call that equivalent. From the directory containing this file, run the bundled read-only diagnostic
before importing application code:
python scripts/check_environment.py
If the diagnostic reports a missing TensorFlow 1.x symbol, stop and resolve the caller-managed runtime first. CUDA support is historical and version-sensitive; CPU execution is the verified functional baseline for the selected APIs. Do not infer modern CUDA or accelerator compatibility from a CPU import.
Public installation starting point
For a fresh caller-managed environment, install the public distribution and then verify a coherent TensorFlow 1.x stack rather than accepting an arbitrary modern resolver result:
python -m pip install dltk==0.2.1
python scripts/check_environment.py
The package's historical requirement declarations are inconsistent, so choose compatible TensorFlow 1.x, NumPy, and protobuf versions deliberately. Add SimpleITK for NIfTI workflows and pandas for CSV-driven applications only when those routes are needed. Do not mutate an existing environment without approval.
Route by task
- Readers, NIfTI/CSV layouts, normalization, augmentation, patches, serving placeholders: read data-pipelines.
- 3-D networks, residual units, activations, losses, metrics, or output dictionaries: read model-building.
model_fn,Reader-to-Estimator composition, train/eval/resume, exports, application flags, or the monitored-session GAN: read training-and-estimators.- SavedModel prediction, crop averaging, sliding windows, segmentation metrics, or metadata-preserving NIfTI output: read inference-and-deployment.
For a request spanning routes, freeze the data shape and output-key contract first, then compose the Reader and model function, and only then export or stitch predictions. Keep each route's references available while crossing the handoff rather than duplicating their API details.
Safe operating sequence
- Confirm the DLTK/TensorFlow 1.x API gate and package version.
- Replace private dataset paths with caller-owned, validated roots and use synthetic arrays or a permissioned tiny fixture first.
- Make the nested Reader
dtypes/example_shapescontract agree with every yielded record; separate PREDICT from TRAIN/EVAL and return after a feature-only prediction yield. - Use rank-5, channels-last feature tensors and preserve network output keys.
- Bound checks to
--help, graph construction, one or a few Estimator steps, temporary model directories, and deterministic synthetic volumes. - Before deployment, inspect the SavedModel signature, window/output geometry, coverage, label semantics, and SimpleITK metadata. Write output only to an explicitly selected caller directory.
Do not download IXI/MRBrainS data, use credentials, run full historical training, invoke destructive restart cleanup, or load external models as a routine skill check. The source applications are data-bound demonstrations and some are unsafe to copy verbatim. See the cross-cutting troubleshooting guide and compatibility reference when a runtime, dependency, data, or workflow gate fails.
Package facts and staleness
The generated graph targets DLTK commit f94d3bb509eb0741164149acbef0788769a869e4,
version 0.2.1. Read repo-provenance.md
before relying on it for a different package version or changed public API.
The structured routing metadata is in
repo-routing-metadata.json.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).