Chinese sturgeon gender identification method and Chinese sturgeon gender identification model training method

By training the Chinese sturgeon sex identification model through target detection technology and using differentiated preprocessing to enhance male and female characteristics, the problems of low accuracy and low efficiency in existing technologies are solved, and early and accurate sex identification is achieved to support aquaculture management and protection work.

CN120635939AActive Publication Date: 2025-09-12THREE GORGES HI TECH INFORMATION TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510627035.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-09-12
Estimated Expiration
2045-05-15

AI Technical Summary

Technical Problem

The existing methods for sex identification of Chinese sturgeon have problems such as low accuracy, low efficiency and reliance on manual experience. It is difficult to accurately distinguish between males and females in the early stages, which affects breeding management and protection work.

Method used

The target detection technology is used to train the Chinese sturgeon sex identification model. By performing differential preprocessing on the labeled images of female and male fish, the individual morphological characteristics are enhanced, and the target detection algorithm is used for sex identification. The result with higher confidence is taken as the final identification result.

Benefits of technology

It has improved the accuracy and efficiency of sex identification of Chinese sturgeon, reduced human intervention, achieved early and accurate differentiation of males and females, and supported aquaculture management and protection work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635939A_ABST
    Figure CN120635939A_ABST
Patent Text Reader

Abstract

The invention provides a Chinese sturgeon sex determination method and a Chinese sturgeon sex determination model training method.The method comprises the steps that first preprocessing and second preprocessing are conducted on a to-be-detected image, a first input image and a second input image are obtained, and the first preprocessing is used for enhancing individual morphological features of female fishes and male fishes; the first input image and the second input image are subjected to gender identification through a Chinese sturgeon gender identification model, a first identification result, a first confidence coefficient, a second identification result and a second confidence coefficient are obtained, and the Chinese sturgeon gender identification model is trained based on a target detection algorithm; the training set comprises a female fish annotation image subjected to first preprocessing and a male fish annotation image subjected to second preprocessing; and taking one of the first identification result and the second identification result with higher confidence as a final identification result. By means of the method, the accuracy and efficiency of Chinese sturgeon sex identification can be further improved by means of the target detection technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of target detection technology, and in particular to a method for identifying the sex of a Chinese sturgeon and a method for training a Chinese sturgeon sex identification model. Background Art

[0002] Sex identification is both a key and challenging aspect of Chinese sturgeon conservation and captive breeding. The lack of secondary sexual characteristics makes it difficult to determine the sex of Chinese sturgeons from birth to maturity, significantly complicating breeding management and conservation efforts. Early sex identification facilitates gender balance control in aquaculture, separate management of males and females, and the selection of reserve broodstock.

[0003] Traditionally, the main methods for sexing Chinese sturgeons include ultrasound and surgical gonadal examination. Ultrasound is only effective at a relatively late stage, at least until stage III, and its accuracy is relatively low. Surgical gonadal examination requires a wide incision to facilitate gonadal observation, and subsequent suturing is required. This is time-consuming and carries a high risk of surgical casualties.

[0004] CN114287378B discloses a method for rapidly identifying the sex of Chinese sturgeon using an endoscope. This method allows for clear observation of the gonads of stage II or higher Chinese sturgeons through a modified endoscope. Combining the individual morphological characteristics of male and female sturgeons, accurate sex identification is possible. Furthermore, the selected incision location causes minimal damage to the sturgeon, without affecting gonadal development. However, this method relies on manual sex identification, and its accuracy and efficiency depend on the experience of the person performing the sex identification. Summary of the Invention

[0005] The present application provides a method for sex identification of Chinese sturgeon and a method for training a Chinese sturgeon sex identification model, which can further improve the accuracy and efficiency of Chinese sturgeon sex identification with the help of target detection technology.

[0006] In a first aspect, an embodiment of the present application provides a method for identifying the sex of a Chinese sturgeon, the method comprising:

[0007] Performing a first preprocessing and a second preprocessing on the image to be detected, respectively, to obtain a first input image and a second input image, wherein the first preprocessing is used to enhance the individual morphological features of the female fish, and the second preprocessing is used to enhance the individual morphological features of the male fish;

[0008] Performing sex identification on a first input image and a second input image, respectively, using a Chinese sturgeon sex identification model to obtain a first identification result and a first confidence score, as well as a second identification result and a second confidence score, wherein the Chinese sturgeon sex identification model is trained based on a target detection algorithm, and a training set includes a first training image and a second training image, the first training image is a female fish labeled image that has undergone a first preprocessing, and the second training image is a male fish labeled image that has undergone a second preprocessing, and the image to be detected, the female fish labeled image, and the male fish labeled image are all gonad images of Chinese sturgeon in stage II or above obtained using an endoscope;

[0009] If the first confidence level is greater than the second confidence level, the first identification result is used as the final identification result; if the first confidence level is less than the second confidence level, the second identification result is used as the final identification result.

