openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.33k stars 2.29k forks source link

Once "classifitaion_sample_async" app once invoked is in a loop. #382

Closed Ferhdez closed 4 years ago

Ferhdez commented 4 years ago

SUMMARY classifitaion_sample_async app never ends, once is invoked the application never finish and enters in a loop. See attached image. BUG_classification_application_never_ends

STEPS TO REPRODUCE

[ INFO ] Loading network files [ INFO ] Preparing input blobs [ WARNING ] Image is resized from (787, 259) to (224, 224) [ INFO ] Batch size is 1 [ INFO ] Loading model to the device [ INFO ] Create infer request [ INFO ] Start inference (10 asynchronous executions) [ INFO ] Completed 1 async request execution [ INFO ] Completed 2 async request execution [ INFO ] Completed 3 async request execution [ INFO ] Completed 4 async request execution [ INFO ] Completed 5 async request execution [ INFO ] Completed 6 async request execution [ INFO ] Completed 7 async request execution [ INFO ] Completed 8 async request execution [ INFO ] Completed 9 async request execution [ INFO ] Completed 10 async request execution [ INFO ] Processing output blobs

Top 10 results:

Image /cntr_workdir/car.png

classid probability


717 0.3228686 817 0.1538750 581 0.1423150 479 0.0849617 436 0.0527374 468 0.0428489 705 0.0232187 511 0.0191299 751 0.0189609 704 0.0109762

Comment: here KEEP A LOOP OF THE APP

EXPECTED RESULT Once the classification app is invoke it should complete its task.

ACTUAL RESULT Classification_sample_async app into a loop.

Ferhdez commented 4 years ago

Writing straight forward test steps:

pull - docker pull clearlinux/stacks-dlrs-mkl

  1. docker run -tid -e http_proxy=http://proxy-chain.intel.com:911/ -e https_proxy=http://proxy-chain.intel.com:912/ --name cntr-stacks-tensorflow-mkl stacks-tensorflow-mkl
  2. docker exec -it cntr-stacks-tensorflow-mkl bash -ci "mkdir -p /cntr_workdir;cd /cntr_workdir;git clone --depth 1 https://github.com/opencv/open_model_zoo.git -b 2019;p ip install pyyaml;swupd clean;swupd bundle-add htop;swupd bundle-add wget which computer-vision-basic;swupd bundle-add computer-vision-basic;wget https://docs.seldon.io/projects/seldon-core/en/latest/_images/car.png
  3. docker exec -it cntr-stacks-tensorflow-mkl bash -ci "/cntr_workdir/open_model_zoo/model_downloader/downloader.py -o /cntr_workdir --name resnet-50
  4. docker exec -it cntr-stacks-tensorflow-mkl bash -ci "cd /cntr_workdir/classification/resnet/v1/50/caffe;python /usr/share/openvino/model-optimizer/mo_caffe.py --data_t ype=FP32 --input_shape=[1,3,224,224] --mean_values=data[104.0,117.0,123.0] --output=prob --input_model=resnet-50.caffemodel --input_proto=resnet-50.prototxt [ SUCCESS ] Generated IR model. [ SUCCESS ] XML file: /cntr_workdir/classification/resnet/v1/50/caffe/./resnet-50.xml [ SUCCESS ] BIN file: /cntr_workdir/classification/resnet/v1/50/caffe/./resnet-50.bin
  5. docker exec -it cntr-stacks-tensorflow-mkl bash -ci 'find / -iname 'resnet-50.xml'
  6. docker exec -it cntr-stacks-tensorflow-mkl bash -ci 'find / -iname 'car.png'|tr -d '
  7. docker exec -t cntr-stacks-tensorflow-mkl bash -ci 'classification_sample_async -i /cntr_workdir/car.png -m /cntr_workdir/classification/resnet/v1/50/caffe/resnet-50.xml In STEP 7 the container gets hang please see following issue – BUG-opencv-382
Ferhdez commented 4 years ago

Please let me know if you need any special kind of log and I can provide it into this issue in order to get progress. Thanks!

maxlytkin commented 4 years ago

Hi @Ferhdez We've tried to follow these steps from your first message on our Clear Linux machine, but wasn't able to replicate this issue with classification sample getting into a loop. It is being executed successfully, and after its completion we don’t see the classification process running neither thru “htop” nor “ps”.

Would you please share with us your environment components versions?

Our components versions: kernel 5.5.6-914.native cmake 3.16.4 python 3.8.1 gcc 9.2.1 OpenCV 4.2.0 computer-vision-openvino bundle 32390

Best regards, Max.

brmarkus commented 4 years ago

In the original post the following command line was mentioned:

classification_sample_async -i /cntr_workdir/image_infer_t.jpeg -m /cntr_workdir/classification/resnet/v1/50/caffe/resnet-50.xml -ni 100 -nireq 4

But "classificiation_sample_async" doesn't support the command line parameter "-ni" and "-nireq"...

@Ferhdez are you sure you haven't patched the original code?

Ferhdez commented 4 years ago

Closing the defect. A warning has been added in the clearlinux/stacks-dlrs-mkl image. In this test I did swupd bundle-add computer-vision-basic which is overwriting dldt libraries. Please see next abstract from - https://github.com/clearlinux/clear-linux-documentation/blob/master/source/guides/stacks/dlrs.rst

Warning Note that although the DLRS images and dockerfiles may be modified for your needs, there are some modifications that may cause unexpected or undesirable results. For example, using the Clear Linux :command:swupd bundle-add command to add packages to a Clear Linux based container may overwrite the DLRS core components. Please use care when modifying the contents of the containers.