Zebra fish juvenile fisheye parameter measurement method and device, electronic equipment, storage medium and application

Through deep learning technology, automatic processing of zebrafish eye image data solves the problems of low efficiency and insufficient accuracy in the existing technology, achieves efficient and reliable measurement of zebrafish eye parameters, and promotes innovation in ophthalmic research. .

CN118587270APending Publication Date: 2024-09-03THE EYE HOSPITAL OF WENZHOU MEDICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410734070.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

The image data processing efficiency of zebrafish juvenile eyes in the existing technology is low and relies on manual annotation and measurement, resulting in subjective errors in the measurement results, which cannot meet the needs of rapid large-scale data processing, and has low accuracy and reliability.

Method used

Using deep learning methods, by constructing image data sets, training models to automatically segment and measure images of zebrafish juvenile eyes, including using the UNet model, combined with data augmentation and loss functions to evaluate model performance, to achieve automated zebrafish eye parameter measurement .

Benefits of technology

It improves the efficiency and accuracy of zebrafish eye parameter measurement, reduces the influence of subjective factors, enables efficient processing of massive data, and improves research efficiency and data reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587270A
    Figure CN118587270A
Patent Text Reader

Abstract

The invention relates to the field of image data processing, in particular to a zebra fish juvenile fisheye parameter measurement method and device, electronic equipment, a storage medium and application, and the method comprises the following steps: obtaining a sample, constructing a data set through an image, and dividing the data set into a test set and a training set; obtaining a plurality of zebra fisheye microscopic images segmented by eye science experts according to a unified segmentation standard, and storing the most accurate segmented image; randomly extracting variation amplitude, randomly selecting a data augmentation algorithm, and increasing the number of samples; constructing a training model and carrying out model training, and judging model convergence through a loss function; and acquiring an image to be detected, and automatically segmenting the juvenile zebra fish fisheye image and calculating parameters. According to the invention, automatic zebra fisheye parameter measurement is realized, the workload and time cost of manual measurement can be reduced, the efficiency and accuracy of data processing are improved, time and energy are saved for scientific researchers, and the research cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image data processing, and in particular to a method, device, electronic equipment, storage medium and application for measuring eye parameters of juvenile zebrafish. Background Art

[0002] Zebrafish eyes display a high degree of molecular complexity and strict spatiotemporal regulation during development, showing a high degree of similarity to human eye development. They are one of the classic vertebrate models often used in medicine to study human eye development and diseases.

[0003] However, with the deepening of ophthalmology research, conventional image data of zebrafish larvae eyes can no longer meet the research needs. Although the accumulation of ophthalmic microscopic image data has provided rich information for research, the optical structure parameters of zebrafish eye microscopic images are still measured manually, that is, the experimenter manually marks and measures the eye tissue contours in the zebrafish larvae limited image through a microscope camera.

[0004] It takes 5-10 minutes to manually collect and record the labels and measurements of a fish. The amount of zebrafish microscopy experimental image data is huge, which requires a lot of manpower and time investment. The traditional manual measurement method is inefficient and cannot meet the needs of fast and large-scale data processing.

[0005] In addition, in the process of manual labeling and measurement, there are subjective factors. Different experimenters will have different judgment standards and measurement methods, and the measurement results obtained will also have different errors, resulting in reduced accuracy and reliability of the obtained measurement data. Summary of the invention

[0006] In order to improve the accuracy and reliability of zebrafish fry eye parameter measurement data, the present invention provides a zebrafish fry eye parameter measurement method, device, electronic equipment, storage medium and application.

[0007] The present invention provides a method for measuring eye parameters of zebrafish larvae, which adopts the following technical scheme:

[0008] A method for measuring eye parameters of zebrafish larvae comprises the following steps:

[0009] Obtain images of zebrafish larvae's eyes as samples, construct a data set through the images, and divide the images in the data set into a test set and a training set;

[0010] Obtain multiple images that are manually segmented according to preset segmentation standards, save the image with the most accurate segmentation, and delete other duplicate images;

