Dataset Viewer
Auto-converted to Parquet Duplicate
png
imagewidth (px)
512
512
svg
stringlengths
29.3k
123k
<?xml version="1.0" encoding="utf-8" ?> <svg baseProfile="full" height="512" version="1.1" width="512" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"><defs /><path d="M 483,507 L 482,509 L 480,509 L 478,509 L 476,509 L 474,509 L 474,511 L 476,5...
<?xml version="1.0" encoding="utf-8" ?> <svg baseProfile="full" height="512" version="1.1" width="512" xmlns="http://www.w3.org/2000/svg" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xlink="http://www.w3.org/1999/xlink"><defs /><path d="M 440,503 L 439,505 L 438,506 L 438,508 L 438,510 L 439,511 L 441,511 L 443,5...
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
"<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<svg baseProfile=\"full\" height=\"512\" version=\"1.1(...TRUNCATED)
End of preview. Expand in Data Studio

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Motif Modules V9 (Black Line Version)

Each row contains a motif pair:

  • png: raster preview (512×512)
  • svg: vector paths of the same motif

Total: 100 pairs
Created: 2025-10-06
Author: maryzhang
License: CC-BY-NC-SA 4.0

Chinese Porcelain Motif Library - Final Collection (PNG & SVG)

Dataset Description

Dataset Summary

A curated collection of 100 high-quality Chinese porcelain motifs provided in both raster (PNG) and vector (SVG) formats. These motifs have been extracted from historical vessel images, processed through multiple refinement stages, and standardized for research and creative applications. Each motif is available in both formats to support diverse use cases from machine learning to graphic design.

Supported Tasks and Leaderboards

  • Pattern Synthesis: Training generative models for motif creation
  • Style Transfer: Fine-tuning diffusion models (LoRA, DreamBooth)
  • Vector Analysis: Studying geometric properties of traditional patterns
  • Design Applications: Creating new designs inspired by traditional motifs
  • Cultural Pattern Recognition: Training classifiers for motif types
  • Procedural Generation: Developing algorithms for pattern variation
  • Digital Restoration: Reference patterns for ceramic restoration projects

Languages

Visual data with English metadata. Traditional Chinese pattern terminology may be referenced in descriptions.

Dataset Structure

Data Instances

Each motif in the collection includes:

{
  "id": "tile_001",
  "png_path": "tile_001_module_black.png",
  "svg_path": "tile_001_module_black.svg",
  "resolution": 512,
  "format": "binary",
  "complexity_score": 847.3,
  "stroke_width": 0.45,
  "processing_pipeline": "yolo_extract_enhance_skeleton_vectorize"
}

Data Fields

  • id: Unique identifier for each motif
  • png_path: Path to PNG raster file (512×512 pixels)
  • svg_path: Path to SVG vector file
  • resolution: Image dimensions in pixels (512×512)
  • format: Visual style (binary black/white)
  • complexity_score: Laplacian variance score indicating pattern detail
  • stroke_width: SVG stroke width in pixels (standardized to 0.45px)
  • processing_pipeline: String describing the full processing chain

Data Splits

Split # Motifs # PNG Files # SVG Files Total Files
train 100 100 100 200

Single split provided. Users should create custom splits for their applications.

Dataset Creation

Curation Rationale

This final curated collection represents the culmination of a multi-stage processing pipeline designed to:

  • Provide clean, standardized motifs suitable for machine learning
  • Offer both raster and vector formats for maximum flexibility
  • Create a high-quality reference library of traditional Chinese patterns
  • Enable both computational analysis and creative applications
  • Support reproducible research in cultural pattern studies

Source Data

Processing Pipeline Overview

1. Source Images (564 vessels)
   ↓
2. YOLO Detection & Extraction
   ↓
3. Pattern Enhancement (3x upscaling, denoising)
   ↓
4. LoRA Fine-tuning & Generation
   ↓
5. Dense Region Cropping (45% window)
   ↓
6. Skeletonization & Binarization
   ↓
7. SVG Vectorization
   ↓
8. Quality Filtering & Curation
   ↓
9. Final Library (100 motifs)

Detailed Processing Steps

Stage 1: Extraction

  • YOLOv8x object detection for vessel localization
  • Laplacian variance scoring for pattern-dense regions
  • Adaptive window sizing (25%, 35%, 45% of minimum dimension)
  • Initial extraction at native resolution

Stage 2: Enhancement

  • Bicubic upscaling (3x)
  • Fast NL-means denoising
  • Gaussian blur and weighted sharpening
  • Quality filtering (variance > 100, mean diff > 15)

Stage 3: Generation & Refinement

  • LoRA fine-tuning on extracted motifs (3 epochs)
  • Stable Diffusion generation with strong prompting
  • Image-to-image refinement (strength: 0.55)
  • DPMSolver with 16 steps for efficiency

Stage 4: Final Processing

  • Dense region extraction (45% crop ratio)
  • Morphological skeletonization
  • Binary thresholding (pure black/white)
  • Contour-based SVG conversion
  • Standardization to 512×512

Annotations

Quality Control Process

  1. Automatic Filtering:

    • Removal of low-variance (blank) images
    • Detection of circular medallions (rejected)
    • Center object detection (rejected)
    • Duplicate detection via MD5 hashing
  2. Manual Curation:

    • Visual inspection for pattern quality
    • Verification of traditional motif characteristics
    • Ensuring variety across the collection
  3. Technical Validation:

    • PNG format: 8-bit grayscale or RGB
    • SVG format: Valid XML, polyline paths
    • Consistent stroke widths (0.45px)
    • File integrity verification

