A neural network toolkit built on pytorch/opencv/numpy that includes neural network layers, modules, loss functions, optimizers, data loaders, data augmentation, etc.
- Advanced neural network modules, such as EfficientNet, ResNet, SENet, Xception, DenseNet, FocalLoss, AdaboundW
- Ultra-efficient dataloader that allows you to take full advantage of GPU
- High performance and multifunctional data augmentation(See woodsgao/image_augments)
git remote add pytorch_modules https://github.com/Baizngaliu/pytorch_modules
git subtree add --prefix=<subtree_path> pytorch_modules master
cd <subtree_path>
pip install -r requirements.txt
git clone https://github.com/Bazingaliu/pytorch_modules
cd pytorch_modules
pip install -r requirements.txt
This module contains a variety of neural network layers, modules and loss functions.
import torch
from pytorch_modules.nn import ResBlock
# NCHW tensor
inputs = torch.ones([8, 8, 224, 224])
block = ResBlock(8, 16)
outputs = block(inputs)
See Bazingaliu/image_augments for more details.
This module includes a series of modified backbone networks, such as EfficientNet, ResNet, SENet, Xception, DenseNet.
import torch
from pytorch_modules.backbones import ResNet
# NCHW tensor
inputs = torch.ones([8, 8, 224, 224])
model = ResNet(32)
outputs = model(inputs)
This module includes a series of dataset classes integrated from pytorch_modules.datasets.BasicDataset
which is integrated from torch.utils.data.Dataset
.
The loading method of pytorch_modules.datasets.BasicDataset
is modified to cache data with LMDB
to speed up data loading. This allows your gpu to be fully used for model training without spending a lot of time on data loading and data augmentation.
Please see the corresponding repository for detailed usage.
pytorch_modules.datasets.ClassificationDataset
> woodsgao/pytorch_classificationpytorch_modules.datasets.SegmentationDataset
> woodsgao/pytorch_segmentation