[0011] Construct a transformation amplitude set containing multiple variation amplitudes and multiple data augmentation methods, randomly select a data augmentation algorithm, randomly extract the variation amplitude in the transformation amplitude set, perform data augmentation on the samples in the training set, and increase the number of samples in the training set;

[0012] Build a training model, construct a loss function, use the images in the training set to train the model, and determine whether the model converges by the change in the loss function;

[0013] The image to be tested is obtained, and the vertical viewing angle zebrafish eye area, vertical viewing angle zebrafish larvae corneal curvature, and vertical viewing angle zebrafish retinal pigment epithelium grayscale mean are calculated.

[0014] In a specific implementation scheme, the training model includes an input layer, an encoder, a decoder and an output layer, the encoder includes N lower acquisition modules, and the decoder includes M upper acquisition modules;

[0015] The input layer takes the images in the dataset and outputs them to the encoder;

[0016] Using N lower acquisition modules of the encoder to extract N scale features in the image, the first lower acquisition module extracts the first feature from the image, and the nth lower acquisition module extracts the nth feature from the n-1th feature of the n-1th lower acquisition module, where N is the total number of lower acquisition modules, 2≤n≤N, and n is a positive integer;

[0017] Use the M upper acquisition modules of the decoder to decode the features of N scales to obtain M feature maps, the mth upper acquisition module obtains the nth feature and outputs the mth feature map, the m-1th upper acquisition module obtains the mth feature map output by the mth upper acquisition module and the n-1th feature output by the n-1th encoder, and outputs the m-1th feature map, where M is the number of upper acquisition modules, M=N, and m is a positive integer less than or equal to M;

[0018] The output layer obtains the first feature map output by the decoder and maps the first feature map to the final category number.

[0019] In a specific feasible implementation scheme, each down-collection module includes a maximum pooling layer and two convolutional layers, a batch normalization layer, and an activation function, and each down-collection module reduces the width and height of the feature map by half;

[0020] Each up-acquisition module includes a deconvolution layer, two convolution layers, a batch normalization layer, and an activation function. Each up-acquisition module doubles the width and height of the feature map and halves the number of channels.

[0021] In a specific implementation scheme, the output layer includes a 1×1 convolutional layer and a softmax activation function.

[0022] In a specific implementation scheme, the method of judging whether the training model has converged by the loss function includes the following steps:

[0023] Convert the output of the training model into a probability map.

[0024] Traverse the probability map in each channel and calculate the Dice coefficient for each channel;

[0025] Flatten the output of the training model and the preset target tensor into a one-dimensional tensor, and then calculate the intersection and union of the result and the target tensor;

[0026] Calculate the Dice loss. The smaller the Dice loss, the more accurate the output of the training model.

[0027] Using the average similarity coefficient D i , Jaccard coefficient J and global accuracy A, and D i ,J,A∈[0,1]; through the average similarity coefficient D i , Jaccard coefficient J and global accuracy A are used to evaluate the model performance, and the average similarity coefficient D i , the closer the Jaccard coefficient J and the global accuracy A are to 1, the better the model performance;

[0028] When the Dice loss no longer decreases, it indicates that the training model has converged.

[0029] In a specific embodiment, the method for calculating the vertical viewing angle zebrafish eye area, the vertical viewing angle zebrafish larvae corneal curvature and the vertical viewing angle zebrafish retinal pigment epithelium grayscale mean includes the following steps:

[0030] The softmax activation function obtains the output of the training model and converts it into a probability map output. If the pixel value of a pixel is greater than or equal to 0.5, it indicates that the pixel is an eye area pixel. Otherwise, it indicates that the pixel is a non-eye area pixel. The number of eye area pixels is counted, and the vertical viewing angle zebrafish eye area is further calculated.

[0031] Obtain all eye area contours in the image, select different acquisition points on the eye area contours as data points to construct a two-dimensional coordinate system, calculate the first-order derivatives of the data points in the x-direction and y-direction, that is, the approximate slope change of the tangent; calculate the second-order derivatives of the data points in the x-direction and y-direction, that is, the speed of the tangent slope change, and then calculate the vertical viewing angle of the zebrafish larvae corneal curvature;

