GithubHelp home page GithubHelp logo

mmdeploy-golang's Introduction

MMDeploy x Golang

 
OpenMMLab website HOT      OpenMMLab platform TRY IT OUT
 

Introduction

Go API for mmdeploy~

Prerequisites

To make sure the building of this repo in success, you should install some pre-packages.

The following guidance is tested on Ubuntu OS on x86 device.

Step 1. Install Golang and setup the envronment for it.

Step 2. Download and install pre-built mmdeploy package and onnxruntime. In this guidance, we choose a MMdepoloy prebuilt package target on ONNXRUNTIME-linux-x86.

wget https://github.com/open-mmlab/mmdeploy/releases/download/v0.8.0/mmdeploy-0.8.0-linux-x86_64-onnxruntime1.8.1.tar.gz
tar -zxvf mmdeploy-0.8.0-linux-x86_64-onnxruntime1.8.1.tar.gz
pushd mmdeploy-0.8.0-linux-x86_64-onnxruntime1.8.1
export MMDEPLOY_DIR=$(pwd)
export LD_LIBRARY_PATH=$MMDEPLOY_DIR/build/install/lib:$LD_LIBRARY_PATH
export LIBRARY_PATH=$MMDEPLOY_DIR/build/install/lib:$LIBRARY_PATH
export CPATH=$MMDEPLOY_DIR/build/install/include:$CPATH
popd
wget https://github.com/microsoft/onnxruntime/releases/download/v1.8.1/onnxruntime-linux-x64-1.8.1.tgz
tar -zxvf onnxruntime-linux-x64-1.8.1.tgz
cd onnxruntime-linux-x64-1.8.1
export ONNXRUNTIME_DIR=$(pwd)
export LD_LIBRARY_PATH=$ONNXRUNTIME_DIR/lib:$LD_LIBRARY_PATH

Quickstart

After setting up the above instructions, you can use Go language to build your fantastic applications powered by MMDeploy! Take a look by running some examples!

Models and Testdata

You can

when you finish your download of the models, put them drectly in the fold named models in the go api path.

Classifier API

Deploy image classification models converted by MMDeploy.

go build examples/ImageClassification.go
./ImageClassification cpu models/classification images/input_images/DemoImageClassification.png

ObjectDetection API

Deploy object detection models converted by MMDeploy.

go build examples/ObjectDetection.go
./ObjectDetection cpu models/detection images/input_images/DemoObjectDetection.jpg

Segmentation API

Deploy object segmentation models converted by MMDeploy.

go build examples/Segmentation.go
./Segmentation cpu models/segmentation images/input_images/DemoSegmentation.png

PoseDetection API

Deploy pose detection models converted by MMDeploy.

go build examples/PoseDetection.go
./PoseDetection cpu models/pose-detection images/input_images/DemoPoseDetection.png

RotatedDetection API

Deploy rotated detection models converted by MMDeploy.

go build examples/RotatedDetection.go
./RotatedDetection cpu models/rotated-detection images/input_images/DemoRotatedDetection.jpg

OCR API

Deploy text detection and text recognition models converted by MMDeploy.

go build examples/Ocr.go
./Ocr cpu models/text-detection models/text-recognition images/input_images/DemoOcr.jpg

Restorer API

Deploy restorer models converted by MMDeploy.

go build examples/Restorer.go
./Restorer cpu models/super-resolution images/input_images/DemoRestorer.png

TOSupport List

  • Classifier
  • Detector
  • Segmentor
  • Pose Detector
  • Rotated Detector
  • Text Detector
  • Text Recognizer
  • Restorer

mmdeploy-golang's People

Contributors

ueanperfect avatar

Stargazers

suixinio avatar  avatar  avatar 孙德伟 avatar Xin Li avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

dhzgit2

mmdeploy-golang's Issues

Welcome update to OpenMMLab 2.0

Welcome update to OpenMMLab 2.0

I am Vansin, the technical operator of OpenMMLab. In September of last year, we announced the release of OpenMMLab 2.0 at the World Artificial Intelligence Conference in Shanghai. We invite you to upgrade your algorithm library to OpenMMLab 2.0 using MMEngine, which can be used for both research and commercial purposes. If you have any questions, please feel free to join us on the OpenMMLab Discord at https://discord.gg/amFNsyUBvm or add me on WeChat (van-sin) and I will invite you to the OpenMMLab WeChat group.

Here are the OpenMMLab 2.0 repos branches:

OpenMMLab 1.0 branch OpenMMLab 2.0 branch
MMEngine 0.x
MMCV 1.x 2.x
MMDetection 0.x 、1.x、2.x 3.x
MMAction2 0.x 1.x
MMClassification 0.x 1.x
MMSegmentation 0.x 1.x
MMDetection3D 0.x 1.x
MMEditing 0.x 1.x
MMPose 0.x 1.x
MMDeploy 0.x 1.x
MMTracking 0.x 1.x
MMOCR 0.x 1.x
MMRazor 0.x 1.x
MMSelfSup 0.x 1.x
MMRotate 1.x 1.x
MMYOLO 0.x

Attention: please create a new virtual environment for OpenMMLab 2.0.

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.