# wk-classify
A package of tools for building deep-learning classification programs. Easy to use, light and powerful.
# Install
```shell script
pip3 install wk-classify
```
# Usage
### quick experience
```python
from wcf.packages.resnet.training import train, BaseConfig
class Config(BaseConfig):
TRAIN_DIR = 'path for train set'
VAL_DIR = 'path for val set'
cfg=Config()
train(cfg)
```
### a real example
```python
from wcf.packages.resnet.training import train, BaseConfig
from torchvision import transforms
class Config(BaseConfig):
GEN_CLASSES_FILE = True
USE_tqdm_TRAIN = False # use tqdm to format output
INPUT_SIZE = (252,196)
BATCH_SIZE = 16
NUM_EPOCHS = 50
BALANCE_CLASSES = True
VAL_INTERVAL = 0.2 # val time insterval: 0.2 epoch (0.2* num_batches_per_epoch)
WEIGHTS_SAVE_INTERVAL = 0.2 # the same as above
TRAIN_DIR = '<your train path>'
VAL_DIR = '<your val path>'
train_transform = transforms.Compose([
transforms.ColorJitter(brightness=0.1, contrast=0.1, saturation=0.1, hue=0.5),
transforms.Resize(INPUT_SIZE),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
val_transform = transforms.Compose([
transforms.Resize(INPUT_SIZE),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
])
cfg=Config()
train(cfg)
```
### all options
check out the `BaseConfig` class for all options
### how to predict?
check out `demo_predict.py`
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:wk-classify-0.0.0.3.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
wk-classify-0.0.0.3.tar.gz (38个子文件)
wk-classify-0.0.0.3
PKG-INFO 2KB
wcf
networks
models.py 33KB
utils.py 953B
torchvision_models.py 1KB
ptcv_models.py 15KB
__init__.py 149B
resnets.py 13KB
__init__.py 0B
utils
split_trainval.py 47B
misc.py 0B
merge_imagefolders.py 908B
__init__.py 0B
packages
__init__.py 0B
demo
transforms.py 3KB
testing.py 1KB
predict.py 2KB
dataset.py 4KB
__init__.py 281B
config.py 376B
network.py 35B
training.py 11KB
setup.cfg 38B
local
cigarette_classify
resnet.py 13KB
demo_predict.py 689B
demo_test.py 392B
__init__.py 0B
demo_train.py 2KB
x.py 301B
network.py 3KB
to_onnx.py 3KB
__init__.py 0B
wk_classify.egg-info
PKG-INFO 2KB
SOURCES.txt 1KB
entry_points.txt 47B
top_level.txt 10B
dependency_links.txt 1B
setup.py 2KB
README.md 2KB
共 38 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功