[0032] The probability map is multiplied pixel by pixel with the original image to filter out the pixels in the eye area and calculate the average grayscale value of all pixels.

[0033] The present invention provides a device for measuring eye parameters of zebrafish fry, which adopts the following technical scheme:

[0034] A device for measuring eye parameters of zebrafish larvae, comprising:

[0035] one or more processors; memory;

[0036] and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the zebrafish larvae eye parameter measurement device to perform the above-mentioned zebrafish larvae eye parameter measurement method.

[0037] The present invention provides an electronic device, which adopts the following technical solution:

[0038] An electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for measuring eye parameters of zebrafish larvae.

[0039] The present invention provides a method for measuring eye parameters of zebrafish larvae, which adopts the following technical scheme:

[0040] A non-transitory computer-readable storage medium storing computer instructions, characterized in that the computer instructions are used to enable a computer to execute the above-mentioned method for measuring eye parameters of juvenile zebrafish.

[0041] The invention also provides an application of a method for measuring eye parameters of juvenile zebrafish in measuring anterior chamber parameters of the juvenile zebrafish.

[0042] In summary, the present invention includes at least one of the following beneficial technical effects:

[0043] 1. Efficiently process massive amounts of zebrafish eye microscopic image data, realize automatic annotation and measurement of zebrafish eye structures, and greatly improve research efficiency and measurement accuracy.

[0044] 2. By automatically segmenting the image of the zebrafish larvae eye, the image of the zebrafish larvae eye is segmented from the overall image, and the parameters are automatically measured, which greatly reduces the error caused by subjective factors during measurement and improves the accuracy and reliability of the zebrafish larvae eye parameter measurement data.

[0045] 3. It can automatically segment the microscopic images of zebrafish larvae’s eyes from a vertical perspective and output a number of zebrafish eye biological parameters. This will help scientists to more conveniently conduct research on the mechanisms of ophthalmic diseases and the effects of eye disease treatment drugs, thereby promoting the innovation and development of ophthalmic disease diagnosis and treatment methods.

[0046] 4. The extracted zebrafish eye biological parameters, such as fish eye area, corneal curvature mean, retinal pigment epithelium grayscale mean, etc., can provide important reference data for the medical field. The zebrafish larvae eye parameter measurement method of the present invention provides new technical means and methods for the field of ophthalmology research, promotes the innovation and development of ophthalmology technology, and stimulates the growth potential of the ophthalmology industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of the method for measuring eye parameters of zebrafish larvae.

[0048] Figure 2 This is the architecture diagram of the training model.

[0049] Figure 3 This is the structural diagram of the encoder.

[0050] Figure 4 It is a structural diagram of an encoder in the prior art.

[0051] Figure 5 It is the structural diagram of the decoder.

[0052] Figure 6 It is the structure diagram of the output layer.

[0053] Figure 7 Schematic diagram of manual and automatic labeling of zebrafish eye regions.

[0054] Figure 8 This is a picture showing the outline of the eye area of ​​a zebrafish. DETAILED DESCRIPTION

[0055] The following is combined with Figure 1-8 The present invention is described in further detail.

[0056] The method for measuring the eye parameters of zebrafish larvae provided in the embodiment of the present invention can be applied on a server or a terminal. The server can be a physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal can be a user equipment (User Equipment, UE) such as a mobile phone, smart phone, laptop, digital broadcast receiver, personal digital assistant (PDA), tablet computer (PAD) with strong computing power, handheld device, vehicle-mounted device, wearable device, computing device or other processing equipment connected to a wireless modem, mobile station (Mobile Station, MS), mobile terminal (Mobile Terminal), etc., and the present invention is not limited here.

[0057] Reference Figure 1 , a method for measuring eye parameters of zebrafish larvae, comprising the following steps:

[0058] S100, obtaining a sample.

[0059] A plurality of fish eye microscopic images of zebrafish fry at different time points after embryo fertilization are obtained by a microscope camera, and images that are blurred, have incomplete shooting ranges, or have large areas of strong reflections are eliminated. In this embodiment, a total of 881 fish eye microscopic images of zebrafish fry at four time points, namely, 3 days, 4 days, 5 days, and 6 days after embryo fertilization, are used as samples, and a data set is constructed using the samples, and the samples in the data set are divided into a test set and a training set.

