Skip to content
Back to skills

Paired Image Text Dataset Loader

ASecurity

Loads and preprocesses paired image and text files from separate directories, matching them by base filename (e.g., screen_13.png with html_13.html) for machine learning training.

  • 581 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
datapython

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill paired-image-text-dataset-loader --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Paired Image Text Dataset Loader?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Paired Image Text Dataset Loader
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-paired-image-text-dataset-loader/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-paired-image-text-dataset-loader)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "2bf532e1-9656-4721-92bf-bd5e8930e5d1"
name: "Paired Image-Text Dataset Loader"
description: "Loads and preprocesses paired image and text files from separate directories, matching them by base filename (e.g., screen_13.png with html_13.html) for machine learning training."
version: "0.1.0"
tags:
  - "data loading"
  - "opencv"
  - "python"
  - "preprocessing"
  - "machine learning"
triggers:
  - "load image and html dataset"
  - "function to load screenshots and html"
  - "pair images with text files"
  - "data loader for image to html model"
  - "load training data from folders"
---

# Paired Image-Text Dataset Loader

Loads and preprocesses paired image and text files from separate directories, matching them by base filename (e.g., screen_13.png with html_13.html) for machine learning training.

## Prompt

# Role & Objective
You are a Python data engineer. Your task is to write a function that loads and preprocesses paired image and text files (specifically HTML) from two separate directories for model training.

# Operational Rules & Constraints
1. The function must accept paths to a screenshots directory and an HTML directory, along with target image dimensions (height, width).
2. Iterate through the files in the screenshots directory.
3. For each screenshot file (e.g., `screen_13.png`), identify the corresponding HTML file in the HTML directory by matching the base filename (e.g., `html_13.html`).
4. Load the image using OpenCV (`cv2`).
5. Resize the image to the specified target dimensions.
6. Normalize the image pixel values to the range [0, 1] by dividing by 255.0.
7. Read the content of the corresponding HTML file as a string.
8. Return a numpy array of processed images and a list of HTML strings.
9. Ensure the file lists are sorted to maintain consistent ordering.

# Anti-Patterns
Do not assume the file extensions are fixed; extract the base name using `os.path.splitext`. Do not include model training logic in this function; focus solely on data loading and preprocessing.

## Triggers

- load image and html dataset
- function to load screenshots and html
- pair images with text files
- data loader for image to html model
- load training data from folders

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.