Artificial intelligence (AI) has emerged as a pivotal tool in managing extensive datasets, enabling pattern recognition, and deriving solutions, particularly revolutionizing additive manufacturing (AM). This study intends to develop AI deep machine learning image processing techniques for real-time defects detection in additively manufactured continuous carbon fiber-reinforced polymer(cCFRP) specimens. Leveraging YOLOv8- a state-of-the-art, single-stage object detection algorithm, this study focuses on the relationship between printing parameters and defect occurrences, specifically misalignment errors. The research delineates a methodological advancement by correlating detected defects with parameter optimization, leading to significant quality improvements in cCFRP specimens. An impressive 94 % accuracy in detecting misalignments was achieved through fine-tuning the nozzle temperature adjustment, resulting in significant reductions in misalignment errors, while minimal impact is observed from print bed temperature, feed amount, and feed rate/sec on refining the proposed model for identifying optimal parameters.