➜  ✗ make mobilenet-demo
ONNX Runtime already downloaded at target/onnxruntime/onnxruntime-osx-arm64-1.23.2/lib
Installing Python package in development mode with all backends...
VIRTUAL_ENV=/Users/tarekziade/Dev/rust-webnn-graph/.venv-webnn \
	PATH=/Users/tarekziade/Dev/rust-webnn-graph/.venv-webnn/bin:$PATH \
	ORT_STRATEGY=system \
	ORT_LIB_LOCATION=target/onnxruntime/onnxruntime-osx-arm64-1.23.2/lib \
	DYLD_LIBRARY_PATH=target/onnxruntime/onnxruntime-osx-arm64-1.23.2/lib \
	RUSTFLAGS="-L target/onnxruntime/onnxruntime-osx-arm64-1.23.2/lib" \
	.venv-webnn/bin/maturin develop --features python,onnx-runtime,coreml-runtime
📦 Including license file `LICENSE`
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found CPython 3.12 at /Users/tarekziade/Dev/rust-webnn-graph/.venv-webnn/bin/python
Ignoring pytest: markers 'extra == "dev"' don't match your environment
Ignoring pytest-asyncio: markers 'extra == "dev"' don't match your environment
Ignoring maturin: markers 'extra == "dev"' don't match your environment
Requirement already satisfied: numpy>=1.20.0 in ./.venv-webnn/lib/python3.12/site-packages (2.3.5)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
📦 Built wheel for CPython 3.12 to /var/folders/6s/t2byg0ts39b5hrrzw1c1kpzh0000gn/T/.tmpMOEHnZ/pywebnn-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
✏️ Setting installed package as editable
🛠 Installed pywebnn-0.4.0
Installing demo dependencies...
========================================================================
Running MobileNetV2 Image Classifier on All Backends
========================================================================

Backend 1/3: ONNX CPU
------------------------------------------------------------------------
======================================================================
Complete MobileNetV2 Image Classification with WebNN
======================================================================
Image: examples/images/test.jpg
Backend: ONNX CPU

Loading all pretrained MobileNetV2 weights...
   ✓ Loaded 106 weight tensors
   Weight load time: 38.17ms

Preprocessing image...
   ✓ Preprocessed to (1, 3, 224, 224) (23.74ms)

Creating WebNN context...
   ✓ Context created (accelerated=False)

Building complete MobileNetV2 graph...
   Layer 0: Initial conv 3->32
   Block 0: 32->16 (stride=1, expansion=1)
   Block 1: 16->24 (stride=2, expansion=6)
   Block 2: 24->24 (stride=1, expansion=6)
   Block 3: 24->32 (stride=2, expansion=6)
   Block 4: 32->32 (stride=1, expansion=6)
   Block 5: 32->32 (stride=1, expansion=6)
   Block 6: 32->64 (stride=2, expansion=6)
   Block 7: 64->64 (stride=1, expansion=6)
   Block 8: 64->64 (stride=1, expansion=6)
   Block 9: 64->64 (stride=1, expansion=6)
   Block 10: 64->96 (stride=1, expansion=6)
   Block 11: 96->96 (stride=1, expansion=6)
   Block 12: 96->96 (stride=1, expansion=6)
   Block 13: 96->160 (stride=2, expansion=6)
   Block 14: 160->160 (stride=1, expansion=6)
   Block 15: 160->160 (stride=1, expansion=6)
   Block 16: 160->320 (stride=1, expansion=6)
   Layer final: Conv 320->1280
   Layer: Global average pool
   Layer: Classifier 1280->1000
   ✓ Complete MobileNetV2 graph built!
   Graph build time: 786.06ms

Running inference...
   ✓ Inference complete (67.60ms)

Top 5 Predictions (Real ImageNet Labels):
----------------------------------------------------------------------
   1. lesser panda                                        99.60%
   2. polecat                                              0.20%
   3. weasel                                               0.09%
   4. black-footed ferret                                  0.02%
   5. kit fox                                              0.01%

======================================================================
Performance Summary:
  - Weight Load:   38.17ms
  - Preprocessing: 23.74ms
  - Graph Build:   786.06ms
  - Inference:     67.60ms
======================================================================

✓ Complete MobileNetV2 with all 106 pretrained layers!
  Architecture built using WebNN operations (conv2d, add, clamp, etc.)
  Just like the JavaScript WebNN demos!

Backend 2/3: ONNX GPU
------------------------------------------------------------------------
======================================================================
Complete MobileNetV2 Image Classification with WebNN
======================================================================
Image: examples/images/test.jpg
Backend: ONNX GPU

Loading all pretrained MobileNetV2 weights...
   ✓ Loaded 106 weight tensors
   Weight load time: 7.86ms

Preprocessing image...
   ✓ Preprocessed to (1, 3, 224, 224) (10.84ms)

