Skip to content
项目

关于

YOLO26n object detection inference from scratch in ARM64 Assembly and C, optimized for Raspberry Pi 4 with NEON, Winograd, GEMM, and custom ARM micro-kernels.

学习与教育

这些数字如何统计

可以做什么

  • ARM64 (AArch64) optimized
  • ARM64 Assembly + C
  • ARM NEON vectorization
  • Float32 inference

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

YOLO26 Inference (ARM64 Assembly + C)

YOLO26 Detection Result YOLO26 Detection Result

YOLO26 object detection inference written from scratch in ARM64 Assembly and C, optimized for the Raspberry Pi 4 (ARM Cortex-A72).

Bachelor's Final Project
Author: Mohammad Ghaderi
Advisor: Prof. Saleh Yousefi


Project Overview

This project implements the inference stage of the YOLO26n object detection model entirely from scratch using C and ARM64 Assembly. The main focus is on understanding and reproducing the low-level optimizations employed by modern ARM inference engines.

Key optimization areas include:

  • ARM NEON SIMD vectorization
  • Cache-aware computation
  • Winograd convolution
  • Optimized GEMM kernels
  • Operator fusion
  • ARM64 micro-kernel design

YOLO26 Architecture

YOLO26 Architecture

The implementation follows the YOLO26 architecture and focuses on efficient execution of convolutional layers on ARM Cortex-A72 processors.


Features

  • ARM64 (AArch64) optimized
  • ARM64 Assembly + C
  • ARM NEON vectorization
  • Float32 inference
  • SiLU/sigmoid/softmax activation (NCNN-inspired implementation - implementing exp)
  • Winograd F(2×3) transform (using NCNN transform matrix values)
  • GEMM convolution
  • Pointwise & Depthwise convolution
  • Cache-aware tiling
  • Custom ARM micro-kernels
  • Operator fusion
  • Multiple kernel and tile-size experiments
  • Attention
  • Components (C3K2, SPPF, Conv, C2PSA, Detect, BottleNeck, PSA)
  • read jpg and save result as png with bounding boxes

Performance

All benchmarks were performed on:

  • Raspberry Pi 4 Model B / ARM Cortex-A72 /ARMv8-A (64-bit) / Linux

Performance Comparison

Example

YOLO26 Detection Result YOLO26 Detection Result YOLO26 Detection Result YOLO26 Detection Result This is the output of the implementation. It surprised me—you can test it too.

Build & Run

Compile the project : ( same for arm or x86 on QEMU emulator)

If ARM64 hardware is not available, the project can be executed through QEMU. The provided Makefile supports both native ARM64 execution and QEMU-based execution using the same commands. Go To Install QEMU emulator

First, clone the repository:

git clone https://github.com/mohammad-ghaderi/YOLO26.git
cd YOLO26

Build

make

Run inference on an image: input image should be 640*640 jpg

make run IMG=path/to/image.jpg

Example:

make run IMG=images/img1.jpg

Install QEMU Emulator

Ubuntu / Debian:

sudo apt update
sudo apt install gcc-aarch64-linux-gnu qemu-user qemu-user-static

Arch Linux:

sudo pacman -S aarch64-linux-gnu-gcc qemu-user

Fedora:

sudo dnf install gcc-aarch64-linux-gnu qemu-user-static

Acknowledgments

  • During development, several experimental implementations were tested. Some of these (e.g., QS8, FP16, etc.) remain in the repository but are not part of the final inference pipeline.
  • The parameters from the official YOLO26n pretrained model were extracted, restructured, and repacked into a custom binary format (param.bin). The ordering and layout were redesigned to match the optimized memory access pattern of this ARM64 inference engine.

探索相关项目

加载中…