Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6415 Discussions

Questions about CV SDK's cnn_alexnet sample

RSun9
New Contributor I
1,185 Views

Hi there,

I have a few questions about the cnn_alexnet sample for the CV SDK. Here they are:

1. Under the directory, samples/cnn_alexnet, there are a readme file and a developer guide. Both files refer to to C++ source code file, cnn_graph_from_caffe.cpp. However, I can not find this C++ file anywhere on my PC. Not in the CV SDK installation directory, not in the CV SDK samples directory. Where is this file?

2. The readme also refers to another file, caffe.proto. Supposed it is needed by the aforementioned C++ file. But again, I can't find it in the current directory. It does exist on my PC though, because I have Caffe installed.

3. Since these two important files are missing, I expected the sample cnn_alexnet would not build or run. But miraculously it built without any error and ran correctly. Somehow, the sample managed to convert Caffe's AlexNet model into an OpenVX graph, built it, and ran, even those two files missing. How is that so? Could you explain how that happened? I can't connect the dots right now, with some important pieces missing.

Thank you very much,

Robby

0 Kudos
6 Replies
Jeffrey_M_Intel1
Employee
1,185 Views

Thanks for this report.  I'm investigating and will get back to you tomorrow.

0 Kudos
Stav_S_Intel
Employee
1,185 Views

Hi Robby,

Can you supply the version number you are running?

looking at the Readme file, i could  not find the reference to these specific files. 

Sample uses Model Optimizer* tool to convert original Caffe proprietary formats to the OpenVX. Model Optimizer* generates

C++ code that creates the OpenVX graph for the Caffe model, load the data. Then the graph is executed on given image

and recognition top-5 results are printed to console.

 

Prototxt  and model are loaded automaticlly by the cmake (during compilation), “caffe.proto” is not included in the package.

The MO generates the graph code.

Regards,

Stav

0 Kudos
RSun9
New Contributor I
1,185 Views

Hi Stav,

Thanks for the timely response. Below is the information you asked for. Note I installed the sample package in my home directory as ~/intel-cvsdk-samples.

Command:

cat ~/intel-cvsdk-samples/version.txt

Output:

1.0.0.1840

 

Command:

cat ~/intel-cvsdk-samples/samples/cnn_alexnet/README

Output (only the text of interest posted):

  .... ....

3 Sample Directory
------------------------------------------------------------------------------

The sample directory has the following structure:
-- cnn_alexnet
    |-- caffe.proto                  (proto file that define Caffe structure
    |                                   https://github.com/BVLC/caffe/blob/master/src/caffe/proto/caffe.proto )
    |-- CMakeLists.txt               (CMake file for the sample)
    |-- cnn_alexnet.cpp              (main file)
    |-- cnn_graph_from_caffe.cpp/hpp (file contains code that creates OpenVX graph)
    |                                 by reading caffe layers)
    |-- data
    |   `-- download.sh              (script to download CNN AlexNet Caffe data)
    |-- utils.cpp/hpp                (file with misc utility functions)
    |-- README                       (this readme file)
    `-- sample_cnn_alexnet_user_guide.pdf  (sample User's Guide)

  .... ....

In the list of files under the directory cnn_alexnet, item 1 and 4 are missing.

-Robby

0 Kudos
Stav_S_Intel
Employee
1,185 Views

Hi Robby,

Your sample package is a bit "old"- can you please get the latest? this should solve the "missing" files issue,, 

https://software.intel.com/en-us/computer-vision-sdk-support/code-samples

Regards,

Stav

0 Kudos
Rishab_G_1
Beginner
1,185 Views

Hello ,

I am also using CNN-AlextNet with model optimizer . I was build the model and convert the caffe model to openvx was able to run floating point precision variants but faced with an error while runtime for Q78 

VXLOG: vxGetKernelByName: Failed to find kernel com.intel.cnn_helpers.scalemddata

(sts=VX_ERROR_INVALID_PARAMETERS)

The detailed error is in the attached file. Do I need install some additional setup or a custom version of the OpenVx.

Please kindly reply to this query.

Thanks and Regards,

Rishab Goel

 

0 Kudos
Stav_S_Intel
Employee
1,185 Views

Hi Goel, 

Please refrain from using Q78- it will be removed from the SDK in the next release. 

For now -You can use floating point successfully, let me know if you need anything else.

 

Regards,

Stav

0 Kudos
Reply