[0010] Furthermore, in one embodiment, the first preprocessing includes:

[0011] performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation, wherein the first original image is any one of the image to be detected, the female fish annotated image, the image to be detected after undergoing other processing, and the image annotated female fish after undergoing other processing;

[0012] The second pre-processing includes:

[0013] Bilateral filtering is performed on the second original image according to the second spatial kernel and the second color gamut standard deviation, where the second original image is any one of an image to be detected, an image of a male fish annotated, an image of the image to be detected after other processing, and an image of the image of a male fish annotated after other processing, a scale of the first spatial kernel is greater than a scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation.

[0014] Furthermore, in one embodiment, the first preprocessing includes:

[0015] performing contrast-limited adaptive histogram equalization on a first original image according to a first block size and a first contrast threshold, wherein the first original image is any one of an image to be detected, an image annotated with female fish, an image of the image to be detected after undergoing other processing, and an image of the image annotated with female fish after undergoing other processing;

[0016] The second pre-processing includes:

[0017] Contrast-restricted adaptive histogram equalization is performed on the second original image according to the second block size and the second contrast threshold, wherein the second original image is any one of an image to be detected, an image labeled with a male fish, an image after the image to be detected has undergone other processing, and an image after the image labeled with a male fish has undergone other processing, the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold.

[0018] Furthermore, in one embodiment, the first preprocessing includes:

[0019] Performing HSV-H channel layered processing on the first original image to obtain a first intermediate image, constructing a mask for the fat portion in the first intermediate image to obtain a second intermediate image, and performing a top-hat transform on the second intermediate image according to a preset convolution kernel, wherein the first original image is any one of the image to be detected, the annotated image of the female fish, the image to be detected after undergoing other processing, and the image annotated image of the female fish after undergoing other processing;

[0020] The second pre-processing includes:

[0021] A third intermediate image is obtained by performing bimodal fusion on the saturation channel and the brightness channel of the second original image in the HSV color space. The color contrast information and the texture brightness information in the third intermediate image are integrated according to a preset weighting coefficient to obtain a fourth intermediate image. The Scharr operator is applied to the fourth intermediate image in the horizontal and vertical directions for collaborative detection, wherein the second original image is any one of the image to be detected, the male fish annotated image, the image of the image to be detected after other processing, and the image of the male fish annotated image after other processing.

[0022] Furthermore, in one embodiment, the first preprocessing includes:

[0023] Performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation to obtain a first intermediate image, wherein the first original image is the image to be detected or the female fish labeled image;

[0024] performing contrast-limited adaptive histogram equalization on the first intermediate image according to the first block size and the first contrast threshold to obtain a second intermediate image;

[0025] Performing HSV-H channel layering processing on the second intermediate image to obtain a third intermediate image;

[0026] constructing a mask for the fat portion in the third intermediate image to obtain a fourth intermediate image;

[0027] Performing a top-hat transform on the fourth intermediate image according to a preset convolution kernel to obtain a first result image, wherein the first result image is the first input image or the first training image;

[0028] The second pre-processing includes:

[0029] performing bilateral filtering on the second original image according to the second spatial kernel and the second color gamut standard deviation to obtain a fifth intermediate image, wherein the second original image is an image to be detected or an image of a male fish annotation, the scale of the first spatial kernel is greater than the scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation;

[0030] performing contrast-limited adaptive histogram equalization on the fifth intermediate image according to the second block size and the second contrast threshold to obtain a sixth intermediate image, wherein the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold;

[0031] Performing bimodal fusion on the saturation channel and the brightness channel of the sixth intermediate image in the HSV color space to obtain a seventh intermediate image;

[0032] integrating the color contrast information and the texture brightness information in the seventh intermediate image according to a preset weighting coefficient to obtain an eighth intermediate image;

[0033] Applying the Scharr operator to the eighth intermediate image in the horizontal direction and the vertical direction respectively to perform collaborative detection to obtain a second result image, wherein the second result image is the second input image or the second training image.

[0034] In a second aspect, the present application also provides a method for training a Chinese sturgeon sex identification model, the method comprising:

[0035] The female fish annotated image is subjected to a first preprocessing to obtain a first training image, and the male fish annotated image is subjected to a second preprocessing to obtain a second training image, wherein the first preprocessing is used to enhance the individual morphological characteristics of the female fish, and the second preprocessing is used to enhance the individual morphological characteristics of the male fish, and both the female fish annotated image and the male fish annotated image are images of the gonads of a Chinese sturgeon at stage II or above, obtained using an endoscope;

[0036] Based on the target detection algorithm, the Chinese sturgeon sex identification model is trained with the first training image and the second training image as training sets.

[0037] Furthermore, in one embodiment, the first preprocessing includes:

[0038] performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation, wherein the first original image is the female fish labeled image or an image of the female fish labeled image that has undergone other processing;

