btk.blend_generator module

The blend_generator module defines the BlendGenerator class, which is used for generating blend parameters. This class is only used internally, inside a DrawBlendsGenerator.

Contains class BlendGenerator to combine entries from a given catalog into blends.

class btk.blend_generator.BlendGenerator(catalog: Catalog, sampling_function: SamplingFunction, batch_size: int = 8, verbose: bool = False)

Bases: object

Class that uses a catalog and a sampling function to return blend information in batches.

__init__(catalog: Catalog, sampling_function: SamplingFunction, batch_size: int = 8, verbose: bool = False)

Initializes the BlendGenerator.

Parameters:
  • catalog – BTK Catalog object

  • sampling_function – An object that return samples from catalog.

  • batch_size – Size of batches returned. (Default: 8)

  • verbose – Whether to print additional information.