|
Download task_030/instruction.md from Lego-X/UXInteract: direct link, hf CLI and curl.
- Browser
- Download file 2.21 kB
-
https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_030/instruction.md
- Command line
-
hf download hf://datasets/Lego-X/UXInteract/task_030/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/Lego-X/UXInteract/resolve/main/task_030/instruction.md
2.21 kB
| # Color-feature anomaly detection | |
| Cluster the local CIFAR-like image features in `cifar_tiny.csv` as described by the bundled README. Use the linked PPM images in `images/`. Work offline; do not download CIFAR-10 or open interactive plot windows. Run `python3 solve.py` from the project root and regenerate outputs there. | |
| ## Cluster and rank | |
| Use K-Means over the RGB feature vectors with Euclidean distance. Choose and explain a reasonable `K` such that 2 ≤ K < the number of samples. Write `cluster_centers.csv` with `cluster,r,g,b`: distinct centers with unique IDs, valid RGB values and nonempty nearest-center groups. If distances tie, use center-table order. Each converged center must agree with the mean of its assigned group to within 0.01. Initialization and the actual centers may differ between reasonable solutions. | |
| Rank samples by distance to their assigned center, descending, then by ascending `image_id` for ties. Write the first `ceil(0.05 × number_of_samples)` to `anomalies.csv` with `image_id,distance`. | |
| ## Visual comparison and report | |
| Write `anomaly_grid.png` at least 128 px wide and 64 px high per anomaly. Place one 64 px-high comparison row per anomaly in CSV order, starting at the top. In each row, place the nearest-neighbor-scaled source image in the leftmost 64×64 block and the nearest center's RGB swatch in the adjacent 64×64 block. Decorations may go outside these blocks. Display the actual comparison PNG in a visible `<img>` within `report.html`, using a local file or the same image embedded as a data URL. | |
| Explain the data, K-Means, why you chose K, and the interpretation of the farthest 5%. Discuss whether a color-feature outlier implies a corrupt image, using the displayed samples rather than just listing filenames. | |
| ## Acceptance Checklist | |
| - The center table is a valid converged K-Means solution for the current features. The ranked anomaly table has the correct count, IDs, order and distances. | |
| - Each comparison row shows the matching source image and center. The offline report visibly displays the comparison and explains what the anomaly score means. | |
| - Recomputing after changes to the source images or features yields corresponding artifacts. | |