[0060] S200, sample processing and segmentation.

[0061] Obtain multiple different manually segmented images of the same image, and retain the one that is manually determined and the most accurate segmentation. The specific process of manually segmenting images is: pre-enrollment training for the three experienced ophthalmologists enrolled. The enrollment training includes: image segmentation software operation training: introduction of the basic functions and operation methods of the image segmentation software, including the use of image segmentation tools. In this embodiment, the image segmentation software is Labelme; zebrafish eye anatomical structure explanation: a brief introduction to the zebrafish eye anatomical structure, as well as the definition and boundaries of different eye sub-anatomical regions; segmentation standard unification: emphasize the importance of segmentation accuracy and consistency, discuss and determine unified segmentation standards. Through training, ensure that ophthalmologists involved in data segmentation understand the task requirements and standards, and maintain consistency and accuracy during the segmentation process. Each image was initially segmented by three ophthalmologists using the polygon tool in the Labelme software to segment each eye sub-anatomical region in the zebrafish eye microscopic image, and after discussion among the three, the most accurate segmented image was retained and the other two images were deleted.

[0062] S300, enlarged microscopic image of zebrafish eye.

[0063] The construction records multiple data augmentation methods and multiple transformation amplitude sets. Data augmentation methods include rotation, equalization, contrast change, brightness change, cropping, flipping, shearing, translation, etc. By randomly selecting one or more data augmentation methods and one or more variation amplitudes in the transformation amplitude set, more samples are provided for the training model, overcoming the problem of insufficient samples in the subsequent model training process, increasing the diversity of samples, and improving the generalization ability of the training model.

[0064] S400, builds a training model for zebrafish larvae eye microscopic image evaluation and uses samples from the training set for training.

[0065] Reference Figure 2 The training model is constructed based on the UNet model, including an input layer, an encoder with four lower acquisition modules, a decoder with four upper acquisition modules, and an output layer. For ease of explanation, the four lower acquisition modules are distinguished by the first lower acquisition module, the second lower acquisition module, the third lower acquisition module, and the fourth lower acquisition module; the four upper acquisition modules are distinguished by the first upper acquisition module, the second upper acquisition module, the third upper acquisition module, and the fourth upper acquisition module. It is easy to understand that the number of upper acquisition modules and lower acquisition modules in this embodiment is a preferred example and can be adjusted according to actual needs.

[0066] The number of input channels of the input layer is 3, and it accepts color image input. The input layer obtains samples from the training set and outputs the samples to the encoder. The first acquisition module of the encoder extracts the first feature from the sample and outputs the first feature to the second acquisition module. The second acquisition module extracts the second feature from the first feature and outputs it to the third acquisition module, and so on, until the fourth acquisition module extracts the fourth feature from the third feature and outputs it. The fourth acquisition module upsamples and fuses the fourth feature to obtain the fourth feature map, the third acquisition module upsamples the fourth feature map, the third acquisition module obtains the third feature for feature fusion, and outputs the third feature map, and so on, until the first acquisition module upsamples the second feature map, obtains the first feature for feature fusion, and outputs the first feature map to the output layer.

[0067] Reference Figure 3 , the lower acquisition module includes two 3×3 convolutional layers, two batch normalization layers, two ReLU activation functions and a maximum pooling layer. Two 3×3 convolutional layers, two batch normalization layers, and two ReLU activation functions constitute a DoubleConv block. Each lower acquisition module halves the width and height of the feature map. Since different lower acquisition modules obtain different features, the output channels of each DoubleConv block are also different, and the number of output channels increases with the depth of the network, that is, the number of channels of the feature maps output by different lower acquisition modules is different, and the number of channels of the feature maps increases with the depth of the network.

