Skip to main content
. 2022 Oct 26;12(11):2591. doi: 10.3390/diagnostics12112591
Algorithm 1. AC-YOLOv5
Input: The original image;
Output: The Network structure, location, and accuracy of the target(s);
Step 1: Adaptively acquire the gray values of pixel points in the original image, and divide all pixel points into three classes based on the gray values, i.e., light, medium and dark according to the gray values;
Step 2: Perform HE on the three classes respectively, and then weight the results after HE and output the image;
Step 3: Input the image into the YOLOv5. Generate the original feature maps and feature matrix A about the object(s) based on the image;
Step 4: Training to predict and get feature maps and feature matrices A^;
Step 5: The loss function is calculated and optimized according to the matrix A and the matrix A^;
Step 6: Perform iterations from step 3 to step 5 until the desired accuracy is achieved.