[0039] The second pre-processing includes:

[0040] Bilateral filtering is performed on the second original image according to the second spatial kernel and the second color gamut standard deviation, wherein the second original image is the male fish labeled image or an image of the male fish labeled image after other processing, the scale of the first spatial kernel is larger than the scale of the second spatial kernel, and the first color gamut standard deviation is larger than the second color gamut standard deviation.

[0041] Furthermore, in one embodiment, the first preprocessing includes:

[0042] performing contrast-limited adaptive histogram equalization on the first original image according to the first block size and the first contrast threshold, wherein the first original image is the female fish labeled image or an image of the female fish labeled image that has undergone other processing;

[0043] The second pre-processing includes:

[0044] Contrast-restricted adaptive histogram equalization is performed on the second original image according to the second block size and the second contrast threshold, wherein the second original image is a male fish labeled image or an image of the male fish labeled image that has undergone other processing, the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold.

[0045] Furthermore, in one embodiment, the first preprocessing includes:

[0046] Performing HSV-H channel layered processing on the first original image to obtain a first intermediate image, constructing a mask for the fat portion in the first intermediate image to obtain a second intermediate image, and performing a top-hat transform on the second intermediate image using a preset convolution kernel, wherein the first original image is the annotated image of the female fish or an image of the annotated image of the female fish that has undergone other processing;

[0047] The second pre-processing includes:

[0048] A third intermediate image is obtained by performing bimodal fusion on the saturation channel and the brightness channel of the second original image in the HSV color space. The color contrast information and the texture brightness information in the third intermediate image are integrated according to a preset weighting coefficient to obtain a fourth intermediate image. The Scharr operator is applied to the fourth intermediate image in the horizontal and vertical directions for collaborative detection, respectively. The second original image is a male fish labeled image or an image of the male fish labeled image that has undergone other processing.

[0049] Furthermore, in one embodiment, the first preprocessing includes:

[0050] Performing bilateral filtering on the female fish labeled image according to the first spatial kernel and the first color gamut standard deviation to obtain a first intermediate image;

[0051] performing contrast-limited adaptive histogram equalization on the first intermediate image according to the first block size and the first contrast threshold to obtain a second intermediate image;

[0052] Performing HSV-H channel layering processing on the second intermediate image to obtain a third intermediate image;

[0053] constructing a mask for the fat portion in the third intermediate image to obtain a fourth intermediate image;

[0054] Performing a top-hat transformation on the fourth intermediate image according to a preset convolution kernel to obtain a first training image;

[0055] The second pre-processing includes:

[0056] performing bilateral filtering on the male fish labeled image according to the second spatial kernel and the second color gamut standard deviation to obtain a fifth intermediate image, wherein the scale of the first spatial kernel is greater than the scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation;

[0057] performing contrast-limited adaptive histogram equalization on the fifth intermediate image according to the second block size and the second contrast threshold to obtain a sixth intermediate image, wherein the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold;

[0058] Performing bimodal fusion on the saturation channel and the brightness channel of the sixth intermediate image in the HSV color space to obtain a seventh intermediate image;

[0059] integrating the color contrast information and the texture brightness information in the seventh intermediate image according to a preset weighting coefficient to obtain an eighth intermediate image;

[0060] The Scharr operator is applied to the eighth intermediate image in the horizontal direction and the vertical direction to perform collaborative detection to obtain a second training image.

[0061] In this application, a Chinese sturgeon sex identification model is trained based on a target detection algorithm. Female fish labeled images and male fish labeled images are pre-processed with enhancements corresponding to their genders before being put into training, so that the model can better learn the individual morphological characteristics of female and male fish. When using the trained model for actual reasoning, the images to be detected are pre-processed with enhancements of both genders before being input into the model, so that the model can better capture the individual morphological characteristics of female and male fish, and obtain two identification results and corresponding confidence levels. The identification result with the higher confidence level is taken as the final identification result. Through this application, the accuracy and efficiency of Chinese sturgeon sex identification can be further improved with the help of target detection technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 This is a flow chart of a method for identifying the sex of Chinese sturgeon in one embodiment of the present application;

[0063] Figure 2 Schematic diagram of the flow of the Chinese sturgeon sex identification model training method in one embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0066] In a first aspect, an embodiment of the present application provides a method for identifying the sex of a Chinese sturgeon.

[0067] Figure 1 The figure shows a flow chart of a method for sex identification of Chinese sturgeon in one embodiment of the present application.

[0068] Reference Figure 1 In one embodiment, the method for identifying the sex of Chinese sturgeon comprises the following steps:

[0069] S11, performing a first preprocessing and a second preprocessing on the image to be detected, respectively, to obtain a first input image and a second input image, wherein the first preprocessing is used to enhance the individual morphological characteristics of the female fish, and the second preprocessing is used to enhance the individual morphological characteristics of the male fish;

