Terahertz defect detection plays a crucial role in various industrial applications, where accurate and efficient identification of small defects is challenging. In this study, we propose an enhanced version of YOLOv8 tailored for terahertz defect detection, incorporating key innovations to address the challenges posed by small and densely packed defects. Our model integrates a P2 layer for improved small object detection, Outlook Attention for contextual awareness, and ODConv for adaptive convolutions. To support model development and evaluation, we constructed a customized dataset using dual-material 3D-printed samples with diverse defect morphologies, captured via a QCL-based THz imaging system. Our enhanced model achieves a mAP@0.75 of 0.724 and a mAP@0.5–0.95 of 0.625, outperforming the YOLOv8 baseline by 11.0% and 3.3%, respectively, and surpassing even robust YOLO versions like YOLOv9 and YOLOv10. Visual comparisons further highlight the enhanced detection accuracy, with high confidence scores and few missed detections, particularly for small defects. These results demonstrate that our approach is highly effective for terahertz defect detection.