File size: 3,126 Bytes
6dcc0f2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | # Board Environment Dependencies
This demo is intended to run on the AidLux board environment where the AidLite QNN240 runtime is available. A normal development container can run `--dry_run`, but cannot execute the QNN contexts unless `import aidlite` succeeds.
## Verified Board Environment
The current board used for validation reports:
```text
Python 3.10.12
aidlite import: OK
numpy 1.26.4
opencv-python / cv2 4.13.0
Pillow / PIL 10.4.0
```
## Required Runtime Components
- AidLux / AidLite Python runtime with `aidlite` module.
- AidLite QNN240 plugin/runtime for `FrameworkType.TYPE_QNN240`.
- Qualcomm HTP/DSP runtime and valid board license.
- Board-side QNN context execution support for the selected model platform.
The Python code checks the AidLite enum contract at startup:
```text
FrameworkType.TYPE_QNN240 = 109
ImplementType.TYPE_LOCAL = 3
AccelerateType.TYPE_DSP = 3
```
## Required Python Packages
The demo imports these Python packages at runtime:
```text
numpy
cv2
PIL
aidlite
```
Package usage:
- `aidlite`: loads and invokes the four QNN240 context `.aidem` files.
- `numpy`: tensor loading, dtype conversion, BEVFormer postprocess, NPZ output.
- `cv2`: board-side six-camera JPG preprocessing.
- `PIL`: camera-grid PNG/GIF visualization.
## Model/Data Files Required By Default Run
Default command:
```bash
python3 code/python/run_test.py --invoke_nums 4 --output_dir outputs/final_sample4
```
The default command auto-discovers the first complete model directory in this order:
```text
models/QCS8550/FP16
models/IQ9/FP16
models/QCS8625/FP16
models/IQ8/FP16
```
Model SHA verification is always enabled. The platform is inferred from model paths:
```text
QCS8550 -> QCS8550 model SHA table
IQ9 -> QCS8550 model SHA table
QCS8625 -> QCS8625 model SHA table
IQ8 -> QCS8625 model SHA table
```
Each platform directory must contain:
```text
backbone_context.bin.aidem
scene_start_encoder_context.bin.aidem
temporal_encoder_context.bin.aidem
decoder_context.bin.aidem
```
Required config files:
```text
code/python/configs/demo_config.json
code/python/configs/nms_runtime_contract.json
```
Required sample data:
```text
code/python/datasets/sample4/asset_manifest.json
datasets/sample4/frames/sample_000..sample_003/
```
Each sample frame contains six raw camera JPGs plus the small auxiliary tensors required by the deployed contexts.
## Quick Environment Check
Run on the board:
```bash
cd /home/aidlux/bevformer_delivery_demo
python3 -c "import aidlite, numpy, cv2; from PIL import Image; print('board env ok')"
python3 code/python/run_test.py --dry_run --check_raw_assets
```
The dry-run checks paths, model SHA, sample assets, and scene-start/temporal routing. It does not invoke AidLite/DSP.
## Notes
- Do not expect real inference to work in a host/container environment without AidLite.
- `configs/qnn_htp_configs/` is not required by runtime; it was only an optional encryption/audit supplement and is not included in the runtime demo package.
- Full inference timing and visualization are printed by the default command without adding extra timing flags.
|