imagenet-examples works but detectnet-examples dont.

I installed the new nano image and jetson-interface repo and am having a issue running the detectnet examples.

These imagenet examples run run fine.

$ ./imagenet-camera.py
$ ./imagenet-camera.py --network=resnet-18
$ ./imagenet-camera.py --camera=/dev/video0
$ ./imagenet-camera.py --width=640 --height=480

Any of theses detectnet examples fail to run because they give the error:fail to load model.

$ ./detectnet-camera.py
$ ./detectnet-camera.py --network=facenet
$ ./detectnet-camera.py --camera=/dev/video0
$ ./detectnet-camera.py --width=640 --height=480 #

Detectnet seems to be having a issue locating the models in this line of code:

parser.add_argument(“–network”, type=str, default=“pednet”, help=“pre-trained model to load, see below for options”)

I have downloaded the pre trained models a couple of times but that doesn’t fix it.

It doesn’t mater if I run the Python or CPP detectnet examples it still fails to run.

Any Ideas?

Hi adventuredaisy, can you post the terminal log you get when you try to run detectnet-console or detectnet-camera, and also check the contents of this directory below:

$ ls -ll jetson-inference/data/networks/ped-100
total 52544
-rw-r--r-- 1 nvidia nvidia        7 Jan  2  2019 class_labels.txt
-rw-r--r-- 1 nvidia nvidia    36411 Sep  9  2016 deploy.prototxt
-rw-r--r-- 1 nvidia nvidia    36667 Sep  9  2016 deploy.prototxt.backup
-rw-r--r-- 1 nvidia nvidia      684 Dec 31  1969 info.json
-rw-r--r-- 1 nvidia nvidia  6291471 Sep  5  2016 mean.binaryproto
-rw-r--r-- 1 nvidia nvidia    42890 Sep  5  2016 original.prototxt
-rw-r--r-- 1 nvidia nvidia 23938015 Sep  6  2016 snapshot_iter_70800.caffemodel
-rw-r--r-- 1 nvidia nvidia      252 Sep  5  2016 solver.prototxt
-rw-r--r-- 1 nvidia nvidia    41845 Sep  5  2016 train_val.prototxt

Also if you cloned the repo between 7/19 and 7/21, there was a temporary bug that I fixed, so might want to try re-cloning the project.

Here you go.

nano@nano-desktop:~$ ls -ll jetson-inference/data/networks/ped-100
total 52528
-rw-r--r-- 1 nano nano        7 Jan  2  2019 class_labels.txt
-rw-r--r-- 1 nano nano    36411 Sep  9  2016 deploy.prototxt
-rw-r--r-- 1 nano nano    36667 Sep  9  2016 deploy.prototxt.backup
-rw-r--r-- 1 nano nano      684 Dec 31  1969 info.json
-rw-r--r-- 1 nano nano  6291471 Sep  5  2016 mean.binaryproto
-rw-r--r-- 1 nano nano    42890 Sep  5  2016 original.prototxt
-rw-r--r-- 1 nano nano 23938015 Sep  6  2016 snapshot_iter_70800.caffemodel
-rw-r--r-- 1 nano nano 23373696 Jul 22 20:57 snapshot_iter_70800.caffemodel.1.1.GPU.FP16.engine
-rw-r--r-- 1 nano nano      252 Sep  5  2016 solver.prototxt
-rw-r--r-- 1 nano nano    41845 Sep  5  2016 train_val.prototxt
nano@nano-desktop:~$

This is the error it shows

device GPU, networks/ped-100/snapshot_iter_70800.caffemodel initialized.
detectNet -- number object classes:   1
detectNet -- maximum bounding boxes:  0
jetson.inference -- detectNet failed to load built-in network 'pednet'
PyTensorNet_Dealloc()
Traceback (most recent call last):
  File "detectnet-camera.py", line 43, in <module>
    net = jetson.inference.detectNet(opt.network, argv, opt.threshold)
Exception: jetson.inference -- detectNet failed to load network

OK, that error indicates the bug I mentioned above, which has since been fixed - so if you re-clone the repo, it should work for you now.

Re-cloned.
Works awesome now

Just want to say Thank you for all the Blood, Sweat and Tears you have obviously put into
This REPO.