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.

error: ‘_GraphFactory’ was not declared in this scope

jim_l_
Beginner
1,092 Views

Hi,

When I build the cnn_alexnet sample, an error occur:

cnn_alexnet/cnn_alexnet.cpp:171:107: error: ‘_GraphFactory’ was not declared in this scope
 ory(context, graph, &vxObjectsContainer, includeNodesList, filteredNodeCount));

However, other samples, e.g auto_contrast, work fine. Any idea how to solve it?

Jim

0 Kudos
3 Replies
jim_l_
Beginner
1,091 Views

I think I have already fixed it by myself. What I have done:

1) The cnn_alexnet.cpp use the wrong api (maybe it is old version code). I simply change

        CHECK_VX_STATUS(_GraphFactory(context, graph, &vxObjectsContainer, includeNodesList, filteredNodeCount));

    to:

        CHECK_VX_STATUS(GraphFactory(context, graph, &vxObjectsContainer, includeNodesList, filteredNodeCount,1));

2) However, the CMakeLists.txt file still have some problem. Another error occur:

       

        load_weights.c:2:35: fatal error: load_tensor_from_file.h: No such file or directory

 

So the other modification is add 'load_tensor_from_file.*' to files_to_copy and GENERATED_SOURCES.

Then compiling is OK.

But when I execute the bin, the default path to find the weights' file is the current folder. So after setting the right path, the expected demo is displayed.

BTW, this demo is quite cool for selecting the ROI for classification, nice job.^_^

BR,

Jim

       

0 Kudos
Stav_S_Intel
Employee
1,092 Views

Hi Jim,

Happy to hear you managed to solve the issue and are happy with the demo, 

I will check regarding the difrances in API.

 

Thanks,

Stav

0 Kudos
Deepak_C_R
Beginner
1,092 Views

Its looks like in the older Sdk it is _GraphFactory() and  in the newer IntelSdk R2 release it is modified into GraphFactory().

(May be you have generated code using newer Sdk, but didnt change your main() to call these newer renamed functions (?))

0 Kudos
Reply