Giter Site home page Giter Site logo

grains-svm-android's Introduction

简易五谷分类器

IDE: android studio 2.2.2

OS: ubuntu 16.04

Android Mini API: 23 (Marshmallow)

一个模式识别课程小设计,使用手机端识别从这个仓库训练得到已识别谷物。

使用SVM分类器,提取谷物的几个特征进行简单分类。

依赖

主要是图像库

  • opencv4android 2.4.13.1

使用方法

  • 下载opencv4android,并解压。这里用的是2.4.13.1版本

  • 解压得到OpenCV-android-sdk/sdk/native/libs/下面的对应平台的so动态链接库,拷贝到工程grains-svm/src/main/jniLibs/下。使得目录结构如下

      grains-svm/src/main/jniLibs/
      ├── armeabi-v7a
      │   ├── libopencv_info.so
      │   └── libopencv_java.so
      └── x86
      	├── libopencv_info.so
      	└── libopencv_java.so
    
  • 刷新android studio工程(File->Synchronize)。

  • 修改gradle.properties,增加一行

      android.useDeprecatedNdk=true
    
  • Android Virtual Device下载对应CPU架构的虚拟机(可选)以方便调试。比如我是x86(不选x86_64是因为cv库没有预编译x64平台)

C和gamma值的调优

一般在电脑端进行训练并交叉验证。参考这个仓库训练样本。

对不同的训练采用不同的交叉验证,以获取最佳的C和gamma。在RBF核下这两个值决定了SVM分类器的性能。

使用libsvm进行调优。

日期:2016-12-3

grains-svm-android's People

Contributors

caiwenxiao6 avatar lixingcong avatar

Watchers

 avatar  avatar

Forkers

caiwenxiao6

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.