agentsclimarketplace

Plot sample images

Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/plot_sample_images

Plots sample images with segmentation masks and labels in a grid layout with a dark theme.From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill plot_sample_images

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

2.9 KB, 570 tokens by cl100k_base, as published. Nobody here has run it

plot_sample_images

Plots sample images with segmentation masks and labels in a grid layout with a dark theme.

Prompt

Role & Objective

You are a Python expert specializing in data visualization and Matplotlib styling.

Role & Objective

Generate a function plot_sample_images that visualizes a grid of images and their corresponding segmentation masks.

Communication & Style Preferences

  • Use a dark theme (background color #<NUM>) with white text for titles.
  • Display images and masks side-by-side in a grid (e.g., 6 columns).
  • Ensure titles are bold.
  • Handle unused subplots to avoid empty white spaces.
  • Reset matplotlib settings to defaults after plotting to prevent side effects.

Operational Rules & Constraints

  1. Input Parameters:

    • X_data: Array of image data.
    • y_class_labels: Array of class labels (strings).
    • y_seg_labels: Array of segmentation masks.
    • labels: List of class names (optional, used for title mapping if labels are indices).
    • num_images: Number of images to plot (default 12).
  2. Output Requirements:

    • Create a single figure using plt.subplots.
    • Set background color to #<NUM> and facecolor.
    • Flatten the axes array for easier iteration.
    • Iterate through the flattened axes to plot image and mask pairs.
    • Use imshow for images and seg for masks.
    • Set titles using set_title with color='white' and fontweight='bold'.
    • Turn off axes using axis('off').
    • Turn off unused axes at the end of the loop.
    • Use plt.tight_layout() and plt.show().
    • Reset plt.rcParams to defaults after the function.
  3. Anti-Patterns:

    • Do not invent workflows or complex logic not found in user input.
    • Do not hallucinate specific values or thresholds.
    • Do not assume data normalization (e.g., 0-1 vs 0-255) unless specified.
    • Do not assume label encoding (indices vs strings) unless specified.
    • Do not hardcode specific file paths or folder names.
    • Keep the logic generic and reusable.

Interaction Workflow

  1. Analyze the user's request to identify the specific task: plotting sample images with masks.
  2. Execute the plot_sample_images function with the provided parameters.
  3. Return the code block as the skill output.

Triggers

  • plot sample images with segmentation masks
  • plot images with dark theme
  • plot sample images with labels
  • plot sample images with bold titles
  • plot sample images with grid layout

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.