[0068] Reference Figure 4 In a common UNet model, the lower acquisition module usually has two 3×3 convolutional layers, and after each 3×3 convolutional layer is a ReLU activation function, followed by a 2×2 maximum pooling layer. However, the eye image of zebrafish larvae is relatively complicated. If there are some genetic defects in the fish eyes, the color of the retinal pigment epithelium in its eyes will be abnormal, and melanin production will decrease, which will be manifested as grayscale changes and pigment value changes, making it difficult for ordinary lower acquisition modules to accurately process images, resulting in low image segmentation accuracy. In the present invention, the training stability and performance of the model can be improved by adding a batch normalization layer. Batch Normalization (BN) is a technology used in the neural network training process to improve training speed and stability. BN alleviates the problem of internal covariate shift by normalizing the input data in each layer, thereby improving the efficiency and stability of subsequent model training.

[0069] Reference Figure 5,The upper acquisition module includes a deconvolution layer, two 3×3 convolution layers, two batch normalization layers, and two ReLU activation functions. Each upper acquisition module doubles the width and height of the feature map and halves the number of channels.

[0070] In the common UNet model, transposed convolution is generally used as the deconvolution layer. Although transposed convolution can restore the details and edge information of the image and is often used for image segmentation, the kernel of the transposed convolution is discontinuous in space, resulting in uneven brightness or color distribution in some areas of the generated image, which may produce checkerboard artifacts, etc. In the analysis of zebrafish larvae eye images, there is an analysis of the grayscale of the zebrafish retinal pigment epithelium. The checkerboard effect of the transposed convolution introduces new errors in the image segmentation process, thereby increasing the analysis error. By replacing the transposed convolution with bilinear interpolation, the new pixel value is smoothly interpolated during the upsampling process, so that the image will not have obvious jagged or blocky effects when enlarged, thereby avoiding the introduction of new errors in image segmentation and facilitating the subsequent analysis of the grayscale of the zebrafish retinal pigment epithelium.

[0071] Reference Figure 6 , the output layer includes a 1×1 convolution layer and a softmax activation function. The 1×1 convolution layer maps the first feature map to the final number of categories, which is the number of segmented areas of the microscopic image of the fish eye of the zebrafish larvae from a vertical perspective. The softmax activation function converts each element in the result output by the 1×1 convolution layer into a probability distribution, that is, a probability map of the probability of each pixel corresponding to a category in the output image of the softmax activation function. The probability of each pixel in the probability map belonging to the fish eye region of the zebrafish larvae is compared with 0.5. If the probability is greater than or equal to 0.5, it indicates that the pixel is a pixel in the fish eye region of the zebrafish larvae. Otherwise, it indicates that the pixel is not a pixel in the fish eye region of the zebrafish larvae.

[0072] S500, model training and evaluation. When the loss function of the training model no longer decreases, it indicates that the model has converged and the model parameters are saved.

[0073] A510, the manually segmented image is used as the target tensor, and the target tensor is flattened into a one-dimensional tensor, that is, the category corresponding to each pixel of the target tensor is converted into a one-dimensional array set G. The model output is flattened into a one-dimensional tensor, that is, the probability distribution output by the training model is converted into a one-dimensional array set H. Calculate the intersection and union of set G and set H. Call the multiclass_dice_coeff function, traverse each final category output by the training model, and call the dice_coeff function for each final category to calculate the Dice coefficient of the category. Call the multiclass_dice_coeff function to calculate the average Dice coefficient of multiple categories.

[0074] According to the formula:

[0075]

[0076] Calculate the Dice coefficient, where Intersection represents the number of pixels that the model predicts to be the target category and are actually the target category, that is, the number of pixels corresponding to the target category in the intersection of set G and set H;

[0077] Predicted Positive indicates the number of pixels predicted by the model to be the target category, that is, the number of pixels in the set H that correspond to the target category;

[0078] Actual Positice represents the number of pixels corresponding to the target category in the target tensor, that is, the number of pixels corresponding to the target category in the set G;

[0079] ∈ is a constant used to avoid division by zero errors.

[0080] The setting of the softmax activation function makes the value of the probability distribution output by the training model within the interval (0, 1), and the sum of the values ​​of each channel is 1, which eliminates the process of converting the results of the training model output during the calculation of the Dice coefficient.

