This tutorial guides you through building a Flask-based web application powered by Hailo. You'll learn how to install the required dependencies, set up the development environment, and launch the server step by step.
Open a terminal on your reComputer AI Box and run the following commands to update your system:
sudo apt update
sudo apt full-upgrade
Step 2: Set PCIe to Gen3Follow the tutorial to set PCIe to Gen3 as required for the Hailo device.
Step 3: Install Dependencies for NPU sudo apt install hailo-all
Step 4: Set Up the Project Environment● Create a New Directory:
mkdir Hailo-Web-App
cd Hailo-Web-App
● Create and Activate a Virtual Environment:
python -m venv --system-site-packages env
source env/bin/activate
● Clone the Repository:
git clone https://github.com/KasunThushara/Hailo-Web.git
cd Hailo-Web
● Install Python Dependencies:
pip install -r requirements.txt
● Grant Execution Permission to the Download Script
chmod +x download_resources.sh
● Run the Resource Download Script:
./download_resources.sh
Step 5: Start the Server● Navigate Back to the Project Directory on New Terminal
cd Hailo-Web-App
● Activate the Virtual Environment (if not already activated):
source env/bin/activate
● Navigate to the Hailo-Web Directory:
cd Hailo-Web
● Start the Server:
python3 server.py
Step 6: Access the Web UIOnce the server is running, open a web browser and visit:
http://<pi-ip-address>:5000
Replace <pi-ip-address> with the actual IP address of your reComputer AI Box.
What You Will Do on the Web UI:- Choose the vision task (e.g., object detection, pose estimation).
- Upload the relevant files for the selected task.
- View the results directly on the web interface.
This setup provides a user-friendly interface for interacting with the Hailo device for various vision tasks.
Comments
Please log in or sign up to comment.