Create_DDB module#
The database generated by the CreeBD class is designed to make the data base.
The CreeBD class performs several steps on the input images before generating the database:
Note
By applying these preprocessing techniques, the CreeBD class simplifies the original image data and prepares it for the neural network training process.
The simplified representations help the network focus on relevant patterns and features.
- class Create_DDB.CreeBD(Test=True, nbrimageset=500)[source]#
Bases:
object
Class for creating the image database.
Parameters: - Test (bool): Indicates whether to run the create test database mode or not. Default is True. - nbrimageset (int): Number of image sets to generate. Default is 500.
- __init__(Test=True, nbrimageset=500)[source]#
Initializes the CreeBD class.
Args: - Test (bool): Indicates whether to run the test mode or not. Default is True. - nbrimageset (int): Number of image sets to generate. Default is 500.
- randgen(im, ni, tq=True)[source]#
Generates random images.
Args: - im: Input image. - ni (int): Number of images to generate. - tq (bool): Indicates whether to display progress bar. Default is True.
Returns: - X (list): List of generated images.
- resize(image, l, m)[source]#
Resizes the image.
Args: - image: Input image. - l (int): Width of the resized image. - m (int): Height of the resized image.
Returns: - Resized image.
- rotation(image, deg)[source]#
Rotates the image.
Args: - image: Input image. - deg (float): Rotation angle in degrees.
Returns: - Rotated image.