Datasets:
checks made
Browse files1234567891011121319 unmodified lines3334353637383940414243444597 unmodified lines1431441451461471481491 unmodified line1511521531541551561576 unmodified lines1641651661671681691701711721731741751769 unmodified lines186187188189190191192193194195196---language:- enlicense: mittask_categories:- image-classificationtags:- synthetic- geometry- computer-visionconfigs:- config_name: 30x30data_files:19 unmodified lines## Introduction to DatasetThe **Geometric Shape Dataset** is a large-scale, synthetically generated computer vision dataset containing **1,680,000** instances of various geometric shapes and lines. It is designed for training image classification, feature extraction, and pattern recognition models across different scales.The dataset is available in three distinct resolution configurations: **30x30, 40x40, and 50x50** (560,000 images per resolution).Instead of clean, binary pixel representations, this dataset introduces complex mathematical variations: every shape features dynamic scaling, random rotations, varied boundary thickness, and a unique distance-based "halo" noise gradient. Additionally, a global background noise is applied to the entire canvas. Values are strictly normalized between `0.0` and `1.0`.## Shapes DistributionThe dataset is perfectly balanced. It contains 7 distinct classes, distributed equally across the 1,680,000 samples (240,000 images per class in total, or 80,000 per class per resolution).<table style="width: 100%; text-align: left; border-collapse: collapse;"><thead><tr>97 unmodified linesTo optimize both disk space and loading speeds, the dataset is architected with modern streaming in mind:* **Configurations by Resolution:** Choose between `30x30`, `40x40`, or `50x50` subsets right from the Hugging Face viewer.* **Chunked Parquet Files:** The dataset is split into smaller, highly compressed `.parquet` chunks (5,600 images per chunk).* **Flattened Arrays:** Parquet does not natively support 2D/3D matrix cells, so the images are safely flattened into `1D` arrays. Depending on the configuration, the array length will be `900` (for 30x30), `1600` (for 40x40), or `2500` (for 50x50). They can be instantly reshaped during training.* **Pre-Shuffled:** The shapes are heavily shuffled *within* each chunk before saving. You will receive perfectly mixed, heterogeneous batches starting from the very first megabyte.## How to Use1 unmodified lineBecause of the chunked Parquet structure, you can either download the entire dataset or use **Iterable Streaming** (lazy loading) to train models without consuming any hard drive space.### 1. Streaming ModeUse `streaming=True` and specify the `name` argument (e.g., `"50x50"`) to fetch data on the fly. Don't forget to reshape the 1D flat array back to a 2D matrix matching your chosen resolution.```pythonfrom datasets import load_dataset6 unmodified linesshuffled_dataset = iterable_dataset.shuffle(buffer_size=10000, seed=42)for data in shuffled_dataset:# Extract and convert to numpy arrayflat_image = np.array(data["image"], dtype=np.float16)# Reshape back to 50x50 matrix (Change to 30, 30 if using the 30x30 config)image_matrix = flat_image.reshape(50, 50)label = data["label"]print(f"Label: {label} | Shape: {image_matrix.shape}")# Rest is up to you9 unmodified lines# This will download the 30x30 dataset configuration to your local Hugging Face cachedataset = load_dataset("OmerTurk1/GeometricShapeDataset", name="30x30", split="train")# Reshape back to 50x50 matrix (Change to 30, 30 if using the 30x30 config)first_image = np.array(dataset[0]["image"], dtype=np.float16).reshape(50, 50)first_label = dataset[0]["label"]print(f"First image is a {first_label} with shape {first_image.shape}")# Rest is up to you```123456789101112131415161719 unmodified lines37383940414243444546474849505152535455565797 unmodified lines1551561571581591601611 unmodified line1631641651661671681696 unmodified lines1761771781791801811821831841859 unmodified lines195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224---language:- enlicense: cc-by-4.0pretty_name: Geometric Shape Datasetsize_categories:- 1M<n<10Mtask_categories:- image-classificationtags:- synthetic- geometry- computer-vision- shapesconfigs:- config_name: 30x30data_files:19 unmodified lines## Introduction to DatasetThe **Geometric Shape Dataset** is a large-scale, synthetically generated computer vision dataset containing **1,680,000** instances of various geometric shapes and lines. It is designed for training image classification, feature extraction, and pattern recognition models across different scales.The dataset is available in three distinct resolution configurations: **30x30, 40x40, and 50x50** (560,000 images per resolution). Each resolution is split into a **`train`** set (504,000 images) and a **`test`** set (56,000 images).Instead of clean, binary pixel representations, this dataset introduces complex mathematical variations: every shape features dynamic scaling, random rotations, varied boundary thickness, and a unique distance-based "halo" noise gradient. Additionally, a global background noise is applied to the entire canvas. Values are strictly normalized between `0.0` and `1.0`.## Shapes DistributionThe dataset is perfectly balanced. It contains 7 distinct classes, distributed equally across the 1,680,000 samples (240,000 images per class in total, or 80,000 per class per resolution).Because every resolution is split into `train` and `test`, the per-class counts for a single resolution are:| Split | Images (per resolution) | Per class (per resolution) || :--- | :--- | :--- || `train` | 504,000 | 72,000 || `test` | 56,000 | 8,000 || **Total** | **560,000** | **80,000** |<table style="width: 100%; text-align: left; border-collapse: collapse;"><thead><tr>97 unmodified linesTo optimize both disk space and loading speeds, the dataset is architected with modern streaming in mind:* **Configurations by Resolution:** Choose between `30x30`, `40x40`, or `50x50` subsets right from the Hugging Face viewer.* **Chunked Parquet Files:** The dataset is split into smaller, highly compressed `.parquet` chunks (5,600 images per chunk).* **Nested 2D Arrays:** Each image is stored as a nested list (`List[List[float16]]`), i.e. a 2D matrix of shape `30x30`, `40x40`, or `50x50` depending on the configuration. When you convert `data["image"]` to a NumPy array it already comes back as a 2D matrix at the correct resolution, so no reshaping is required.* **Pre-Shuffled:** The shapes are heavily shuffled *within* each chunk before saving. You will receive perfectly mixed, heterogeneous batches starting from the very first megabyte.## How to Use1 unmodified lineBecause of the chunked Parquet structure, you can either download the entire dataset or use **Iterable Streaming** (lazy loading) to train models without consuming any hard drive space.### 1. Streaming ModeUse `streaming=True` and specify the `name` argument (e.g., `"50x50"`) to fetch data on the fly. Each image is already a 2D matrix, so converting it to a NumPy array gives you the right shape directly.```pythonfrom datasets import load_dataset6 unmodified linesshuffled_dataset = iterable_dataset.shuffle(buffer_size=10000, seed=42)for data in shuffled_dataset:# Already a 2D matrix (50x50 for this config); no reshape neededimage_matrix = np.array(data["image"], dtype=np.float16)label = data["label"]print(f"Label: {label} | Shape: {image_matrix.shape}")# Rest is up to you9 unmodified lines# This will download the 30x30 dataset configuration to your local Hugging Face cachedataset = load_dataset("OmerTurk1/GeometricShapeDataset", name="30x30", split="train")# Already a 2D matrix (30x30 for this config); no reshape neededfirst_image = np.array(dataset[0]["image"], dtype=np.float16)first_label = dataset[0]["label"]print(f"First image is a {first_label} with shape {first_image.shape}")# Rest is up to you```> **Tip:** Each resolution also ships a `test` split. Pass `split="test"` to `load_dataset` to evaluate your model on held-out data.## License & AttributionThis dataset is released under the **[Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/)** license.You are free to use, share, and adapt this dataset for any purpose, including commercial use, **as long as you give appropriate credit** to the author (Omer Turk / `OmerTurk1`).### CitationIf you use this dataset in your work, please cite it:```bibtex@misc{turk_geometric_shape_dataset,author = {Omer Turk},title = {Geometric Shape Dataset},howpublished = {\url{https://huggingface.co/datasets/OmerTurk1/GeometricShapeDataset}},note = {Synthetic geometric shape image classification dataset}}```
README.md+41-13