zbj3ji / Dataset_Image_Segmentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1. Simple data set for image segmentation tasks (Enhanced version)

This version randomly generates up to 3 objects per image. Then, the mask is created accordingly. Each object has a different mask: where a triangle is present, the mask has the value "1"; where a rectangle is present, the mask has the value "2"; and where a circle is present, the mask has the value "3". In all other areas where there are no objects present, the mask has a value of "0". You can find more examples below for your intuition:

sample_1 sample_2 sample_3

Data is already splited into dev (4500 images) and test pairs (500 images). You can download it from here.

2. Simple data set for image segmentation tasks

I was searching for a simple dataset where I could have an object and its corresponding mask (white for object present, black for object not present). I found nothing that met my expectations, so I created this simple script to generate three different objects - triangles, rectangles, and circles. They are generated in random colors and positions on the canvas, and the corresponding masks are also generated. You can run the Python script on your local machine or download some samples I've created and stored in the folder here.

Please, don't forget to change following parameters before running the script on your local machine:

NUM_IMAGES = 15
STORAGE_PATH = 'E:\\data_sets\\shapes\\'

Here are a couple of examples of original/mask pairs:

triangle_original1 triangle_mask1 triangle_original2 triangle_mask2

circle_original1 circle_mask1 circle_original2 circle_mask2

rectangle_original1 rectangle_mask1 rectangle_original2 rectangle_mask2

If you use this code to generate your own data, please remember to cite this source as Dataset_Image_Segmentation. Thank you!

About


Languages

Language:Python 100.0%