peal.data.dataset_generators.SquareDatasetGenerator¶
- class peal.data.dataset_generators.SquareDatasetGenerator[source]¶
Bases:
objectSynthetic 64x64 “square” dataset with four independent binary factors.
Sample
igetsClassA = i % 2(inner square bright/dark red),ClassB = (i // 2) % 2(background bright/dark),ClassCandClassD(square in the lower/upper half in x and y). The continuous factors are stored asColorA, ColorB, PositionX, PositionY. Every sample also gets an_inversetwin with inverted background colour and the same noise, and a mask of the inner square is written for both.- Parameters:
data_config (
DataConfig) – Suppliesdataset_pathandnum_samples.
Methods
Write
imgs/,masks/anddata.csvfor the dataset and its_inversetwin (<dataset_path>_inverse).