EN|CN
This application runs on the Atlas 200 DK and implements the road segmentation by using fcn network.
Before using an open source application, ensure that:
- Mind Studio has been installed.
- The Atlas 200 DK developer board has been connected to Mind Studio, the cross compiler has been installed, the SD card has been prepared, and basic information has been configured.
Before running the application, obtain the source code package and configure the environment as follows.
-
Obtain the source code package.
Download all the code in the road-segmentation repository at https://github.com/Ascend/road-segmentation to any directory on Ubuntu Server where Mind Studio is located as the Mind Studio installation user, for example, /home/ascend/road-segmentation.
-
Log in to Ubuntu Server where Mind Studio is located as the Mind Studio installation user and set the environment variable DDK_HOME.
vim ~/.bashrc
Run the following commands to add the environment variables DDK_HOME and LD_LIBRARY_PATH to the last line:
export DDK_HOME=/home/XXX/tools/che/ddk/ddk
export LD_LIBRARY_PATH=$DDK_HOME/uihost/lib
NOTE:
- XXX indicates the Mind Studio installation user, and /home/XXX/tools indicates the default installation path of the DDK.
- If the environment variables have been added, skip this step.
Enter :wq! to save and exit.
Run the following command for the environment variable to take effect:
source ~/.bashrc
-
Access the root directory where the application code is located as the Mind Studio installation user, for example, /home/ascend/road-segmentation.
-
Run the deployment script to prepare the project environment, including compiling and deploying the ascenddk public library and application.
bash deploy.sh host_ip model_mode
- host_ip: For the Atlas 200 DK developer board, this parameter indicates the IP address of the developer board.
- model_mode indicates the deployment mode of the model file. The default setting is internet.
- local: If the Ubuntu system where Mind Studio is located is not connected to the network, use the local mode. In this case, download the dependent common code library ezdvpp to the sample-objectdetection/script directory by referring to the Downloading Dependent Code Library.
- internet: Indicates the online deployment mode. If the Ubuntu system where Mind Studio is located is connected to the network, use the Internet mode. In this case, download the dependent code library ezdvpp online.
Example command:
bash deploy.sh 192.168.1.2
-
Upload the generated Da Vinci offline model kittisegRealTime.om to the directory of the HwHiAiUser user on the host.
scp kittisegRealTime.om HwHiAiUser@host_ip:/home/HwHiAiUser/HIAI_PROJECTS/ascend_workspace/segmentation/out/kittisegRealTime.om
For the Atlas 200 DK, the default value of host_ip is 192.168.1.2 (USB connection mode) or 192.168.0.2 (NIC connection mode).
-
run server on the host
python3 run_server.py
-
Log in to the Host as the HwHiAiUser user in SSH mode on Ubuntu Server where Mind Studio is located.
ssh HwHiAiUser@host_ip
For the Atlas 200 DK, the default value of host_ip is 192.168.1.2 (USB connection mode) or 192.168.0.2 (NIC connection mode).
-
Go to the path of the executable file of road segmentation application.
cd ~/HIAI_PROJECTS/ascend_workspace/segmentation/out
-
Run the application.
Camera Test
./ascend_segmentation
Picture Test
./ascend_segmentation 1
- Width of the input image: 623px
- Height of the input image: 188px
Download the dependent software libraries to the road-segmentation/script** directory.
Table 2 Download the dependent software library
Encapsulates the DVPP interface and provides image and video processing capabilities, such as color gamut conversion and image / video conversion |