[0070] S12. Performing sex identification on the first input image and the second input image, respectively, using a Chinese sturgeon sex identification model to obtain a first identification result and a first confidence level, as well as a second identification result and a second confidence level, wherein the Chinese sturgeon sex identification model is trained based on a target detection algorithm, and the training set includes a first training image and a second training image, the first training image is a female fish labeled image that has undergone a first preprocessing, and the second training image is a male fish labeled image that has undergone a second preprocessing, and the image to be detected, the female fish labeled image, and the male fish labeled image are all images of gonads of Chinese sturgeon in stage II or above obtained using an endoscope;

[0071] S13. If the first confidence level is greater than the second confidence level, the first identification result is used as the final identification result; if the first confidence level is less than the second confidence level, the second identification result is used as the final identification result.

[0072] Specifically, the common morphological characteristics of female and male fish include: the gonads are both ribbon-shaped, and the gonad ligaments are blue-gray ribbon-like stripes; the inner surface of the body wall is smooth, light white with scattered gray spots; the rectum is pure bright black or bright black with coarse light-colored patterns.

[0073] The individual morphological characteristics of male fish include: fat independent of the testis, beige in color, with evenly distributed punctate pigmentation on the surface; the testis is milky white or light pink, with clear edges, a smooth surface, a uniform and delicate texture, and is opaque.

[0074] The individual morphological characteristics of female fish include: fat is often mixed with eggs, which are lighter yellow or milky white, and the surface pigmentation is generally not obvious; the surface of the ovary is rough, slightly transparent in the early stage, like cotton-wool block lobes, with wrinkles on the surface, or round eggs (diameter greater than 0.1mm) embedded in the fat can be clearly observed, or irregular eggs (diameter less than 0.1mm) can be vaguely observed.

[0075] In this embodiment, a Chinese sturgeon sex identification model is trained based on a target detection algorithm. Female and male fish labeled images are pre-processed for their corresponding genders before being put into training, allowing the model to better learn the individual morphological characteristics of female and male fish. When the trained model is used for actual reasoning, the images to be detected are pre-processed for both genders for enhancement before being input into the model, allowing the model to better capture the individual morphological characteristics of female and male fish. Two identification results and corresponding confidence levels are obtained, and the identification result with the higher confidence level is taken as the final identification result. Through this embodiment, the accuracy and efficiency of Chinese sturgeon sex identification can be further improved with the help of target detection technology.

[0076] Furthermore, in one embodiment, the first preprocessing includes:

[0077] performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation, wherein the first original image is any one of the image to be detected, the female fish annotated image, the image to be detected after undergoing other processing, and the image annotated female fish after undergoing other processing;

[0078] The second pre-processing includes:

[0079] Bilateral filtering is performed on the second original image according to the second spatial kernel and the second color gamut standard deviation, where the second original image is any one of an image to be detected, an image of a male fish annotated, an image of the image to be detected after other processing, and an image of the image of a male fish annotated after other processing, a scale of the first spatial kernel is greater than a scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation.

[0080] In this embodiment, the first preprocessing and the second preprocessing include differential processing at the noise reduction level. In view of the smooth tissue characteristics of the male fish testis, an appropriate large-scale spatial kernel (for example, 9×9 pixels) and a wide color gamut standard deviation (for example, 75) are set for bilateral filtering. The wide color gamut standard deviation allows for larger color fluctuations and is suitable for noise fusion in homogeneous areas (smooth surfaces of testis). In view of the mosaic structure of the egg grains in the female fish ovary, an appropriate small-scale spatial kernel (for example, 5×5 pixels) and a strict color gamut standard deviation (for example, 25) are set for bilateral filtering to protect the edge gradient of the egg grains during the noise reduction process.

[0081] Furthermore, in one embodiment, the first preprocessing includes:

[0082] performing contrast-limited adaptive histogram equalization on a first original image according to a first block size and a first contrast threshold, wherein the first original image is any one of an image to be detected, an image annotated with female fish, an image of the image to be detected after undergoing other processing, and an image of the image annotated with female fish after undergoing other processing;

[0083] The second pre-processing includes:

[0084] Contrast-restricted adaptive histogram equalization is performed on the second original image according to the second block size and the second contrast threshold, wherein the second original image is any one of an image to be detected, an image labeled with a male fish, an image after the image to be detected has undergone other processing, and an image after the image labeled with a male fish has undergone other processing, the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold.

[0085] In this embodiment, the first and second preprocessing steps include differential processing at the contrast enhancement level. Using the contrast-constrained adaptive histogram equalization (CLAHE) algorithm, for male fish, appropriately large block sizes (e.g., 15×15 pixels) are combined with a low contrast threshold (e.g., 2) to achieve overall equalization of fat distribution. For female fish, appropriately small block sizes (e.g., 8×8 pixels) are combined with a high contrast threshold (e.g., 4) to perform local histogram stretching on the ovule mosaic, thereby enhancing local details more finely.

