Code Monkey home page Code Monkey logo

boostingmodelspeed's Introduction

About

This is code corresponding to article "How I Improved the Speed of my Computer Vision Model by 3x" (TODO: LINK)

Requirements

For Python implementation, requirements include python modules: tensorflow==2.0.0 numpy==1.18.1 opencv-contrib-python==4.2.0.34

For C++ implementation, requirements include installing Cppflow (https://github.com/serizba/cppflow) in /usr/include or /usr/local/include directory, as well as TensorFlow for C (https://www.tensorflow.org/install/lang_c)

Note: When installing Cppflow, following modifications would be necessary to src/Model.cpp Model::init()

  1. In the first line of the function:

TF_Operation* init_op[1] = {TF_GraphOperationByName(this->graph, "init")};

Replace "init" with the name of your graph's input placeholder. In frozen_graph.pb of this directory, the name of the input is "x".

  1. Comment out these last couple of lines, as they sometimes give problems even if remainder of functionality works well.

    // TF_SessionRun(this->session, nullptr, nullptr, nullptr, 0, nullptr, nullptr, 0, init_op, 1, nullptr, this->status); // this->status_check(true);

How to use

To run python implementation, simply run HowToBoostInferencingSpeed.ipynb cells and see output.

To run C++ implementation, simply run make. Then enter build directory and run executable "example".

boostingmodelspeed's People

Contributors

sravit1 avatar

Watchers

 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.