vision-and-generative
Use Libra for image classification, GANs, read-mode inspection, pretrained/custom CNN export, and feature-map/debug workflows on image datasets.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- vision-and-generative
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Use Libra for image classification, GANs, read-mode inspection, pretrained/custom CNN export, and feature-map/debug workflows on image datasets.
- disable-model-invocation
- true
02 资源文件 7
- 参考文档references/api-reference.md2.1 KB
- 参考文档references/data-formats.md1.6 KB
- 参考文档references/export-and-preprocessing.md1.5 KB
- 参考文档references/troubleshooting.md2.0 KB
- 参考文档references/workflows.md2.3 KB
- 脚本scripts/inspect_image_dataset.py6.4 KB
- 脚本scripts/smoke_cnn_layout.py2.4 KB
03 SKILL.md 正文
Vision and Generative Workflows with Libra
Load this sub-skill when a task uses Libra image workflows: CNN classification, image read-mode selection, image preprocessing, pretrained/custom CNN architectures, feature-map visualization, TensorFlowJS/TFLite export, or DCGAN image generation.
What this sub-skill owns
convolutional_query(...)for image classificationgan_query(...)for DCGAN generation from a single class of images- image data layouts:
setwise,classwise,csvwise, and already-processed directories pretrained,custom_arch,show_feature_map,save_as_tfjs, andsave_as_tfliteconstraints- image preprocessing side effects such as
proc_training_set,proc_testing_set,tfjsmodel,model.tflite, andgenerated_images
Trigger phrases
Use this route when a user asks to:
- train a CNN from folders of images
- decide which
read_modeorimage_columnto pass - use VGG, ResNet, MobileNet, DenseNet, or a custom Keras JSON architecture
- export a trained image classifier to TFJS/TFLite
- view feature maps after CNN training
- generate images with Libra's GAN path
- diagnose image folder/class count/path issues
Bundled references
references/api-reference.mdfor method parameters and model keysreferences/workflows.mdfor image classification and GAN recipesreferences/data-formats.mdfor image dataset layoutsreferences/export-and-preprocessing.mdfor preprocessing/export side effectsreferences/troubleshooting.mdfor read-mode, pretrained/custom architecture, GPU, and TFJS failures
Bundled scripts
scripts/inspect_image_dataset.pyinspects a folder or CSV and suggests a saferead_mode/image_columndirection.scripts/smoke_cnn_layout.pycreates a tiny synthetic image tree and verifies that the layout helper sees a classwise dataset. It does not train a CNN.
Operating notes
- Treat image training as potentially expensive. Start with layout inspection and a tiny epoch count before full runs.
custom_archrequirespreprocess=False; the source raises if bothcustom_archand preprocessing are requested.- Pretrained models require 224x224 inputs when using ImageNet weights.
save_as_tfjs=Truewritestfjsmodel;save_as_tflite=Truewritesmodel.tflitein the current working directory.- GAN output is written under
generated_imagesrelative to the image data path in the inspected code. - Image captioning uses image files but is routed through
sub-skills/nlp-and-generationbecause the public client methods live there. Use this sub-skill only for image path/layout debugging around captioning.
Cross-links
- Use the root skill for install/import compatibility and TensorFlowJS/JAX version notes.
- Route text-only generation and image captioning model calls to
sub-skills/nlp-and-generation. - Route tabular
analyze(), recommendation, and dashboard tasks tosub-skills/tabular-modelingunless the model key isconvolutional_NN.
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).