[0081] Further according to the formula:

[0082] Dice Loss=1-Dice Coefficient

[0083] Calculate the Dice loss. The smaller the Dice loss, the better the prediction result of the training model, and the smaller the corresponding loss value. In other words, the smaller the Dice loss, the more accurate the segmentation of the microscopic image of the eye of the zebrafish larvae. During the model training process, when the Dice loss no longer decreases, it indicates that the model has converged.

[0084] A520, based on the data in set G and set H, calculate the global accuracy A, Jaccard coefficient J, and average similarity coefficient D i .

[0085] The global accuracy A is defined as:

[0086] The Jaccard coefficient J is defined as:

[0087] Average similarity coefficient D i is defined as:

[0088] In the above definition, TP represents the number of pixels correctly detected as the zebrafish eye region under the vertical viewing angle, that is, the number of pixels corresponding to the zebrafish eye region category under the vertical viewing angle in the intersection of set G and set H.

[0089] TN represents the number of pixels correctly detected as background areas, that is, the number of pixels corresponding to the background area category in the intersection of set G and set H.

[0090] FP represents the number of pixels that predict the background area as the zebrafish eye area under a vertical perspective, that is, the number of pixels classified as the zebrafish eye area under a vertical perspective in the remaining data after removing the data that intersects with the set G from the set H.

[0091] FN represents the number of pixels that are predicted as the background area in the zebrafish eye area under the vertical viewing angle, that is, the number of pixels classified as the background area in the remaining data after the set H removes the data that intersects with the set G.

[0092] The numerical range of global accuracy A and Jaccard coefficient J are both in the interval (0, 1), and the closer the global accuracy A is to 1, the higher the overall prediction accuracy of the training model on the validation set, that is, the higher the accuracy of sample segmentation, the higher the model performance. The closer the Jaccard coefficient J is to 1, the higher the overlap between the prediction results of the training model and the manual segmentation, that is, the higher the overlap between the sample segmentation and the manual sample segmentation, the higher the model performance. Average similarity coefficient D i The closer it is to 1, the higher the similarity between the two samples. The training model can achieve a good balance between recall and precision, that is, the segmentation of the sample can accurately perform the zebrafish eye area from a vertical perspective and minimize segmentation errors and omissions, which means higher model performance.

[0093] When the global accuracy A, Jaccard coefficient J, and average similarity coefficient D i The training model is iterated until the Dice loss, global accuracy A, Jaccard coefficient J, and average similarity coefficient D are stable. iIf all tend to be stable, it means that the model has converged; otherwise, it means that the training model needs to continue to iterate. During the model training process, the output is a line graph of the Dice loss distribution changing with the training round, a line graph of the learning rate changing with the number of iterations, a line graph of the Dice coefficient changing with the training round, a line graph of the global accuracy A changing with the training round, a line graph of the Jaccard coefficient J changing with the number of iterations, and a line graph of the average similarity coefficient D i Line graphs that change with training rounds make it easy to intuitively understand the training effect of the training model.

[0094] Table 1

[0095] Segmentation Area Fisheye area Dice coefficient 0.953 Global_correct (global correctness) 99.4% Jaccard index 0.967

[0096] Reference Figure 7 Combined with Table 1, which is a performance table of Unet vertical view fisheye area segmentation, after the model converges, the global accuracy of the training model is as high as 99.4%, and the Jaccard coefficient and Dice coefficient are both greater than 0.95, which can accurately segment the eyes of zebrafish larvae.

[0097] S600: Input the image to be tested into the converged training model to obtain the segmented image to be tested, and extract the eye parameters of the juvenile zebrafish from the image.

[0098] Obtain the probability map output by the softmax activation function, and compare the probability that each pixel in the probability map belongs to the eye region of the zebrafish fry with 0.5. If the probability is greater than or equal to 0.5, it indicates that the pixel is a pixel in the eye region of the zebrafish fry. Otherwise, it indicates that the pixel is not a pixel in the eye region of the zebrafish fry. By calculating the number of pixels in the eye region of the zebrafish fry, the vertical viewing angle zebrafish eye area can be calculated.

