CN113221860A - DNA fragment recognition method, device, computer equipment and storage medium - Google Patents

DNA fragment recognition method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN113221860A
CN113221860A CN202110768165.3A CN202110768165A CN113221860A CN 113221860 A CN113221860 A CN 113221860A CN 202110768165 A CN202110768165 A CN 202110768165A CN 113221860 A CN113221860 A CN 113221860A
Authority
CN
China
Prior art keywords
sperm
area
image
threshold
positioning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110768165.3A
Other languages
Chinese (zh)
Other versions
CN113221860B (en
Inventor
许德鹏
刘晓康
周军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Reetoo Biotechnology Co Ltd
Original Assignee
Shenzhen Reetoo Biotechnology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Reetoo Biotechnology Co Ltd filed Critical Shenzhen Reetoo Biotechnology Co Ltd
Priority to CN202110768165.3A priority Critical patent/CN113221860B/en
Publication of CN113221860A publication Critical patent/CN113221860A/en
Application granted granted Critical
Publication of CN113221860B publication Critical patent/CN113221860B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/69Microscopic objects, e.g. biological cells or cellular parts
    • G06V20/695Preprocessing, e.g. image segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10056Microscopic image
    • G06T2207/10061Microscopic image from scanning electron microscope
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application relates to a DNA fragment recognition method, a device, a computer device and a storage medium. The method comprises the following steps: acquiring a sperm image; extracting a single-channel image from the sperm image; determining a sperm edge area in a single-channel image through edge detection; obtaining a sperm positioning area through the sperm edge area; and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result. The method can improve the recognition accuracy of DNA fragment recognition.

Description

DNA fragment recognition method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method and an apparatus for identifying DNA fragments, a computer device, and a storage medium.
Background
With the development of computer technology, DNA (deoxyribose nucleic Acid) fragment recognition technology has emerged, and is mainly used to determine whether DNA fragments exist in sperm.
In the traditional technology, DNA fragment recognition is usually performed on sperms in a chromatin diffusion image analysis mode, wherein the chromatin diffusion image analysis refers to analyzing sperm images diffused by SCD method chromatin by using methods such as image binarization, contour ellipse fitting and the like, calculating the ratio of the thickness of the unilateral halo of each sperm head to the minimum diameter, and judging whether DNA fragments exist.
However, in the conventional method, since the halo and the contour of the head in the chromatin diffusion image are not obvious and are not standard ellipses, the extracted contour may have a large error, and further, in the case of sperm junction or overlapping, the error of the contour may be larger, and there is a problem that the recognition accuracy is low.
Disclosure of Invention
In view of the above, it is necessary to provide a DNA fragment recognition method, apparatus, computer device and storage medium capable of improving recognition accuracy in view of the above technical problems.
A DNA fragment recognition method, the method comprising:
acquiring a sperm image;
extracting a single-channel image from the sperm image;
determining a sperm edge area in a single-channel image through edge detection;
obtaining a sperm positioning area through the sperm edge area;
and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
In one embodiment, obtaining the sperm cell localization area by the sperm cell edge area comprises:
acquiring pixel value distribution of a sperm edge area, and acquiring a color threshold value according to the pixel value distribution;
and carrying out binarization on the single-channel image according to a color threshold value to obtain a foreground area, and taking the foreground area as a sperm positioning area.
In one embodiment, obtaining a pixel value distribution of a sperm edge region, and obtaining a color threshold from the pixel value distribution comprises:
acquiring pixel value distribution of a sperm edge area, and determining a pixel value to be traversed according to the pixel value distribution;
acquiring inter-class variance corresponding to the pixel value to be traversed;
and sequencing the inter-class variances, determining a target traversal pixel value corresponding to the maximum inter-class variance, and taking the target traversal pixel value as a color threshold.
In one embodiment, further comprising:
calculating the area of each sperm locating area;
and filtering the sperm positioning area according to a preset area threshold and the area of the sperm positioning area.
In one embodiment, the area threshold comprises a first threshold, and filtering the sperm localization area according to a preset area threshold and the area of the sperm localization area comprises:
and filtering out sperm locating areas with the area smaller than a first threshold value.
In one embodiment, the area threshold comprises a second threshold, and filtering the sperm localization area according to a preset area threshold and the area of the sperm localization area comprises:
and filtering out the sperm locating area with the area larger than the second threshold value.
In one embodiment, the area threshold comprises a second threshold, and filtering the sperm localization area according to a preset area threshold and the area of the sperm localization area comprises:
selecting a sperm positioning area with the area larger than a second threshold value, and judging the adjacent condition of the sperm positioning area;
when the sperm locating area is not adjacent to the sperm, filtering the sperm locating area;
when the sperm adjacent to the sperm positioning area exists, the sperm positioning area is divided.
In one embodiment, determining the contiguity of the sperm cell localization areas comprises:
calculating the nearest distance from each pixel in the sperm locating area to the edge of the sperm locating area;
determining a central area of the sperm positioning area according to a preset distance threshold and the nearest distance;
and judging the adjacent condition of the sperm locating area according to the central area.
In one embodiment, determining the contiguity of the sperm locating areas based on the central area comprises:
when the number of the central regions is equal to 1, judging that no adjacent sperm exists;
when the number of the central regions is more than 1, it is judged that there is a sperm abutment.
In one embodiment, when there is sperm contiguity in the sperm locating region, segmenting the sperm locating region comprises:
when the sperm adjacent exists in the sperm positioning area, adjacent gap pixels are obtained, wherein the adjacent gap pixels are pixels outside each central area in the sperm positioning area, and the area radius of the central area is obtained;
calculating the distance from the adjacent gap pixel to the center of each central area, and calculating the ratio of the distance from the adjacent gap pixel to the center of each central area to the area radius;
and determining the corresponding relation between the adjacent gap pixels and the central area according to the ratio, and segmenting the sperm positioning area according to the corresponding relation.
In one embodiment, performing DNA fragment recognition on the sperm image of the sperm localization area, and obtaining the DNA fragment recognition result comprises:
extracting the characteristics of the sperm image of the sperm positioning area to obtain characteristic information;
and inputting the characteristic information into the trained fragment recognition model to obtain a DNA fragment recognition result, wherein the trained fragment recognition model is obtained by training a sample sperm image.
In one embodiment, the detecting by edge includes:
and performing edge extraction on the single-channel image by using a Canny edge detection method.
In one embodiment, further comprising:
the sperm edge region is dilated using an edge dilation method.
A DNA fragment recognition apparatus, the apparatus comprising:
the acquisition module is used for acquiring a sperm image;
the extraction module is used for extracting a single-channel image from the sperm image;
the detection module is used for determining a sperm edge area in the single-channel image through edge detection;
the positioning module is used for obtaining a sperm positioning area through the sperm edge area;
and the identification module is used for carrying out DNA fragment identification on the sperm image of the sperm positioning area to obtain a DNA fragment identification result.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a sperm image;
extracting a single-channel image from the sperm image;
determining a sperm edge area in a single-channel image through edge detection;
obtaining a sperm positioning area through the sperm edge area;
and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a sperm image;
extracting a single-channel image from the sperm image;
determining a sperm edge area in a single-channel image through edge detection;
obtaining a sperm positioning area through the sperm edge area;
and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
According to the DNA fragment identification method, the device, the computer equipment and the storage medium, after the sperm image is obtained, the single-channel image is extracted from the sperm image, the single-channel image can be subjected to edge detection, the sperm edge area in the single-channel image is determined, then the sperm edge area can be utilized to realize sperm positioning, the sperm positioning area is obtained, the DNA fragment identification is carried out on the sperm image of the obtained sperm positioning area, the accurate identification can be realized, the DNA fragment identification result is obtained, and the identification accuracy is improved.
Drawings
FIG. 1 is a schematic flow chart of a DNA fragment identification method according to an embodiment;
FIG. 2 is a G channel image extracted in one embodiment;
FIG. 3 is a sperm cell positioning image in one embodiment;
FIG. 4 is a single channel image after sperm filtration in one embodiment;
FIG. 5 is a schematic flow chart of a DNA fragment discriminating method in another embodiment;
FIG. 6 is a block diagram showing the construction of a DNA fragment discriminating apparatus according to an embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a DNA fragment recognition method is provided, and this embodiment is illustrated by applying the method to a terminal, it is to be understood that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and is implemented by interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server can be implemented by an independent server or a server cluster formed by a plurality of servers. In this embodiment, the method includes the steps of:
step 102, acquiring a sperm image.
The sperm image is an image corresponding to a sperm sample slide stained by a fluorescent staining method placed under an electron microscope, which is acquired by an image sensor of the electron microscope.
Specifically, a user can place the semen sample slide stained by a fluorescent staining method under an electron microscope, a sperm image can be collected through an image sensor of the electron microscope, and when the sperm image needs to be identified by DNA fragments, the terminal can acquire the sperm image from the electron microscope. The mode of acquiring the sperm image from the electron microscope may be that the electron microscope directly outputs the acquired sperm image to the terminal, and this embodiment is not specifically limited herein.
And 104, extracting a single-channel image from the sperm image. Specifically, the sperm image is a multi-channel image, when the sperm positioning area is determined, the terminal extracts a single-channel image from the sperm image, and the single-channel image is utilized to realize the sperm positioning. For example, the sperm image may be an RGB (Red, Green, Blue, Red, Green, Blue) image, and the extracted single-channel images are an R-channel image, a G-channel image, and a B-channel image. For example, as shown in fig. 2, the G channel image is extracted, and the bright spots therein indicate the areas where the sperm are located.
Further, the method for extracting the single-channel image from the sperm image may specifically be: firstly, a single-channel image is directly separated from a sperm image, and the single-channel image can be realized through a preset code. And secondly, converting the sperm image into a single-channel image, which can be realized by a matrix. And thirdly, the sperm image is changed into other multi-channel color spaces and one channel image is separated.
And 106, determining the sperm edge area in the single-channel image through edge detection.
Specifically, after the single-channel image is obtained, the terminal performs edge detection on the single-channel image by using an edge detection method to determine a sperm edge area. Further, after the sperm edge region is determined, the terminal can further expand the sperm edge region obtained after the edge detection by using an edge expansion method, and the sperm edge region is widened by the edge expansion, and more sampling pixels are included, so that accurate sperm positioning can be carried out. The terminal can use a Canny edge detection method to carry out edge detection on the single-channel image.
Preferably, after the single-channel image is extracted, the channel image with the maximum difference between the foreground image containing the sperm and the background image can be preferably selected from the single-channel image for edge detection and sperm positioning. As can be seen from the calculation of the difference, in the RGB images, the G-channel image is preferably a channel image in which the difference between the foreground image containing the sperm and the background image is maximized, where the maximum difference means that the difference between the foreground image containing the sperm and the background image is the most obvious in each single-channel image. The method for preferably selecting the channel image with the maximized difference between the foreground image containing the sperms and the background image specifically may be: the method comprises the steps of obtaining an image sample set, extracting single-channel images of image samples in the image sample set, calculating the difference between a foreground containing sperms and a background of each single-channel image, and determining the channel image with the maximum difference between the foreground image containing the sperms and the background image according to the difference. For example, as shown in fig. 2, the G channel image is extracted, and the bright spots therein indicate the areas where the sperm are located.
And step 108, obtaining a sperm locating area through the sperm edge area.
The sperm localization area is an area where sperm is present in a single channel image determined by sperm localization.
Specifically, after the sperm edge area is obtained, the terminal counts the pixel values of the sperm edge area to obtain the pixel value distribution of the sperm edge area, and performs sperm positioning according to the pixel value distribution to obtain the sperm positioning area. The pixel value distribution is used for representing the distribution condition of the pixel values corresponding to the sperm edge area, and can be obtained by counting the pixel values of the sperm edge area.
Furthermore, after sperm positioning is carried out according to pixel value distribution and sperm positioning areas are obtained, the area of each sperm positioning area is calculated by the terminal, and the sperm positioning areas are filtered according to a preset area threshold value and the area of the sperm positioning area so as to filter out the sperm positioning areas which do not meet the requirements, so that accurate DNA fragment identification is realized.
And 110, performing DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
Specifically, after the sperm locating area is determined, the terminal performs feature extraction on the sperm image of the obtained sperm locating area, determines feature information corresponding to the sperm image, and performs DNA fragment recognition according to the feature information to determine whether DNA fragments exist in the sperm image, so as to obtain a DNA fragment recognition result. The characteristic information refers to values representing sperm properties, such as area, perimeter, pixel quantile value, and the like, and different characteristic information may be selected according to different DNA fragment identification methods, and the characteristic information is not specifically limited in this embodiment.
Preferably, when the sperm image of the sperm locating area is obtained for DNA fragment recognition, a single-channel image with maximum difference between normal sperm and abnormal sperm with DNA fragments can be preferably selected from the sperm image for DNA fragment recognition, so as to obtain a more accurate DNA fragment recognition result. As can be seen from the calculation of the difference, it is preferable that, in the RGB image, the R-channel image is a single-channel image in which the difference between normal sperm and abnormal sperm in which DNA debris exists is maximized. The method for preferably selecting the single-channel image with the maximized difference between the normal sperm and the abnormal sperm with the DNA fragments specifically comprises the following steps: acquiring an image sample set, extracting single-channel images of the image samples in the image sample set, calculating the difference between normal sperms and abnormal sperms for each single-channel image, and determining the single-channel image with the maximum difference between the normal sperms and the abnormal sperms with DNA fragments according to the difference.
According to the DNA fragment identification method, the device, the computer equipment and the storage medium, after the sperm image is obtained, the single-channel image is extracted from the sperm image, the single-channel image can be subjected to edge detection, the sperm edge area in the single-channel image is determined, then the sperm edge area can be utilized to realize sperm positioning, the sperm positioning area is obtained, the DNA fragment identification is carried out on the sperm image of the obtained sperm positioning area, the accurate identification can be realized, the DNA fragment identification result is obtained, and the identification accuracy is improved.
In one embodiment, obtaining the sperm cell localization area by the sperm cell edge area comprises:
acquiring pixel value distribution of a sperm edge area, and acquiring a color threshold value according to the pixel value distribution;
and carrying out binarization on the single-channel image according to a color threshold value to obtain a foreground area, and taking the foreground area as a sperm positioning area.
The color threshold refers to a pixel value used for binarizing a single-channel image. The foreground region is a region where the pixel value determined after binarization is not zero. The binarization is to change the pixel value of the single-channel image into two values, for example, the pixel values of the single-channel image whose pixel values are greater than the color threshold value are all set to 1, and the pixel values of the single-channel image whose pixel values are not greater than the color threshold value are all set to 0, so as to implement binarization. For example, as shown in FIG. 3, a sperm cell positioning image is shown, wherein the bright spots indicate the areas where the sperm cells are located.
Specifically, the terminal counts pixel values of a sperm edge area to obtain pixel value distribution of the sperm edge area, calculates a color threshold value by using a maximum inter-class variance method according to the pixel value distribution, binarizes a single-channel image by using the color threshold value, sets the pixel value of which the pixel value is greater than the color threshold value in the single-channel image as a first pixel value, sets the pixel value of which the pixel value is not greater than the color threshold value in the single-channel image as a second pixel value, takes an image area corresponding to the first pixel value as a foreground area corresponding to the single-channel image, and takes the foreground area as a sperm positioning area. The first pixel value and the second pixel value may be set by themselves as needed, for example, the first pixel value may be set to 255, and the second pixel value may be set to 0.
The maximum inter-class variance method is an algorithm for determining an image binarization segmentation threshold, which is also called as Otsu method, and after the image binarization segmentation is performed according to the threshold obtained by Otsu method, the inter-class variance between the foreground and background images is maximum. The method is considered as the optimal algorithm for selecting the threshold value in image segmentation, is simple in calculation and is not influenced by the brightness and the contrast of an image, so that the method is widely applied to digital image processing. The image is divided into a background part and a foreground part according to the gray characteristic of the image. Since the variance is a measure of the uniformity of the gray distribution, the larger the inter-class variance between the background and the foreground is, the larger the difference between the two parts constituting the image is, and the smaller the difference between the two parts is when part of the foreground is mistaken for the background or part of the background is mistaken for the foreground. Thus, a segmentation that maximizes the inter-class variance means that the probability of false positives is minimized.
In this embodiment, pixel value distribution in the sperm edge region is obtained, a color threshold value is obtained according to the pixel value distribution, binarization is performed on the single-channel image according to the color threshold value, a foreground region is obtained, the foreground region is used as a sperm positioning region, and compared with the case that binarization is directly performed on the single-channel image, robustness is higher.
In one embodiment, obtaining a pixel value distribution of a sperm edge region, and obtaining a color threshold from the pixel value distribution comprises:
acquiring pixel value distribution of a sperm edge area, and determining a pixel value to be traversed according to the pixel value distribution;
acquiring inter-class variance corresponding to the pixel value to be traversed;
and sequencing the inter-class variances, determining a target traversal pixel value corresponding to the maximum inter-class variance, and taking the target traversal pixel value as a color threshold.
The pixel value to be traversed refers to a pixel value existing in a pixel value distribution. The inter-class variance corresponding to the pixel value to be traversed refers to the inter-class variance obtained by calculating after dividing the single-channel image into a foreground region and a background region by using the pixel value to be traversed.
Specifically, the terminal obtains pixel value distribution of a sperm edge area, pixel values appearing in the pixel value distribution are all used as pixel values to be traversed, a single-channel image is divided according to the pixel values to be traversed, the single-channel image is divided into a foreground area and a background area, inter-class variances corresponding to the pixel values to be traversed are obtained according to a preset inter-class variance calculation formula and the divided foreground area and background area, all the inter-class variances are sequenced, a target traversal pixel value corresponding to the maximum inter-class variance is determined, and the target traversal pixel value is used as a color threshold value to realize threshold selection for performing area segmentation on the single-channel image. When the single-channel image is divided into a foreground area and a background area according to the pixel value to be traversed, the terminal can classify the part of the single-channel image with the pixel value larger than the pixel value to be traversed into the foreground area and classify the part of the single-channel image with the pixel value not larger than the pixel value to be traversed into the background area.
The preset inter-class variance calculation formula is a formula for calculating inter-class variance, and specifically is
Figure 618374DEST_PATH_IMAGE001
Figure 818412DEST_PATH_IMAGE002
And
Figure 218300DEST_PATH_IMAGE003
respectively representing the pixel proportion and the average pixel value of the foreground region,
Figure 503788DEST_PATH_IMAGE004
and
Figure 647324DEST_PATH_IMAGE005
respectively representing the pixel proportion and the average pixel value of the background area,
Figure 701868DEST_PATH_IMAGE006
represents the average pixel value of the entire image,
Figure 538237DEST_PATH_IMAGE007
the inter-class variance is represented, and the threshold t when the inter-class variance is maximum is the required color threshold.
In the embodiment, by obtaining the pixel value distribution of the sperm edge area, determining the pixel value to be traversed according to the pixel value distribution, obtaining the inter-class variance corresponding to the pixel value to be traversed, sequencing the inter-class variances, determining the target traversal pixel value corresponding to the maximum inter-class variance, and taking the target traversal pixel value as the color threshold, the accurate color threshold can be determined by using the pixel value distribution, so that accurate binaryzation is realized, and robustness is enhanced.
In one embodiment, further comprising:
calculating the area of each sperm locating area;
and filtering the sperm positioning area according to a preset area threshold and the area of the sperm positioning area.
Specifically, the terminal calculates the area of each sperm positioning area according to the number of all pixels in each sperm positioning area and the actual physical distance represented by the pixel distance, and filters the sperm positioning area by using a preset area threshold and the area of the sperm positioning area. For example, as shown in fig. 4, a single channel image after sperm filtration.
Wherein, when carrying out the sperm and filtering, the terminal can separate out undersize, too big and the sperm location area of normal size according to predetermined area threshold value, and to the sperm location area of normal size, the terminal can directly remain, and to the sperm location area of undersize, the terminal can directly filter, and to too big sperm location area, the terminal need be in the further filtering after judging its adjacent condition. When the overlarge sperm locating areas are adjacent to each other, namely at least two sperm locating areas are partially overlapped, the terminal divides the sperm locating areas adjacent to each other, calculates the sperm area of each divided sperm locating area, and performs sperm filtration on each divided sperm locating area by using a preset area threshold. When the oversized sperm locating area is not adjacent to the sperm, the terminal end can directly filter the oversized sperm locating area. The preset area threshold may be set according to the requirement, and the embodiment is not limited in detail here.
In this embodiment, the area of each sperm locating area is calculated, and the sperm locating areas are filtered according to a preset area threshold and the area of each sperm locating area, so that abnormal sperm locating areas can be filtered.
In one embodiment, the area threshold comprises a first threshold, and filtering the sperm localization area according to a preset area threshold and the area of the sperm localization area comprises:
and filtering out sperm locating areas with the area smaller than a first threshold value.
Specifically, the terminal filters the sperm locating area by using a first threshold value, and filters the sperm locating area with an area smaller than the first threshold value.
In one embodiment, the area threshold comprises a second threshold, and filtering the sperm localization area according to a preset area threshold and the area of the sperm localization area comprises:
and filtering out the sperm locating area with the area larger than the second threshold value.
Specifically, the terminal filters the sperm locating area by using a second threshold value, and filters the sperm locating area with an area larger than the second threshold value.
In one embodiment, the area threshold comprises a second threshold, and filtering the sperm localization area according to a preset area threshold and the area of the sperm localization area comprises:
selecting a sperm positioning area with the area larger than a second threshold value, and judging the adjacent condition of the sperm positioning area;
when the sperm locating area is not adjacent to the sperm, filtering the sperm locating area;
when the sperm adjacent to the sperm positioning area exists, the sperm positioning area is divided.
Specifically, in addition to the sperm locating region with the directly filtered area larger than the second threshold mentioned in the above embodiment, the terminal may also select the sperm locating region with the area larger than the second threshold, and filter the sperm locating region by determining the adjacent condition of the sperm locating regions. When the sperm positioning area is not adjoined by the sperm, the terminal can directly filter the sperm positioning area, when the sperm positioning area is adjoined by the sperm, the terminal can segment the sperm positioning area to obtain the segmented sperm positioning area, and the segmented sperm positioning area is filtered according to the area of the segmented sperm positioning area and a preset area threshold.
At this time, when filtering the segmented sperm locating area, the terminal calculates the area of the segmented sperm locating area, and filters the sperm locating area by comparing the area with an area threshold. Further, the area threshold includes a first threshold and a second threshold, and the terminal filters out the segmented sperm locating area having an area smaller than the first threshold and the segmented sperm locating area having an area larger than the second threshold.
In the embodiment, the sperm locating areas with the areas larger than the second threshold are selected, the sperm locating areas are adjoined and divided in a thinning mode, common abnormal conditions are considered while unreasonable sperm areas are filtered out, the dividing recall rate is improved, and accurate sperm locating areas can be obtained.
In one embodiment, determining the contiguity of the sperm cell localization areas comprises:
calculating the nearest distance from each pixel in the sperm locating area to the edge of the sperm locating area;
determining a central area of the sperm positioning area according to a preset distance threshold and the nearest distance;
and judging the adjacent condition of the sperm locating area according to the central area.
The central area refers to a sperm area consisting of target pixels with the closest distance greater than a preset distance threshold in the sperm locating area.
Specifically, the terminal calculates the closest distance from each pixel in the sperm locating area to all pixels in the edge of the sperm locating area, screens out a target pixel with the closest distance greater than a preset distance threshold according to the preset distance threshold and the closest distance, obtains a central area of the sperm locating area according to the target pixel, and judges the adjacent condition of the sperm locating area according to the central area. Since the number of the central regions in the sperm localization area is at least two when there is sperm abutment in the sperm localization area, the abutment of the sperm localization area can be determined directly from the number of the central regions in the sperm localization area, i.e., there is no or no sperm abutment. Further, before the closest distance is calculated, the terminal binarizes the sperm locating area according to a preset binarization threshold value, so that the edge of the sperm locating area is more accurate.
In this embodiment, the nearest distance from each pixel in the sperm locating area to the edge of the sperm locating area is calculated, and the central area of the sperm locating area is determined according to the preset distance threshold and the nearest distance, so that the adjacent condition of the sperm locating area can be determined according to the central area.
In one embodiment, determining the contiguity of the sperm locating areas based on the central area comprises:
when the number of central regions is equal to 1, determining that there is no sperm adjacency;
when the number of central regions is greater than 1, it is determined that there is sperm adjacency.
Specifically, when the number of the central regions is equal to 1, it means that only one sperm is present in the sperm localization region and it is determined that there is no sperm abutment, and when the number of the central regions is greater than 1, it means that more than one sperm is present in the sperm localization region and it is determined that there is sperm abutment.
In one embodiment, when there is sperm contiguity in the sperm locating region, segmenting the sperm locating region comprises:
when the sperm adjacent exists in the sperm positioning area, adjacent gap pixels are obtained, wherein the adjacent gap pixels are pixels outside each central area in the sperm positioning area, and the area radius of the central area is obtained;
calculating the distance from the adjacent gap pixel to the center of each central area, and calculating the ratio of the distance from the adjacent gap pixel to the center of each central area to the area radius;
and determining the corresponding relation between the adjacent gap pixels and the central area according to the ratio, and segmenting the sperm positioning area according to the corresponding relation.
The adjacent gap pixels are pixels outside each central area in the sperm locating area, namely pixels which do not belong to the central area in the sperm locating area.
Specifically, when the sperm positioning area has sperm adjacency, the terminal acquires the area radius of the central area, determines the center of the central area, determines the adjacent gap pixel according to the central area, calculates the distance between the adjacent gap pixel and the center of each central area, calculates the ratio of the distance between the adjacent gap pixel and the center of each central area to the area radius, corresponds the adjacent gap pixel to the central area corresponding to the minimum ratio, determines the corresponding relation between the adjacent gap pixel and the central area, divides the sperm positioning area according to the corresponding relation, and divides the sperm positioning area into at least two divided sperm positioning areas. The manner of obtaining the area radius of the central area may be: and calculating the area of the central area of each central area according to the number of all pixels in each central area and the actual physical distance represented by the pixel distance, and reversely deducing the area radius of the central area according to the area of the central area.
In this embodiment, the division of the adjacent gap pixels can be realized by determining the adjacent gap pixels according to the central region, acquiring the region radius of the central region, calculating the ratio of the distance from the adjacent gap pixels to the center of the central region to the region radius, determining the corresponding relationship between the adjacent gap pixels and the central region according to the ratio, and dividing the sperm locating region according to the corresponding relationship.
In one embodiment, performing DNA fragment recognition on the sperm image of the sperm localization area, and obtaining the DNA fragment recognition result comprises:
extracting the characteristics of the sperm image of the sperm positioning area to obtain characteristic information;
and inputting the characteristic information into the trained fragment recognition model to obtain a DNA fragment recognition result, wherein the trained fragment recognition model is obtained by training a sample sperm image.
The characteristic information refers to values representing sperm properties, such as area, perimeter, pixel quantile value and the like, and different characteristic information can be selected according to different DNA fragment identification modes. The trained fragment recognition model refers to a model trained in advance for determining whether DNA fragments exist in the sperms in the sperm locating area according to the characteristic information, for example, the trained fragment recognition model may specifically be a random forest model, and the like. The trained debris recognition model may be obtained by training a sample sperm image including a first sample image with DNA debris present and a second sample image without DNA debris present.
Specifically, different feature information can be selected according to different DNA fragment recognition modes, so that when the DNA fragment recognition is carried out, the terminal can determine the corresponding feature to be extracted according to the trained fragment recognition model, carry out feature extraction on the sperm image of the sperm positioning area according to the feature to be extracted, determine the feature information corresponding to the sperm positioning area, and input the feature information into the trained fragment recognition model to obtain the corresponding DNA fragment recognition result. Wherein the trained debris recognition model is obtained by training a sample sperm image. During training, the terminal obtains an untrained fragment recognition model, inputs a sample sperm image into the untrained fragment recognition model to obtain a recognition result corresponding to the untrained fragment recognition model, compares the recognition result with a real result of the sample sperm image, calculates a model loss function, and performs model adjustment by using the model loss function to obtain the trained fragment recognition model.
For example, the feature information may be specifically 75 quantiles of pixel values, the trained fragment recognition model may be specifically a decision tree of a node, the node is a color threshold obtained by training, the 75 quantile pixel values corresponding to the sperm locating region may be obtained by performing pixel value distribution statistics on a sperm image of the obtained sperm locating region at the terminal, and the 75 quantile pixel values are input into the decision tree, that is, the 75 quantile pixel values may be classified according to the color threshold obtained by training, so as to obtain a DNA fragment recognition result corresponding to the sperm locating region. The 75-bit pixel value is a pixel value at 75% of the pixel values arranged from small to large. Here, the fragment recognition is performed using only one piece of feature information, and the recognition efficiency can be significantly improved.
In the embodiment, the characteristic information is obtained by extracting the characteristic of the sperm image of the sperm positioning area, and the characteristic information is input into the trained fragment recognition model to obtain the DNA fragment recognition result, so that the DNA fragment can be accurately recognized.
In one embodiment, the detecting by edge includes:
and performing edge extraction on the single-channel image by using a Canny edge detection method.
Specifically, the terminal filters noise in the single-channel image by using a Gaussian filter algorithm, then calculates the gradient strength and direction of each pixel point in the single-channel image after the noise is filtered, then applies a non-maximum value to suppress and eliminate the stray response of the edge, and finally marks strong and weak edge pixels through double gradient thresholds to suppress the isolated weak edge, so that edge detection is completed, and a sperm edge region in the single-channel image is obtained.
In this embodiment, edge extraction is performed on a single-channel image by using a Canny edge detection method, so that the sperm edge area in the single-channel image can be determined.
In one embodiment, the method further comprises:
the sperm edge region is dilated using an edge dilation method.
Specifically, after the sperm edge area in the single-channel image is determined, the terminal further expands the sperm edge area by using an edge expansion method, the sperm edge area is widened by the edge expansion, the number of sampling pixels is increased, and the sperm edge area in the single-channel image is more accurate, so that accurate sperm positioning is performed. In one embodiment, as shown in fig. 5, a schematic flow chart is provided to illustrate the DNA fragment recognition method of the present application, and the DNA fragment recognition method specifically includes the following steps:
the method comprises the steps that a terminal obtains a sperm image through an image sensor of an electron microscope, channel extraction is carried out on the sperm image to obtain a first channel image and a second channel image, the first channel image is a maximized difference image between the sperm image and a background image, the second channel image is a maximized difference image between normal sperm and abnormal sperm with DNA fragments, edge detection is carried out on the first channel image to determine a sperm edge area, pixel value distribution of the sperm edge area is obtained, sperm positioning is carried out according to the pixel value distribution to obtain a sperm positioning area, the area of each sperm positioning area is calculated according to the sperm positioning area, the sperm positioning area is filtered according to a preset area threshold value and the area of the sperm positioning area to obtain a filtered sperm positioning area, and the sperm positioning area in the second channel image is determined according to the filtered sperm positioning area, and carrying out DNA fragment recognition on the sperm image in the sperm positioning area to obtain a DNA fragment recognition result.
It should be understood that, although the steps in the flowcharts related to the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in each flowchart related to the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 6, there is provided a DNA fragment recognition apparatus including: an acquisition module 602, an extraction module 604, a detection module 606, a location module 608, and an identification module 610, wherein:
an acquisition module 602, configured to acquire a sperm image;
an extraction module 604, configured to extract a single-channel image from the sperm image;
a detection module 606, configured to determine a sperm edge region in the single channel image through edge detection;
a positioning module 608, configured to obtain a sperm positioning area through the sperm edge area;
and the identification module 610 is configured to perform DNA fragment identification on the obtained sperm image of the sperm locating area to obtain a DNA fragment identification result.
Above-mentioned DNA fragment recognition device through after acquireing sperm image, extracts the single channel image from sperm image, can utilize and carry out edge detection to single channel image, determines the sperm marginal zone in the single channel image, and then can utilize the sperm marginal zone to realize the sperm location, obtains the sperm location region, carries out DNA fragment through the sperm image to obtaining the sperm location region and discerns, just can realize accurate discernment, obtains DNA fragment recognition result, improves the recognition accuracy.
In one embodiment, the positioning module is further configured to obtain pixel value distribution of a sperm edge area, obtain a color threshold according to the pixel value distribution, binarize the single-channel image according to the color threshold to obtain a foreground area, and use the foreground area as the sperm positioning area.
In one embodiment, the positioning module is further configured to obtain pixel value distribution of a sperm edge area, determine a pixel value to be traversed according to the pixel value distribution, obtain inter-class variances corresponding to the pixel value to be traversed, sort the inter-class variances, determine a target traversal pixel value corresponding to a maximum inter-class variance, and use the target traversal pixel value as a color threshold.
In one embodiment, the positioning module is further configured to calculate an area of each sperm positioning region, and filter the sperm positioning regions according to a preset area threshold and the area of the sperm positioning region.
In one embodiment, the area threshold comprises a first threshold, and the location module is further configured to filter out sperm location regions having an area less than the first threshold.
In one embodiment, the area threshold comprises a second threshold, and the location module is further configured to filter out sperm location regions having an area greater than the second threshold.
In one embodiment, the area threshold includes a second threshold, and the positioning module is further configured to select a sperm positioning region having an area greater than the second threshold, and determine an adjacent condition of the sperm positioning region, filter the sperm positioning region when the sperm positioning region is not adjacent to the sperm, and segment the sperm positioning region when the sperm positioning region is adjacent to the sperm.
In one embodiment, the positioning module is further configured to calculate a closest distance between each pixel in the sperm positioning area and an edge of the sperm positioning area, determine a central area of the sperm positioning area according to a preset distance threshold and the closest distance, and determine an adjacent condition of the sperm positioning area according to the central area.
In one embodiment, the positioning module is further configured to determine that there is no sperm abutment when the number of central regions is equal to 1 and determine that there is sperm abutment when the number of central regions is greater than 1.
In one embodiment, the positioning module is further configured to, when there is sperm adjacent in the sperm positioning area, obtain adjacent gap pixels, where the adjacent gap pixels are pixels outside each central area in the sperm positioning area, obtain an area radius of the central area, calculate a distance from the adjacent gap pixels to a center of each central area, calculate a ratio of the distance from the adjacent gap pixels to the center of each central area to the area radius, determine a correspondence between the adjacent gap pixels and the central area according to the ratio, and segment the sperm positioning area according to the correspondence.
In one embodiment, the identification module is further configured to perform feature extraction on the sperm image of the sperm locating area to obtain feature information, input the feature information into the trained debris identification model to obtain a DNA debris identification result, and the trained debris identification model is obtained by training the sample sperm image.
In one embodiment, the detection module is further configured to perform edge extraction on the single-channel image using a Canny edge detection method.
In one embodiment, the detection module is further configured to dilate the sperm edge region using an edge dilation method.
For specific examples of the DNA fragment recognition apparatus, reference may be made to the above examples of the DNA fragment recognition method, which are not described herein again. The above-mentioned respective modules in the DNA fragment recognition apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a DNA fragment recognition method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring a sperm image;
extracting a single-channel image from the sperm image;
determining a sperm edge area in a single-channel image through edge detection;
obtaining a sperm positioning area through the sperm edge area;
and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring pixel value distribution of a sperm edge area, acquiring a color threshold value according to the pixel value distribution, binarizing a single-channel image according to the color threshold value to obtain a foreground area, and taking the foreground area as a sperm positioning area.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining pixel value distribution of a sperm edge area, determining a pixel value to be traversed according to the pixel value distribution, obtaining inter-class variances corresponding to the pixel value to be traversed, sequencing the inter-class variances, determining a target traversal pixel value corresponding to the maximum inter-class variance, and taking the target traversal pixel value as a color threshold.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and calculating the area of each sperm positioning area, and filtering the sperm positioning areas according to a preset area threshold and the area of each sperm positioning area.
In one embodiment, the area threshold comprises a first threshold, and the processor when executing the computer program further performs the steps of: and filtering out sperm locating areas with the area smaller than a first threshold value.
In one embodiment, the area threshold comprises a second threshold, and the processor when executing the computer program further performs the steps of: and filtering out the sperm locating area with the area larger than the second threshold value.
In one embodiment, the area threshold comprises a second threshold, and the processor when executing the computer program further performs the steps of: and selecting the sperm positioning area with the area larger than the second threshold value, judging the adjacent condition of the sperm positioning area, filtering the sperm positioning area when the sperm positioning area is not adjacent to the sperm, and segmenting the sperm positioning area when the sperm is adjacent to the sperm.
In one embodiment, the processor, when executing the computer program, further performs the steps of: calculating the nearest distance from each pixel in the sperm locating area to the edge of the sperm locating area, determining the central area of the sperm locating area according to a preset distance threshold and the nearest distance, and judging the adjacent condition of the sperm locating area according to the central area.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the number of central regions is equal to 1, it is judged that there is no sperm abutment, and when the number of central regions is greater than 1, it is judged that there is sperm abutment.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the sperm adjacent exists in the sperm positioning area, adjacent gap pixels are obtained, the adjacent gap pixels are pixels outside each central area in the sperm positioning area, the area radius of each central area is obtained, the distance from the adjacent gap pixels to the center of each central area is calculated, the ratio of the distance from the adjacent gap pixels to the center of each central area to the area radius is calculated, the corresponding relation between the adjacent gap pixels and the central area is determined according to the ratio, and the sperm positioning area is divided according to the corresponding relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and extracting the characteristics of the sperm image of the sperm positioning area to obtain characteristic information, inputting the characteristic information into the trained fragment recognition model to obtain a DNA fragment recognition result, and training the sample sperm image to obtain the trained fragment recognition model.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and performing edge extraction on the single-channel image by using a Canny edge detection method.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the sperm edge region is dilated using an edge dilation method.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring a sperm image;
extracting a single-channel image from the sperm image;
determining a sperm edge area in a single-channel image through edge detection;
obtaining a sperm positioning area through the sperm edge area;
and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring pixel value distribution of a sperm edge area, acquiring a color threshold value according to the pixel value distribution, binarizing a single-channel image according to the color threshold value to obtain a foreground area, and taking the foreground area as a sperm positioning area.
In one embodiment, the computer program when executed by the processor further performs the steps of: the method comprises the steps of obtaining pixel value distribution of a sperm edge area, determining a pixel value to be traversed according to the pixel value distribution, obtaining inter-class variances corresponding to the pixel value to be traversed, sequencing the inter-class variances, determining a target traversal pixel value corresponding to the maximum inter-class variance, and taking the target traversal pixel value as a color threshold.
In one embodiment, the computer program when executed by the processor further performs the steps of: and calculating the area of each sperm positioning area, and filtering the sperm positioning areas according to a preset area threshold and the area of each sperm positioning area.
In one embodiment, the area threshold comprises a first threshold, the computer program when executed by the processor further performing the steps of: and filtering out sperm locating areas with the area smaller than a first threshold value.
In an embodiment, the area threshold comprises a second threshold, the computer program when executed by the processor further performing the steps of: and filtering out the sperm locating area with the area larger than the second threshold value.
In an embodiment, the area threshold comprises a second threshold, the computer program when executed by the processor further performing the steps of: and selecting the sperm positioning area with the area larger than the second threshold value, judging the adjacent condition of the sperm positioning area, filtering the sperm positioning area when the sperm positioning area is not adjacent to the sperm, and segmenting the sperm positioning area when the sperm is adjacent to the sperm.
In one embodiment, the computer program when executed by the processor further performs the steps of: calculating the nearest distance from each pixel in the sperm locating area to the edge of the sperm locating area, determining the central area of the sperm locating area according to a preset distance threshold and the nearest distance, and judging the adjacent condition of the sperm locating area according to the central area.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the number of central regions is equal to 1, it is judged that there is no sperm abutment, and when the number of central regions is greater than 1, it is judged that there is sperm abutment.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the sperm adjacent exists in the sperm positioning area, adjacent gap pixels are obtained, the adjacent gap pixels are pixels outside each central area in the sperm positioning area, the area radius of each central area is obtained, the distance from the adjacent gap pixels to the center of each central area is calculated, the ratio of the distance from the adjacent gap pixels to the center of each central area to the area radius is calculated, the corresponding relation between the adjacent gap pixels and the central area is determined according to the ratio, and the sperm positioning area is divided according to the corresponding relation.
In one embodiment, the computer program when executed by the processor further performs the steps of: and extracting the characteristics of the sperm image of the sperm positioning area to obtain characteristic information, inputting the characteristic information into the trained fragment recognition model to obtain a DNA fragment recognition result, and training the sample sperm image to obtain the trained fragment recognition model.
In one embodiment, the computer program when executed by the processor further performs the steps of: and performing edge extraction on the single-channel image by using a Canny edge detection method.
In one embodiment, the computer program when executed by the processor further performs the steps of: the sperm edge region is dilated using an edge dilation method. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A DNA fragment recognition method, comprising:
acquiring a sperm image;
extracting a single-channel image from the sperm image;
determining a sperm edge area in the single-channel image through edge detection;
obtaining a sperm positioning area through the sperm edge area;
and carrying out DNA fragment recognition on the sperm image of the sperm positioning area to obtain a DNA fragment recognition result.
2. The method of claim 1, wherein said obtaining a sperm cell localization zone via said sperm cell edge zone comprises:
acquiring pixel value distribution of the sperm edge area, and acquiring a color threshold value according to the pixel value distribution;
and carrying out binarization on the single-channel image according to the color threshold value to obtain a foreground area, and taking the foreground area as a sperm positioning area.
3. The method of claim 2, wherein obtaining a distribution of pixel values of the sperm edge region from which to derive a color threshold comprises:
acquiring pixel value distribution of the sperm edge area, and determining pixel values to be traversed according to the pixel value distribution;
acquiring inter-class variance corresponding to the pixel value to be traversed;
and sequencing the inter-class variances, determining a target traversal pixel value corresponding to the maximum inter-class variance, and taking the target traversal pixel value as a color threshold.
4. The method of claim 1, further comprising:
calculating the area of each sperm localization zone;
and filtering the sperm positioning area according to a preset area threshold and the area of the sperm positioning area.
5. The method of claim 4, wherein the area threshold comprises a first threshold, and wherein filtering the sperm localization area based on a preset area threshold and the area of the sperm localization area comprises:
filtering out the sperm locating area with the area smaller than the first threshold value.
6. The method of claim 4, wherein the area threshold comprises a second threshold, and wherein filtering the sperm localization area based on a preset area threshold and the area of the sperm localization area comprises:
filtering out the sperm locating area with the area larger than the second threshold value.
7. The method of claim 4, wherein the area threshold comprises a second threshold, and wherein filtering the sperm localization area based on a preset area threshold and the area of the sperm localization area comprises:
selecting a sperm positioning area with the area larger than the second threshold value, and judging the adjacent condition of the sperm positioning area;
when no sperm are adjacent to the sperm positioning area, filtering the sperm positioning area;
and when the sperm adjacent to the sperm positioning area exists, the sperm positioning area is divided.
8. The method of claim 7, wherein said determining the contiguity of the sperm localization zones comprises:
calculating the nearest distance from each pixel in the sperm locating area to the edge of the sperm locating area;
determining a central area of the sperm positioning area according to a preset distance threshold and the nearest distance;
and judging the adjacent condition of the sperm positioning area according to the central area.
9. The method of claim 8, wherein said determining the contiguity of the sperm localization zones from the central zone comprises:
when the number of the central regions is equal to 1, judging that no sperm are adjacent;
when the number of the central regions is more than 1, it is judged that there is a sperm abutment.
10. The method of claim 7, wherein segmenting the sperm localization area when there is sperm adjacency in the sperm localization area comprises:
when the sperm adjacent exists in the sperm positioning area, adjacent gap pixels are obtained, wherein the adjacent gap pixels are pixels outside each central area in the sperm positioning area, and the area radius of the central area is obtained;
calculating the distance from the adjacent gap pixel to the center of each central area, and calculating the ratio of the distance from the adjacent gap pixel to the center of each central area to the area radius;
and determining the corresponding relation between the adjacent gap pixels and the central area according to the ratio, and segmenting the sperm positioning area according to the corresponding relation.
11. The method of claim 1, wherein performing DNA fragment recognition on the sperm image from which the sperm localization area was obtained to obtain a DNA fragment recognition result comprises:
extracting the characteristics of the sperm image of the sperm positioning area to obtain characteristic information;
and inputting the characteristic information into a trained fragment recognition model to obtain a DNA fragment recognition result, wherein the trained fragment recognition model is obtained by training a sample sperm image.
12. The method of claim 1, wherein the passing edge detection comprises:
and performing edge extraction on the single-channel image by using a Canny edge detection method.
13. The method of claim 1, further comprising:
expanding the sperm edge region using an edge dilation method.
14. A DNA fragment recognition apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring a sperm image;
the extraction module is used for extracting a single-channel image from the sperm image;
the detection module is used for determining a sperm edge area in the single-channel image through edge detection;
the positioning module is used for obtaining a sperm positioning area through the sperm edge area;
and the identification module is used for carrying out DNA fragment identification on the sperm image of the sperm positioning area to obtain a DNA fragment identification result.
15. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 13 when executing the computer program.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 13.
CN202110768165.3A 2021-07-07 2021-07-07 DNA fragment recognition method, device, computer equipment and storage medium Active CN113221860B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110768165.3A CN113221860B (en) 2021-07-07 2021-07-07 DNA fragment recognition method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110768165.3A CN113221860B (en) 2021-07-07 2021-07-07 DNA fragment recognition method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113221860A true CN113221860A (en) 2021-08-06
CN113221860B CN113221860B (en) 2021-10-22

Family

ID=77081149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110768165.3A Active CN113221860B (en) 2021-07-07 2021-07-07 DNA fragment recognition method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113221860B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090202131A1 (en) * 2006-01-19 2009-08-13 Luigi Armogida Automated microscopic sperm identification
CN104268515A (en) * 2014-09-18 2015-01-07 山东大学 Sperm morphology anomaly detection method
CN108182676A (en) * 2017-12-22 2018-06-19 成都朴华科技有限公司 A kind of sperm fragment rate detection method, device, equipment and readable storage medium storing program for executing
US20180239949A1 (en) * 2015-02-23 2018-08-23 Cellanyx Diagnostics, Llc Cell imaging and analysis to differentiate clinically relevant sub-populations of cells
CN108961208A (en) * 2018-05-21 2018-12-07 江苏康尚生物医疗科技有限公司 A kind of aggregation leucocyte segmentation number system and method
US20190197294A1 (en) * 2017-12-22 2019-06-27 Hillel Llc Imaging device for measuring sperm motility
CN110363740A (en) * 2018-12-29 2019-10-22 上海北昂医药科技股份有限公司 Sperm fragment recognition methods in DNA image
CN110930345A (en) * 2018-08-31 2020-03-27 赛司医疗科技(北京)有限公司 Sperm tail recognition method
CN111402232A (en) * 2020-03-16 2020-07-10 深圳市瑞图生物技术有限公司 Method for detecting sperm aggregation in semen
CN111563550A (en) * 2020-04-30 2020-08-21 北京百度网讯科技有限公司 Sperm morphology detection method and device based on image technology

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090202131A1 (en) * 2006-01-19 2009-08-13 Luigi Armogida Automated microscopic sperm identification
CN104268515A (en) * 2014-09-18 2015-01-07 山东大学 Sperm morphology anomaly detection method
US20180239949A1 (en) * 2015-02-23 2018-08-23 Cellanyx Diagnostics, Llc Cell imaging and analysis to differentiate clinically relevant sub-populations of cells
CN108182676A (en) * 2017-12-22 2018-06-19 成都朴华科技有限公司 A kind of sperm fragment rate detection method, device, equipment and readable storage medium storing program for executing
US20190197294A1 (en) * 2017-12-22 2019-06-27 Hillel Llc Imaging device for measuring sperm motility
CN108961208A (en) * 2018-05-21 2018-12-07 江苏康尚生物医疗科技有限公司 A kind of aggregation leucocyte segmentation number system and method
CN110930345A (en) * 2018-08-31 2020-03-27 赛司医疗科技(北京)有限公司 Sperm tail recognition method
CN110363740A (en) * 2018-12-29 2019-10-22 上海北昂医药科技股份有限公司 Sperm fragment recognition methods in DNA image
CN111402232A (en) * 2020-03-16 2020-07-10 深圳市瑞图生物技术有限公司 Method for detecting sperm aggregation in semen
CN111563550A (en) * 2020-04-30 2020-08-21 北京百度网讯科技有限公司 Sperm morphology detection method and device based on image technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
缪慧司等: "结合距离变换与边缘梯度的分水岭血细胞分割", 《中国图象图形学报》 *

Also Published As

Publication number Publication date
CN113221860B (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN110110799B (en) Cell sorting method, cell sorting device, computer equipment and storage medium
US7979212B2 (en) Method and system for morphology based mitosis identification and classification of digital images
US8379961B2 (en) Mitotic figure detector and counter system and method for detecting and counting mitotic figures
CN111242961B (en) Automatic film reading method and system for PD-L1 antibody staining section
CN113723573B (en) Tumor tissue pathological classification system and method based on adaptive proportion learning
CN111402267B (en) Segmentation method, device and terminal of epithelial cell nuclei in prostate cancer pathological image
WO2005076197A2 (en) Method and system for morphology based mitosis identification and classification of digital images
CN110826418B (en) Facial feature extraction method and device
CN103735253A (en) Tongue appearance analysis system and method thereof in traditional Chinese medicine based on mobile terminal
CN111274926B (en) Image data screening method, device, computer equipment and storage medium
US20230417700A1 (en) Automated analysis of analytical gels and blots
CN106372624A (en) Human face recognition method and human face recognition system
CN109147932B (en) Cancer cell HER2 gene amplification analysis method and system
CN114820625A (en) Automobile top block defect detection method
US9953238B2 (en) Image processing method and system for extracting distorted circular image elements
CN113221860B (en) DNA fragment recognition method, device, computer equipment and storage medium
CN110458846B (en) Cell image segmentation method based on graph path search and deep learning
CN112927182A (en) Digital PCR microarray image analysis method
Chang et al. Batch-invariant nuclear segmentation in whole mount histology sections
CN114973244B (en) System and method for automatically identifying mitosis of H & E staining pathological image of breast cancer
CN203970354U (en) A kind of Tongue analytical system based on mobile terminal
CN111178359A (en) License plate number recognition method, device and equipment and computer storage medium
CN114494155A (en) Non-small cell lung cancer IHC staining image tumor region immune grading method, system and storage medium
CN114119569A (en) Imaging logging image crack segmentation and identification method and system based on machine learning
CN113793324A (en) Nasopharyngeal carcinoma induced chemotherapy curative effect prediction method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant