Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
5966 Discussions

Porting "People Counter Solution" to OpenVINO 2021.4

mvasquez
New Contributor I
446 Views

Hi, we need to use this solution with OpenVINO 2021.4, do you have plans of porting this or what would be your advise? We observe errors like this because of the changes of OpenVINO APIs:

Traceback (most recent call last):
File "people_counter.py", line 228, in
main()
File "people_counter.py", line 139, in main
cur_request_id, args.cpu_extension)[1]
File "/home/mvasquez/dev/openvino/people-counter-python/application/inference.py", line 79, in load_model
[l for l in self.net.layers.keys() if l not in supported_layers]
AttributeError: 'openvino.inference_engine.ie_api.IENetwork' object has no attribute 'layers'

 

Regards,
Miguel Vasquez

0 Kudos
4 Replies
IntelSupport
Community Manager
412 Views

Hi Miguel Vasquez,

Thanks for reaching out.

The error arises because the 'ie_api.IENetwork.layers' is deprecated. The property has been removed since in the 2021.2 release. Please refer to the following link: https://docs.openvinotoolkit.org/2021.1/ie_python_api/classie__api_1_1IENetwork.html

 

I would recommend you use get_ops()/get_ordered_ops() methods from nGraph Python API for 2021.4 release. nGraph is the OpenVINO™ graph manipulation library, used to represent neural network models in the form of a computational graph. With nGraph Python APIs, you can create, inspect, and modify computational graphs. 

 

Use the nGraph function's get_ordered_ops method to get a topologically sorted list of its graph Nodes. Please refer to the following documentation:

https://docs.openvinotoolkit.org/latest/openvino_docs_nGraph_DG_PythonAPI.html#inspect_an_ngraph_fun...

 

Regards,

Aznie


mvasquez
New Contributor I
399 Views

Thanks for the response Aznie. Do you know if the owner will port the reference implementation to version 2021.4 or are you suggesting we should try to port it?

 

Regards,

Miguel

IntelSupport
Community Manager
352 Views

Hi mvasquez,

We never validated the application on OpenVINO 2021.4 and it is not created by our developer. However, you could try to port it in 2021.4, but make sure you are using the models downloaded from OpenVINO 2021.4 too. If not, you might encounter incompatible errors.


Regarding the unsupported layers error message, the error is because of the deprecated network. The IENetwork class which called the 'layers' will returns a dictionary that contains the list of each supported layer and its properties. By that, it will find out the unsupported layers that present and display the error message.

 

Meanwhile, you could find more information on unsupported and custom layers by check this article: https://docs.openvinotoolkit.org/latest/_docs_HOWTO_Custom_Layers_Guide.html

 

Regards,

Aznie


IntelSupport
Community Manager
301 Views

Hi mvasquez,

This thread will no longer be monitored since we have provided relevant information. If you need any additional information from Intel, please submit a new question.


Regards,

Aznie


Reply