In this paper, we develop an automated optical inspection method to detect yarn packages’ defect. Although textile industry is regarded as traditional industry, many new technologies, e.g., computer vision detection algorithms, are applied to this industry I recent years. Yarn packages are the semi-finished good of textile industry. Various factors may cause abnormal-shaped packages. In this study, we develop three defect detection algorithms to extract abnormal-shape packages. These algorithms can help manufacturer to avoid the disadvantages of human inspection effectively and improve the productive quality.