Darknet demo needs opencv for webcam images OpenCV=1 - object-detection

I have been doing object detection with Yolo with the darknet git repository and wanted to start with video, I instaled OpenCV and try to run darknet for videos as:
$ ./darknet detector demo cfg/coco.data cfg/yolov3.cfg yolov3.weights <video file>
but I have the following message:
$ demo needs opencv for webcam images
I changed the second line in the makefile to:
OpenCV=1
but the message continue showing, and in the forums only. I followed a tutorial (https://pjreddie.com/darknet/install/#cuda), but I do not not what re-make the project is and the test at the end shows that it is not compiling with opencv. I tried to remake it with:
remake darknet
but I have the following error with the libraries:
include/darknet.h:11:30: fatal error: cuda_runtime.h: No such file or directory
compilation terminated.
Edit: I think is the instalation of CUDA as the comand nvidia-smi does not anything

Related

How to make Tensorflow vid2depth inference works?

I tried to test Tensorflow's vid2depth inference (https://github.com/tensorflow/models/tree/master/research/vid2depth).
I followed the instruction of the README. However, I got the below error:
ValueError: Couldn't find 'checkpoint' file or checkpoints in given directory vid2depth/trained-model/model-119496
I test with tf 0.12, 1.0.0. 1.8 and 1.15.
I used the below command:
python3.6 inference.py --kitti_dir ~/vid2depth/kitti-raw-uncompressed --output_dir ~/vid2depth/inference --kitti_video 2011_09_26/2011_09_26_drive_0009_sync --model_ckpt ~/vid2depth/trained-model/model-119496/
The content of the checkpoint folder I downloaded is:
model-119496.data-00000-of-00001 model-119496.index model-119496.meta
It seems provided files are not in the correct format, but I followed the link of the README.
It seems to be an old checkpoint format (Loading older checkpoint in tensorflow).
Could anyone make vid2depth works?
Thank you.

Static libray Tensorflow

I'm new in c++, and I want to use a static library of tensorflow lite to load and run a model of tensorflow on a c++ program. But after I built the library and run the program ( with the library.a include inside), there is a problem :
./libtensorflow-lite.a:1:1: error: expected unqualified-id
!<arch>
^
./libtensorflow-lite.a:2:3: error: invalid filename for line marker directive
#1/20 1595980892 0 0 100644 664268 `
^
[....]
If you could give me a clue of how to import this library with no errors it's would be awesome.
PS: I built the library with ./build_lib.sh which is on the git of tensorflow at the address tensorflow/tensorflow/lite/tools/make/build_lib.sh
In order to load and run a TFLite model in C++, use the TFLite C++ Inference API

Deeplab: "Failed to find all Cityscapes modules"

I am trying to run the tensorflow DeepLab tutorial on the cityscapes dataset. I downloaded the gtFine dataset and cloned into the cityscapesScripts folder, and set up the directories as recommended in the tutorial. When I ran the following line from the tutorial,
sh convert_cityscapes.sh,
I received an error message stating "Failed to find all Cityscapes modules".
I checked the cityscapesScripts documentation and I think I am missing the labels module, which is likely causing the error. Where can I clone or download the missing module(s)?
In the dependencies for sh convert_cityscapes.sh, there's a file with invalid syntax.
You can get it to work on Python3 by commenting out the line
print type(obj).name
from cityscapeScripts/helpers/annotation.py line 238

Tensorflow on Hexagon DSP unclear issues

I am follow instruction to build Android application with Tensorflow engine on Hexagon DSP.
My device is Pixel 1.
libhexagon_controller.so - there is no compilation problem with android_Release mode , but when I trying to build android_Release_aarch6 i have linkage problem :
warning: libadsprpc.so, needed by /Tensorflow_Hexagon/tensorflow-master/tensorflow/contrib/makefile/downloads/hexagon/libs/libhexagon_controller.so, not found (try using -rpath or -rpath-link)
I resolve it with adding -ladsprpc to Makefile in tensorflow/contrib/makefile.
If ladsprpc nedeed for android_Release_aarch64 why in android_Release it's ok ?
2.I follow steps to generate sign test shared library -${QUALCOMM_SDK}/docs/Tools_Signing.html
my problem is with adb push output/testsig-0x<serial number> /system/lib/rfsa/adsp/
I am getting adb: error: failed to copy 'testsig-xxxx.so' to '/system/lib/rfsa/adsp/': remote couldn't create file: Is a directory
What to do?
Thanks.

Python Configuration Error when build retrain.py by bazel, following google doc

I am learning transfer learning according to How to Retrain Inception's Final Layer for New Categories however, when I build 'retrain.py' using bazel, the following error ocures:
The error message is:
python configuration error:'PYTHON_BIN_PATH' environment variable is not set and referenced by '//third_party/py/numpy:headers'
I am so sorry, I have done my best to display the error image.unfortunately, I failed.
I use python2.7, anaconda2 and bazel0.6.1, tensorflow1.3.
appreciate for your any reply !