Hey @Seungdae_Kim,
The issue is that you’re trying to optimize a YOLOv8 classification model but using the default yolov8n configuration, which is for object detection. The detection config includes NMS post-processing and layer references that don’t exist in your classification model, causing the “Given layers not exist in the HN” error.
The fix: Don’t pass the model name (yolov8n) when working with custom models. Instead, create a custom YAML file for your classification model (without the detection-specific stuff like NMS).
I’d recommend following Victor’s approach from this thread and using the single compile command:
hailomz compile --ckpt yolov8_classification.onnx \
--calib-path /path/to/calibration/imgs/ \
--yaml custom_yolov8_classification.yaml \
--hw-arch hailo8 \
--classes <number_of_classes>
This handles parsing, optimization, and compilation in one step. Just make sure your custom YAML is configured for classification, not detection.
The key takeaway: avoid using the default yolov8n name when your model has a different architecture - it’ll load incompatible configurations.
Hope this helps!