Giter Club home page Giter Club logo

tensorssd's Introduction

tensorSSD

Deep-Learn model SSD_300x300 transplante to TensorRT(Nvidia Jetson Tx2)

  • include header file

#include "TensorSSD.h"
  • create TensorSSD object and initialize it

		//create tensorSSD
		TensorSSD* tensorSSD = new TensorSSD();
		//initialize with dimension of the input
		tensorSSD->initialize(1280,720);
  • convert SSD model to tensorRT model cache

tensorSSD->convertCaffeSSDModel("SSD.prototxt", "SSD.model", "trtModel.cache")
 

NOTE: you should modify the deploy file to remove or comment the item that tensorRT not supported

  • load cached model file

		//load model cached file & get cached file size
		int cacheSize = tensorSSD->loadTensorSSDModel("./trtModel.cache",&cacheSize);
  • prepare before inference

		//prepare execution with confidence threshold (0~1.0)
		tensorSSD->prepareInference(0.9);
  • do inference

    must in a video or image process loop
		//a vector that detected objects will be received
		vector<Rect> rectList;
		//do inference with a image(RGBA)
		tensorSSD->imageInference( (float4*)imgRGBA, &rectList);

		Rect rect;
		//print detected objects
		for(int i=0;i<rectList.size();i++){
			rect = rectList[i];
			printf("Object detected %d: x = %d y = %d width = %d height =  d\n",i,rect.x,rect.y,rect.width,rect.height);

		}
  • Demo

    • Ubuntu16.04,Cuda9.0,NV GEFORCE gtx 1060 on PC(x86_64)
    • USB camera, mp4 file play on a smart phone.

img

tensorssd's People

Contributors

wkexinw avatar

Watchers

 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.