Creating WebNN context...
   ✓ Context created (accelerated=True)

Building complete MobileNetV2 graph...
   Layer 0: Initial conv 3->32
   Block 0: 32->16 (stride=1, expansion=1)
   Block 1: 16->24 (stride=2, expansion=6)
   Block 2: 24->24 (stride=1, expansion=6)
   Block 3: 24->32 (stride=2, expansion=6)
   Block 4: 32->32 (stride=1, expansion=6)
   Block 5: 32->32 (stride=1, expansion=6)
   Block 6: 32->64 (stride=2, expansion=6)
   Block 7: 64->64 (stride=1, expansion=6)
   Block 8: 64->64 (stride=1, expansion=6)
   Block 9: 64->64 (stride=1, expansion=6)
   Block 10: 64->96 (stride=1, expansion=6)
   Block 11: 96->96 (stride=1, expansion=6)
   Block 12: 96->96 (stride=1, expansion=6)
   Block 13: 96->160 (stride=2, expansion=6)
   Block 14: 160->160 (stride=1, expansion=6)
   Block 15: 160->160 (stride=1, expansion=6)
   Block 16: 160->320 (stride=1, expansion=6)
   Layer final: Conv 320->1280
   Layer: Global average pool
   Layer: Classifier 1280->1000
   ✓ Complete MobileNetV2 graph built!
   Graph build time: 787.03ms

Running inference...
   ✓ Inference complete (43.74ms)

Top 5 Predictions (Real ImageNet Labels):
----------------------------------------------------------------------
   1. lesser panda                                        99.60%
   2. polecat                                              0.20%
   3. weasel                                               0.09%
   4. black-footed ferret                                  0.02%
   5. kit fox                                              0.01%

======================================================================
Performance Summary:
  - Weight Load:   7.86ms
  - Preprocessing: 10.84ms
  - Graph Build:   787.03ms
  - Inference:     43.74ms
======================================================================

✓ Complete MobileNetV2 with all 106 pretrained layers!
  Architecture built using WebNN operations (conv2d, add, clamp, etc.)
  Just like the JavaScript WebNN demos!

Backend 3/3: CoreML (Neural Engine)
------------------------------------------------------------------------
======================================================================
Complete MobileNetV2 Image Classification with WebNN
======================================================================
Image: examples/images/test.jpg
Backend: CoreML (Neural Engine)

Loading all pretrained MobileNetV2 weights...
   ✓ Loaded 106 weight tensors
   Weight load time: 7.37ms

Preprocessing image...
   ✓ Preprocessed to (1, 3, 224, 224) (10.72ms)

Creating WebNN context...
   ✓ Context created (accelerated=True)

Building complete MobileNetV2 graph...
   Layer 0: Initial conv 3->32
   Block 0: 32->16 (stride=1, expansion=1)
   Block 1: 16->24 (stride=2, expansion=6)
   Block 2: 24->24 (stride=1, expansion=6)
   Block 3: 24->32 (stride=2, expansion=6)
   Block 4: 32->32 (stride=1, expansion=6)
   Block 5: 32->32 (stride=1, expansion=6)
   Block 6: 32->64 (stride=2, expansion=6)
   Block 7: 64->64 (stride=1, expansion=6)
   Block 8: 64->64 (stride=1, expansion=6)
   Block 9: 64->64 (stride=1, expansion=6)
   Block 10: 64->96 (stride=1, expansion=6)
   Block 11: 96->96 (stride=1, expansion=6)
   Block 12: 96->96 (stride=1, expansion=6)
   Block 13: 96->160 (stride=2, expansion=6)
   Block 14: 160->160 (stride=1, expansion=6)
   Block 15: 160->160 (stride=1, expansion=6)
   Block 16: 160->320 (stride=1, expansion=6)
   Layer final: Conv 320->1280
   Layer: Global average pool
   Layer: Classifier 1280->1000
   ✓ Complete MobileNetV2 graph built!
   Graph build time: 793.91ms

Running inference...
   ✓ Inference complete (47.27ms)

Top 5 Predictions (Real ImageNet Labels):
----------------------------------------------------------------------
   1. lesser panda                                        99.60%
   2. polecat                                              0.20%
   3. weasel                                               0.09%
   4. black-footed ferret                                  0.02%
   5. kit fox                                              0.01%

======================================================================
Performance Summary:
  - Weight Load:   7.37ms
  - Preprocessing: 10.72ms
  - Graph Build:   793.91ms
  - Inference:     47.27ms
======================================================================

✓ Complete MobileNetV2 with all 106 pretrained layers!
  Architecture built using WebNN operations (conv2d, add, clamp, etc.)
  Just like the JavaScript WebNN demos!

========================================================================
All three backends completed successfully!
========================================================================
