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.
5920 Discussions

Real Time On spot OpenVino AI Fruit Classification

ziadtaha
Beginner
335 Views

Now, I am am working on a project that classify fruit images ,so what i basically do that i insert fruit images and by Openvino toolkit it is able to classify it (for Example either apple or anything else). and that done by Pyhton GUI by this command:

[python OPPYtest.py -m AI_Trainning_Module.xml -i 11b.jpg]

So oppytest is just the rename for hello classification demo file and (AI-tranning) is the trained TensorFlow file and 11b is the JPG input

SO, MY PROBLEM NOW THAT I want to not just insert image from my hard disk then classify i want to classify in real time image for example use my webcam or a Gige camera to capture the fruit and then classify in real time on spot ,

when i asked the support they told me to use the (object_detection_demo) to do what I want BUT I AM NOT ABLE TO DO IT

Attached is my project file (TEST-AI-2) and the which work normally
and also I Attached the (Online-Fruit-Camera-Test.py) which i am trying to do ....

0 Kudos
4 Replies
IntelSupport
Community Manager
306 Views

Hi ziadtaha,

Thanks for reaching out.

Can I know which version of OpenVINO you are using? Do you use the model from OpenVINO Object Detection Models for your application?

 

Meanwhile, please elaborate and provide all the relevant files/details regarding your application for us to test it on our side. For now, I am unable to test your script due to limited resources and information.

 

Hence, you can also refer to Implement a Fruit Classification Prototype with Intel Distribution of OpenVINO toolkit sample that might help you.

 

Regards,

Aznie

 

ziadtaha
Beginner
296 Views

Dear Aznie

  • The version of OpenVINO is : (openvino_2021.3.394)

 

  • I did not use any of these ( Object Detection Models  ). The model that i had used is a trained Tensorflow Model that I had Optimized  by Openvino and change it into (.xml) File and Then I use it in this form of command : 
python object_detection_demo.py -m AI_Trainning_Module.xml   -i 0

 

 

  • So to Sum up, What I did so far I write this  command  (python hello_classification.py -m AI_Trainning_Module.xml -i cap8.jp)  and i get the result that showed in the attach  image and SoNow what I  want , is To not  insert  an image , but to insert live webcam image then classify it 

 

ziadtaha_0-1630332781202.png

 

 

 

 

IntelSupport
Community Manager
272 Views

Hi ziadtaha,

There are OpenVINO demos and samples that can implement in Real-time based that you can refer such as Multi-Channel Object Detection Yolov3 C++ Demo and many more. You can find the relevant example in Open Model Zoo demo applications section.

 

Therefore, I am unable to test your application and model on object_detection_demo.py since your model is a custom model with an unknown architecture type. To execute the demo, the architecture_type (-at) is required. You can refer to the README.md or usage message of the demo in this documentation.

https://docs.openvinotoolkit.org/latest/omz_demos_object_detection_demo_python.html#running

 

Hence, please be noted that the object_detection_demo.py is only worked with the supported model as listed in the documentation. As the input(-i) of the demo, you can use any single image, a folder of images, a video file, or camera id. In your case, you will have to give the camera id for real-time streaming.

 

To make it work together with your application, it is up to your creativity on how to integrate the features together. You might want to refer to this DL Streamer examples on how to build and run your application with a camera or RSTP camera.

 

Regards,

Aznie

 

 

IntelSupport
Community Manager
227 Views

Hi ziadtaha,

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


Regards,

Aznie


Reply