Jetson nano crashed when using tiny yolo v3 model

Nano has almost the same architecture with TX1, So feel free to use the same config file.

hello, im having a hard time trying to run Darknet tiny-yolo in the jetson nano, if i set the Flags to GPU=1 and OPENCV=1 and run the webcam detection sample the system just crash and freeze.
without GPU (GPU=0) I can run the pictures detection without a problem and webcam seems to open but take like 10 min to show a frame from the webcam.

I’ll appreciate any advice or Makefile example of how to make this run.

thank you

Hi,

Could you try make clean && make again.
If there are something wrong, it should root from the pre-process part.

Read image/decode from webcamera -> resize/channel transform -> cudamemcpy() -> inference(forward) -> result process.
jetbot@jetbot:~/darknet$ head -n 10 Makefile 
GPU=1
CUDNN=1
OPENCV=1
OPENMP=0
DEBUG=0

ARCH= -gencode arch=compute_30,code=sm_30 \
      -gencode arch=compute_35,code=sm_35 \
      -gencode arch=compute_50,code=[sm_50,compute_50] \
      -gencode arch=compute_52,code=[sm_52,compute_52]
jetbot@jetbot:~/darknet$ make 
make: Nothing to be done for 'all'.
jetbot@jetbot:~/darknet$ time ./darknet detector test cfg/voc.data cfg/yolov3-tiny.cfg  yolov3-tiny.weights  data/dog.jpg
layer     filters    size              input                output
    0 conv     16  3 x 3 / 1   416 x 416 x   3   ->   416 x 416 x  16  0.150 BFLOPs
    1 max          2 x 2 / 2   416 x 416 x  16   ->   208 x 208 x  16
    2 conv     32  3 x 3 / 1   208 x 208 x  16   ->   208 x 208 x  32  0.399 BFLOPs
    3 max          2 x 2 / 2   208 x 208 x  32   ->   104 x 104 x  32
    4 conv     64  3 x 3 / 1   104 x 104 x  32   ->   104 x 104 x  64  0.399 BFLOPs
    5 max          2 x 2 / 2   104 x 104 x  64   ->    52 x  52 x  64
    6 conv    128  3 x 3 / 1    52 x  52 x  64   ->    52 x  52 x 128  0.399 BFLOPs
    7 max          2 x 2 / 2    52 x  52 x 128   ->    26 x  26 x 128
    8 conv    256  3 x 3 / 1    26 x  26 x 128   ->    26 x  26 x 256  0.399 BFLOPs
    9 max          2 x 2 / 2    26 x  26 x 256   ->    13 x  13 x 256
   10 conv    512  3 x 3 / 1    13 x  13 x 256   ->    13 x  13 x 512  0.399 BFLOPs
   11 max          2 x 2 / 1    13 x  13 x 512   ->    13 x  13 x 512
   12 conv   1024  3 x 3 / 1    13 x  13 x 512   ->    13 x  13 x1024  1.595 BFLOPs
   13 conv    256  1 x 1 / 1    13 x  13 x1024   ->    13 x  13 x 256  0.089 BFLOPs
   14 conv    512  3 x 3 / 1    13 x  13 x 256   ->    13 x  13 x 512  0.399 BFLOPs
   15 conv    255  1 x 1 / 1    13 x  13 x 512   ->    13 x  13 x 255  0.044 BFLOPs
   16 yolo
   17 route  13
   18 conv    128  1 x 1 / 1    13 x  13 x 256   ->    13 x  13 x 128  0.011 BFLOPs
   19 upsample            2x    13 x  13 x 128   ->    26 x  26 x 128
   20 route  19 8
   21 conv    256  3 x 3 / 1    26 x  26 x 384   ->    26 x  26 x 256  1.196 BFLOPs
   22 conv    255  1 x 1 / 1    26 x  26 x 256   ->    26 x  26 x 255  0.088 BFLOPs
   23 yolo
Loading weights from yolov3-tiny.weights...Done!
data/dog.jpg: Predicted in 0.079204 seconds.
sheep: 56%
bird: 52%
cat: 56%
bird: 62%
bicycle: 58%
Gtk-Message: 22:16:26.889: Failed to load module "canberra-gtk-module"
^C
real	0m11.218s
user	0m4.176s
sys	0m1.524s

jetbot@jetbot:~/darknet$

I run tiny-yolo on jetson nano with Tensorrt5.0 ,the model used lightweight-yolov3 .

Using previously generated plan file located at data/yolov3-1-kFLOAT-kGPU-batch1.engine
Loading TRT Engine…
Loading Complete!
trt-yolo-app: /home/ai/TensorRT_yolo3_module/deepstream_reference_apps/yolo/lib/yolo.cpp:646: bool Yolo::verifyYoloEngine(): Assertion `get3DTensorVolume(m_Engine->getBindingDimensions(tensor.bindingIndex)) == tensor.volume && “Tensor volumes dont match between cfg and engine file \n”’ failed.
Aborted (core dumped)