[0086] Furthermore, in one embodiment, the first preprocessing includes:

[0087] Performing HSV-H channel layered processing on the first original image to obtain a first intermediate image, constructing a mask for the fat portion in the first intermediate image to obtain a second intermediate image, and performing a top-hat transform on the second intermediate image according to a preset convolution kernel, wherein the first original image is any one of the image to be detected, the annotated image of the female fish, the image to be detected after undergoing other processing, and the image annotated image of the female fish after undergoing other processing;

[0088] The second pre-processing includes:

[0089] A third intermediate image is obtained by performing bimodal fusion on the saturation channel and the brightness channel of the second original image in the HSV color space. The color contrast information and the texture brightness information in the third intermediate image are integrated according to a preset weighting coefficient to obtain a fourth intermediate image. The Scharr operator is applied to the fourth intermediate image in the horizontal and vertical directions for collaborative detection, wherein the second original image is any one of the image to be detected, the male fish annotated image, the image of the image to be detected after other processing, and the image of the male fish annotated image after other processing.

[0090] In this embodiment, the first preprocessing and the second preprocessing include differential processing at the edge enhancement level. The male fish uses HSV-H channel layered processing to distinguish beige fat from milky white / light pink testes, constructs a fat mask to isolate the interference area, and sets a convolution kernel of appropriate size (for example, 7×7 pixels) to perform a top hat transformation to eliminate tiny noise points such as point-like pigmentation in the image, thereby improving image quality. The female fish performs bimodal fusion on the saturation (S) channel and the YUV brightness (Y) channel in the HSV color space. By setting an appropriate weighting coefficient (for example, 0.6:0.4), the color contrast and texture brightness information are integrated to effectively improve the recognizability of the egg arrangement direction. In order to further enhance the edge features of the eggs, the Scharr operator is applied in the horizontal and vertical directions for collaborative detection. Among them, the Scharr operator in the horizontal direction is mainly used to enhance the characteristics of the linear distribution of eggs, while the Scharr operator in the vertical direction is used to suppress interference caused by tissue wrinkles.

[0091] Furthermore, in one embodiment, the first preprocessing includes:

[0092] Performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation to obtain a first intermediate image, wherein the first original image is the image to be detected or the female fish labeled image;

[0093] performing contrast-limited adaptive histogram equalization on the first intermediate image according to the first block size and the first contrast threshold to obtain a second intermediate image;

[0094] Performing HSV-H channel layering processing on the second intermediate image to obtain a third intermediate image;

[0095] constructing a mask for the fat portion in the third intermediate image to obtain a fourth intermediate image;

[0096] Performing a top-hat transform on the fourth intermediate image according to a preset convolution kernel to obtain a first result image, wherein the first result image is the first input image or the first training image;

[0097] The second pre-processing includes:

[0098] performing bilateral filtering on the second original image according to the second spatial kernel and the second color gamut standard deviation to obtain a fifth intermediate image, wherein the second original image is an image to be detected or an image of a male fish annotation, the scale of the first spatial kernel is greater than the scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation;

[0099] performing contrast-limited adaptive histogram equalization on the fifth intermediate image according to the second block size and the second contrast threshold to obtain a sixth intermediate image, wherein the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold;

[0100] Performing bimodal fusion on the saturation channel and the brightness channel of the sixth intermediate image in the HSV color space to obtain a seventh intermediate image;

[0101] integrating the color contrast information and the texture brightness information in the seventh intermediate image according to a preset weighting coefficient to obtain an eighth intermediate image;

[0102] Applying the Scharr operator to the eighth intermediate image in the horizontal direction and the vertical direction respectively to perform collaborative detection to obtain a second result image, wherein the second result image is the second input image or the second training image.

[0103] In this embodiment, the first preprocessing and the second preprocessing perform differential processing at the noise reduction level, contrast enhancement level, and edge enhancement level respectively. Each of the previous processing steps provides a better intermediate image as a basis for subsequent processing, which helps to improve the overall feature enhancement effect.

[0104] Secondly, based on the same inventive concept, the present application also provides a Chinese sturgeon sex identification model training method.

[0105] Figure 2 The figure shows a flow chart of a method for training a Chinese sturgeon sex identification model in one embodiment of the present application.

[0106] Reference Figure 2 In one embodiment, the Chinese sturgeon sex identification model training method includes:

[0107] S21. Performing a first preprocessing on the annotated image of the female fish to obtain a first training image, and performing a second preprocessing on the annotated image of the male fish to obtain a second training image, wherein the first preprocessing is used to enhance the individual morphological characteristics of the female fish, and the second preprocessing is used to enhance the individual morphological characteristics of the male fish, and both the annotated image of the female fish and the annotated image of the male fish are images of gonads of a Chinese sturgeon in stage II or above, obtained using an endoscope;

