Welcome to fbscatnet’s Documentation!
API Reference
This section documents the core modules of the fbscatnet package.
Generate Bank
- class fbscatnet.generate_bank.FourierBesselWaveletBank(size, m, k, sigma=0.3, norm='l1', verbose=False)[source]
Bases:
objectA bank of Fourier-Bessel wavelets indexed by parameters m and k.
- get_keys()[source]
Return the dictionary keys representing individual wavelets.
- Returns:
View of the string keys.
- Return type:
KeysView[str]
- get_values()[source]
Return the collection of wavelet arrays.
- Returns:
View of the wavelet numpy arrays.
- Return type:
ValuesView[np.ndarray]
Scatnet
- class fbscatnet.scatnet.FourierBesselScatNet(bank, backend='cpu')[source]
Bases:
objectA scattering network based on Fourier-Bessel wavelets for generating image embeddings.
- Parameters:
bank (FourierBesselWaveletBank)
backend (str)
- bank
The bank of Fourier-Bessel wavelets.
- Type:
- low_pass
Low-pass filter array retrieved from the bank.
- Type:
np.ndarray
- final_features
Generated feature embeddings from the last run.
- Type:
np.ndarray
- generate_embeddings(data, downsize, batch_size=32, use_multiprocessing=False)[source]
Generate scattering network feature embeddings for a given dataset.
- Parameters:
data (np.ndarray) – Input image dataset of shape (num_samples, height, width).
downsize (int) – Spatial downsampling factor via block mean pooling.
batch_size (int, optional) – Number of samples per batch. Defaults to 32.
use_multiprocessing (bool, optional) – Whether to use multiple CPU cores (Ignored if backend=’gpu’). Defaults to False.
- Returns:
Flattened feature embeddings of shape (num_samples, feature_dim).
- Return type:
np.ndarray