A method and device for quantifying fish skin color
By collecting and processing fish epidermal images and using the image segmentation model to count pigment cell information, the accurate judgment of fish body blackening in artificial breeding of leopard gill azillary is solved, and the accuracy and efficiency of body color quantification are achieved.
Patent Information
- Application Number
- CN202411856690.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Under artificial breeding conditions, it is difficult to accurately determine the blackening of leopard gilled perch. The traditional body color identification method has problems such as strong subjectivity, low efficiency and inability to fully reflect the body color gradient and diversity.
A method of quantifying body color of fish epidermis is used to collect fish epidermis images and process them based on the image segmentation model to count pigment cell information, including pigment cell categories, quantity and area, and then quantify the body color of fish epidermis.
It realizes accurate quantification of the body color of the fish's epidermis, reduces subjectivity, improves judgment consistency and efficiency, is suitable for large-scale breeding needs, and is conducive to the refined feeding and industrialization of fish.
Smart Images

Figure CN119313747B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of fish body color discrimination, and in particular to a fish skin body color quantification method, a fish skin body color quantification device and a storage medium. Background Art
[0002] Leopard gill perch (Plectropomus leopardus), commonly known as the eastern star grouper, is a valuable edible and ornamental fish, which is loved by consumers for its tender meat and bright color. With the continuous advancement of leopard gill perch breeding technology, artificial breeding is becoming more and more prosperous, but some problems have also been exposed and attracted widespread attention. Among them, the blackening of the body of leopard gill perch under artificial breeding conditions is the most urgent problem to be solved.
[0003] Body color is an important economic trait of leopard gill perch. Usually, the price of brighter red individuals is significantly higher than that of dark black individuals. Therefore, research on body color becomes very important. It is known that the skin of leopard gill perch contains a variety of pigment cells, including melanophores, erythrophores, xanthophores and iridophores. These pigment cells are staggered and together constitute the complex body color of leopard gill perch. In body color related research, body color determination has always been a difficult point, especially the subjective judgment of red and black often causes controversy. Traditional body color identification methods, such as colorimeter and visual extreme phenotype method, are highly subjective, difficult to form objective standards, and cannot fully reflect the gradient and diversity of leopard gill perch body color. Because the complex body color formed by the mixture of multiple cells in different proportions, such as orange, orange-red, reddish brown, etc., is often difficult to be accurately quantified. More accurate body color phenotype measurement for fish such as the leopard gill perch, where body color is very important, is not only beneficial for determining their market prices, but is also a key step in scientific research related to fish body color formation.
[0004] The traditional method of distinguishing body color mainly relies on manual observation, but this method has many shortcomings. First, manual observation is easily affected by subjective factors, resulting in inaccurate judgment results and poor consistency. Secondly, during the observation process, fish may become stressed, and the pigment granules in the pigment cells will shrink to varying degrees, making it difficult to accurately determine the body color under normal conditions. In addition, as the scale of aquaculture expands, the efficiency of manual observation is too low to meet the needs of large-scale aquaculture. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a method for quantifying fish skin color to solve the above problems.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present application provides a method for quantifying the epidermal body color of fish, the quantification method comprising: step 1: collecting an epidermal image of the fish; step 2: processing the epidermal image based on an image segmentation model to obtain at least one pigment cell image corresponding to the fry; step 3: performing statistical processing on the pigment cell image to determine the pigment cell information corresponding to the pigment cell image, the pigment cell information including the pigment cell category, the number of pigment cells and the area of the pigment cell; step 4: quantifying the epidermal body color of the fish based on the pigment cell information.
[0008] Furthermore, step 1 specifically includes: step 1-1: anesthetizing the fish; step 1-2: applying a pigment cell shrinking agent to the epidermis of the fry; and step 1-3: selecting a non-iridescent area of the epidermis to determine the epidermis image of the fish.
[0009] Furthermore, the pigment granule shrinking agent of the pigment cells is 100 ppm norepinephrine.
[0010] Furthermore, step 1-1 includes: step 1-1-1: dissolving MS-222 powder in water to prepare an initial anesthetic solution of 50-200 mg / L; step 1-1-2: adding sodium bicarbonate to the initial anesthetic solution until the pH value of the initial anesthetic solution is 7.4-7.6 to form a target anesthetic solution; step 1-1-3: anesthetizing the fish based on the target anesthetic solution.
[0011] Furthermore, step 1-3 includes: step 1-3-1: selecting the non-iridescent area of the epidermis in the same field of view, and capturing one or more images at a focal length as the initial epidermis image of the fish; step 1-3-2: performing image fusion processing on multiple initial epidermis images to obtain the epidermis image of the fish.
[0012] Furthermore, the training steps of the image segmentation model include: step A: labeling the pigment cells and background skin in the epidermal image to determine the initial model data; step B: performing data enhancement processing on the initial model data to obtain a target model data set; step C: performing model training based on the target model data set to obtain a trained image segmentation model.
[0013] Furthermore, step 3 includes: step 3-1: binarizing the pigment cell image; step 3-2: performing statistical processing on the binarized pigment cell image to determine the pigment cell information corresponding to the pigment cell image.
[0014] Furthermore, the method for quantifying fish epidermal body color also includes: Step 5: obtaining the number of pigment cells and the area of pigment cells corresponding to the pigment cell category; Step 6: determining whether the number of pigment cells and / or the area of pigment cells is greater than a preset threshold: if so, determining that the fish is a first type of fish; if not, determining that the fish is a second type of fish.
[0015] In a second aspect, the present application provides a device for quantifying the epidermal body color of fish, the quantification device comprising: an acquisition module for acquiring epidermal images of fish; a first processing module for processing the epidermal images based on an image segmentation model to obtain at least one pigment cell image corresponding to the fish; a second processing module for performing statistical processing on the pigment cell images to determine the pigment cell information corresponding to the pigment cell images, the pigment cell information including the pigment cell category, the number of pigment cells and the area of the pigment cell; a quantification module for quantifying the epidermal body color of fish based on the pigment cell information.
[0016] In a third aspect, the present application provides a non-volatile readable storage medium storing computer-readable instructions. When the computer-readable instructions are executed by a processor, the processor executes a method for quantifying the skin color of fish configured as provided in the first aspect above.
[0017] It can be seen from the above technical solution that the advantages and positive effects of the method for quantifying the skin color of fish proposed by the present invention are:
[0018] This application collects epidermal images of the fish body surface, combines with a trained image segmentation model, optimizes the statistical method for skin pigment cells, and accurately quantifies the body color of the fish epidermis according to the information of fish epidermal pigment cells. Further, this application can automatically classify fish through pigment cell information to facilitate the subsequent refined breeding, breeding and research of different types of fish, improve the artificial breeding technology of leopard gill perch, and is conducive to the industrialization of artificial breeding of such fish. Further, this application proposes for the first time that a pigment cell shrinking agent is used to pretreat the fish epidermis. The pigment cell shrinking agent is 100 ppm norepinephrine, which is harmless to fish. Therefore, norepinephrine can be used as a pigment cell shrinking agent to stimulate the skin tissue of leopard gill perch, so that the pigment in the pigment cell shrinks rapidly and concentrates into a compact pigment group, which solves the problem that the color of the pigment group of this type of fish does not show unevenness due to differences in cells or individuals, so that each pigment group presents a more obvious color block, which is particularly suitable for the body color research of colored fish. Colored fish, such as yellow croaker, koi, rainbow snapper, foxtail snapper, etc., have a large number of pigment cells of different colors on their epidermis, which are condensed and contracted into pigment clusters through pigment cell contractants. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above content and the following specific embodiments of the present invention will be better understood when read in conjunction with the accompanying drawings. It should be noted that the accompanying drawings are only examples of the technical solutions claimed for protection.
[0020] Figure 1 is a flow chart of the fish skin body color quantification method of the present application;
[0021] Figure 2 It is a stereoscopic partial image of the skin of the leopard spiny bass when it is not treated;
[0022] Figure 3 It is a local image of the skin of the leopard spiny bass observed by stereomicroscope after being treated with norepinephrine in the present application;
[0023] Figure 4 This is a process diagram of synthesizing multiple fish skin images in this application;
[0024] Figure 5 This is a display diagram of the training set selection of the image segmentation model of this application;
[0025] Figure 6 is a schematic diagram of the image segmentation model of the present application for identifying pigment cells;
[0026] Figure 7 It is a segmentation schematic diagram when the image segmentation model of the present application is insufficiently trained;
[0027] Figure 8 It is a schematic diagram of the red pigment cell image of the present application after binarization processing;
[0028] Fig. 9 is a schematic diagram of a melanocyte image of the present application after binarization processing;
[0029] Fig.10 is a schematic diagram of the yellow pigment cell image of the present application after binarization processing;
[0030] Fig.11 It is a schematic diagram of the segmentation and identification of pigment cells less than 0.005 square inches of the present application;
[0031] Fig.12 It is a structural block diagram of the fish skin body color quantification device of the present application.
[0032] The reference numerals are described as follows:
[0033] Fish skin color quantification device: 100;
[0034] Acquisition module: 10;
[0035] First processing module: 20;
[0036] Second processing module: 30;
[0037] Quantization module:40. DETAILED DESCRIPTION
[0038] The detailed features and advantages of the present invention are described in detail in the specific implementation modes below, and the contents are sufficient to enable any person skilled in the art to understand the technical contents of the present invention and implement them accordingly. Moreover, according to the description, claims and drawings disclosed in this specification, those skilled in the art can easily understand the relevant objects and advantages of the present invention.
[0039] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0040] In the description of this embodiment, it should be noted that the terms "upper", "lower", "inner", "bottom", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, or are the orientations or positional relationships in which the product is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0041] Please refer to Table 1. Taking the leopard gill perch as an example, the current traditional fish body color identification method is highly subjective, difficult to form an objective standard, and cannot fully reflect the gradient and diversity of the leopard gill perch body color. Special body colors, such as orange, orange-red, reddish brown, grayish white, etc., are often ignored.
[0042] Table 1: Traditional identification methods of the body color of leopard gill bass
[0043] Traditional methods principle Description of body color Advantages limitation Colorimeter Theory of three primary colors of light and human eye's perception of color Use color space models (such as Lab) to characterize and describe colors Easy to operate, relatively objective results There is no standard colorimetric sample for the body color of the leopard gill perch, so it is only reliable when comparing the color difference between two samples. In addition, the material properties of fish skin are not uniform, so the measurement error is large. Visual inspection of extreme phenotypes Subjective visual inspection Red, black Simple, fast, accurate, and can meet scientific analysis requirements in most cases Ignoring the fact that the leopard gill bass has a variety of color gradients, it is also impossible to completely distinguish the body color of dark individuals Chromocyte counting Stereoscopic magnification of the skin surface to count red and melanocytes When the number of red or black cells exceeds a certain threshold, they are recorded as red or black individuals, respectively. Compared with direct visual inspection, it is more rigorous and fully considers the two pigment cells that form the body color of leopard gill perch, and the results are more accurate In essence, it is still selecting extreme phenotypes, and it is impossible to completely distinguish individuals with intermediate colors. Moreover, when directly observing the pigment cells on the surface of the body, the overlapping boundaries are unclear, making it difficult to count. Absorbance method Light absorption properties Absorbance at a certain point on the fish skin Can characterize the body color depth of different leopard gill perch individuals It must be used in a group of individuals of the same body color type (for example, all visually red individuals) as an auxiliary judgment of the depth of body color. Pigment content determination method Absorbance measurement, comparison with standard Pigment content It can accurately measure the types and contents of pigments in the skin, and then define body color according to the pigment content. The cost is high, the operation is difficult, and the determination of pigments requires reliance on standard products
[0044] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0045] Please refer to Figure 1 As shown, the present application provides a method for quantifying the skin color of fish, which may specifically include the following steps:
[0046] Step 1: Collect fish skin images.
[0047] In the implementation of the present application, step 1 may specifically include: step 1-1: anesthetizing the fish; step 1-2: applying a pigment cell shrinking agent to the fish's epidermis; and step 1-3: selecting a non-iridescent area of the epidermis to determine the fish's epidermis image.
[0048] Exemplarily, the pigment cell shrinkage agent can be 100 ppm norepinephrine, and MS-222 powder can be dissolved in water to prepare an initial anesthetic solution of 50-200 mg / L. Sodium bicarbonate is added to the initial anesthetic solution until the pH value of the initial anesthetic solution is 7.4-7.6 to form a target anesthetic solution; based on the target anesthetic solution, the fry is anesthetized.
[0049] It can be understood that the present application pre-treats the fish epidermis with a pigment cell shrinking agent, which can facilitate the subsequent observation of the pigment cells in the fish epidermis and improve the accuracy of obtaining pigment cell information.
[0050] Furthermore, one or more non-iridescent regions of the same epidermis with different focal lengths are selected as initial epidermis images of the fish; and multiple initial epidermis images are subjected to image fusion processing to obtain an epidermis image of the fish body.
[0051] It is understandable that if the surface of the fish body cannot be adjusted to be flat, you can repeatedly shoot the same field of view at different focal lengths, use software to merge and output them as a focus composite picture to maximize the clarity of the entire image.
[0052] It should be noted that the non-rainbow areas of the fish's epidermis mainly refer to those areas that do not have rainbow colors or metallic luster. The colors and characteristics of these areas are mainly produced by pigment cells rather than iridophores.
[0053] In an exemplified manner of the present application, the objective lens can be set to 6.4x, the angle of the fish body is adjusted to make it flat, the field of view is entirely non-iridescent and different pigment cells are clearly visible, the total number of pigment cells is about 3000, and the eyepiece is 10x; after the field of view is clear, the image parameters are adjusted on the LAS X software (the supporting software for the stereoscope) (the light intensity is set to 1500 lux, the aperture is maximum, the exposure time is 300ms, the white balance, the image size of this patent is cropped to 2250x1700 pixels, and the other values are selected as the default values) to take a picture of the field of view and save it in a vector image format.
[0054] Step 2: Based on the image segmentation model, the epidermis image is processed to obtain at least one pigment cell image corresponding to the fish.
[0055] In an implementable manner of the present application, the training steps of the image segmentation model include: Step A: labeling the pigment cells and background skin in the epidermal image to determine the initial model data; Step B: performing data enhancement processing on the initial model data to obtain a target model data set; Step C: performing model training based on the target model data set to obtain a trained image segmentation model.
[0056] Taking the leopard gill perch as an example, the fish contains three types of pigment cells: red, black, and yellow. After the corresponding epidermis image is processed by the image segmentation model, a red pigment cell image, a melanin cell image, a yellow pigment cell image, and a background skin image can be obtained. It can be understood that the background skin image is not the target object of the embodiment of the present application, and therefore can be ignored.
[0057] Step 3: Perform statistical processing on the pigment cell image to determine the pigment cell information corresponding to the pigment cell image.
[0058] The pigment cell information may include pigment cell type, pigment cell number and pigment cell area;
[0059] Specifically, after obtaining the red pigment cell image, the melanin cell image and the yellow pigment cell image through the image segmentation model, these images are switched to 16-bit format. At this time, the gray value of each pixel in the image represents the type and depth of the selected pigment cell color, and the corresponding binary pixel threshold can be set to perform binarization processing, which is convenient for counting each pigment cell and determining the number of pigment cells and the area of pigment cells corresponding to the pigment cell image.
[0060] Step 4: Quantify the fish skin color based on the pigment cell information.
[0061] It can be understood that by collecting epidermal images of the fry surface and combining them with a trained image segmentation model, the statistical method of the three pigment cells including but not limited to red, black and yellow in the non-iridescent area of the leopard gill perch is optimized, and the body color of the fish epidermis is accurately quantified based on the specific fish epidermal pigment cell information.
[0062] Furthermore, the method for quantifying fish epidermal body color may also include: Step 5: obtaining the number of pigment cells and the area of pigment cells corresponding to the pigment cell category; Step 6: determining whether the number of pigment cells and / or the area of pigment cells is greater than a preset threshold: if so, determining that the fish is a first type of fish; if not, determining that the fish is a second type of fish.
[0063] For example, the bright red or orange body color of leopard gill perch has a higher economic value, so the leopard gill perch fry with a larger red pigment cell pigment block area or more red pigment cells can be classified as red fish, and other fry can be classified as darker individuals. It is also possible to divide multiple color gradients to classify fish of different colors into more detailed levels, such as red, brownish red, pink, and black. The body color value can also be evaluated based on the value of the pigment cells and sorted by size.
[0064] In the implementation of the present application, when the pigment cells in the pigment cell image are detected to be no less than 0.005 inches 2 When the number of pigment cells is increased by one,
[0065] In this embodiment, the image segmentation model can be applied after training, or the trained image segmentation model can be directly applied. For example, the specific training process of the image segmentation model provided in this application is as follows:
[0066] It mainly includes 1. data preparation, 2. model selection, 3. model training and 4. model evaluation and optimization.
[0067] Among them, 1. Data preparation can include 1.1 data collection, 1.2 data enhancement and 1.3 data set division.
[0068] 1.1 Data collection: Image source: Collect microscope images containing fish epidermal cells. These images should contain clear pigment cells. Annotated data: For each image, the location and boundaries of pigment cells need to be manually annotated. This is usually done through professional image annotation tools, such as LabelImg, VIA (VGG Image Annotator), etc.
[0069] 1.2 Data Augmentation: Rotation and Flipping: Randomly rotate and flip the image to increase the diversity of the data. Scaling: Adjust the size of the image to adapt to different resolutions. Color Transformation: Adjust the brightness and contrast of the image to simulate different lighting conditions.
[0070] 1.3 Dataset division: The data set is divided into training set, validation set and test set. In this application, 70% of the data is used for training, 15% for validation, and 15% for testing.
[0071] 2. Model selection may include 2.1 selecting an image segmentation model and 2.2 adjusting the model architecture.
[0072] 2.1 Select an image segmentation model: You can choose UNet, Mask R-CNN, FCN or DeepLab, etc. Among them, UNet is a classic convolutional neural network structure, suitable for biomedical image segmentation. Mask R-CNN is an object detection and segmentation model based on regional convolutional neural network, suitable for image segmentation in complex scenes.
[0073] 2.2 Model architecture adjustment: Adjust the model architecture according to the characteristics of the data set and task, such as adding or reducing convolutional layers, changing the size of the convolution kernel, etc.
[0074] 3. Model training may include 3.1 data preprocessing, 3.2 setting training parameters and 3.3 training process.
[0075] 3.1 Data preprocessing: Convert images and annotation data into a format acceptable to the model, such as TensorFlow’s TFRecord or PyTorch’s Dataset.
[0076] 3.2 Set training parameters: Learning rate: Select an appropriate initial learning rate and consider using a learning rate decay strategy. Batch size: Set an appropriate batch size based on hardware resources. Optimizer: Such as Adam, SGD, etc. Loss function: Such as cross entropy loss, Dice loss, etc., select an appropriate loss function based on task requirements.
[0077] 3.3 Training process: Use the training set to train the model and monitor the performance on the validation set. After each training round, record the model's loss value and accuracy. Adjust the model's parameters, such as learning rate, batch size, etc., based on the performance on the validation set.
[0078] 4. Model evaluation and optimization can include 4.1 Evaluation indicators and 4.2 Model optimization.
[0079] 4.1 Evaluation indicators: Pixel accuracy: indicates the proportion of pixels correctly classified at the pixel level to the total number of pixels. Mean intersection over union (mIoU): indicates the average value of the intersection over union (IoU) of each category among all categories. IoU refers to the ratio of the intersection over union between the segmentation result and the label. F1 value: the harmonic mean of precision and recall.
[0080] 4.2 Model optimization: Data enhancement: Continue to try different data enhancement methods to improve the generalization ability of the model. Model architecture adjustment: Adjust the model architecture according to the evaluation results, such as adding convolutional layers, changing the size of the convolution kernel, etc. Hyperparameter tuning: Adjust hyperparameters such as learning rate and batch size to optimize the performance of the model.
[0081] To further facilitate understanding of the inventive concept of the present application, the present application provides the following specific embodiments for easy understanding:
[0082] (1) Preparation of anesthetic: Dissolve MS-222 powder in water to prepare a 50-200 mg / L solution (the concentration depends on the fish to be anesthetized. When the fish weight is less than 50 g, the anesthetic concentration is 50 mg / L. As the fish weight increases, the anesthetic concentration gradually increases. When the fish weight reaches 500 g, the anesthetic concentration is 200 mg / L. Thereafter, as the weight increases, the anesthetic concentration remains unchanged). Use sodium bicarbonate to adjust the pH to 7.4-7.6.
[0083] (2) Fish preparation: The whole fresh leopard gill perch to be tested was immersed in anesthetic, and after the fish body was still, it was laid flat on the operating table. A cotton swab was dipped in 100 ppm norepinephrine (Levarterenol; L-Noradrenaline, MCE, HY-13715) and wiped from the first fin spine to the lateral line of the pectoral fin in the natural state of the fish body. After waiting for 1 minute, the skin of the fish body where the smear was applied was in a fully stressed state and then transferred to the stage of the stereoscope (Leica, CH-9435).
[0084] Please refer to Figure 2 and Figure 3 This application proposes for the first time to stimulate the skin tissue of leopard gill bass by norepinephrine, so that the pigment in the pigment cells can quickly shrink and concentrate into compact pigment clusters, solving the problem that the color of the pigment clusters on the skin of this type of fish species is uneven due to differences in cells or individuals, making each pigment cluster appear more obvious and uniform red, orange or black.
[0085] (3) Observation of pigment cells and collection of images: Illuminate the fish body with an upper light source, select a non-iridescent area as the observation point, adjust the objective lens magnification to an appropriate size (6.4x is used in this application, which is one of the fixed magnifications of the objective lens of this type of stereoscope), adjust the angle of the fish body to make it flat, and the field of view is all non-iridescent areas and different pigment cells are clearly visible. The total number of pigment cells is about 3,000, and the eyepiece is 10x; after the field of view is clear, adjust the image parameters on the LASX software (the supporting software for the stereoscope used in this patent) (the light intensity is set to 1500 lux, the aperture is maximum, the exposure time is 300ms, and the white balance is set. The image size of this patent is cropped to 2250x1700 pixels, and other values are selected as default values) to take a picture of the field of view and save it in a vector format.
[0086] If the fish body cannot be adjusted to be flat, it is necessary to repeatedly shoot the same field of view at different focal lengths, and use software to merge and output them as a focus composite picture to maximize the clarity of the entire image.
[0087] For example, Figure 4 As shown, the uneven fish bodies of A, B, and C make it impossible to focus on the same position in the field of view. For the images taken multiple times at the same position, D can be synthesized and cropped using the Z project function of ImageJ software to obtain a clear image with full field of view (slightly enlarged compared to A, B, and C).
[0088] (4) Image processing: The obtained images were imported into ImageJ software and the machine learning-based image segmentation plug-in was run. It is located in the "Segmentation" function type column of the "Plugins" tab of the software (Plugins-Segmentation-TrainableWekaSegmentation). Four class groups were created, representing red, black, and yellow pigment cells and background skin, respectively. The free-marquee tool was used to select five locations in the upper left and lower left, upper right and upper right, and middle of the entire image (such as Figure 5 ), select 3-4 areas representing the characteristics of these 4 class groups (for example, select 4 red pigment cells as class1) as labels, click Trainclassifier to train the machine model (in theory, the more labels selected, the more accurate the model), and select additional representatives based on the recognition results of the model. After multiple calibration training, the model can accurately distinguish these 4 class groups. Click Getprobablitity to obtain the segmentation map of the corresponding channels of different classes, click Image-Color-MakeComposite (select Grayscale), Image-Color-SplitChannels, and you can get the segmentation map after splitting. The trained model can be exported and saved (Saveclassifier), and Loadclassifier can be used on the next picture.
[0089] like Figure 6 As shown, after training, the image segmentation model can automatically recognize Figure 5 Schematic diagram of different pigment blocks in the skin (red is red pigment block, green is black pigment block, purple is yellow pigment block, and yellow is background skin).
[0090] like Figure 7 As shown, when the image segmentation model is insufficiently trained, misidentification or omission occurs when segmenting pigment cells as indicated by the arrows.
[0091] (5) Cell counting: Switch the obtained segmentation image to 16-bit format. The grayscale value of each pixel represents the type and depth of the color of the selected pigment cell. Click Image-Adjust-Threshold to adjust the threshold and select the pigment cell (the red part represents the selected part).
[0092] After Apply, the image is converted to a binary image (such as Figure 8-Figure 10 As shown in the figure, A is split into binary images of the class channels representing three pigment blocks, where A, B, and C correspond to red, black, and yellow pigment cells, respectively.
[0093] Occasionally, due to uneven colors, a small amount of gaps are generated inside each cell when adjusting the threshold. The Process-Binary-FillHoles function can be used to fill them. Finally, the Analyze-AnalyzeParticles tool is used to count, and the parameter size is adjusted to 0.005 inches. 2 (indicates cells with a recorded area of more than 0.005 square inches), check Display results, Exclude on edges, Clear results, Summarize, and get the final counting results of pigment cells, including the size of each pigment cell, as well as the total number, total area, average area and proportion of each pigment cell (as shown in Table 2, Table 3 and Table 4).
[0094] Table 2: Statistical results of skin pigment blocks of leopard gill perch (excluding 0.005 inch 2 the following)
[0095] Pigment block type Quantity / pcs <![CDATA[Total area / inch 2 > <![CDATA[Average size / inch 2 > Area % Red blood cell pigment block 370 5.635 0.015 0.764 Melanocytic pigment block 750 30.117 0.040 4.082 Yellow cell pigment block 484 4.399 0.009 0.569
[0096] Table 3: Statistical results of skin pigmentation of leopard gill perch (all)
[0097] Pigment block type Quantity / pcs <![CDATA[Total area / inch 2 > <![CDATA[Average size / inch 2 > Area % Red blood cell pigment mass 480 6.051 0.013 0.820 Melanocytic pigment block 771 30.193 0.039 4.092 Yellow cell pigment block 628 5.005 0.008 0.678
[0098] Table 4: The red pigment block in the same image of leopard perch skin was less than 0.005 inches in three independent replicates 2 result
[0099] Group Quantity / pcs <![CDATA[Total area / inch 2 > <![CDATA[Average size / inch 2 > Area % 1 724 1 0.001 0.100 2 678 0.931 0.001 0.093 3 708 0.904 0.001 0.091
[0100] It can be understood that this application uses norepinephrine for the first time to stimulate the skin tissue of leopard gill perch, so that the pigment in the pigment cells shrinks rapidly and concentrates into a compact pigment mass. Then use a stereoscope to take an image of a fixed block. At this time, the color of the pigment mass does not show unevenness due to differences in cells or individuals, and all appear red, orange or black. At the same time, the pigment mass is highly shrunk, with clear boundaries between each other, easy to distinguish, and the size of the pigment mass is only related to the pigment content in the pigment cell. Therefore, the image collected under this condition can accurately reflect the area of the pigment mass, which directly corresponds to the size of the pigment cell. Compared with not using norepinephrine treatment, the boundaries of the pigment cells on the skin surface are unclear, overlap each other, the skin texture is not fixed, and the color distribution is uneven. Different pigment cells can only be counted by the naked eye, and it is difficult to compare the color difference values of different individuals by image method.
[0101] Furthermore, this application uses the automated counting of leopard gill perch pigment cells for the first time: by using ImageJ software to count the number and area of pigment clusters, the pigment content in the skin is characterized. The automatic image segmentation method greatly reduces the workload generated by manual counting, and the segmentation model is repeatedly trained multiple times (theoretically, the more times the training is performed, the more labels are selected for each class group, and the more accurate the results are. Figure 6 As shown in the figure; if the training level is insufficient or the label area selection is unclear, the resolution of automatic segmentation is low, which may easily lead to omission or misrecognition, such as Figure 7 As shown in the figure above), the software can identify pigment cells in the image with an accuracy of 1 pixel, which significantly improves the accuracy of the statistical results.
[0102] In addition, if Fig.11 As shown in the figure, A is the epidermis image, B is the pigment cell area automatically segmented and identified by the image segmentation model, and the arrows indicate relatively small and light-colored pigment blocks, which have little "share" in the formation of skin color. Only pigment cell clusters with an area greater than 0.005 square inches are counted (the results are shown in Table 2), reducing the statistical errors caused by locally dispersed tiny pigment particles (the results of all statistics are shown in Table 3).
[0103] The tiny pigment particles dispersed locally in the pigment cell image usually have an area less than 0.005 square inches and a total proportion of no more than 0.1%. They are lighter pigment spots or image noise points, and have no or little "contribution" to the color of the entire area. In the results of using the automatic segmentation function for the same image independently multiple times, the number and area statistics of pigment blocks greater than and equal to 0.005 square inches did not change significantly, but the number and area statistics of pigment blocks less than 0.005 square inches fluctuated up and down (as shown in Table 4). Not counting (ignoring) the values of these pigment blocks effectively enhances the robustness of the automated counting process when processing different images and reduces the impact of errors on the final body color judgment.
[0104] Please refer to Fig.12 Based on the above invention concept, the present application also provides a fish epidermal body color quantification device 100, which includes: an acquisition module 10, a first processing module 20, a second processing module 30 and a quantification module 40. Among them, the acquisition module 10 is used to collect the epidermal image of the fish; the first processing module 20 is used to process the epidermal image based on the image segmentation model to obtain at least one pigment cell image corresponding to the fish; the second processing module 30 performs statistical processing on the pigment cell image to determine the pigment cell information corresponding to the pigment cell image, and the pigment cell information includes the pigment cell type, the number of pigment cells and the pigment cell area; the quantification module 40 is used to quantify the fish epidermal body color according to the pigment cell information.
[0105] The present application also provides an electronic device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements the above-mentioned fish skin body color quantification method by running the executable instructions.
[0106] It should be noted that the systems, devices or modules described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0107] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0108] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0109] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0110] The terms and expressions used herein are for descriptive purposes only, and the present invention should not be limited to these terms and expressions. The use of these terms and expressions does not mean to exclude any equivalent features of the illustrations and descriptions (or parts thereof), and it should be recognized that various modifications that may exist should also be included in the scope of the claims. Other modifications, variations and substitutions may also exist. Accordingly, the claims should be deemed to cover all such equivalents.
[0111] Similarly, it should be pointed out that although the present invention has been described with reference to the current specific embodiments, ordinary technicians in this technical field should realize that the above embodiments are only used to illustrate the present invention, and various equivalent changes or substitutions may be made without departing from the spirit of the present invention. Therefore, as long as the changes and modifications to the above embodiments are within the scope of the essential spirit of the present invention, they will fall within the scope of the claims of the present invention.
Claims
1. A method for quantifying fish skin color, characterized in that: include: Step 1: Collect fish skin images; Step 2: Based on the image segmentation model, the epidermis image is processed to obtain at least one pigment cell image corresponding to the fish; Step 3: Performing statistical processing on the pigment cell image to determine the pigment cell information corresponding to the pigment cell image, wherein the pigment cell information includes the pigment cell type, the number of pigment cells and the area of the pigment cells; Step 4: quantifying the fish skin color according to the pigment cell information, The step 1 specifically includes: step 1-1: anesthetizing the fish; Step 1-2: Take a pigment granule shrinking agent of pigment cells and apply it to the epidermis of the fish; Step 1-3: Select a non-iridescent area of the epidermis to determine the epidermis image of the fish, and the pigment granule shrinking agent of the pigment cells is 100 ppm norepinephrine.
2. The fish skin color quantification method according to claim 1, characterized in that: The step 1-1 comprises: Step 1-1-1: Dissolve MS-222 powder in water to prepare an initial anesthetic solution of 50-200 mg / L; Step 1-1-2: adding sodium bicarbonate to the initial anesthetic solution until the pH value of the initial anesthetic solution is 7.4-7.6, thereby forming a target anesthetic solution; Step 1-1-3: Based on the target anesthetic solution, the fish is anesthetized.
3. The fish skin color quantification method according to claim 1, characterized in that: The steps 1-3 include: Step 1-3-1: Select a non-iridescent area of the epidermis in the same field of view, and capture an image at at least one focal length as an initial epidermis image of the fish; Step 1-3-2: Perform image fusion processing on the multiple initial epidermis images to obtain the epidermis image of the fish.
4. The fish skin color quantification method according to claim 1, characterized in that: The training steps of the image segmentation model include: Step A: marking the pigment cells and background skin in the epidermal image to determine initial model data; Step B: performing data enhancement processing on the initial model data to obtain a target model data set; Step C: Perform model training based on the target model data set to obtain the trained image segmentation model.
5. The fish skin color quantification method according to claim 1, characterized in that: The step 3 comprises: Step 3-1: performing binarization processing on the pigment cell image; Step 3-2: Perform statistical processing on the pigment cell image after binarization to determine the pigment cell information corresponding to the pigment cell image.
6. The method for quantifying fish skin color according to claim 1, characterized in that: The quantification method further comprises: Step 5: Obtain the number of pigment cells and the area of pigment cells corresponding to the pigment cell category; Step 6: Determine whether the number of pigment cells and / or the area of pigment cells is greater than a preset threshold: If so, it is determined that the fish is a first type of fish.