📂 Batch Image Loader (Dataset):
The AcademiaSD_BatchLoader is a specialized node designed to facilitate the sequential loading of images from a specified local directory. Its primary purpose is to streamline the process of accessing and utilizing image datasets for AI art projects, making it an invaluable tool for artists working with large collections of images. By leveraging a circular index system, this node ensures that images are loaded in a continuous loop, allowing for efficient batch processing without manual intervention. This functionality is particularly beneficial for tasks that require iterative image analysis or manipulation, as it automates the retrieval of images based on their index position within the folder. The node also includes robust error handling to manage scenarios where images may not be found or are in an unsupported format, ensuring a smooth and uninterrupted workflow.
📂 Batch Image Loader (Dataset) Input Parameters:
folder_path
The folder_path parameter specifies the directory path where the images are stored. It is crucial for the node to know where to look for the images to load. The default value is set to "C:\\Ruta\\A\\Tus\\Imagenes", which is a placeholder path. You should replace this with the actual path to your image directory. This parameter does not have a maximum or minimum value but must be a valid directory path.
image_index
The image_index parameter determines the position of the image to be loaded from the directory. It is an integer value that allows you to specify which image in the sequence should be accessed. The default value is 0, meaning the first image in the directory will be loaded initially. The minimum value is 0, and there is no explicit maximum value, but it should not exceed the number of images in the directory.
filename_filter
The filename_filter parameter is an optional string that allows you to filter images by their filenames. By providing a specific substring, only images containing that substring in their filenames will be considered for loading. This is useful for selectively processing images that meet certain naming criteria. The default value is an empty string, meaning no filtering is applied.
📂 Batch Image Loader (Dataset) Output Parameters:
image
The image output is a tensor representing the loaded image in RGB format. This output is crucial for further processing or analysis within your AI art projects, as it provides the raw image data needed for various operations.
mask
The mask output is a tensor that represents the alpha channel of the image, if available. If the image does not have an alpha channel, a default mask of zeros is provided. This mask can be used for tasks that require transparency information or for masking operations in image processing.
image_path
The image_path output is a string that provides the full path to the loaded image. This is useful for logging, debugging, or any operation where you need to reference the specific location of the image file.
filename_text
The filename_text output is a string containing the filename of the loaded image. This is helpful for display purposes or when you need to keep track of which image is currently being processed.
📂 Batch Image Loader (Dataset) Usage Tips:
- Ensure that the
folder_pathis correctly set to the directory containing your images to avoid file not found errors. - Use the
filename_filterto efficiently process only the images that meet specific criteria, which can save time and computational resources. - Adjust the
image_indexto cycle through images in your dataset, especially useful for batch processing tasks.
📂 Batch Image Loader (Dataset) Common Errors and Solutions:
La carpeta no existe: <folder_path>
- Explanation: This error occurs when the specified folder path does not exist.
- Solution: Verify that the
folder_pathis correct and points to an existing directory containing your images.
No se encontraron imágenes válidas.
- Explanation: This error indicates that no images matching the valid extensions or filename filter were found in the specified directory.
- Solution: Check that the directory contains images with supported extensions (.jpg, .jpeg, .png, .webp, .bmp, .tiff) and that the
filename_filteris not overly restrictive.
Error cargando imagen: <error_message>
- Explanation: This error occurs when there is an issue loading a specific image, possibly due to file corruption or unsupported format.
- Solution: Inspect the image file for corruption or format issues. Ensure that the image is in a supported format and try reloading.
