--- license: agpl-3.0 language: - en base_model: - yolov8 pipeline_tag: object-detection tags: - Axera - YOLOv8 - NPU - Ultralytics - Object Detection - Aquarium --- # YOLOv8-Aquarium This version of **YOLOv8-Aquarium** has been converted to run on the Axera NPU using **w8a16** quantization. It is fine-tuned to detect aquatic life in aquarium environments. ## Supported Classes This model is trained to detect the following **5 classes**: 1. **fish** 2. **turtle** 3. **shrimp** 4. **crab** 5. **snail** Compatible with Pulsar2 version: 5.1. ## Convert tools links: For those who are interested in model conversion, you can try to export axmodel through: - [The repo of AXera Platform](https://github.com/AXERA-TECH/ax-samples), where you can get the detailed guide. - [Pulsar2 Link, How to Convert ONNX to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/pulsar2/introduction.html) ## Support Platform https://docs.m5stack.com/zh_CN/ai_hardware/AI_Pyramid-Pro - **AX650N/AX8850** - [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html) - [AI Pyramid](https://docs.m5stack.com/zh_CN/ai_hardware/AI_Pyramid-Pro) - [M.2 Accelerator card](https://docs.m5stack.com/en/ai_hardware/LLM-8850_Card) - **AX620E** - [爱芯派2](https://axera-pi-2-docs-cn.readthedocs.io/zh-cn/latest/index.html) - [Module-LLM](https://docs.m5stack.com/zh_CN/module/Module-LLM) - **AX637** ## How to use Download all files from this repository to the device. ### python env requirement #### pyaxengine https://github.com/AXERA-TECH/pyaxengine ```bash wget https://github.com/AXERA-TECH/pyaxengine/releases/download/0.1.3.rc2/axengine-0.1.3-py3-none-any.whl pip install axengine-0.1.3-py3-none-any.whl ``` ### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro) Input image: ![](test.png) run ```bash python3 infer_yolov8_pyax.py --model-path aquarium_yolov8s_6way.axmodel --test-img test.png ``` ```bash root@ax650:~/yolo8# python3 infer_yolov8_pyax.py --model-path aquarium_yolov8s_6way.axmodel --test-img test.png [INFO] Available providers: ['AxEngineExecutionProvider', 'AXCLRTExecutionProvider'] [INFO] Using provider: AxEngineExecutionProvider [INFO] Chip type: ChipType.MC50 [INFO] VNPU type: VNPUType.DISABLED [INFO] Engine version: 2.12.0s [INFO] Model type: 2 (triple core) [INFO] Compiler version: 5.2-dirty a6f1799a-dirty [Aquarium-YOLOv8-6way] [14:15:20.397] [DEBUG] Load model time = 485.48 ms [Aquarium-YOLOv8-6way] [14:15:20.463] [DEBUG] Pre-process time = 8.36 ms [Aquarium-YOLOv8-6way] [14:15:20.483] [DEBUG] Forward time min/avg/max = 19.42/19.42/19.42 ms (n=1) [Aquarium-YOLOv8-6way] [14:15:20.490] [DEBUG] Post-process time = 6.78 ms [Aquarium-YOLOv8-6way] [14:15:20.491] [INFO] Detections: 26 [Aquarium-YOLOv8-6way] [14:15:20.491] [INFO] fish score=0.850 xyxy=(168.9,517.7,285.1,583.1) [Aquarium-YOLOv8-6way] [14:15:20.491] [INFO] fish score=0.771 xyxy=(757.8,573.3,801.3,601.8) ... [Aquarium-YOLOv8-6way] [14:15:20.496] [INFO] fish score=0.452 xyxy=(600.2,412.4,652.9,460.7) [Aquarium-YOLOv8-6way] [14:15:20.496] [INFO] per-class: {'fish': 26, 'turtle': 0, 'shrimp': 0, 'crab': 0, 'snail': 0} [Aquarium-YOLOv8-6way] [14:15:20.526] [INFO] Saved to result_aquarium_yolov8.jpg root@ax650:~/yolo8# ls aquarium_yolov8s_6way.axmodel infer_yolov8_pyax.py result_aquarium_yolov8.jpg test.png root@ax650:~/yolo8# realpath result_aquarium_yolov8.jpg /root/yolo8/result_aquarium_yolov8.jpg ``` Output image: ![](result_aquarium_yolov8.jpg) ```