AGENT SKILL

android-deployment

Routes Android TFLite asset, Gradle, classifier, GPU delegate, and mobile YOLOv4 deployment workflows for tensorflow-yolov4-tflite.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
android-deployment
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes Android TFLite asset, Gradle, classifier, GPU delegate, and mobile YOLOv4 deployment workflows for tensorflow-yolov4-tflite.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

Android Deployment

Use this sub-skill when the user wants to run or adapt the repository's Android TFLite demo, replace the .tflite asset, update labels, reason about the YoloV4Classifier constants, or troubleshoot Gradle/TFLite delegate issues.

Before Android work

  • Produce and validate a TFLite model through ../model-conversion/SKILL.md before replacing Android assets.
  • Verify the model with Python TFLite inference before debugging Android UI or camera code.
  • Read references/android-app.md for Gradle, asset, classifier, and delegate facts distilled from the app source.
  • Use scripts/check_android_assets.py to check model/label asset names and class-count consistency in a target app.

Main routes

  1. Replace the bundled model: confirm the asset filename expected by MainActivity and DetectorActivity, copy the validated .tflite into the app assets directory of the user's target checkout, then run the asset checker.
  2. Update labels/classes: replace coco.txt or change the Java constants so the classifier reads the intended label file; class order must match the TFLite model output.
  3. Choose delegates: inspect YoloV4Classifier constants for GPU/NNAPI; GPU delegate is enabled by source default, NNAPI is disabled.
  4. Build/run the app: verify Android SDK/Gradle compatibility and be aware that the source Gradle file applies a model-download task that fetches a default MobileNet zip unless changed.

Asset checker examples

python sub-skills/android-deployment/scripts/check_android_assets.py \
  --android-root android \
  --model yolov4-416-fp32.tflite \
  --labels coco.txt \
  --expected-classes 80

Use --assets-dir instead of --android-root if the user has copied the app layout into another project.

Handoff to other sub-skills

Stop conditions

Stop before installing Android SDKs, downloading Gradle dependencies, running a camera app on a device, or replacing production mobile assets unless the user approves the target project and overwrite policy.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351