[0099] Reference Figure 8 , find all eye area contours in the image to be tested through the cv2.findcontours function. The eye area contour is composed of multiple pixels connected, that is, the cv2.findcontours function finds the pixel points with a probability greater than or equal to 0.5 in the probability map of the image to be tested, and further finds the pixel points of all eye area contours. Select different acquisition points on the eye area contour as data points to construct a two-dimensional coordinate system, and calculate the first-order derivatives of the data points in the x and y directions through the np.gradient function, that is, the approximate slope change of the tangent; then, apply the function again to calculate the second-order derivative, which reflects the speed of the change of the tangent slope, that is, the curvature of the curve. The vertical viewing angle of the zebrafish larvae corneal curvature is further calculated through the first-order derivative and the second-order derivative. The vertical viewing angle of the zebrafish larvae corneal curvature is calculated by randomly selecting 3 data points and taking the average value to improve the accuracy of the vertical viewing angle of the zebrafish larvae corneal curvature. The data points can also be selected manually.

[0100] The cv2.circle function can be used to mark data points on the image, so that the data point positions can be visualized when calculating the vertical viewing angle of the zebrafish larvae corneal curvature.

[0101] Get the probability map output by the softmax activation function, multiply the probability map by the image to be tested pixel by pixel, filter out the pixels in the eye area, and calculate the average grayscale of the pixels in the eye area, which is the average grayscale of the fisheye area under the vertical viewing angle.

[0102] An embodiment of the present invention also discloses a device for measuring eye parameters of larval zebrafish, comprising one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the device for measuring eye parameters of larval zebrafish to perform the above-mentioned method for measuring eye parameters of larval zebrafish.

[0103] An embodiment of the present invention also discloses an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method for measuring eye parameters of zebrafish larvae.

[0104] The embodiment of the present invention further discloses a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the above-mentioned method for measuring eye parameters of juvenile zebrafish.

[0105] The method for measuring the parameters of the eye of a juvenile zebrafish disclosed in the embodiment of the present invention can also be used for the anterior chamber of the eye of a juvenile zebrafish, and the anterior chamber of the eye of a juvenile zebrafish in the microscopic image of the eye of a juvenile zebrafish can be automatically marked and segmented, and the area of ​​the anterior chamber of the eye of a juvenile zebrafish can also be automatically calculated. Referring to Table 2, which is a performance table of the anterior chamber area segmentation of the fish eye of the Unet vertical viewing angle, after the model converges, the global accuracy of the training model is as high as 98.1%, and the Jaccard coefficient and the Dice coefficient are both close to 0.95, which can accurately segment the anterior chamber of the eye of a juvenile zebrafish.

[0106] Table 2

[0107] Segmentation Area Anterior chamber area Dice coefficient 0.949 Global_correct (global correctness) 98.1% Jaccard index 0.951

[0108] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for measuring eye parameters of zebrafish larvae, characterized in that: The steps include: Obtain images of zebrafish larvae's eyes as samples, construct a data set through the images, and divide the images in the data set into a test set and a training set; Obtain multiple images that are manually segmented according to preset segmentation standards, save the image with the most accurate segmentation, and delete other duplicate images; Construct a transformation amplitude set containing multiple variation amplitudes and multiple data augmentation methods, randomly select a data augmentation algorithm, randomly extract the variation amplitude in the transformation amplitude set, perform data augmentation on the samples in the training set, and increase the number of samples in the training set; Build a training model, construct a loss function, use the images in the training set to train the model, and determine whether the model converges by the change in the loss function; The image to be tested is obtained, and the vertical viewing angle zebrafish eye area, vertical viewing angle zebrafish larvae corneal curvature, and vertical viewing angle zebrafish retinal pigment epithelium grayscale mean are calculated.

