计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
neural-style-tf【效率与协作】Use the legacy TensorFlow neural-style-tf script for artistic image and video style transfer, command planning, runtime checks, and troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this repo skill when the task involves Cameron Smith's neural-style-tf implementation of Gatys-style neural style transfer: constructing neural_style.py commands, preparing TensorFlow 1.x runtime checks, choosing image/video flags, preserving original colors, using segmentation masks, or diagnosing VGG/OpenCV/ffmpeg/legacy TensorFlow failures.
Do not use this skill for modern TensorFlow 2/Keras style-transfer APIs, PyTorch neural style examples, Stable Diffusion/Diffusers generation, or general image augmentation unless the user specifically names neural-style-tf or its script-style VGG-19 workflow.
neural_style.py script. This repository is not an installable package with console entry points; it is operated by running the script.protobuf<3.21.| User intent | Read next | Why |
|---|---|---|
| Build a still-image style-transfer command from content/style paths, choose output names, or replace the interactive shell wrapper. | sub-skills/image-stylization/SKILL.md | Owns base python neural_style.py image command construction, output layout, CPU/GPU choice, VGG path, and basic optimizer/image-size controls. |
| Blend multiple styles, use style masks/segmentation, preserve original colors, adjust layers/losses, or tune initialization/pooling/Adam. | sub-skills/advanced-controls/SKILL.md | Owns expert flags and validation for count-sensitive advanced parameters. |
| Plan video stylization, frame extraction, optical flow, temporal consistency, frame formats, or video assembly. | sub-skills/video-stylization/SKILL.md | Owns video/frame pipeline planning and optical-flow file expectations. |
Explain every neural_style.py argument by group. | references/cli-reference.md | Compact source-verified CLI catalog with defaults and caveats. |
| Diagnose installation, TensorFlow 2 incompatibility, protobuf descriptor errors, missing VGG, bad image reads, GPU fallback, or ffmpeg/deepflow issues. | references/troubleshooting.md | Cross-cutting failure map before drilling into sub-skill-specific troubleshooting. |
A basic still-image command has this shape:
python neural_style.py \
--content_img lion.jpg --content_img_dir ./image_input \
--style_imgs kandinsky.jpg --style_imgs_dir ./styles \
--model_weights imagenet-vgg-verydeep-19.mat \
--device /cpu:0 --img_output_dir ./image_output --img_name result
Prefer the bundled image command builder for user-supplied file paths:
python sub-skills/image-stylization/scripts/build_image_command.py \
--script neural_style.py \
--content ./image_input/lion.jpg \
--style ./styles/kandinsky.jpg \
--device /cpu:0 --max-size 64 --max-iterations 1 --optimizer adam
The builder prints a command and runs nothing unless --run is explicitly supplied.
neural_style.py uses TensorFlow 1.x symbols such as tf.Session and tf.contrib.opt.ScipyOptimizerInterface; TensorFlow 2.x without compatibility changes is not a drop-in replacement.imagenet-vgg-verydeep-19.mat.--device /gpu:0, but CPU is accepted with --device /cpu:0; video is normally impractical without a compatible GPU.No such file from the source check_image(...) path.Managed repo-skill import uses references/repo-routing-metadata.json. Do not hand-edit live router Markdown; use the verified import helper only when a user later asks to import this skill.