GithubHelp home page GithubHelp logo

jizhihang / mxnet-ssd.cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhreshold/mxnet-ssd.cpp

0.0 2.0 0.0 7.04 MB

C++ object detection module for mxnet-ssd

License: MIT License

Shell 0.01% Batchfile 0.01% C++ 99.74% C 0.25%

mxnet-ssd.cpp's Introduction

mxnet-ssd.cpp

C++ object detection module for mxnet-ssd.

Note that python detection module is already included in mxnet-ssd. The goal of this repository is to create a test end for mxnet-ssd with no external dependency.

demo demo1

Installation

Ubuntu/Debian

  • Install prerequisites, via sudo apt-get install cmake git build-essentials and make sure your c++ compiler support C++11 (g++4.8 or above): g++ --version
  • Clone this repo recursively: git clone --recursive https://github.com/zhreshold/mxnet-ssd.cpp
  • Build all using script:
cd $REPO_ROOT/build
bash ./install.sh

Windows

  • Install prerequisite:
    • cmake and git(git is optional, highly recommended), they both provide installer online.
    • Install Visual Studio 2015(verified version).
  • Clone this repo:
git clone https://github.com/zhreshold/mxnet-ssd.cpp
git checkout win
# or you can download from github as zip file if git was not installed
# be sure to switch to branch win before download
  • Generate VS solution:
cd /path/to/repo/build
./create_sln_vs2015.bat
# the solution will be created in build/vc14/
# open this solution and build, the executable and dlls will be copied to /repo/build if success

OSX

Installation guide to be added.

Download the model

Download the pretrained model and unzip to the same folder as the executable. By default it's the build directory.

You can put the model any where you like, as long as you run the program with --model /path/to/model_prefix

Usage

cd $REPO_ROOT/build
./ssd ../demo/000001.jpg
# save detection image
./ssd ../demo/000004.jpg -o out.jpg
# save detection results to text file
./ssd ../demo/000002.jpg --save-result result.txt

Full usage info: ./ssd -h

Usage: ssd  [-hv] [-o <FILE>] [-m <FILE>] [-e <INT>] [--class-map <FILE>] [--width <INT>] [--height <INT>] [-r <FLOAT>] [-g <FLOAT>] [-b <FLOAT>] [-t <FLOAT>] [--gpu <INT>] [--disp-size <INT>] [--save-result <FILE>] <FILE>

  Required options:
  <FILE>                    input image

  Optional options:
  -h, --help                print this help and exit
  -v, --version             print version and exit
  -o, --out=FILE            output detection result to image
  -m, --model=FILE          load model prefix(default: deploy_ssd_300)
  -e, --epoch=INT           load model epoch(default: 1)
  --class-map=FILE          load classes from text file
  --width=INT               resize width(default: 300)
  --height=INT              resize height(default: 300)
  -r, --red=FLOAT           red mean pixel value(default: 123)
  -g, --green=FLOAT         green mean pixel value(default: 117)
  -b, --blue=FLOAT          blue mean pixel value(default: 104)
  -t, --thresh=FLOAT        visualize threshold(default: 0.5)
  --gpu=INT                 gpu id to detect with, default use cpu(default: -1)
  --disp-size=INT           display size, -1 to disable display(default: 640)
  --save-result=FILE        save result in text file


Credits

mxnet-ssd.cpp's People

Contributors

zhreshold avatar

Watchers

James Cloos avatar  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.