# Improved U2 Net-Based Surface Defect Detection Method for Blister Tablets
## 1 Introduction  
In the pharmaceutical industry, the detection of surface defects on tablets is a key step to ensure the safety, effectiveness, and market acceptance of drugs. According to the requirements of GMP (Good Manufacturing Practice) and ICH Q9 (Quality Risk Management), all stages of tablet production from raw material preparation, compression, to packaging must undergo strict appearance inspection to ensure that the tablet surface is free of defects such as damage, scratches, and contamination [1; 2]. These defects not only affect the appearance of the tablets but also lead to more serious consequences, such as incomplete disintegration of the tablets during administration, which affects the dissolution and efficacy of the drug. These risks make the detection of surface defects in tablets a core quality-control point in pharmaceutical production. The eligibility criteria for tablet surface defects require that tablets must achieve strict visual and functional consistency. First, the surface of the tablet must be smooth and free of scratches. Any such defect will result in uneven internal disintegration of the tablet, affecting the accuracy of administration. Scratches not only affect the appearance of the tablet but also may cause the tablet to crack during patient administration, affecting the efficacy of the drug [1]. Second, the surface of the tablet must be kept clean and free of contaminants, including the presence of black spots or other foreign objects. The presence of pollutants not only affects the physical stability of tablets but also poses a threat to the health of patients, as it may cause adverse reactions or reduce the effectiveness of the drugs [1]. In the tablet testing process, nonconformities are usually divided into serious defects and minor defects. Serious defects include those that may directly affect the function, safety, or efficacy of the tablet, and such defects must be reported immediately, and correctiveaction taken, to prevent nonconforming products from entering the market. Common serious defects include scratches, contaminants, and breakage [1,2]. Scratches or damage usually occur in the tablet pressing process. Due to uneven mold pressure or equipment failure, these defects will lead to incomplete disintegration of the tablet during use and inaccurate release dose, which directly affects the efficacy of the tablet [1]. The source of contaminants may be wear and tear of equipment, unclean operating conditions, or operator error. Contaminated tablets not only affect appearance but also pose health risks to patients and must be destroyed or reprocessed immediately [3]. Common minor defects include slight scratches on the surface of the tablet or small dents on the surface. Such defects usually occur during the packaging, transportation, or storage of the tablets and do not affect the function or dose release of the tablets. For example, a slight scratch on the surface of a pill, although it does not affect the efficacy of the drug, may affect the image of the product in the market [1,2]. Most of the general packaging of tablets is in the form of blister packaging, which ensures the integrity of the tablets while also solving the problem of hygiene during transportation. Therefore, how to detect it completely and accurately is of great significance for ensuring the quality and safety of drugs [4,5]. The surface defect detection method for blister tablets has experienced a process of development from traditional methods to intelligent detection today. The traditional methods mainly include human methods and extraction of defect features + classification [6,7]. Human method: this method detects defective tablets using human senses, relying on the human eye. Classification method after extraction of defect features: manually designing different rules for different defects, e.g., based on area, size, circumference, curvature, and determining which are defects according to these rules.