---
# System prepended metadata

title: Blaize GSF Installation and use instructions
tags: [Blaize GSF GPU]

---

---
tags: Blaize GSF GPU
---
# Blaize GSF Installation and use instructions
###### tags: Blaize GSF , yolov3 , yolov4

## HW equipment
Model: SCB-1932
OS: Ubuntu Linux 18.04
Kernel: 5.4.0-Generic
CPU: Intel® Xeon® Gold 5318S CPU @ 2.10GHz * 2
RAM: 32G (DDR4) * 16 = 512G
BIOS: C1932A001T06


**It is recommended to install the GSF under Ubuntu, please do not install it in the existing Ubuntu environment for other purposes to avoid impact
Affect the original work and functions. In addition, as the version of each release is different, the file names or screen displays mentioned in the following sections are for reference only. Please take the latest version actually received as the main**
## Download the Script

Please click on the link below to download the GSF 4.0-codec installer, the download password is:
**Blaize**

https://weikengcomtw-my.sharepoint.com/:f:/g/personal/dashiellchien_weikeng_com_tw/Es5sE5C4lItEmpU_2SWYyOEBpJz1m6PQkmEWvdnRdUVbXw?e=hDs8sL

## Install GSF
#### Increase the executable permissions of the installation file:
```javascript=
# chmod u+x install-blaize-gsf-4.0-codec-2021-11-25.sh
```
```javascript=
# apt-get install mokutil
```
#### Execute the following command to start the installation:
```javascript=
# ./ install-blaize-gsf-4.0-codec-2021-11-25.sh
```
-----------------------------------------------------------------------------
**Encountered a problem prompt (y/n) during the installation process, all answer y (yes)**

**During the installation process, a reboot will be required, please follow the instructions and press the "y" key to reboot.**

**After rebooting, please open the terminal again, and the program will automatically continue to install until it is completed.**

