Windows 10 and YOLOV2 for Object Detection Series
In today’s post I’ll share some experience on how to download the latest version of Tiny-YoloV3 and use it in the UWP App that I created in previous posts. Important, the Tiny-YoloV2 model I’ve used in previous posts was in Onnx format, and it was downloaded from Azure AI Gallery.
We can download Tiny-YoloV3 from the official site, however I will work with a version that is already compiled in CoreML format, CoreML format is usually used in iOS apps (see References).
Well, to convert the model of CoreML To Onnx, we will use Visual Studio Tools For Ai. And the next set of software
Once all the software is installed, we can follow the step by step of [Ai Converting Models To ONNX] to convert our model. However, the road is not as simple as it seems. The 1st thing we can find are errors like the following
Problems with Python, in my case had several versions of Python installed, but the IDE had no marked as [Default]. From the panel [Pythin Environments] You can fix this
Next Problem I need some configuration on my part, it was related to Prerequisites for conversion. It all starts with [Missing Package WinMLTools]
Missing package WinMLTools, please check details in output window.
Traceback (most recent call last):
File “C:\Users\<Bruno>\AppData\Local\Microsoft\VisualStudio\15.0_e5344afb\Extensions\kzqekf1z.44v\RuntimeSDK\model\model_converter_cli.py”, line 76, in check_winmltools_installed
ModuleNotFoundError: No module named ‘winmltools’
However After Of Investigate for a while, these are the 2 Packages I need to install
Microsoft ML Tool (winmltools)
pip3 install winmltools==0.1.0.5072
pip3 install “git+https://email@example.com”
As always, 1st thing to do is update Python
And now we can launch the conversion operation again
And a few seconds later we already have our Tiny-YoloV3 in format Onnx
Because the model respects the Input/Output of the previous version, we only have to replace the file in our solution. I have added the new Onnx Just to have a little more control over the example.
As I have always updated the complete example in GitHub
Greetings @ Toronto