[0108] S22. Based on the target detection algorithm, the first training image and the second training image are used as training sets to train the Chinese sturgeon sex identification model.

[0109] It should be noted that this embodiment only limits the training method of the Chinese sturgeon sex identification model, and does not limit the method of using the Chinese sturgeon sex identification model. Figure 1 The use of parallel preprocessing to obtain higher confidence results is shown.

[0110] Furthermore, in one embodiment, the first preprocessing includes:

[0111] performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation, wherein the first original image is the female fish labeled image or an image of the female fish labeled image that has undergone other processing;

[0112] The second pre-processing includes:

[0113] Bilateral filtering is performed on the second original image according to the second spatial kernel and the second color gamut standard deviation, wherein the second original image is the male fish labeled image or an image of the male fish labeled image after other processing, the scale of the first spatial kernel is larger than the scale of the second spatial kernel, and the first color gamut standard deviation is larger than the second color gamut standard deviation.

[0114] Furthermore, in one embodiment, the first preprocessing includes:

[0115] performing contrast-limited adaptive histogram equalization on the first original image according to the first block size and the first contrast threshold, wherein the first original image is the female fish labeled image or an image of the female fish labeled image that has undergone other processing;

[0116] The second pre-processing includes:

[0117] Contrast-restricted adaptive histogram equalization is performed on the second original image according to the second block size and the second contrast threshold, wherein the second original image is a male fish labeled image or an image of the male fish labeled image that has undergone other processing, the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold.

[0118] Furthermore, in one embodiment, the first preprocessing includes:

[0119] Performing HSV-H channel layered processing on the first original image to obtain a first intermediate image, constructing a mask for the fat portion in the first intermediate image to obtain a second intermediate image, and performing a top-hat transform on the second intermediate image using a preset convolution kernel, wherein the first original image is the annotated image of the female fish or an image of the annotated image of the female fish that has undergone other processing;

[0120] The second pre-processing includes:

[0121] A third intermediate image is obtained by performing bimodal fusion on the saturation channel and the brightness channel of the second original image in the HSV color space. The color contrast information and the texture brightness information in the third intermediate image are integrated according to a preset weighting coefficient to obtain a fourth intermediate image. The Scharr operator is applied to the fourth intermediate image in the horizontal and vertical directions for collaborative detection, respectively. The second original image is a male fish labeled image or an image of the male fish labeled image that has undergone other processing.

[0122] Furthermore, in one embodiment, the first preprocessing includes:

[0123] Performing bilateral filtering on the female fish labeled image according to the first spatial kernel and the first color gamut standard deviation to obtain a first intermediate image;

[0124] performing contrast-limited adaptive histogram equalization on the first intermediate image according to the first block size and the first contrast threshold to obtain a second intermediate image;

[0125] Performing HSV-H channel layering processing on the second intermediate image to obtain a third intermediate image;

[0126] constructing a mask for the fat portion in the third intermediate image to obtain a fourth intermediate image;

[0127] Performing a top-hat transformation on the fourth intermediate image according to a preset convolution kernel to obtain a first training image;

[0128] The second pre-processing includes:

[0129] performing bilateral filtering on the male fish labeled image according to the second spatial kernel and the second color gamut standard deviation to obtain a fifth intermediate image, wherein the scale of the first spatial kernel is greater than the scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation;

[0130] performing contrast-limited adaptive histogram equalization on the fifth intermediate image according to the second block size and the second contrast threshold to obtain a sixth intermediate image, wherein the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold;

[0131] Performing bimodal fusion on the saturation channel and the brightness channel of the sixth intermediate image in the HSV color space to obtain a seventh intermediate image;

[0132] integrating the color contrast information and the texture brightness information in the seventh intermediate image according to a preset weighting coefficient to obtain an eighth intermediate image;

[0133] The Scharr operator is applied to the eighth intermediate image in the horizontal direction and the vertical direction to perform collaborative detection to obtain a second training image.

[0134] Among them, the functions of the first preprocessing and the second preprocessing in the above-mentioned Chinese sturgeon sex identification model training method correspond to the steps in the above-mentioned Chinese sturgeon sex identification method embodiment. The only difference is that the original image and the result image do not include the image to be detected and the image after the image to be detected has undergone other processing, which will not be repeated here.

[0135] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0136] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit the "first", "second" and "third" to different types.

[0137] In the description of the embodiments of this application, the words "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.

[0138] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0139] In some processes described in the embodiments of the present application, multiple operations or steps are included that appear in a specific order. However, it should be understood that these operations or steps may not be performed in the order in which they appear in the embodiments of the present application or may be performed in parallel. The sequence numbers of the operations are only used to distinguish between different operations, and the sequence numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be performed in sequence or in parallel, and these operations or steps may be combined.

