Hi!
I am doing object recognition on my Jetson TX2 and want to try DetectNet. I have problems creating an instance of the net.
This command parse the parameters to the class:
detectNet* net = detectNet::Create(prototxt_path, model_path, mean_pixel, threshold, DETECTNET_DEFAULT_INPUT, DETECTNET_DEFAULT_COVERAGE, DETECTNET_DEFAULT_BBOX, maxBatchSize);
But gives this error when compiling:
undefined reference to `detectNet
Can you help me?
I have followed the instructions for installing the Jetson Inference libraries:
<img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-header.jpg">
# Deploying Deep Learning
Welcome to our instructional guide for inference and realtime [DNN vision](#api-reference) library for NVIDIA **[Jetson Nano/TX1/TX2/Xavier](http://www.nvidia.com/object/embedded-systems.html)**.
This repo uses NVIDIA **[TensorRT](https://developer.nvidia.com/tensorrt)** for efficiently deploying neural networks onto the embedded Jetson platform, improving performance and power efficiency using graph optimizations, kernel fusion, and FP16/INT8 precision.
Vision primitives, such as [`imageNet`](c/imageNet.h) for image recognition, [`detectNet`](c/detectNet.h) for object localization, and [`segNet`](c/segNet.h) for semantic segmentation, inherit from the shared [`tensorNet`](c/tensorNet.h) object. Examples are provided for streaming from live camera feed and processing images. See the **[API Reference](#api-reference)** section for detailed reference documentation of the C++ and Python libraries.
<img src="https://github.com/dusty-nv/jetson-inference/raw/master/docs/images/deep-vision-primitives.png" width="800">
There are multiple tracks of the tutorial that you can choose to follow, including [Hello AI World](#hello-ai-world) for running inference and transfer learning onboard your Jetson, or the full [Two Days to a Demo](#two-days-to-a-demo-digits) tutorial for training on a PC or server with DIGITS.
It's recommended to walk through the Hello AI World module first to familiarize yourself with machine learning and inference with TensorRT, before proceeding to training in the cloud with DIGITS.
### Table of Contents
* [Hello AI World](#hello-ai-world)
* [Two Days to a Demo](#two-days-to-a-demo-digits)
* [API Reference](#api-reference)
This file has been truncated. show original
Kind regards,
Otto
Hi AastaLLL
I think I did it correctly.
I downloaded the repository from here https://github.com/dusty-nv/jetson-inference .
Then i build it using cmake.
The header files was placed in folder /build/aarch64/
To test if the libraries was working I created a test file where I imported /build/aarch64/detectNet.h and created an instance and passed variables (.prototxt and more) to the constructor. Se below.
But. I got an error: undefined reference to detectNet
Do you see any mistakes?
Thanks,
Otto
#include
#include
#include “/home/nvidia/Desktop/neuralnetworks/objectDetection/detectNet/build/aarch64/include/detectNet.h”
using namespace std;
int main(){
const char * prototxt_path = “/home/nvidia/Desktop/neuralnetworks/objectDetection/caffenet_deploy.prototxt”;
const char * model_path = “/home/nvidia/Desktop/neuralnetworks/objectDetection/caffe_model.caffemodel”;
const char * mean_binary = “/home/nvidia/Desktop/neuralnetworks/objectDetection/mean.binaryproto”;
float threshold = 0.5f;
const char * input = “data”;
const char * coverage = “blob”;
const char * bboxes = “bboxes”;
const uint32_t maxBatchSize = 2;
detectNet* net = detectNet::Create(prototxt_path, model_path, mean_binary, threshold, DETECTNET_DEFAULT_INPUT, DETECTNET_DEFAULT_COVERAGE, DETECTNET_DEFAULT_BBOX, maxBatchSize);
cout << "works" << endl;
}
Hi,
You need to link the libjetson_inference.so.
Here is an simple example for your reference:
source
#include "detectNet.h"
int main( int argc, char** argv )
{
detectNet* net = detectNet::Create(argc, argv);
return 0;
}
build
nvcc -std=c++11 topic_1038283.cpp -I[jetson_inferece]/build/aarch64/include/ -L[jetson_inferece]/build/aarch64/lib/ -ljetson-inference -o test
run
LD_LIBRARY_PATH=[jetson_inferece]/build/aarch64/lib/:$LD_LIBRARY_PATH
./test
Thanks