create symmetrical objects in synthetic images and their corresponding mask
Project description
Shape generate
The file shape_generate.py has multiple functionality to create synthetic dataset
of symmetrical objects. The methods creates two folders, namely, images and masks. The images are constructed from the Gaussain distribution.
Installation
This repo is managed with poetry. To try out this package, do:
$ poetry install
$ poetry run symmsyn --help
Examples
The following examples show the method to create the dataset
- Create a dataset of
200images of size=256 x 256 with circle objects of radius=10and density=20
poetry run symmsyn --job_type "single" --n_image 200 --folder_name "circle_data" --object_type "circle" --image_dims 256 --circle_radius 10 --start_count 45 --end_count 50
- Create a dataset of
100images of size=512 x 512 with square objects of side=10, density=35
poetry run symmsyn --job_type "single" --n_image 100 --folder_name "square_data" --object_type "square" --image_dims 512 --start_count 34 --end_count 35 --square_size 10 10
- Create a dataset of
100images of size=512 x 512 with triangle objects of varying size, density=35
poetry run symmsyn --job_type "single" --n_image 100 --folder_name "triangle_data" --object_type "triangle" --image_dims 512 --start_count 34 --end_count 35 --size_vary True
- Create a dataset of
500images of size=256 x 256 with circle+ellipse objects of radius=10, minor_radius=5, major_radius=10, circle density=35, ellipse density=10
The elliptical objects will be equally divided into horizontal and angular objects. Specify angle parameter if needed.
poetry run symmsyn --job_type "multi" --n_image 100 --folder_name "circle_ellipse_data" --image_dims 256 --circle_radius 10 --circle_start 34 --circle_end 35 --add_ellipse True --ell_count 10 --m_radius 10 --n_radius 5 --ell_angle 45
- Create a dataset of
500images of size=256 x 256 with circle+ellipse+triangle objects of varying sizes and circle density=10, ellipse density=10, triangle density=40
The elliptical objects will be equally divided into horizontal and angular objects. Specify angle parameter if needed.
poetry run symmsyn --job_type "multi" --n_image 500 --folder_name "circle_ellipse_tri_data" --image_dims 256 --circle_start 9 --circle_end 10 --add_tri True --add_ellipse True --tri_count 40 --ell_count 10 --size_vary True
- Create a dataset of
500images of size=256 x 256 with circle+square+triangle objects of radius=10, side=10, size=12and circle density=10, square density=10, triangle density=15and change the intensity of objects to0.5*std.of the background
To change from square to rectangle objects vary the values in the parameter size, a good starting value (-8,12)
poetry run symmsyn --job_type "multi" --n_image 500 --folder_name "circle_square_tri_data" --image_dims 256 --circle_radius 10 --circle_start 9 --circle_end 10 --add_square True --add_tri True --square_size 10 10 --tri_size 12 12 --sq_count 10 --tri_count 15 --intensity_vary True --intensity_ratio 0.5
- Create only an image and mask size=256 x 256 with circle+square+triangle objects of radius=10,side=10, size=12 and circle density=10, square density=10, triangle density=15
The image and mask are saved as a file "multi.png"
To change from square to rectangle objects vary the values in the parameter size, a good starting value (-8,12)
poetry run symmsyn --job_type "multi" --image_dims 256 --circle_radius 10 --circle_start 9 --circle_end 10 --add_square True --add_tri True --square_size 10 10 --tri_size 12 12 --sq_count 10 --tri_count 15 --save_file False
=================================================================================================================================================================
Some example images are shown here.
The datasets in the order from left to right: circle objects, circle and ellipse, circle and square, circle, ellipse and triangle objects.
An example of circle, ellipse and triangle object dataset with the variation of signal to noise.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file symmetric_synthetic-0.1.0.tar.gz.
File metadata
- Download URL: symmetric_synthetic-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.0 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e669d882ffabfa7fc641f9464611f61191416e674a22605b70fde9412d5fb645
|
|
| MD5 |
5d16f8c6ffb504d61d78602778bfc6dc
|
|
| BLAKE2b-256 |
8f87459673ebc6bc3c08e03f35095a0854e46016bafd8942dcfe043568c18e95
|
File details
Details for the file symmetric_synthetic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: symmetric_synthetic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.0 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47d567f9d34d981f1ccb90fb651060e175ba9b8e4dd761345ac965103a20fb1b
|
|
| MD5 |
ec90da01ed02000b96f398e476fbcd7e
|
|
| BLAKE2b-256 |
df478829d89e670435c3483569d9fc2e257631d421dee0b6b4ef89eddf8b8233
|