[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to execute the methods described in each embodiment of the present application.

[0141] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for identifying the sex of a Chinese sturgeon, characterized in that: The method for identifying the sex of Chinese sturgeon comprises: Performing a first preprocessing and a second preprocessing on the image to be detected, respectively, to obtain a first input image and a second input image, wherein the first preprocessing is used to enhance the individual morphological features of the female fish, and the second preprocessing is used to enhance the individual morphological features of the male fish; Performing sex identification on a first input image and a second input image, respectively, using a Chinese sturgeon sex identification model to obtain a first identification result and a first confidence score, as well as a second identification result and a second confidence score, wherein the Chinese sturgeon sex identification model is trained based on a target detection algorithm, and a training set includes a first training image and a second training image, the first training image is a female fish labeled image that has undergone a first preprocessing, and the second training image is a male fish labeled image that has undergone a second preprocessing, and the image to be detected, the female fish labeled image, and the male fish labeled image are all gonad images of Chinese sturgeon in stage II or above obtained using an endoscope; If the first confidence level is greater than the second confidence level, the first identification result is used as the final identification result; if the first confidence level is less than the second confidence level, the second identification result is used as the final identification result.

2. The method for sex identification of Chinese sturgeon according to claim 1, wherein: The first pre-processing includes: performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation, wherein the first original image is any one of the image to be detected, the female fish annotated image, the image to be detected after undergoing other processing, and the image annotated female fish after undergoing other processing; The second pre-processing includes: Bilateral filtering is performed on the second original image according to the second spatial kernel and the second color gamut standard deviation, where the second original image is any one of an image to be detected, an image of a male fish annotated, an image of the image to be detected after other processing, and an image of the image of a male fish annotated after other processing, a scale of the first spatial kernel is greater than a scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation.

3. The method for sex identification of Chinese sturgeon according to claim 1, wherein: The first pre-processing includes: performing contrast-limited adaptive histogram equalization on a first original image according to a first block size and a first contrast threshold, wherein the first original image is any one of an image to be detected, an image annotated with female fish, an image of the image to be detected after undergoing other processing, and an image of the image annotated with female fish after undergoing other processing; The second pre-processing includes: Contrast-restricted adaptive histogram equalization is performed on the second original image according to the second block size and the second contrast threshold, wherein the second original image is any one of an image to be detected, an image labeled with a male fish, an image after the image to be detected has undergone other processing, and an image after the image labeled with a male fish has undergone other processing, the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold.

4. The method for sex identification of Chinese sturgeon according to claim 1, wherein: The first pre-processing includes: Performing HSV-H channel layered processing on the first original image to obtain a first intermediate image, constructing a mask for the fat portion in the first intermediate image to obtain a second intermediate image, and performing a top-hat transform on the second intermediate image according to a preset convolution kernel, wherein the first original image is any one of the image to be detected, the annotated image of the female fish, the image to be detected after undergoing other processing, and the image annotated image of the female fish after undergoing other processing; The second pre-processing includes: A third intermediate image is obtained by performing bimodal fusion on the saturation channel and the brightness channel of the second original image in the HSV color space. The color contrast information and the texture brightness information in the third intermediate image are integrated according to a preset weighting coefficient to obtain a fourth intermediate image. The Scharr operator is applied to the fourth intermediate image in the horizontal and vertical directions for collaborative detection, wherein the second original image is any one of the image to be detected, the male fish annotated image, the image of the image to be detected after other processing, and the image of the male fish annotated image after other processing.

5. The method for sex identification of Chinese sturgeon according to claim 1, wherein: The first pre-processing includes: Performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation to obtain a first intermediate image, wherein the first original image is the image to be detected or the female fish labeled image; performing contrast-limited adaptive histogram equalization on the first intermediate image according to the first block size and the first contrast threshold to obtain a second intermediate image; Performing HSV-H channel layering processing on the second intermediate image to obtain a third intermediate image; constructing a mask for the fat portion in the third intermediate image to obtain a fourth intermediate image; Performing a top-hat transform on the fourth intermediate image according to a preset convolution kernel to obtain a first result image, wherein the first result image is the first input image or the first training image; The second pre-processing includes: performing bilateral filtering on the second original image according to the second spatial kernel and the second color gamut standard deviation to obtain a fifth intermediate image, wherein the second original image is an image to be detected or an image of a male fish annotation, the scale of the first spatial kernel is greater than the scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation; performing contrast-limited adaptive histogram equalization on the fifth intermediate image according to the second block size and the second contrast threshold to obtain a sixth intermediate image, wherein the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold; Performing bimodal fusion on the saturation channel and the brightness channel of the sixth intermediate image in the HSV color space to obtain a seventh intermediate image; integrating the color contrast information and the texture brightness information in the seventh intermediate image according to a preset weighting coefficient to obtain an eighth intermediate image; Applying the Scharr operator to the eighth intermediate image in the horizontal direction and the vertical direction respectively to perform collaborative detection to obtain a second result image, wherein the second result image is the second input image or the second training image.

6. A method for training a Chinese sturgeon sex identification model, characterized in that: The Chinese sturgeon sex identification model training method comprises: The female fish annotated image is subjected to a first preprocessing to obtain a first training image, and the male fish annotated image is subjected to a second preprocessing to obtain a second training image, wherein the first preprocessing is used to enhance the individual morphological characteristics of the female fish, and the second preprocessing is used to enhance the individual morphological characteristics of the male fish, and both the female fish annotated image and the male fish annotated image are images of the gonads of a Chinese sturgeon at stage II or above, obtained using an endoscope; Based on the target detection algorithm, the Chinese sturgeon sex identification model is trained with the first training image and the second training image as training sets.

7. The Chinese sturgeon sex identification model training method according to claim 6, wherein: The first pre-processing includes: performing bilateral filtering on the first original image according to the first spatial kernel and the first color gamut standard deviation, wherein the first original image is the female fish labeled image or an image of the female fish labeled image that has undergone other processing; The second pre-processing includes: Bilateral filtering is performed on the second original image according to the second spatial kernel and the second color gamut standard deviation, wherein the second original image is the male fish labeled image or an image of the male fish labeled image after other processing, the scale of the first spatial kernel is larger than the scale of the second spatial kernel, and the first color gamut standard deviation is larger than the second color gamut standard deviation.

8. The Chinese sturgeon sex identification model training method according to claim 6, wherein: The first pre-processing includes: performing contrast-limited adaptive histogram equalization on the first original image according to the first block size and the first contrast threshold, wherein the first original image is the female fish labeled image or an image of the female fish labeled image that has undergone other processing; The second pre-processing includes: Contrast-restricted adaptive histogram equalization is performed on the second original image according to the second block size and the second contrast threshold, wherein the second original image is a male fish labeled image or an image of the male fish labeled image that has undergone other processing, the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold.

9. The Chinese sturgeon sex identification model training method according to claim 6, wherein: The first pre-processing includes: Performing HSV-H channel layered processing on the first original image to obtain a first intermediate image, constructing a mask for the fat portion in the first intermediate image to obtain a second intermediate image, and performing a top-hat transform on the second intermediate image using a preset convolution kernel, wherein the first original image is the annotated image of the female fish or an image of the annotated image of the female fish that has undergone other processing; The second pre-processing includes: A third intermediate image is obtained by performing bimodal fusion on the saturation channel and the brightness channel of the second original image in the HSV color space. The color contrast information and the texture brightness information in the third intermediate image are integrated according to a preset weighting coefficient to obtain a fourth intermediate image. The Scharr operator is applied to the fourth intermediate image in the horizontal and vertical directions for collaborative detection, respectively. The second original image is a male fish labeled image or an image of the male fish labeled image that has undergone other processing.

10. The Chinese sturgeon sex identification model training method according to claim 6, wherein: The first pre-processing includes: Performing bilateral filtering on the female fish labeled image according to the first spatial kernel and the first color gamut standard deviation to obtain a first intermediate image; performing contrast-limited adaptive histogram equalization on the first intermediate image according to the first block size and the first contrast threshold to obtain a second intermediate image; Performing HSV-H channel layering processing on the second intermediate image to obtain a third intermediate image; constructing a mask for the fat portion in the third intermediate image to obtain a fourth intermediate image; Performing a top-hat transformation on the fourth intermediate image according to a preset convolution kernel to obtain a first training image; The second pre-processing includes: performing bilateral filtering on the male fish labeled image according to the second spatial kernel and the second color gamut standard deviation to obtain a fifth intermediate image, wherein the scale of the first spatial kernel is greater than the scale of the second spatial kernel, and the first color gamut standard deviation is greater than the second color gamut standard deviation; performing contrast-limited adaptive histogram equalization on the fifth intermediate image according to the second block size and the second contrast threshold to obtain a sixth intermediate image, wherein the first block size is larger than the second block size, and the first contrast threshold is smaller than the second contrast threshold; Performing bimodal fusion on the saturation channel and the brightness channel of the sixth intermediate image in the HSV color space to obtain a seventh intermediate image; integrating the color contrast information and the texture brightness information in the seventh intermediate image according to a preset weighting coefficient to obtain an eighth intermediate image; The Scharr operator is applied to the eighth intermediate image in the horizontal direction and the vertical direction to perform collaborative detection to obtain a second training image.

Citation Information

Patent Citations

  • A method for rapid sex determination of Chinese sturgeon using endoscopy

    CN114287378B

  • B ultrasonic genital gland identifying method of parent fish of Acipenser sinensis

    CN101836612A

  • Crab gender identification method and device

    CN109583289A

  • A convolutional neural network-based method for identifying finished dishes by multiple models

    CN109684922A

  • An image enhancement method in a dark light environment

    CN109685742A