![]() |
---|
This is the demo of showing multiple AI models running concurrently on Ryzen AI. Please note that all the steps mentioned here need to be performed in Windows CMD Prompt, if you perform this demo in Windows Powershell, some errors will occur. The following models are used:
- MobileNet_v2
- ResNet50
- Retinaface
- Segmentation
- Yolox
│ 1x4.xclbin
│ env.yaml
│ README.md
│ vaip_config.json
│ voe-0.1.0-cp39-cp39-win_amd64.whl
│
├─.vscode
│ settings.json
│
├─bin
│ ipu_multi_models.exe
│ onnxruntime.dll
│ onnxruntime_vitisai_ep.dll
│
├─images
│ mobilenet_V2.jpg
│ modelsx4.jpg
│ resnet50.jpg
│ retina.jpg
│ segmentation.jpg
│ yolox.jpg
│
└─ipu_modelsx4_demo
│ generate_script.py
│
└─config
mobile_net_v2.json
modelx4.json
resnet50.json
retinaface.json
segmentation.json
yolovx.json
Please note that all the steps mentioned here need to be performed in Windows CMD Prompt. Make sure the IPU driver has been installed by following the instructions on the Ryzen AI Developer Guide. The IPU driver version >= 10.106.8.62 has been tested. The older version might work but no guaranteed.
- Follow these steps to install Anaconda on your system if it has not been installed:
-
Download Anaconda: Visit the Anaconda download page (https://www.anaconda.com/products/distribution) and choose the distribution that matches your operating system (Windows, macOS, or Linux). Download the Python 3.9 version.
-
Install Anaconda: Follow the installation instructions for your operating system. Generally, this involves running the installer and accepting the default settings.
-
Verify Installation: After installation, open Anaconda Prompt on Windows and type
conda --version
to verify that Anaconda was installed correctly. You should see the installed Conda version.
-
Create a Conda Environment by using the env.yaml
conda create --name <env_name> --file=env.yaml
-
Activate the Environment
conda activate <env_name>
-
Download the onnx models and test image/video package, and unzip it under <path_to_RyzenAI-SW>/demo/multi-model-exec/ipu_modelsx4_demo/.
You should have the directory like this:
.
├── generate_script.py
├── modelsx4_screenshot.png
├── resource
│ ├── RetinaFace_int.onnx
│ ├── detection
│ ├── detection.avi
│ ├── face
│ ├── face.avi
│ ├── mobilenetv2_1.4_int.onnx
│ ├── nano-YOLOX_int.onnx
│ ├── pointpainting-nus-FPN_int.onnx
│ ├── resnet50_pt.onnx
│ ├── seg_512_288.avi
│ └── to_video.py
-
Generate the config files by running the comand:
python generate_script.py
Please note that all the steps mentioned here need to be performed in Windows CMD Prompt. You can load and run the models one by one: run_mobile_net_v2.bat
run_resnet50.bat
run_retinaface.bat
run_segmentation.bat
or you can load and run multiple models at the same time:
- Python version version 3.9 is required if not "The code execution cannot proceed because python39.dll was not found. Reinstalling he programm may fix this problem"
- If you find an exclamation mark on the icon of the AMD IPU device in the System Devices list in your Device Manager, it indicates that there is an issue with your driver installation, and the program may not function correctly.
- If this demo aborted with the 'glog.dll cannot be found' error, you need to use the command 'set PATH=C:;%PATH%' to explicitly export the path to 'glog.dll'. 'glog.dll' is installed along with ANACONDA3. The recommended ANACONDA3 installer is 'Anaconda3-2023.07-2-Windows-x86_64'.