----------------------------------------------------------------------------
![](https://i.imgur.com/qquQbKa.png)

![](https://i.imgur.com/yRqoD6s.png)

#### When the installation is complete, please use the following command to confirm whether the user currently logged in Ubuntu is in the video group.
```javascript=
# groups | grep video
```
#### If it is not in the video group, please use the following command to add the user to the video group and check again whether it has been successfully added. If not, please log out and log in again, or reboot.
```javascript=
# sudo usermod -a -G video $LOGNAME
```
#### This step is extremely important, please be sure to perform and confirm) => Reboot and confirm that "Above 4G Decoding" and "Above 4GB MMIO BIOS assignment" are turned on in the BIOS (if this option is available)
```javascript=
If an error occurs during this step, please refer to "<iv> GSF Installation Error Troubleshooting" for troubleshooting.
```

#### In addition, in order to avoid conflicts caused by simultaneous loading of other PCIe graphics chip drivers, it is recommended not to automatically mount the blaize driver module after booting the operating system. The method is as follows:
```javascript=
Please use the following command to check if the blaize driver module has been added to the blacklist
# cat /etc/modprobe.d/blacklist.conf | grep blaize
```
![](https://i.imgur.com/TUpHLPT.png)

#### If the command execution result does not display the "blacklist blaize" related string, please manually add "blacklist blaize" in the last line of the file /etc/modprobe.d/blacklist.conf (please remove the double quotes)

![](https://i.imgur.com/DOCmWJq.png)

#### Reboot and execute the following commands immediately. If the execution result does not show blaize related keywords, the setting is successful.

```javascript=
# reboot
# lsmod | grep blaize
```
![](https://i.imgur.com/EZUQEyX.png)

## Start GSF
#### Execute the following command to confirm whether the PCIe device is recognized by the system.
```javascript=
# lspci | grep 1e
```
#### If it is successfully identified, it should display a result similar to the following.
![](https://i.imgur.com/8qmm6Yx.png)


#### Execute the following two lines of commands in sequence to mount the driver module.
```javascript=
# sudo modprobe blaize-media
# sudo modprobe blaize
```
![](https://i.imgur.com/wz3cwsE.png)

#### Execute the following command to confirm whether the driver module is successfully mounted.
```javascript=
# lsmod | grep blaize
```
![](https://i.imgur.com/GUebPr6.png)


#### Change the folder to the installed blaize-gsf-4.0 folder, and start the virtual environment:
```javascript=
# source blaize-env/bin/activate
```
![](https://i.imgur.com/lfC9dcB.png)


#### Switch to the gsf folder:
```javascript=
# cd gsf
```
#### Start gsf:
```javascript=
# ./graphstream.py
```
![](https://i.imgur.com/NOb9qZP.png)

#### The GSF GUI screen that appears successfully is similar to the following:

![](https://i.imgur.com/C8pYQN3.png)


## Operation method under GUI:
If you run gsf for the first time, you will be asked if you want to download a test video, please select yes, and the video will be downloaded to the media folder (gsf/media) in the same directory.

![](https://i.imgur.com/rJKusnK.png)

![](https://i.imgur.com/2pSmybj.png)

(If you have a self-provided test video, you can also copy the video to this folder, and under the video drop-down menu, uncheck the check box, you can see and use the self-provided test video)

The default is Yolov4 network, if you want another network, please select from the drop-down menu.

Device option, please click accelerator (accelerator card) or embedded (embedded SoM).

Select accelerator (accelerator card) and skip directly to step 4 to continue execution.

When selecting embedded (embedded SoM), you need to directly connect the embedded SoM with the Ubuntu host through a network cable, and connect to the USB port and make the following settings:

Ethernet interface (the name of the network interface connected between Ubuntu host and SoM)
* Serial port (the name of the USB to serial interface connecting Ubuntu host and SoM, such as /dev/ttyUSB0)
* HostIP (IP address of the network interface between Ubuntu host and SoM)
* board IP (IP address of the network interface connecting SoM and Ubuntu host)

Click Build to start deploy network to GSP:

![](https://i.imgur.com/jRFElkl.png)


After Build is complete, click Run Graph

![](https://i.imgur.com/VI3oR7a.png)


Select from the drop-down menu traffic1.mp4 or anyother as your choice.


![](https://i.imgur.com/jOsik92.png)


Click stream video to start the test.

![](https://i.imgur.com/TJYDObK.png)

**At this time, you will see a window to frame all the cars. If you look closely, there will be Car, Truck... etc. It can be seen from this screen that the accuracy rate is high, the objects are accurately framed, and there is no too much Many false positives (False Positive); the console screen behind you can see the FPS value of the output result. These two are the common output results comparison of AI applications: (correctness and FPS).**


If you select None from the Display output drop-down menu and click stream video again, the video will not be output to the screen display, and the FPS will increase.

Check Statistics and click Run Graph => stream video, then the latency and avg frame time can be known from the console.

## Run All the videos with scripts:
Please follow the instructions as below. ( from the file “readme.txt” which is in the file “demo_script_20_videos.rar” )
```java=
1. Place the two shell script files under the gsf/ folder.
2. Executing both shell script files separately automatically generates 20 videos Yolov3 demos
```
 ![](https://i.imgur.com/wlPOTkr.png)

![](https://i.imgur.com/IAvowVH.png)
### Run all the videos at once with display
```javascript=
# cd balize-gdf-4.0/gsf
# Open terminal and Run
# ./run_all_display.sh
```
![](https://i.imgur.com/ExM4VlX.png)

### Run all the videos at once without display
```javascript=
# cd balize-gdf-4.0/gsf
# Open terminal and Run
# ./run_all_no_display.sh
```
![](https://i.imgur.com/ECOFNCF.png)

## GSF Installation Error.
#### After starting the installation, the agreement will be asked first, if the following screen is encountered:
![](https://i.imgur.com/pU0clAp.jpg)

#### Please open another terminal and enter:
```javascript=
# pkill -9 whiptail 
# sudo dpkg --purge blaize-sdk 
# echo "blaize-sdk blaize-sdk/eula/accepted boolean true" | sudo debconf-set-selections
```
Then execute the installer script to install it again.

#### If all packages are not installed correctly during the installation process, you may see the following screen
![](https://i.imgur.com/grlpnSI.png)

#### Please enter:
```javascript=
# sudo dpkg --purge blaize-sdk
```
#### Install again, if it still fails, please enter:
```javascript=
# sudo dpkg --force-remove-reinstreq -r blaize-sdk
```
You can install it.