Giter Club home page Giter Club logo

ogle's Introduction

OGLE

opengl2.0 based deeplearning inference engine, used for stricted environment, like web, opencl-disable arm

Introduction

OGLE is mainly for deeplearning inferece, it has two parts,

  1. Model Converter
  2. opengl based graph runtime you need to convert model you trained to onnx format first. then use converter to convert model from onnx to dlx format, only dlx model can used for graph runtime

Install

Prerequisite

  1. opengl libraries
  2. common utils libraries, like glog gtest gflag
  3. opencv, protobuf please build from source

compile

# build converter
cd converter
mkdir build && cd build && cmake .. && make -j`nproco`

# build runtime
cd ..
cd ./ogl_runtime/opengl/nn
# generate kernel files
python make_shaders.py glsl all_shaders.h all_shaders.cc
cd -

mkdir build && cd build && cmake .. && make -j`nproco`

How to use

  • convert model first
cd converter/build
export SRC=model.onnx
exoprt DST=demo.dlx
./Converter ${SRC} ${DST}
# then you can get the demo.dlx in current directory
  • to use opengl based graph runtime, please refer to ogl_runtime/opengl/examples/ssd/main.cc for example.
# demo
cd ogl_runtime/build
./opengl/examples/ssd_detector
  • trained model download from google drive or baiduyunpan , passwd: ef7i, then put demo.dlx into build directory, you can use the person detector model to detect in camera or image. the follow image is used for demostration.

Benchmark

framework model time platform mem
OGLE mobilenet ssd 8ms 1080TI 187m
MNN mobilenet ssd 9-10ms 1080TI 174m

Develop

  1. add new op please read ogl_runtime/opengl/nn/glsl and ogl_runtime/opengl/nn/kernels for reference. then you need to rerun python make_shaders.py glsl all_shaders.h all_shaders.cc again

ogle's People

Contributors

kl456123 avatar

Watchers

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