2. The method for measuring eye parameters of zebrafish fry according to claim 1, characterized in that: The training model includes an input layer, an encoder, a decoder and an output layer. The encoder includes N lower acquisition modules and the decoder includes M upper acquisition modules. The input layer takes the images in the dataset and outputs them to the encoder; Using N lower acquisition modules of the encoder to extract N scale features in the image, the first lower acquisition module extracts the first feature from the image, and the nth lower acquisition module extracts the nth feature from the n-1th feature of the n-1th lower acquisition module, where N is the total number of lower acquisition modules, 2≤n≤N, and n is a positive integer; Use the M upper acquisition modules of the decoder to decode the features of N scales to obtain M feature maps, the mth upper acquisition module obtains the nth feature and outputs the mth feature map, the m-1th upper acquisition module obtains the mth feature map output by the mth upper acquisition module and the n-1th feature output by the n-1th encoder, and outputs the m-1th feature map, where M is the number of upper acquisition modules, M=N, and m is a positive integer less than or equal to M; The output layer obtains the first feature map output by the decoder and maps the first feature map to the final category number.

3. The method for measuring eye parameters of zebrafish fry according to claim 2, characterized in that: Each down-collection module includes a maximum pooling layer and two convolutional layers, a batch normalization layer, and an activation function. Each down-collection module halves the width and height of the feature map; Each up-acquisition module includes a deconvolution layer, two convolution layers, a batch normalization layer, and an activation function. Each up-acquisition module doubles the width and height of the feature map and halves the number of channels.

4. The method for measuring eye parameters of zebrafish fry according to claim 2, characterized in that: The output layer consists of a 1×1 convolutional layer and a softmax activation function.

5. The method for measuring eye parameters of zebrafish fry according to claim 1, characterized in that: The method of judging whether the training model has converged by the loss function includes the following steps: Convert the output of the training model into a probability map. Traverse the probability map in each channel and calculate the Dice coefficient for each channel; Flatten the output of the training model and the preset target tensor into a one-dimensional tensor, and then calculate the intersection and union of the result and the target tensor; Calculate the Dice loss. The smaller the Dice loss, the more accurate the output of the training model. Using the average similarity coefficient D i , Jaccard coefficient J and global accuracy A, and D i ,J,A∈[0,1]; through the average similarity coefficient D i , Jaccard coefficient J and global accuracy A are used to evaluate the model performance, and the average similarity coefficient D i , the closer the Jaccard coefficient J and the global accuracy A are to 1, the better the model performance; When the Dice loss no longer decreases, it indicates that the training model has converged.

6. The method for measuring eye parameters of zebrafish fry according to claim 1, characterized in that: The method for calculating the vertical viewing angle zebrafish eye area, the vertical viewing angle zebrafish larvae corneal curvature and the vertical viewing angle zebrafish retinal pigment epithelium grayscale mean value comprises the following steps: The softmax activation function obtains the output of the training model and converts it into a probability map output. If the pixel value of a pixel is greater than or equal to 0.5, it indicates that the pixel is an eye area pixel. Otherwise, it indicates that the pixel is a non-eye area pixel. The number of eye area pixels is counted, and the vertical viewing angle zebrafish eye area is further calculated. Obtain all eye area contours in the image, select different acquisition points on the eye area contours as data points to construct a two-dimensional coordinate system, calculate the first-order derivatives of the data points in the x-direction and y-direction, that is, the approximate slope change of the tangent; calculate the second-order derivatives of the data points in the x-direction and y-direction, that is, the speed of the tangent slope change, and then calculate the vertical viewing angle of the zebrafish larvae corneal curvature; The probability map is multiplied pixel by pixel with the original image, the pixels in the eye area are filtered out, and the average grayscale value of all pixels is calculated.

7. A device for measuring eye parameters of zebrafish fry, characterized in that: include one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the zebrafish larvae eye parameter measurement device to perform the zebrafish larvae eye parameter measurement method as described in any one of claims 1 to 6.

8. An electronic device, characterized in that: include: at least one processor; And a memory connected to at least one processor in communication; wherein the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor so that at least one processor can execute the method for measuring eye parameters of zebrafish larvae as described in any one of claims 1-6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method for measuring eye parameters of larval zebrafish according to any one of claims 1 to 6.

10. Application of the method for measuring eye parameters of juvenile zebrafish as claimed in any one of claims 1 to 6 in measuring anterior chamber parameters of juvenile zebrafish.