For implementation on recent CANN version, please refer to https://github.com/Ascend/samples/tree/master/python/level2_simple_inference/6_other/imageinpainting_hifill
This project is implementation of HiFill Image Inpainting on Atlas200DK board.
You can deploy this application on the Atlas 200 DK to inpaint on images with respective masks.
The current application adapts to DDK&RunTime of 1.32.0.0.
Before deploying this sample, ensure that the development environment for Atlas200DK has been setup according to this guide, or with ADKInstaller, or with docker image
Before running this application, download or git clone the whole repository to any directory on Ubuntu Server where Mind Studio is located, and copy samples folder to the directory of Huawei_Ascend.
Note: If the HiAI library, OpenCV library, and related dependencies have been installed on the developer board, skip this step.
-
Configure the network connection of the developer board.
Configure the network connection of the Atlas DK developer board by referring to https://github.com/Atlas200dk/sample-README/tree/master/DK_NetworkConnect.
-
Install the environment dependencies(please deploy in python3).
Configure the environment dependency by referring to https://github.com/Atlas200dk/sample-README/tree/master/DK_Environment.
Copy the application codes and samples to the developer board.
Go to the directory of 'Huawei_Ascend', and run the following command to copy the code and samples to the developer board.
scp -r ../Huawei_Ascend/ [email protected]:/home/HwHiAiUser/HIAI_PROJECTS
Type the password of the developer board as prompted. The default password is Mind@123.
-
Log in to the host side as the HwHiAiUser user in SSH mode on Ubuntu Server where Mind Studio is located.
- The following uses the USB connection mode as an example. In this case, the IP address is 192.168.1.2. Replace the IP address as required.
-
Go to the directory where the application code is stored as the HwHiAiUser user.
-
Run the application.
python3 test_Dchip.py
Huawei_Ascend
├── ModelManager.py # Graph creation and inference
├── inpaint.om # Huawei Ascend Offline model for HiFill Image inpainting
├── matmul.om # Huawei Ascend Offline model to accelerate matrix muliplication in postprocessing
├── inpaint_inference.py # inpainting graph
├── matmul_inference.py # matmul graph
├── test_Dchip.py # script to run the application