본문으로 건너뛰기
cccskills
무료GitHub에 공개

sports-field-visualization

Use when maintaining sports field visualization or Tkinter GUI and standalone CLI integration with Matplotlib.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Sports Field Visualization & GUI-CLI Integration

This skill documents the patterns and fixes for maintaining cross-platform compatibility between Tkinter GUIs and standalone CLI tools using Matplotlib, specifically focusing on the drawsportsfields.py and markerless_3d_analysis.py modules.

vailá maintenance rule (version/date)

When you edit drawsportsfields.py, markerless_3d_analysis.py, or any *.py in this repo, also update:

  • edited script header Update Date (today) + Version (global, from vaila.py header/banner)
  • root README.md line Last updated: YYYY-MM-DD
  • help docs: matching vaila/help/<module>.md + .html, plus vaila/help/index.md + .html (“Generated on”)
  • installers / vaila.py if change impacts install/run UX

Reference checklist: AGENTS.md (“Mandatory: Update metadata on any script change”).

Context

The vailá project uses a dual-mode execution pattern for many modules:

  1. Integrated GUI: Modules are imported into vaila.py and run inside the main Tkinter notebook.
  2. Standalone CLI: Modules are run directly (e.g., uv run vaila/module.py --arg value).

Key Challenges & Solutions

1. Matplotlib Backend Synchronization

Issue: Standing-alone CLI execution often defaults to the QtAgg backend. If the system lacks Qt dependencies (common in minimal Linux installs or headless environments), the script crashes with qt.qpa.plugin errors. Solution: Explicitly set the backend to TkAgg before importing pyplot if the module is designed for Tkinter integration.

import matplotlib
matplotlib.use("TkAgg")
import matplotlib.pyplot as plt

2. GUI vs. CLI Execution Paths

Issue: Modules originally designed as GUIs often trigger the full tk.Tk() main loop even when run with CLI arguments (e.g., --field), leading to unnecessary window creation or crashes in non-interactive sessions. Solution: Use the if __name__ == "__main__": block to distinguish between a full GUI launch and a simple plot visualization.

if __name__ == "__main__":
    if args.field:
        # Static plot mode (CLI)
        plot_field(df)
        plt.show()
    else:
        # Interactive GUI mode
        run_gui()

3. App Class Portability

Issue: Defining the main application class inside if __name__ == "__main__": prevents it from being imported by other modules. Also, restricting master to tk.Tk prevents embedding it in tk.Toplevel windows. Solution:

  • Move the App class to the module level.
  • Update type hints to tk.Tk | tk.Toplevel.
class App:
    def __init__(self, master: tk.Tk | tk.Toplevel):
        self.master = master
        # initialization logic...

4. Matplotlib Colormap Deprecations

Issue: Direct attribute access like plt.cm.rainbow is deprecated in modern Matplotlib versions and triggers linting errors. Solution: Use the registry-based retrieval method.

# GOOD
cmap = plt.get_cmap("rainbow")

# BAD
cmap = plt.cm.rainbow

FIFA Field Geometry Integration

The "FIFA" layout is now natively supported using a coordinate system centered at (0,0,0).

  • Reference File: vaila/models/soccerfield_ref3d_fifa.csv
  • Registry Entry:
SPORT_REGISTRY["fifa"] = SportDef(
    label="FIFA Starter Kit",
    model_csv="soccerfield_ref3d_fifa.csv",
    title="FIFA Skeletal Tracking Pitch",
    plot_fn=plot_field,
)

Related Modules

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Configures best-practice alerting policies for AI agents using OpenTelemetry (OTel) metrics, generating output as Terraform (.tf) configuration files. Use when analyzing, writing, or deploying alerting policies to monitor agent latency, error rates, token usage, and quality metrics. Don't use for standard infrastructure monitoring unrelated to AI agents, or when the agent is not instrumented with OpenTelemetry (for Reliability, Cost, Safety, Security alerts). NOTE: Reliability, Cost, Safety, and Security alerts use generic OTel metrics and work across runtimes (such as Cloud Run, Vertex AI). Quality alerts rely on Vertex AI Online Monitors and are strictly bound to Vertex AI deployments.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vaila-multimodaltoolbox/vaila212026년 10월 20일 업데이트

Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a specific model is deployable (`gcloud ai model-garden models list-deployment-config`), query deployment cost, troubleshoot deployment errors (like quota limits), or undeploy/clean up endpoints. Also use when copying and deploying a 1P Tuned Model. Don't use for pure listing/discovery questions of the form "is X deployed?", "list my endpoints", or "which regions have models running?" — for those use `agent-platform-endpoint-management`. Don't use for public Vertex AI deployments (use the `vertex-deploy` skill) or for running model evaluations (use the `agent-platform-eval-flywheel` skill).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vaila-multimodaltoolbox/vaila212026년 10월 20일 업데이트

Manages Agent Platform serving endpoints. Use when you need to create, list, describe, update, or delete serving endpoints for model deployment on Agent Platform. Also use when troubleshooting endpoint permission, quota, or resource busy errors. Don't use for deploying models to endpoints or for running model evaluations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vaila-multimodaltoolbox/vaila212026년 10월 20일 업데이트

Measures and improves the quality of AI models and agents on Google Cloud using the Eval Quality Flywheel methodology. Use when evaluating an agent or model, building an eval dataset, picking or writing evaluation metrics, analyzing failures, comparing results before and after a fix, or when guidance is needed on Agent Platform eval methodology — including dataset schema, LLM-as-judge scoring, and common failure causes. For fine-tuning, use agent-platform-tuning. For general production deployment, use agent-platform-deploy.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vaila-multimodaltoolbox/vaila212026년 10월 20일 업데이트

Connects to and performs inference with Google Cloud Agent Platform GenAI models, including First-Party Gemini models and Third-Party OpenMaaS models (Llama, DeepSeek, Qwen, etc.). Use when asked to perform inference, ask a model a question, run a test prompt, execute chat completions, or generate code for calling Gemini or OpenMaaS models, authenticate with GenAI SDK, OpenAI SDK, or legacy Agent Platform SDK, configure base URLs and global/regional endpoints, or troubleshoot 429 Resource Exhausted (DSQ), 400 User Validation, or 404 Not Found errors. Don't use for deploying models to endpoints or for running model evaluations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vaila-multimodaltoolbox/vaila212026년 10월 20일 업데이트

Guides agents and users through migrating from Gemini API in Google AI Studio to Gemini Enterprise Agent Platform (formerly Vertex AI). Use this skill when moving applications to Google Cloud, to leverage Cloud credits, or to unify inferencing with other Cloud infrastructure (IAM, billing, telemetry).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

vaila-multimodaltoolbox/vaila212026년 10월 20일 업데이트

vaila-multimodaltoolbox의 스킬 모두 보기

이 스킬의 문제 신고