Who are the annotators?

  • Automated pipeline for technical processing
  • Dataset curator for final selection and quality assurance

Personal and Sensitive Information

No personal or sensitive information is contained in this dataset.

Considerations for Using the Data

Social Impact of Dataset

  • Digital Heritage: Preserving traditional Chinese decorative arts in modern formats
  • Creative Commons: Enabling new creative works inspired by historical patterns
  • Research Acceleration: Providing ready-to-use data for pattern analysis
  • Educational Resource: Teaching traditional design principles through accessible formats

Discussion of Biases

Processing Biases:

  • Complexity Preference: Pipeline favors intricate patterns over simple ones
  • Contrast Bias: Binary processing may lose subtle gradations
  • Scale Normalization: Fixed 512×512 may not preserve original proportions
  • Skeletonization Bias: Thin features emphasized over solid areas

Cultural Representation:

  • Period Mix: Patterns from different dynasties treated uniformly
  • Style Conflation: Regional variations may be homogenized
  • Modern Interpretation: Processing may not preserve historical accuracy

Other Known Limitations

  • Limited to 100 curated examples
  • Binary format loses original color information
  • SVG conversion is approximation, not perfect vectorization
  • Some geometric patterns may be better preserved than organic ones
  • Fixed stroke width may not suit all pattern types
  • Processing artifacts possible in complex regions

Additional Information

Dataset Curators

Mary Zhang

Licensing Information

Dataset License

This processed dataset is released under Creative Commons Attribution 4.0 International (CC BY 4.0) for research and educational use.

Important Note

While the processing and curation are under CC BY 4.0, original patterns derive from historical sources. Users should:

  • Attribute this dataset when using the processed files
  • Respect the cultural heritage these patterns represent
  • Consider context when using for commercial purposes

Citation Information

BibTeX:

@dataset{zhang2024motif_library,
  author = {Zhang, Mary},
  title = {Chinese Porcelain Motif Library - Final Collection},
  year = {2024},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/maryzhang/motif_library_final},
  note = {100 curated Chinese porcelain motifs in PNG and SVG formats, processed through multi-stage pipeline}
}

APA: Zhang, M. (2024). Chinese Porcelain Motif Library - Final Collection [Dataset]. HuggingFace. https://huggingface.co/datasets/maryzhang/motif_library_final

Contributions

  • Original vessel imagery from Smithsonian, Met Museum, National Palace Museum
  • Ultralytics for YOLOv8 detection framework
  • Stable Diffusion community for generative refinement tools
  • Open source computer vision libraries (OpenCV, Pillow, scikit-image)

Technical Specifications

File Formats

PNG Files:

  • Resolution: 512×512 pixels
  • Color mode: Binary (black/white) or grayscale
  • Bit depth: 8-bit
  • Compression: PNG standard
  • Average file size: 15-50 KB

SVG Files:

  • Viewport: 512×512 pixels
  • Path type: Polyline contours
  • Stroke width: 0.45px uniform
  • Fill: None
  • Stroke color: Black (#000000)
  • Average file size: 10-30 KB

Statistical Properties

  • Average pattern complexity: 847.3 (Laplacian variance)
  • Stroke density: 12-45 polylines per motif
  • Coverage: 15-60% of canvas area
  • Symmetry: Mixed (radial, bilateral, asymmetric)

Usage Examples

Loading for ML Training

from datasets import load_dataset
from PIL import Image
import torch
from torchvision import transforms

# Load dataset
dataset = load_dataset("maryzhang/motif_library_final")

# Setup transforms for ML
transform = transforms.Compose([
    transforms.ToTensor(),
    transforms.Normalize([0.5], [0.5])
])

# Process motifs
for item in dataset['train']:
    png_img = Image.open(item['png_path'])
    tensor = transform(png_img)
    # Your model training here

Working with SVG

import svgwrite
from xml.dom import minidom

# Parse SVG for analysis
def analyze_svg(svg_path):
    doc = minidom.parse(svg_path)
    paths = doc.getElementsByTagName('polyline')
    
    total_points = 0
    for path in paths:
        points = path.getAttribute('points')
        total_points += len(points.split())
    
    return {
        'num_paths': len(paths),
        'total_points': total_points
    }

Design Application

# Combine motifs for new designs
def create_pattern_tile(motif_path, repetitions=2):
    img = Image.open(motif_path)
    width, height = img.size
    
    # Create tiled pattern
    new_img = Image.new('RGB', (width * repetitions, height * repetitions))
    for i in range(repetitions):
        for j in range(repetitions):
            new_img.paste(img, (i * width, j * height))
    
    return new_img

Recommended Use Cases

Research Applications

  • Training diffusion models for pattern generation
  • Developing pattern recognition algorithms
  • Studying geometric properties of traditional designs
  • Cross-cultural pattern analysis
  • Computational creativity research

Educational Applications

  • Teaching traditional Chinese design principles
  • Demonstrating pattern extraction techniques
  • Workshops on cultural heritage digitization
  • Computer vision course materials

Creative Applications

  • Generating new patterns inspired by tradition
  • Textile and ceramic design
  • Digital art installations
  • Architecture and interior design elements

Version History

  • v1.0.0 (2024): Initial release with 100 curated motifs

Future Improvements

  • Expand to 500+ motifs
  • Add color variants from original vessels
  • Include period/dynasty classifications
  • Provide multiple complexity levels
  • Add pattern type annotations (floral, geometric, etc.)
  • Include 3D-aware pattern representations

AI-Assisted Development

  • Transparency Note: ChatGPT was utilized during the development process for: code generation and debugging

Downloads last month
4

Space using maryzhang/motif_library_final 1