Request it for the seed queue, or get it now with pf download AXERA-TECH/bevformer (CLI guide).
This repository contains the BEVFormer model converted for high-performance inference on the Axera NPU. BEVFormer is a paradigm-shifting transformer-based framework for 3D object detection that learns unified spatio-temporal bird's-eye-view (BEV) representations from multi-camera inputs.
This version is optimized with w8a16 quantization and is compatible with Pulsar2 version 4.2.
For model conversion and deployment guidance:
.axmodel.| Chips | Model Variant | NPU1 Latency (Per Frame) | NPU3 Latency (Per Frame) |
|---|---|---|---|
| AX650 | BEVFormer-Tiny | 253.966 ms | 91.209 ms |
BEVFormer requires multi-view camera inputs (typically 6 views: front, front-left, front-right, back, back-left, back-right).
Environment: Ensure you have the required Python environment activated (e.g., using Conda or a virtual environment) with the following core packages installed:
axengine (PyAXEngine)numpy (>= 1.22.0), opencv-python (cv2), tqdm, and cffi.(Recommended: Use a dedicated Conda environment to manage these dependencies.)
Model/Data: Ensure the compiled .axmodel, inference_config.json, and input data (inference_data/) are available on the host.
Run the inference script by providing the compiled model, configuration, and data directory.
python inference_axmodel.py compiled.axmodel inference_config.json inference_data/ --output-dir inference_results
(base) root@ax650:~/data# python inference_axmodel.py compiled.axmodel inference_config.json inference_data/ --output-dir ./inference_results
[INFO] Available providers: ['AXCLRTExecutionProvider', 'AxEngineExecutionProvider']
[INFO] Using provider: AxEngineExecutionProvider
[INFO] Chip type: ChipType.MC50
[INFO] VNPU type: VNPUType.DISABLED
[INFO] Engine version: 2.12.0s
[INFO] Model type: 0 (single core)
[INFO] Compiler version: 5.1-patch1 82190926
Processing scene 1/2: fcbccedd61424f1b85dcbf8f897f9754 (40 frames)
Scene fcbccedd61424f1b85dcbf8f897f9754: 28%|ββββββββββββββββββββββ | 11/40 [00:12<00:33, 1.15s/it]/root/guofangming/inference_axmodel.py:389: RuntimeWarning: invalid value encountered in cast
corners = imgfov_pts_2d[i].astype(np.int32)
Scene fcbccedd61424f1b85dcbf8f897f9754: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 40/40 [00:47<00:00, 1.18s/it]Processing scene 2/2: 325cef682f064c55a255f2625c533b75 (41 frames)
Scene 325cef682f064c55a255f2625c533b75: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 41/41 [00:48<00:00, 1.18s/it]Creating video: fcbccedd61424f1b85dcbf8f897f9754_result.mp4: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 40/40 [00:08<00:00, 4.83it/s]β Scene fcbccedd61424f1b85dcbf8f897f9754: 40 frames, video: ./inference_results/fcbccedd61424f1b85dcbf8f897f9754/fcbccedd61424f1b85dcbf8f897f9754_result.mp4]Save scene results: 50%|βββββββββββββββββββββββββββββββββββββββββββββββββββ | 1/2 [00:23<00:23, 23.05s/it]
Creating video: 325cef682f064c55a255f2625c533b75_result.mp4: 7%|ββ | 3/41 [00:00<00:07, 4.92it/s]
Creating video: 325cef682f064c55a255f2625c533b75_result.mp4: 100%|ββββββββββββββββββββββ| 41/41 [00:08<00:00, 4.78it/s]
β Scene 325cef682f064c55a255f2625c533b75: 41 frames, video: ./inference_results/325cef682f064c55a255f2625c533b75/325cef682f064c55a255f2625c533b75_result.mp4
Save scene results: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 2/2 [00:47<00:00, 23.79s/it]
The model generates a 3D detection map projected onto the Bird's-Eye-View plane. Results are saved as images and videos which visualize the ego-vehicle and surrounding detected objects.
Example Visualization:
Have the files? Publish a torrent.
Publish a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo AXERA-TECH/bevformer ./model-folder