The demo showcases the search and sort the images for a quick and easy viewing experience on your AMD Ryzen™ AI based PC with two AI models - Yolov5 and Retinaface.
It features searching images locally when the cloud is not available due to lost or no connectivity. With AMD XDNA™ dedicated AI accelerator hardware seamlessly integrated on-chip and software that intelligently optimizes tasks and workloads, freeing up CPU and GPU resources, it makes new user experiences possible.
Please note the demo is for functional demonstration purposes only and does not represent the highest possible performance or accuracy.
To run this demo, you need a AMD Ryzen™ 7040HS Series mobile processor powered laptop with Windows 11 OS.
Please make sure the IPU driver (tested with >=10.106.8.62) has been installed as shown below.
Please make sure Visual C++ Redistributable and conda (Miniconda or Anaconda) has been installed on Windows.
Start a conda command prompt and run:
setup.bat
Please refer to this page for more detailed setup instructions.
Note that Azure cloud setup is needed only for running the application with Azure cloud and it requires an Azure account and subscription. If you only need to run the application locally, you can skip the Azure cloud setup step.
- Install azure python sdk
pip install azure-ai-ml azure-identity
- Create your workspace here
- After the workspace is created, navigate to your workspace's dashboard and click
Download config.json
- Create Azure endpoint.
After this step you should see a newly generated
python models/setup_azure_ep.py --prefix <custom_endpoint_prefix> --config <config_json_path> -m [retinaface/yolov5] --step endpoint
azure_config.yaml
file undermodels/<model>/
directory with yourauth_key
and endpointuri
. Ifuri
is none, wait for a short while and run the same command again. - Deploy the model
The cloud deployment will take a long time. Please go to your Azure portal to check the deployment status (Azure portal -> your workspace -> launch studio -> endpoints -> your_endpoint).
python models/setup_azure_ep.py --prefix <custom_endpoint_prefix> --config <config_json_path> -m [retinaface/yolov5] --step deployment
- Set the endpoint traffic. In your Azure portal's endpoint status page, click on
Update traffic
and set the traffic to 100
There are 3 ways to run the demo:
- Use QT GUI in python
- Use web brower
- Use GUI exe
Execute the batch script:
run_pyapp.bat
Both 2 and 3 need to start the server as below:
cd webapp
python server.py
http://localhost:8998
or
cd electron-quick-start
npm install electron-packager
npx electron-packager . ms-build-demo --platform=win32 --arch=x64 --overwrite
npm install
npm start
The demo uses Yolov5 and Retinaface models. To know how to run your own models with ONNXRuntime on Ryzen AI, please find more details on the Ryzen AI Software Developer Guide page.