Giter VIP home page Giter VIP logo

kaggle-cifar10's Introduction

kaggle cifar10 图像分类比赛

项目介绍

在本项目中,大家会学会使用卷积网络进行kaggle cifar10的图像分类,我们给定一个非常简单的 resnet18 的baseline,大家可以使用任意的网络结构进行训练和测试,通过该项目,我们能够对调参有更好的了解。

项目下载

打开终端,运行

git clone https://github.com/L1aoXingyu/kaggle-cifar10.git

进行项目的下载或者通过网页版下载

数据下载

通过比赛界面根据图片中的显示进行数据下载

然后在项目的根目录中创建data文件夹,将下载好的4个文件放入data中,接着运行下面的命令来得到预处理之后的数据

sudo apt-get install p7zip
cd data;
p7zip -d train.7z;
p7zip -d test.7z;
cd ..; python3 preprocess.py;

这里可能需要等待比较久的时间

训练 baseline

运行下面的代码

python3 train.py --bs=128  # cpu 训练
python3 train.py --bs=128 --use_gpu # gpu 训练

就可以进行baseline训练, 其中 bs 表示 batch size, use_gpu 表示是否使用 gpu,还有一些额外的参数,请阅读 train.py,在训练过程中,会自动创建checkpoints文件夹,训练的模型会自动保存在checkpoints中。

提交结果

训练完成 baseline 之后,我们的模型会保存在 checkpoints 中,我们可以 load 我们想要的模型,进行结果的提交,运行下面的代码

python3 submission.py --model_path='checkpoints/model_best.pth.tar' --use_gpu

我们会在本地创建一个预测的结果 submission.csv,我们将这个文件提交到 kaggle,可以得到类似下面的比赛结果。

kaggle-cifar10's People

Contributors

l1aoxingyu avatar

Stargazers

kenn avatar  avatar cjpan avatar Mazeqi avatar  avatar  avatar Daqiu Shi avatar Emma avatar Wentao Chao avatar cheng avatar  avatar viriya avatar Peng Wang avatar rookie avatar  avatar Tony Tree avatar

Watchers

James Cloos avatar  avatar pzSuen avatar

kaggle-cifar10's Issues

good job!

很棒的cifar-10 baseline,
我自己也在参照论文写baseline
有个疑问,应该是Res14(6*2 + 2)吧,为什么取名是Res18?

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.