# Geometric Shapes Dataset This dataset contains procedurally generated images of various geometric shapes with corresponding captions. It's designed for educational purposes and testing of diffusion models. ## Dataset Overview - **Content**: 100,000 images of geometric shapes with detailed metadata - **Image size**: 512x512 pixels - **Format**: PNG images with CSV metadata - **Features**: Various shapes, colors, sizes, and descriptive captions - **Purpose**: Educational use for training and testing single-step diffusion models ## Dataset Creation The dataset was generated using the included Python script (`create_dataset.py`), which was created with the assistance of Claude AI (Anthropic). The script generates a wide variety of geometric shapes with different properties: - **Shapes**: 50+ different shapes including basic shapes (circle, square, triangle) and more complex ones (hypocycloid, lemniscate, star) - **Colors**: 30 different colors with their hex values - **Sizes**: Randomly scaled from 10% to 100% with corresponding descriptive terms - **Captions**: Diverse, randomly generated descriptions of the shapes in various formats ## Usage ### Using the Dataset This dataset is designed for educational purposes only. It's particularly useful for: - Learning to build diffusion models from scratch - Experimenting with simple image-to-text and text-to-image models - Testing model performance on synthetic data - Educational demonstrations of computer vision concepts ### OPTIONAL - If you want to createw youe own images If you want to generate your own version of the dataset or modify the parameters: 1. Install the required dependencies: ```bash pip install numpy matplotlib tqdm ``` 2. Run the script: create a folder "geometric_shapes", and save create_dataset.py the in the folder, and execute it ```bash python create_dataset.py ``` ``` Generating Images: 100%|█████████████████████████████████████████████████| 100000/100000 [07:36<00:00, 218.96it/s] Generated 100000 images in 456.89 seconds Size: 100000 images ``` 3. By default, the script will: - Generate 100,000 images in the `dataset/images` directory - Create a `dataset/metadata.csv` file with image filenames and captions - Use 10 CPU cores for parallel processing 4. You can modify these parameters in the `__main__` section of the script: ```python generate_images_multiprocess( num_images=100000, # Change this number to generate fewer/more images max_workers=10, # Change based on your CPU cores img_size=(512, 512) # Modify image dimensions ) ``` 5. Ensure your dataset is organized as follows: ``` geometric_shapes/ ├── README.md ├── create_dataset.py ├── dataset/ │ ├── images_001/ │ │ ├── image1.jpg │ │ ├── image2.jpg │ │ ├── ... ``` 6. Upload Instructions Log in to Hugging Face: ```sh huggingface-cli login ``` Upload the dataset: ```sh cd .. && huggingface-cli upload-large-folder anokimchen/geometric_shapes geometric_shapes --repo-type dataset && cd geometric_shapes ``` ## License This dataset is provided for educational and research purposes only. ## Acknowledgements - Code generated with the assistance of Claude (Anthropic) - Dataset created for learning purposes to build and test single-step diffusion models ## Citation If you use this dataset in your research or educational projects, please include a reference to this repository.