L4T Multimedia API Reference

32.3.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
multimedia_api/ll_samples/docs/l4t_mm_caffe_to_tensorrt_guide.md
Go to the documentation of this file.
1 Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
2 <!-- Tool is located in the tools/ConvertCaffeToGieModel directory. -->
3 
4 @page l4t_mm_caffe_to_tensorRT_group CAFFE to TensorRT Model Tool
5 @{
6 
7  - [Overview](#overview)
8  - [Building and Running](#build_and_run)
9  - [Key Structure and Classes](#key)
10 
11 - - - - - - - - - - - - - - -
12 <a name="overview">
13 ## Overview ##
14 
15 NVIDIA<sup>&reg;</sup> TensorRT<sup>&trade;</sup>
16 is an accelerated neural network inference engine and run-time library.
17 `ConvertCaffeToTrtModel` is a standalone model conversion tool that converts a CAFFE
18 network to a TensorRT compatible model. This tool runs offline on the
19 NVIDIA<sup>&reg;</sup> Jetson<sup>&trade;</sup>
20 platform and provides a cached TensorRT model stream to prevent subsequent repetitive
21 network conversion. Using this converted model, TensorRT-based applications can improve
22 greatly in accuracy and performance.
23 
24 If the source model changes (i.e., is retrained), the tool performs conversion again
25 to enable TensorRT accelerated inference.
26 
27 <a name="build_and_run">
28 ## Building and Running ##
29 
30 #### Prerequisites ####
31 
32 * You have followed Steps 1-3 in @ref mmapi_build.
33 * If you are building from your host Linux PC (x86), you have
34  followed Step 4 in @ref mmapi_build.
35 * You have installed the TensorRT package.
36 * You have a trained a deep-learning network.
37 
38 ### To build:
39 
40 TBD
41 
42 ### To run
43 * Enter:
44 
45  ./ConvertCaffeToTrtModel -n ../../data/Model/GoogleNet_one_class/GoogleNet_modified_oneClass_halfHD.prototxt \
46  -l ../../data/Model/GoogleNet_one_class/GoogleNet_modified_oneClass_halfHD.caffemodel \
47  -m detection -o coverage,bboxes -f fp16 -b 2 -w 115343360 -s trtModel.cache
48 
49 ### To get a list of supported options
50 * Use the `-h` option.
51 
52 
53 - - - - - - - - - - - - - - -
54 <a name="key">
55 ## Key Structure and Classes ##
56 
57 The `CudaEngine` structure is a TensorRT interface that invokes the TensorRT function.
58 
59 The sample uses the following function:
60 
61 | Function | Description |
62 | ---------------- | ----------- |
63 | caffeToTRTModel | Uses TensorRT API to transfer a network model from CAFFE to TensorRT. |
64 
65 
66 
67 
68 @}
69