Coder Social home page Coder Social logo

imageclassification's Introduction

基于卷积神经网络的图片分类

项目介绍

此数据集包含鸡、兔子和老鼠共三种动物,可分作哺乳纲和鸟纲。数据集中,鸡和兔子各340张图片,老鼠的图片290张。  
项目共分为三个部分:  
                  * 第一部分为针对哺乳纲(老鼠和兔子)和鸟纲的二分类任务  
                  * 第二部分为针对鸡、兔子和老鼠的三分类任务  
                  * 第三部分为同时针对纲和种进行的多标签分类任务。

模型展示

模型示意图 图注:这里我们使用了 cov 卷积+maxpoolong 池化+relu 激活的两层网络,最后使用全连接 来进行 flatten 操作的方式来搭建基本的 network。最终得到 两/三个类别的概率向量大小

结果综述

在此次项目中,主要的限制因素是数据集的质量。  
一方面,数据量较少,不能覆盖分类目标的大部分特征,另一方面,训练集和测试集的图片画风相差较大,即特征分布并不相同。这两方面因素制约了模型的泛化能力,导致训练过程中极易发生过拟合,而这也是其他正则化方法不能完全弥补的缺陷。  
在 loss 值的处理上,是使用了将 classes 与 species 的 loss 进行相加求平均的方式。 在同样的网络之中,二分类问题的准确率明显大于三分类问题,并随着类别的增加而下降 Acc 中,我们判断将两个任务都判断准确的作为正确的结果,使用判断正确的/总数据集大 小来计算。
由于数据集过小,所以非常容易出现过拟合的情况,此时 train 的 loss 会停滞不变, 比如 stage2 和 stage3 中,可以通过数据增广、增加 epoch 并渐小学习率,调整 batch size 的方式来进行优化。

所以此项目的主要意义在于,实现了深度学习中在计算机视觉领域图像分类的具体应用。  
学会了常规的数据处理、数据读取、模型搭建、模型训练和优化调参的具体方法,很适合小白使用此案例来进行 pytorch 图像分类的入门。为以后的学习打下实践基础。

项目成员

Winter : https://github.com/zysc1996  
JocelynWang2333 : https://github.com/JocelynWang2333  
Sunmile : https://github.com/Sunmilelj  
Rongxin : https://github.com/dengrongxin

imageclassification's People

Contributors

zysc1996 avatar jocelynwang2333 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.