Skip to content

Generate random pictures with simple shapes in them, labeled by their spatial relationships. Used for generating example data for an ML image recognition project.

License

Notifications You must be signed in to change notification settings

YonatanNemtsov/shape-generator

Repository files navigation

Shape Generator

This is a random data generator for a machine learning project, with the goal of classifying spatial relationships of simple shapes in a picture.

Additions and improvements are welcome!

Example usage:

from shape_label_generation import triangle, square, circle, inside_of, left_of
from shape_picture_generation import draw_picture
from PIL import Image, ImageDraw

image_size = (1000,1000)
label = left_of(inside_of(triangle)(square))(circle)
image = Image.new("RGB", image_size, (255, 255, 255))
draw_picture(image, label, image_size)
print(label.linear_rep())
image.show()

Output:

image

About

Generate random pictures with simple shapes in them, labeled by their spatial relationships. Used for generating example data for an ML image recognition project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages