I want to launch deep_sort with yolo


I use this git repository and I added some tools like detecting a line offender.

It works well on my desktop-ubuntu.

On jetson-nano it didn`t work at all.

When I launch this file.

2019-12-07 03:53:38.722172: I tensorflow/core/common_runtime/bfc_allocator.cc:824] Stats:
Limit: 72499200
InUse: 72499200
MaxInUse: 72499200
NumAllocs: 73
MaxAllocSize: 4718592

2019-12-07 03:53:38.722235: W tensorflow/core/common_runtime/bfc_allocator.cc:319] ***************************************************************************************************x
2019-12-07 03:53:38.722301: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at random_op.cc:76 : Resource exhausted: OOM when allocating tensor with shape[1,1,384,128] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc

Error message was too long, so I brought a little.

I though it was a memory issue. So I made some swap file(6GB) using below link.


But it couldn`t solve the problem.

Hence, I attached some codes on yolo.py

from keras.backend import tensorflow_backend as K
config = tf.ConfigProto()
config.gpu_options.allow_growth = True

but got a similar result with change in numbers.

Limit: 12369920
InUse: 12369920
MaxInUse: 12369920
NumAllocs: 58
MaxAllocSize: 2097152

I know deepstream-app little and did some samples with tracking but I have to add some tools.

Is there any possible way to launch this file on Nano?

We have tensorflow package that you can install through sdkmanger. Have you installed it and try?

Also there is reference samples of runnin yolo in DeepStream SDK. Suggest you give it a try.

One more reference of running customized YOLO model in DeepStream SDK:

Yes I followed this guide. https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

Also, I know customized YOLO in Deepstream SDK.

But my purpose is using Opencv with YOLO. For example, drawing a line and detecting a object when offends the line.

I heard that jetson nano supports fp16.

Can I change my code to fp16 in tensorflow?

Or is there no possibility with original python project?


Is there any reason to use TensorFlow-based YOLO model?
We have some sample for the official darknet model and it work pretty good with DeepstreamSDK.

If you want to use the TensorFlow-based version, you can refer to this sample.
It demonstrates how to convert a TF model into TRT engine.
However, please noticed this may request to implement or port the non-supported layer on your own.