Complete guide for running the YOLOv8s object detection model on BOS Eagle-N hardware. This page covers model setup, weight downloading, inference execution with images and video, performance profiling, and optimization techniques.
yolov8s
Set environment variables
# at $TT_METAL_HOME
source env_set.sh
Download weights
python ./models/bos_model/yolov8s/weights_downloader.py
Run Test (Image)
python ./models/bos_model/yolov8s/run_yolov8s.py
- input:
reference/images - output:
results
Run Test with Trace (Image)
python ./models/bos_model/yolov8s/run_yolov8s.py --trace -i 320 -n 10
- Trace makes model execution much more fast.
- Option i means the size of the image. Maximum I is 320.
- 'n' means Number of iteration.
Run Video Demo
- Video file is required in
videos. Please make "videos" folder. - You can download the video from the below link.
- External link: "https://bos-semi-demo-contents.s3.ap-northeast-2.amazonaws.com/public/demo_logo_text_v1.1.mp4" (Right click & Save video as ...)
python ./models/bos_model/yolov8s/demo_yolov8s.py
Run for ttnn-visualizer Profiler
- First, export environment variables using the script file. The
experiment_namecan be anything, for exampleyolo.
source models/bos_model/export_l1_vis.sh $EXPERIMENT_NAME
- Second, run the model. If the model finishes running successfully, the result report will be generated in
generated/ttnn/reports/EXPERIMENT_NAME_MMDD_hhmm/.
python ./models/bos_model/yolov8s/run_yolov8s.py
- Third, run
ttnn-visualizer. Thereport_pathis the path mentioned in the previous step. Visithttp://localhost:8000/using your web browser.
ttnn-visualizer --profiler-path $REPORT_PATH
- If the experiment has finished, please run the following command to clear the environment variables
source models/bos_model/unset_l1_vis.sh