Giter VIP home page Giter VIP logo

fireclassification's Introduction

Fire: Deep Learning for lazy humans

license

一、前言

Fire is a deep learning Framework written in Python and used for Image Classification task, running on top of the machine learning platform Pytorch.

Read the source code as documentation.

二、使用

2.1 训练

  1. 下载fashion mnist放到data目录下,运行make_fashionmnist.py自动提取图片并划分类别、验证集
  2. 拷贝 fire/examples/config.py.example到根目录并去掉后缀.example,然后根据需要修改相应参数、配置
  3. 拷贝 fire/examples/dataaug_user.py.example到fire目录并去掉后缀.example,然后根据需要修改相应数据增强(默认无增强)
  4. 执行python train.py 训练
  5. 执行python evaluate.py 测试(在config设置模型路径)

2.2 自定义网络结构

依次修改fire/model.py相应代码即可。

三、功能

0.数据加载

  • 文件夹形式
  • csv标签形式
  • 其它自定义形式需手动修改代码

1.支持网络

2.优化器

  • Adam
  • SGD
  • AdaBelief
  • Ranger
  • AdamW

3.学习率衰减

  • ReduceLROnPlateau
  • StepLR
  • MultiStepLR
  • SGDR

4.损失函数

  • 交叉熵
  • Focalloss

5.其他

  • Metric(acc, F1)
  • 训练日志保存
  • 交叉验证
  • 梯度裁剪
  • earlystop
  • weightdecay
  • 按文件夹设置分类标签、读取csv标签
  • 冻结/解冻 除最后的全连接层的特征层
  • labelsmooth

四、Update

  • 2022.7 [v1.0] (根据这半年打比赛经验,增加一些东西,删除一些几乎不用的东西。) 增加convnext、swin transformer、半精度训练,删除mobileformer,删除日志、tensorboard(习惯用文档记录),优化readme
  • 2021.8 [v0.9] 增加micronet和测试结果,增加rk3399测速
  • 2021.8 [v0.8] 增加mobileformer,加入fashion mnist数据集使用demo,方便测试各种模型,同时加入部分网络的训练结果

五、To Do

  • 完善Readme
  • 增加使用文档
  • 彻底分离用户自定义部分的代码
  • 特征图热力图可视化(grad-cam)
  • Dynamtic ReLU

六、参考资源

  1. albumentations
  2. warmup
  3. pytorch-grad-cam

fireclassification's People

Contributors

fire717 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.