GithubHelp home page GithubHelp logo

stanford-cars-classification's Introduction

开始之前

    -cars_meta.mat:
      Contains a cell array of class names, one for each class.

    -cars_train_annos.mat:
      Contains the variable 'annotations', which is a struct array of length
      num_images and where each element has the fields:
        bbox_x1: Min x-value of the bounding box, in pixels
        bbox_x2: Max x-value of the bounding box, in pixels
        bbox_y1: Min y-value of the bounding box, in pixels
        bbox_y2: Max y-value of the bounding box, in pixels
        class: Integral id of the class the image belongs to.
        fname: Filename of the image within the folder of images.

    -cars_test_annos.mat:
      Same format as 'cars_train_annos.mat', except the class is not provided.

Stanford Cars Dataset这个数据集一共196类,训练集8144,测试集8041。cars_meta.mat包含了所有类的编号和类名,cars_train_annos.mat包含了训练集车的坐标,文件名,cars_test_annos.mat同理。cars_test_annos_withlabels.mat另外包含了测试集的编号,用于测试。文件可在data下找到。

思路

数据预处理 ——> 训练(Fine-tuning on AlexNet, CaffeNet,训练代价小,不容易过拟合)——> 预测

data preprocessing

  • 裁剪 根据bouding box裁剪出车辆
  • 重采样 裁剪出车辆之后,图片大小不一致,需要将裁减后的图片重新采样到同样的大小,保持数据的一致性。再然后因为AlexNet, CaffeNet的pre-trained model输入大小在227,所以同样把图片resize到227*227的大小。可能有些样本会出现形变和模糊不清,因为大小不等,没有解决方法。
  • normalization 将样本像素值归一化到0~1之间,乘以0.00390625,不要除以255或者256,python2除法只会返回int,不会保留小数。
  • zero-centering 减去pixel的均值

训练

在AlexNet, CaffeNet上迁移学习。

预测

测试集同样的处理方法,输出准确度。

stanford-cars-classification's People

Contributors

hzzone avatar

Stargazers

Arya avatar hello_sarah avatar SHI Xuan avatar

Watchers

mejihero avatar  avatar

Forkers

mejihero

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.