parafilt
Collection of parallel adaptive filter implementations for efficient signal processing applications in PyTorch.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Keywords
Repository
Collection of parallel adaptive filter implementations for efficient signal processing applications in PyTorch.
Basic Info
Statistics
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 2
Topics
Metadata Files
README.md
ParaFilt
ParaFilt is a Python package that provides a collection of parallel adaptive filter implementations for efficient signal processing applications. It leverages the power of parallel processing using PyTorch, enabling faster and scalable computations on multi-core CPUs and GPUs.

Features
- Parallel algorithm framework that allows computing iterative algorithms in a parallel way.
- Parallel implementation of popular adaptive filter algorithms, including LMS, NLMS, RLS, and more.
- Possibility for researchers to integrate their own adaptive filter algorithms for parallel computing.
- Comprehensive documentation and examples for quick start and usage guidance.
Installation
To install ParaFilt, you can use pip:
pip install parafilt
Usage
Inputs:
desired_signal: (batch_size, samples) - Desired signal tensor.
input_signal: (samples) - Input tensor.
Returns:
Tuple containing the estimated output and the error signal (d_est, e).
d_est: (batch_size, samples) - Estimated output tensor.
e: (batch_size, samples) - Error signal tensor.
Here's an example of how to use the package to create and apply the LMS filter: ```python import parafilt
Create an instance of the LMS filter
lms_filter = parafilt.LMS(hop=1024, framelen=4096, filterlen=1024).cuda()
Perform parallel filter iteration
dest, e = lmsfilter(desiredsignal, inputsignal) ```
Here's an example of how to use the package to create and apply the RLS filter: ```python import parafilt
Create an instance of the RLS filter
rls_filter = parafilt.RLS(hop=1024, framelen=4096, filterlen=30).cuda()
Perform parallel filter iteration
dest, e = rlsfilter(desiredsignal, inputsignal) ```
For detailed usage example, please refer to this notebook.
Parallel Algorithm Framework
Parafilt provides a parallel algorithm framework that enables researchers to implement and execute iterative algorithms in a parallelized manner. This framework allows for efficient utilization of multi-core CPUs and GPUs, resulting in significant speedup for computationally intensive algorithms.

To leverage the parallel algorithm framework, researchers can extend the base classes provided by Parafilt and utilize the parallel computation capabilities provided by PyTorch.
Here's an example of how to use the package to create your own filter: ```python from parafilt import BaseFilter
class TemplateFilter(BaseFilter): def init(self, hop: int, framelen: int, filterlen: int = 1024, weightsdelay: Optional[int] = None, weightsrange: (float, float) = (-65535, 65535)): ''' Template filter class that extends the BaseFilter class. :param hop: Hop size for frame processing. :param framelen: Length of each frame. :param filterlen: Length of the filter. :param weightsdelay: Delay for the weights, If None, it is set to framelen-1 (default: None). :param weightsrange: Range for the filter weights (default: (-65535, 65535)). ''' super().init(hop=hop, framelen=framelen, filterlen=filterlen, weightsdelay=weightsdelay, weightsrange=weightsrange)
@torch.no_grad()
def forward_settings(self, d: torch.Tensor, x: torch.Tensor):
'''
Placeholder for the settings during forward.
:param d: Desired signal tensor.
Shape: (batch_size, frame_length)
:param x: Input tensor.
Shape: (1, frame_length, filter_length)
'''
return
@torch.no_grad()
def iterate(self, d: torch.Tensor, x: torch.Tensor) -> (torch.Tensor, torch.Tensor):
'''
Placeholder for the filter iteration.
:param d: Desired signal tensor.
Shape: (batch_size, frame_length)
:param x: Input tensor.
Shape: (1, frame_length, filter_length)
:return:
torch.Tensor: Estimated output tensor.
Shape: (batch_size, frame_length)
torch.Tensor: Error tensor.
Shape: (batch_size, frame_length)
'''
raise NotImplementedError
```
Citation
If you use this software, please cite it as below.
@software{asaf_zorea_2023_8004059,
author = {Asaf Zorea},
title = {ParaFilt: Parallel Adaptive Filtering for Efficient Signal Processing},
month = jun,
year = 2023,
publisher = {Zenodo},
version = {v0.1.2-beta},
doi = {10.5281/zenodo.8004059},
url = {https://doi.org/10.5281/zenodo.8004059}
}
Future Work
- Implementation of CUDA code for the parallel frameworks and filter algorithms to achieve even faster computations.
- Addition of an option for zero-padding, enabling the output size to match the input size without discarding any samples during the frame decomposition and reconstruction process after performing the filter.
Contributing
Contributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for more information.
Contact
For any inquiries or questions, please contact zoreasaf@gmail.com.
Owner
- Name: Asaf Zorea
- Login: nuniz
- Kind: user
- Location: Israel
- Repositories: 1
- Profile: https://github.com/nuniz
Asaf Zorea, :))
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Zorea" given-names: "Asaf" orcid: "https://orcid.org/0000-0001-9083-1892" title: "ParaFilt: Parallel Adaptive Filtering for Efficient Signal Processing" version: v0.1.2-beta doi: 10.5281/zenodo.8004059 date-released: 2023-06-04 url: "https://github.com/nuniz/ParaFilt"
GitHub Events
Total
- Watch event: 3
Last Year
- Watch event: 3
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 18 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
pypi.org: parafilt
ParaFilt is a Python package that provides a collection of parallel adaptive filter implementations for efficient signal processing applications.
- Homepage: https://github.com/nuniz/ParaFilt
- Documentation: https://parafilt.readthedocs.io/
- License: MIT
-
Latest release: 0.1.2b0
published over 2 years ago