graph LR
Dataset_Loaders["Dataset Loaders"]
Image_Bounding_Box_Preprocessor["Image/Bounding Box Preprocessor"]
General_Data_Preprocessor["General Data Preprocessor"]
Data_Collator["Data Collator"]
Spike_Encoder["Spike Encoder"]
Dataset_Loaders -- "provides raw data to" --> Image_Bounding_Box_Preprocessor
Dataset_Loaders -- "provides raw data to" --> General_Data_Preprocessor
Image_Bounding_Box_Preprocessor -- "provides transformed individual data to" --> Data_Collator
General_Data_Preprocessor -- "provides transformed individual data to" --> Data_Collator
Data_Collator -- "provides batched data to" --> Spike_Encoder
The data processing subsystem in bindsnet begins with Dataset Loaders, responsible for acquiring and providing raw dataset samples. These raw samples are then directed to specialized preprocessors: the Image/Bounding Box Preprocessor handles visual data transformations, while the General Data Preprocessor manages generic data preparation and integrity checks. Both preprocessors operate on individual data samples. Once preprocessed, these individual samples are fed into the Data Collator, which aggregates them into optimized batches. Finally, the Spike Encoder receives these batched, preprocessed data and converts them into spike trains, the essential input format for Spiking Neural Networks. This sequential flow ensures that data is correctly prepared and formatted for efficient SNN model consumption.
Manages the initial acquisition and loading of raw datasets from various sources (e.g., alov300, davis, spoken_mnist). This component handles dataset-specific logic, including downloading, integrity checks, and providing the raw data interface. It serves as the entry point for all data into the SNN pipeline.
Related Classes/Methods:
bindsnet/datasets/alov300.pybindsnet/datasets/davis.pybindsnet/datasets/spoken_mnist.pybindsnet/datasets/dataloader.py
Applies specialized transformations to individual image and bounding box data samples, such as scaling, cropping, shifting, and recentering. These operations are often used for data augmentation, normalization, or preparing visual data for specific SNN architectures before batching.
Related Classes/Methods:
Handles generic data preparation workflows applicable to various individual data types, including file integrity checks, hashing, and saving processed data to disk. This component ensures data consistency and can manage cached versions of preprocessed data before batching.
Related Classes/Methods:
Aggregates preprocessed individual data samples into batches, optimizing data flow for efficient processing by PyTorch-based SNN models during training or inference. It is particularly crucial for time-series or sequential data.
Related Classes/Methods:
Converts preprocessed and batched numerical or image data into spike trains, which are the native input format for Spiking Neural Networks. This is a critical step that bridges traditional data representations with the event-driven nature of SNNs.
Related Classes/Methods: