https://github.com/cjpurackal/shapes
A sample dataset generator for experimenting with computer vision models for classification, detection and segmentation before testing it out with real world datasets
https://github.com/cjpurackal/shapes
computer-vision dataset-generation deep-learning
Last synced: about 1 year ago
JSON representation
A sample dataset generator for experimenting with computer vision models for classification, detection and segmentation before testing it out with real world datasets
- Host: GitHub
- URL: https://github.com/cjpurackal/shapes
- Owner: cjpurackal
- Created: 2019-04-26T05:51:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T23:37:48.000Z (almost 3 years ago)
- Last Synced: 2025-04-02T23:34:05.563Z (over 1 year ago)
- Topics: computer-vision, dataset-generation, deep-learning
- Language: Python
- Homepage:
- Size: 244 KB
- Stars: 1
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shapes :large_blue_circle: :large_orange_diamond: :small_red_triangle: :red_circle:
A sample dataset generator for experimenting with computer vision models for classification, detection and segmentation before testing it out with real world datasets
# Usage
```
usage: run.py [-h] [--save_dir SAVE_DIR]
[--image_size IMAGE_SIZE [IMAGE_SIZE ...]]
[--num_images NUM_IMAGES] [--shapes SHAPES [SHAPES ...]]
[--shape_color SHAPE_COLOR] [--shuffle_color SHUFFLE_COLOR]
[--task_type TASK_TYPE]
optional arguments:
-h, --help show this help message and exit
--save_dir SAVE_DIR path to where you want to save the dataset
--image_size IMAGE_SIZE [IMAGE_SIZE ...]
size of the image
--num_images NUM_IMAGES
number of images for your dataset
--shapes SHAPES [SHAPES ...]
shapes that you require in your dataset. Available:
['rect', 'circle']
--shape_color SHAPE_COLOR
specify a particular color for all the shapes
--shuffle_color SHUFFLE_COLOR
shuffle colors for the shapes
--task_type TASK_TYPE
specify type of task. Available: ['classification',
'detection', 'segmentation']
```
# Example
Generate a dataset of circles and rectangles with bounding boxes
```
python run.py --save_dir /tmp/ --image_size 500 500 --num_images 5 --shapes circle rect
```
Or you can run simply with defualt config
```
python run.py --save_dir /tmp/
```
Generate a dataset for classification
```
python run.py --task_type classification --save_dir /tmp/
```
# Visualize
Visualize the generated dataset for object detection
```
python visualize.py --dataset_dir /tmp/dataset
```

