Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
143 Views

OpenVINO 2020.4 monitors

Jump to solution

2020.4 YOLO demo uses OpenVINO monitors,but how could i use it

monitors.py

 

 

try:
    from monitors_extension import Presenter
except ImportError:
    import logging


    class Presenter:
        def __init__(self, keys, yPos=20, graphSize=(150, 60), historySize=20):
            self.yPos = yPos
            self.graphSize = graphSize
            self.graphPadding = 0
            if keys:
                logging.warning("monitors_extension wasn't found")

        def handleKey(self, key): pass

        def drawGraphs(self, frame): pass

        def reportMeans(self): return ''

 

 

 these functions are all empty?

args.add_argument('-u', '--utilization_monitors', default='', type=str,
help='Optional. List of monitors to show initially.')

 whatever the input,the output always "monitors_extension wasn't found" ?

How could i use monitors correctly or it's not finished yet?

Labels (1)
0 Kudos

Accepted Solutions
Highlighted
Moderator
104 Views

Hi @WU__Tianwen 

Utilization monitors feature thru -u parameter is not yet implemented for Object Detection YOLO Python Demo. Be default there is empty value "" provided, and in case of non-empty value provided it just throws the exception message via monitors.py.

You can take a look at the example on how this is implemented in Classification C++ Demo.
With "-u CMD" you can have all 3 utilization monitors being enabled for CPU, all the cores, and memory.

C:\Users\user\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release>classification_demo.exe -m C:\Users\user\Documents\Intel\OpenVINOn\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml -i "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png" -labels "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\demos\classification_demo\synset_words.txt" -u CMD
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png
FPS: 182.257
Latency: 0.0139791
Mean core utilization: 67.7% 42.1% 41.4% 44.9% 52.0% 47.4% 44.9% 53.3%
Mean CPU utilization: 49.2%
Memory mean usage: 3.4 GiB
Mean swap usage: 0.1 GiB

 

View solution in original post

3 Replies
Highlighted
Moderator
118 Views

Greetings,


1.May I know whether this script is from our official OpenVino documentation?

2.Is this where you are referring to?: https://github.com/TNTWEN/OpenVINO-YOLOV4

3.I checked the whole openvino folders but I could only found monitors.cpp instead of monitors.py, probably you could try out this monitors.cpp.


Sincerely,

Iffa


0 Kudos
Highlighted
New Contributor I
114 Views

Hello!

Openvino2020R4 yolov3 python demo use monitors.

https://github.com/TNTWEN/OpenVINO-YOLOV4  this is my project ,and in this issue https://github.com/TNTWEN/OpenVINO-YOLOV4/issues/1 we talked about monitors.

for windows OpenVINO (install in the default path) , python monitor files  path:

C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\inference_engine\demos\python_demos\common

Add these files to the project and demo will not report errors

but this .py file  doesn't seem to implement any function

"""
 Copyright (C) 2020 Intel Corporation

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
"""

try:
    from monitors_extension import Presenter
except ImportError:
    import logging


    class Presenter:
        def __init__(self, keys, yPos=20, graphSize=(150, 60), historySize=20):
            self.yPos = yPos
            self.graphSize = graphSize
            self.graphPadding = 0
            if keys:
                logging.warning("monitors_extension wasn't found")

        def handleKey(self, key): pass

        def drawGraphs(self, frame): pass

        def reportMeans(self): return ''

 

 I also found cpp monitors files,

C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\demos\common\monitors

But it seems that it can't be used directly in Python demo

Thanks!

0 Kudos
Highlighted
Moderator
105 Views

Hi @WU__Tianwen 

Utilization monitors feature thru -u parameter is not yet implemented for Object Detection YOLO Python Demo. Be default there is empty value "" provided, and in case of non-empty value provided it just throws the exception message via monitors.py.

You can take a look at the example on how this is implemented in Classification C++ Demo.
With "-u CMD" you can have all 3 utilization monitors being enabled for CPU, all the cores, and memory.

C:\Users\user\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release>classification_demo.exe -m C:\Users\user\Documents\Intel\OpenVINOn\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml -i "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png" -labels "C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\open_model_zoo\demos\classification_demo\synset_words.txt" -u CMD
[ INFO ] Parsing input parameters
[ INFO ] Files were added: 1
[ INFO ]     C:\Program Files (x86)\IntelSWTools\openvino_2020.4.287\deployment_tools\demo\car.png
FPS: 182.257
Latency: 0.0139791
Mean core utilization: 67.7% 42.1% 41.4% 44.9% 52.0% 47.4% 44.9% 53.3%
Mean CPU utilization: 49.2%
Memory mean usage: 3.4 GiB
Mean swap usage: 0.1 GiB

 

View solution in original post