BGU-CS-VIL/WTConv
BGU-CS-VIL/WTConv has 610 GitHub stars and 24 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-23 06:02 UTC. Last push 2026-08-12.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
Wavelet Convolutions for Large Receptive Fields. ECCV 2024.
开发工具README.md
原文Wavelet Convolutions for Large Receptive Fields [ECCV 2024]
Shahaf E. Finder, Roy Amoyal, Eran Treister, and Oren Freifeld
WTConv illustration
Updates
- February 7, 2026 - Added
fast_wtconv, a high-performance implementation with CUDA, Metal, and Triton backends. More details here. - June 11, 2025 - Added WTConv1d, as implemented for TimePoint.
Requirements
- Python 3.12
- timm 1.0.7
- PyWavelets 1.6.0
How to use
You can import WTConv and use it in your CNN
from wtconv import WTConv2d
conv_dw = WTConv2d(32, 32, kernel_size=5, wt_levels=3)
Or you can use WTConvNeXt through timm's model registry
import wtconvnext
model = create_model(
"wtconvnext_tiny",
pretrained=False,
num_classes=1000
)
Fast WTConv
We provide a high-performance implementation of WTConv layers efficiently optimized for CUDA, Metal (MPS), and Triton. Please refer to fast_wtconv for more details.
Results and Trained Models
ImageNet-1K
| name | resolution | acc@1 | #params | FLOPs | model |
|---|---|---|---|---|---|
| WTConvNeXt-T | 224x224 | 82.5 | 30M | 4.5G | model |
| WTConvNeXt-S | 224x224 | 83.6 | 54M | 8.8G | model |
| WTConvNeXt-B | 224x224 | 84.1 | 93M | 15.5G | model |
Training and Validating WTConvNeXt
Training WTConvNeXt on ImageNet-1k
You can use this script, taken from the timm library, to train WTConvNeXt-T:
python train.py --model wtconvnext_tiny --drop-path 0.1 \
--data-dir IMAGENET_PATH \
--epochs 300 --warmup-epochs 20 \
--batch-size 64 --grad-accum-steps 64 --sched-on-updates \
--lr 4e-3 --weight-decay 5e-2 \
--opt adamw --layer-decay 1.0 \
--aa rand-m9-mstd0.5-inc1 \
--reprob 0.25 --mixup 0.8 --cutmix 1.0 \
--model-ema --model-ema-decay 0.9999 \
--output checkpoints/wtconvnext_tiny_300/
You can use torchrun to distribute the training, just note that the effective batch size should be 4096 (gpus * batch-size * grad-accum-steps = 4096).
E.q., we've trained the network using a single machine with 4 GPUs, hence set batch-size to 64 and grad-accum-steps to 16.
torchrun --nproc-per-node=4 \
python train.py --model wtconvnext_tiny --drop-path 0.1 \
--data-dir IMAGENET_PATH \
--epochs 300 --warmup-epochs 20 \
--batch-size 64 --grad-accum-steps 16 --sched-on-updates \
--lr 4e-3 --weight-decay 5e-2 \
--opt adamw --layer-decay 1.0 \
--aa rand-m9-mstd0.5-inc1 \
--reprob 0.25 --mixup 0.8 --cutmix 1.0 \
--model-ema --model-ema-decay 0.9999 \
--output checkpoints/wtconvnext_tiny_300/
Other network sizes:
WTConvNeXt-S
Single GPUpython train.py --model wtconvnext_small --drop-path 0.4 \
--data-dir IMAGENET_PATH \
--epochs 300 --warmup-epochs 20 \
--batch-size 64 --grad-accum-steps 64 --sched-on-updates \
--lr 4e-3 --weight-decay 5e-2 \
--opt adamw --layer-decay 1.0 \
--aa rand-m9-mstd0.5-inc1 \
--reprob 0.25 --mixup 0.8 --cutmix 1.0 \
--model-ema --model-ema-decay 0.9999 \
--output checkpoints/wtconvnext_tiny_300/
Multi-GPU
torchrun --nproc-per-node=4 \
python train.py --model wtconvnext_small --drop-path 0.1 \
--data-dir IMAGENET_PATH \
--epochs 300 --warmup-epochs 20 \
--batch-size 64 --grad-accum-steps 16 --sched-on-updates \
--lr 4e-3 --weight-decay 5e-2 \
--opt adamw --layer-decay 1.0 \
--aa rand-m9-mstd0.5-inc1 \
--reprob 0.25 --mixup 0.8 --cutmix 1.0 \
--model-ema --model-ema-decay 0.9999 \
--output checkpoints/wtconvnext_tiny_300/
WTConvNeXt-B
Single GPUpython train.py --model wtconvnext_base --drop-path 0.4 \
--data-dir IMAGENET_PATH \
--epochs 300 --warmup-epochs 20 \
--batch-size 64 --grad-accum-steps 64 --sched-on-updates \
--lr 4e-3 --weight-decay 5e-2 \
--opt adamw --layer-decay 1.0 \
--aa rand-m9-mstd0.5-inc1 \
--reprob 0.25 --mixup 0.8 --cutmix 1.0 \
--model-ema --model-ema-decay 0.9999 \
--output checkpoints/wtconvnext_tiny_300/
Multi-GPU
torchrun --nproc-per-node=4 \
python train.py --model wtconvnext_base --drop-path 0.5 \
--data-dir IMAGENET_PATH \
--epochs 300 --warmup-epochs 20 \
--batch-size 64 --grad-accum-steps 16 --sched-on-updates \
--lr 4e-3 --weight-decay 5e-2 \
--opt adamw --layer-decay 1.0 \
--aa rand-m9-mstd0.5-inc1 \
--reprob 0.25 --mixup 0.8 --cutmix 1.0 \
--model-ema --model-ema-decay 0.9999 \
--output checkpoints/wtconvnext_tiny_300/
Evaluating WTConvNeXt on ImageNet-1k
You can use this script, taken from the timm library, to validate the results:
python validate.py --model wtconvnext_tiny \
--data-dir IMAGENET_PATH \
--checkpoint WTConvNeXt_tiny_5_300e_ema.pth
Acknowledgement
The code for WTConvNeXt, as well as the training and validating scripts, were adapted from the timm library.
License
This project is released under the MIT license. Please see the LICENSE file for more information.
Citation
If you find this repository helpful, please consider citing:
@inproceedings{finder2024wavelet,
title = {Wavelet Convolutions for Large Receptive Fields},
author = {Finder, Shahaf E and Amoyal, Roy and Treister, Eran and Freifeld, Oren},
booktitle = {European Conference on Computer Vision},
year = {2024},
}
If you use the optimized implementation (CUDA/MPS/Triton) in your work, please also acknowledge:
@article{aflalo2026fast,
title={Fast and Memory-Efficient Wavelet Convolutions via I/O-Aware Reformulation},
author={Amit Aflalo and Shahaf E. Finder and Roy Amoyal and Eran Treister and Oren Freifeld},
year={2026},
journal={arXiv preprint arXiv:2608.10805},
url={https://arxiv.org/abs/2608.10805},
}
探索相关项目
加载中…