Adaptation of the Facebook RegNet-Y-0320 (width=320) image classification model for Huawei Ascend NPU inference.
RegNetForImageClassification)RegNetY-0320 uses a stage-based architecture with:
| Metric | Value |
|---|---|
| Average Latency | 6.44 ms |
| Min Latency | 6.17 ms |
| Max Latency | 6.73 ms |
| Throughput | 155.32 images/sec |
| Device | Ascend910 NPU |
CPU vs NPU inference comparison:
facebook-regnet-y-320-NPU/
├── model_files/ # Model weights and config (not in git)
│ ├── config.json
│ ├── pytorch_model.bin
│ └── preprocessor_config.json
├── assets/ # Test images
│ └── test.jpg
├── logs/ # Execution logs
│ ├── env_check.log
│ ├── inference.log
│ ├── accuracy.log
│ ├── benchmark.log
│ └── paths.txt
├── screenshots/ # Screenshots
├── model_utils.py # Model loading utilities
├── inference.py # NPU inference with Top-5 output
├── eval_accuracy.py # CPU vs NPU accuracy comparison
├── benchmark.py # Performance benchmarking
├── requirements.txt # Python dependencies
└── README.md # This filepip install -r requirements.txtpython inference.pypython eval_accuracy.pypython benchmark.pyfacebook/regnet-y-0320-sw.Apache 2.0