Calculates image sizes in a given folder and subfolders. Summarize unique image sizes at the end.

class ImageSizeCalculator[source]

ImageSizeCalculator(path)

Calculates image sizes in a given folder and subfolders. Summarize unique image sizes at the end. path: the folder to process

ImageSizeCalculator.calculate[source]

ImageSizeCalculator.calculate()

The main logic. return: a dictionary with unique sizes as key and image count as value

Helper Methods

configure_logging[source]

configure_logging(logging_level=20)

Configures logging for the system.

:param logging_level: The logging level to use.

Run from command line

To run the image size calculator from command line, use the following command: python -m mlcore.tools.image_size_calculator [parameters]

The following parameters are supported:

  • [folder]: The folder to scan.