This repository provides a comprehensive collection of example code and applications for developing with Sophon SDK, targeting developers working with Sophon's AI accelerators. It offers practical demonstrations of model compilation, runtime inference, and pre/post-processing for a wide array of mainstream deep learning algorithms.
How It Works
The project is structured into three modules: tutorial
for basic API usage, sample
for algorithm implementations, and application
for end-to-end use cases. It leverages Sophon's toolchain, including TPU-NNTC and TPU-MLIR for model optimization and compilation, and BMRuntime for efficient inference. The examples showcase integration with BMCV and OpenCV for image/video processing, demonstrating the full pipeline from data handling to AI model execution on Sophon hardware.
Quick Start & Requirements
- Installation: Requires downloading and installing the SOPHON SDK, which includes TPU-MLIR, TPU-NNTC, LIBSOPHON, SOPHON-FFMPEG, SOPHON-OPENCV, and SOPHON-SAIL. Specific version compatibility is detailed in the README.
- Hardware: Primarily targets Sophon accelerators, including BM1684, BM1684X, BM1688, and CV186X.
- Resources: Setup involves obtaining the correct SDK versions, which can be substantial. Detailed documentation and tutorials are available on the Sophon community website.
Highlighted Details
- Supports a vast range of models including YOLO variants, ResNet, RetinaFace, SAM, Llama2, Qwen, StableDiffusion, Whisper, and more.
- Demonstrates various hardware acceleration capabilities for image, video, and audio processing tasks.
- Includes examples for multi-modal AI, large language models (LLMs), and speech processing.
- Features applications like multi-camera license plate recognition and LLM API servers.
Maintenance & Community
- Actively maintained with frequent updates and bug fixes, as indicated by the version history.
- Community support is available through the Sophon Community website and developer forums. Contributions are welcomed.
Licensing & Compatibility
- Licensed under the Apache License 2.0.
- Compatible with commercial use and integration into closed-source projects.
Limitations & Caveats
- Strict version dependencies exist between SOPHON-DEMO and its underlying SDK components, requiring careful management.
- The project is primarily focused on Sophon's proprietary hardware ecosystem.