Skip to content

CUQS/road-segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EN|CN

Road Segmentation

This application runs on the Atlas 200 DK and implements the road segmentation by using fcn network.

Prerequisites

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.

Software Preparation

Before running the application, obtain the source code package and configure the environment as follows.

  1. 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.

  2. 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

Deployment

  1. Access the root directory where the application code is located as the Mind Studio installation user, for example, /home/ascend/road-segmentation.

  2. 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

  3. 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).

Running

  1. run server on the host

    python3 run_server.py
  2. 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).

  3. Go to the path of the executable file of road segmentation application.

    cd ~/HIAI_PROJECTS/ascend_workspace/segmentation/out

  4. Run the application.

    Camera Test

    ./ascend_segmentation

    image2

    Picture Test

    ./ascend_segmentation 1

    image1

    • Width of the input image: 623px
    • Height of the input image: 188px

Downloading Dependent Code Library

Download the dependent software libraries to the road-segmentation/script** directory.

Table 2 Download the dependent software library

Module Name

Module Description

Download Address

EZDVPP

Encapsulates the DVPP interface and provides image and video processing capabilities, such as color gamut conversion and image / video conversion

https://github.com/Ascend/sdk-ezdvpp

After the download, keep the folder name ezdvpp.

About

atlas application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors