Intelligent fry specification, color and gender screening system based on morphological measurement feature recognition
By adopting intelligent technology based on morphological metrological feature recognition in the fry screening system, combined with YOLO and OpenCV algorithms, the problems of low recognition accuracy and low efficiency in fry screening are solved, and efficient and accurate fry screening is achieved, saving labor Resources and improve productivity.
Patent Information
- Application Number
- CN202411884815.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-27
- Filing Date
- 2024-12-20
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The prior art has problems such as low identification accuracy, low efficiency, and strong artificial dependence in the fry screening process, especially in the selection of fry specifications, colors and genders, which are difficult to achieve efficient and accurate identification.
Using an intelligent fry specification color and gender screening system based on morphological metrology feature recognition, combined with YOLO algorithm, OpenCV and adaptive image enhancement algorithm, the feature extraction network and attention mechanism are specially improved to achieve accurate identification of extremely small fry images and Splitting.
It improves the accuracy and screening efficiency of fry identification, reduces manual intervention, and achieves rapid and accurate fry screening, greatly saves artificial resources and improves production efficiency.
Smart Images

Figure CN119422988A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fish fry screening, and in particular to an intelligent fish fry specification, color and gender screening system based on morphometric feature recognition. Background Art
[0002] "In food production, seed industry comes first", and the development of aquaculture industry also revolves around artificial breeding. In aquatic seedling enterprises, due to individual differences in seedlings, when the fry grow to a certain stage, there will always be a large difference in size. If feeding is not timely, it will often cause big fish to eat small fish and cannibalize each other, which will not only cause losses, but also make individuals more susceptible to infection with bacteria and parasites due to injuries, bringing huge risks to the fry. Therefore, seedling separation is required in the production process to avoid cannibalization, but artificial seedling separation is time-consuming and labor-intensive, and the error is large. After a period of time, the phenomenon of large differences in the size of the fry continues to appear, and the risk cannot be eliminated.
[0003] At the same time, with the improvement of living standards, people's demand for ornamental fish is getting higher and higher, and the ornamental fish industry is developing faster and faster. The value of ornamental fish is extremely related to its appearance. The same koi with excellent appearance is often worth thousands or even hundreds of thousands, while those with poor appearance are often worth only a few yuan in the market. Therefore, for the ornamental fish industry, the sorting of ornamental fish fry is particularly important. The body characteristics and color patterns of the fry are often judged and screened during the breeding process. This work is particularly important, but it can only be carried out during a specific seedling period, and there is a certain time limit. It also depends on the experience and judgment of the technicians. Limited by the technicians' eyesight and labor intensity, the intensity of screening is often unsatisfactory, which has a certain impact on the improvement of the ornamental fish's germplasm and quality.
[0004] Fish generally show strong gender differences during their growth process. For example, female half-smooth tongue sole can grow to more than 3kg, while male growth stops at 0.4kg. The growth rate and final size of females of most fish, such as turbot, goldfish and koi, are significantly greater than those of males, while the growth rate and final size of males of yellow catfish and tilapia are significantly greater than those of females. Therefore, in order to improve economic benefits in the process of fish production, efforts are often made to solve the problem of full feminization or full masculinization of fish. Gender screening not only plays a role in improving economic benefits in production, but also plays an auxiliary breeding effect in the selection of fish germplasm. However, it is difficult to distinguish between male and female fry in the larval stage, and molecular marker technology is often used. Organs and tissues of the fish need to be collected, which causes damage to the fish body and makes it difficult to ensure screening efficiency.
[0005] At present, machine vision is widely used in aquaculture. Common and open source feature detection algorithms include SSD, YOLO, etc. YOLO has a very fast detection speed, but there is no example of YOLO being applied to fish fry feature detection. Most of them are used for pathological monitoring, judging feeding intensity, and identifying abnormal behavior of fish. However, the identification of fish fry features and specifications is difficult to accurately identify because the fry are fragile and cannot be out of water, resulting in light refraction above the water surface. Even if they are identified, the feature extraction effect is poor due to interference factors such as the small size of the fry, which ultimately leads to unsatisfactory recognition accuracy. In addition, common programs occupy a large storage capacity and are difficult to deploy on single-chip microcomputers. They are mostly deployed on PC terminals and mobile phones. When used, they need to be connected to the mobile phone or PC for networking operation, and cannot be used on demand, resulting in inconvenience and difficulty in use. Summary of the invention
[0006] In order to solve the above problems, the purpose of the present invention is to provide an intelligent fry specification color gender screening system based on morphometric feature recognition to perform multi-condition fry identification and sorting, aiming to improve the fry identification accuracy and screening efficiency.
[0007] In order to achieve the above technical objectives and address the deficiencies of the above technologies, the present application provides an intelligent fish fry specification, color and gender screening system based on morphometric feature recognition, comprising a fish fry sequencing module, a diversion and transmission module for processing the fish fry fed through the fish fry sequencing module, and a fish fry feature and specification discrimination module located above the diversion and transmission module; the fish fry feature and specification discrimination module is derived from the general feature recognition model YOLO and OpenCV through specialized improvements, and targeted improvements are made to the feature extraction of extremely small fish fry image information. After obtaining a recognition model with higher accuracy, it provides a diversion basis based on the fish fry image.
[0008] In one embodiment, the fry sequencing module includes a fish pouring box, a deceleration slide, and a dense multi-tube fitting for transferring the fry from the fish pouring box to the deceleration slide; a plurality of groups of deceleration brakes are fixedly installed on the deceleration slide, and the plurality of groups of deceleration brakes are arranged in a staggered manner; the dense multi-tube fitting is composed of a plurality of pipes densely arranged, wherein one end of the pipe is arranged in the fish pouring box, and the other end extends outward into the deceleration slide.
[0009] Furthermore, the number of the deceleration slideways can vary from one to more according to the efficiency of the fry batches; the dense multi-tube fittings can be configured with different inner diameters according to requirements to match different fry sizes.
[0010] Furthermore, the diversion conveying module includes at least three groups of diversion chutes installed at the outlet of the deceleration chute, conveyor belts and partitions installed on the corresponding diversion chutes, and two groups of baffles installed in a V-shape at the position of the partition facing the corresponding conveyor belt; at least three groups of the diversion chutes are arranged horizontally, and the diversion chutes are inclined downward; the partitions are vertically fixed on the sliding surface of the corresponding diversion chute, and the partitions are located on the corresponding side of the conveyor belt facing away from the deceleration chute; the conveyor belt is made of rubber, and a coordination cavity is opened through the diversion chute for the corresponding conveyor belt to pass through.
[0011] Furthermore, the number of the diversion chutes and conveyor belts can vary from one to more depending on the diversion efficiency requirements.
[0012] Furthermore, the partition divides the corresponding diversion chute into a qualified channel and an unqualified channel, and the two groups of baffles are used to control the opening and closing of the qualified channel and the unqualified channel respectively; the diversion chute is equipped with a rotating structure for driving the baffle, and the baffle performs a unidirectional opening and closing movement under the action of the rotating structure.
[0013] In one of the embodiments, the fry characteristic specification identification module includes a shell installed on the side of the diversion transmission module through a hinge, a high-definition camera and a lighting fixture embedded in the shell facing the diversion slide, an image processing component installed in the shell, and an X-ray imaging component; the X-ray imaging component includes an X-ray transmitter placed under the diversion transmission module and an X-ray receiver embedded in the shell facing the diversion transmission module.
[0014] Furthermore, the fry identification module also includes a fish feature training module, an image information processing module, a fish feature and specification identification and comparison module, a baffle control module, a fry counting module and a human-computer interaction module installed in the shell.
[0015] Furthermore, the improved feature recognition model is based on the YOLO algorithm, which is integrated with the image adaptive enhancement algorithm, and the CA attention mechanism is integrated into the C3 module. The resnet feature extraction network is used to replace its original feature extraction network, and maximum suppression is integrated. The specification recognition and comparison module uses Python language, integrates the image adaptive enhancement MSRCR algorithm, and adopts the method of pre-setting calibration marks to achieve the conversion between real specifications and pixels by identifying calibration marks.
[0016] In one embodiment, the specific discrimination process of the fish characteristics and specification identification comparison is as follows:
[0017] S1 obtains color image data of fry;
[0018] S2 uses an image enhancement algorithm to remove the refraction interference of shallow water light and then proceeds to the next step. In this embodiment, the MSRCR algorithm is used to enhance the image to obtain clearer color fry feature information;
[0019] The MSRCR image enhancement algorithm is added to the image preprocessing stage in the target detection process and used as a YOLO network input image enhancement method to eliminate the image impact caused by the reflection of the water surface after the fry enters the water. The formula is as follows:
[0020] S11 Color Restoration Reflectivity: R MSRCR (x,y)=C(x,y)·R MSR (x,y), where: R MSRCR is the reflectance after multi-scale Retinex processing, and C(x,y) is the color restoration factor.
[0021] S12 Color Restoration Factor: Among them, I(x,y) represents the image of a certain channel, A mapping function representing a color space.
[0022] S13 Logarithmic transformation, linear stretching, and pixel value correction: Logarithmic transformation is performed on the original image to compress the dynamic range of the image, and then linear stretching is performed on the processed image to map it to the required output range, and finally converted from the logarithmic domain to the real domain, and the image is corrected by changing the gain (Gain) and offset (Offset).
[0023] The C3_CA module is added to the C3 module of the Backbone structure of YOLOv5s to achieve better extraction of multi-level and multi-scale features in the image and improve the average precision of the feature training model; the implementation of the C3_CA module is as follows: the input feature map is processed by the C3 module to obtain an intermediate feature map. The CA attention mechanism is applied to the intermediate feature map to obtain a weighted feature map. The weighted feature map is used as the output of the C3_CA module for subsequent network layer processing. The formula is as follows:
[0024] S21 global average pooling: where x c (i, j) represents the pixel value at position (i, j) on the cth channel, and H and W represent the height and width of the feature map, respectively.
[0025] S22 concatenated feature map: f = [y1, y2, ..., y C ], where C represents the number of channels.
[0026] S23 convolution operation: g = σ(Conv(f)), where Conv represents the convolution operation and σ represents the activation function.
[0027] S24 weighted operation: in represents the element-by-element multiplication operation, x represents the original feature map, and g represents the attention weight.
[0028] The Resnet feature extraction network replaces the CSP feature extraction network in YoloV5s, and directly adds the input feature map to the output feature map by introducing the residual block. The formula is as follows:
[0029] S31 Core Formula
[0030] Residual learning: H(x)=F(x)+x, H(x) is the expected output, F(x) is the residual part, and x is the input.
[0031] S32 residual block: F(x) is usually obtained through a series of convolutional layers, batch normalization layers, and activation function layers. Specifically, suppose there is a residual block containing two convolutional layers (conv1 and conv2): F(x) = conv2(BN2(ReLU(conv1(BN1(x))))).
[0032] S33 jump connection: H(x) = F(x) + W_s(x), assuming that the dimensions of input x and output F(x) are inconsistent, x needs to be transformed to match the dimension of F(x). The dimension transformation function is W_s(x), and the final output is H(x).
[0033] The maximum suppression (NMS) is a method used to suppress overlapping bounding boxes in detection, retaining only the bounding box with the highest confidence. When there are multiple overlapping bounding boxes, the bounding box with the highest confidence is retained, and other bounding boxes with lower confidence are suppressed to obtain more accurate target detection results. Specifically, NMS sorts the bounding boxes according to confidence, and then traverses these bounding boxes in turn. If the degree of overlap between the current bounding box and the retained bounding box (usually measured by intersection over union (IOU)) exceeds a preset threshold (such as 0.5), the current bounding box will be suppressed, that is, it will not be retained as the final detection result. The formula is implemented as follows:
[0034]
[0035] Among them, the intersection area (inter_area) is the area of the overlapping part of the two bounding boxes, and area1 and area2 are the areas of the two bounding boxes respectively.
[0036] Specification identification: The length and width model in the opencv library is introduced and improved. Specifically, the length and width of the calibration mark are used to infer the length of other objects in the image using the calibration object, and the scaling method is adopted. The specific formula is:
[0037]
[0038] The real-world size is W real Width and H real Height. In the image, the size of this rectangle is W img Pixel width and H img Pixel height. After traversing the outline of the fry, the real world size represented by each pixel in the image is calculated and the specifications of the fry are output. Because the camera is placed vertically in the present invention, the scaling factor is negligible.
[0039] S3 determines whether the body color requirements are met based on the body color characteristics of the fry, and determines whether the body color characteristics meet the screening requirements by performing convolution calculation based on the feature image recognition system improved by the C3_CA attention mechanism and the resnet feature extraction network;
[0040] If yes, execute S4; if no, execute S9
[0041] S4 determines whether the fry meets the desired fish species based on the overall characteristics of the fry, and determines whether the body color characteristics meet the screening requirements by performing convolution calculation based on the feature image recognition system improved by the C3_CA attention mechanism and the resnet feature extraction network;
[0042] If yes, execute S5; if no, execute S9;
[0043] S5 obtains X-ray gonad image data of the fry, and determines whether the sex of the fry is as expected by the gonad features of the fry using the feature image recognition system;
[0044] If yes, execute S6; if no, execute S9;
[0045] S6 grayscales the image and traverses the edges to obtain morphological data, and then performs S7 operation;
[0046] S7 extracts morphological data and uses a fish body length and weight prediction model to calculate whether the weight meets the deviation of preset fry specifications according to the body length;
[0047] If yes, execute S8; if no, execute S9;
[0048] S8 opens the qualified channel, and the qualified fry count is +1;
[0049] S9 opens the unqualified channel, and the unqualified fry count is +1.
[0050] Furthermore, the method for processing to obtain morphological data is specifically performed as follows:
[0051] S31 uses image enhancement adaptive algorithm to pre-process the image, obtains a clear image and extracts the characteristic points of the fry color image;
[0052] S32 performs grayscale and binarization processing on the fry image;
[0053] S33 extracts the grayscale image contour of the fry by traversing all points;
[0054] S34 performs fish fry characterization extraction and obtains morphometric data.
[0055] The present invention also provides a fry screening method performed by the above system, comprising the following steps:
[0056] S1 provides a fish characteristic data set and a body length-weight relationship coefficient database, and provides the screening system;
[0057] The S2 screening system sorts the fry poured in batches;
[0058] The S3 screening system captures and extracts image information of fry;
[0059] S4 uses an improved fish feature image recognition algorithm to analyze the image information of the fry and extract the morphological measurement, color and gender feature information of the fry;
[0060] S5 performs convolution calculation and judgment through the fry feature recognition algorithm and outputs the confidence level. It determines whether to open a qualified or unqualified channel and counts the fry based on whether it is higher than the confidence level threshold.
[0061] In one embodiment, the method for analyzing the image information of the fry and extracting the morphological measurement, color and gender characteristic information of the fry is specifically performed as follows:
[0062] S41 image information processing module analyzes the captured image information to obtain color feature data of the fry;
[0063] S42 grayscale processing of the captured fish fry image;
[0064] S43 performs edge extraction on the grayscale fry image;
[0065] S44 calculates and extracts morphometric data of the image information of the fry after edge extraction to obtain morphometric feature data of the size of the fry;
[0066] The image information extracted by S45 X-ray imaging or CT imaging is enhanced by the pre-image adaptive enhancement algorithm and then the internal gonad development status information of the fry is extracted by the improved image feature recognition algorithm to obtain the sex characteristic data of the fry.
[0067] The present invention discloses the following technical effects:
[0068] The fry screening system of the present invention designs a multi-angle screening system for fry specifications, fry body color and fry sex, uses an improved fish feature and specification recognition model that combines different fish morphometric features, color features and sex features, and cooperates with machine vision recognition and intelligent computing screening to overcome the three key difficulties of specification screening, color screening and sex screening in the fish seedling process, effectively solves the problems of large and small fish cannibalism, ornamental fish selection and male and female screening in the fry stage during seedling cultivation, and starts from the difficulty of improving the screening speed and screening accuracy of small individual fry, through specialization to improve the common general image recognition model on the market, by improving the attention mechanism and feature extraction network and maximum value suppression, and nesting the adaptive image enhancement MSRCR algorithm in the outer layer, reducing the risk of misjudgment and improving the accuracy of feature recognition. According to actual measurement, the recognition speed of every 100 fry is about 50ms, which is much lower than the time of manual judgment. In addition, the trained model is only tens of MB, which is easy to deploy on a terminal with small storage space. It is easy to operate and has strong portability. It fills the domestic gap, greatly saves labor, accelerates the artificial breeding process, and improves production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 Shown is a structural schematic diagram of an intelligent fish fry specification, color and gender screening system based on morphometric feature recognition provided by the present invention.
[0071] Figure 2 Shown Figure 1 Exploded view of the fish fry sequencing module.
[0072] Figure 3 Shown Figure 1 Schematic diagram of the structure of the middle diversion transmission module.
[0073] Figure 4 Shown Figure 1 Exploded diagram of the module for distinguishing the characteristic specifications of medium-sized fish fry.
[0074] Figure 5 The grayscale processing diagram of the screening system in the present invention is shown.
[0075] Figure 6 Shown is an edge detection diagram of the screening system in the present invention.
[0076] Figure 7Shown is a diagram of morphological data extraction of the screening system of the present invention.
[0077] Figure 8 Shown is an operation block diagram of the fry characteristic specification discrimination module in the present invention.
[0078] Fig. 9 Shown is a flow chart of the improved fry processing of the present invention (abcd is the processing sequence).
[0079] Fig.10 Shown is the final result after our improved image recognition accuracy.
[0080] Fig.11 The figure shows the final embodiment of the C3_CA attention mechanism and the resnet feature extraction network in the code.
[0081] Fig.12 Shown is the fish body length predicted by the discriminant module
[0082] Fig.13 Shown is the C3_CA attention mechanism added to the fish fry image feature recognition module
[0083] Fig.14 Improved feature recognition model structure (data inflow is enhanced by MSRCR), and improved backbone and head;
[0084] Fig.15 , Fig.16 The figure shows the confidence comparison of the final recognition results and the prediction box comparison before and after the improvement;
[0085] Fig.17 Shown is the machine screening process;
[0086] Fig.18 The figure shows the process of establishing the feature recognition model;
[0087] Among them, 1. fish dumping box; 2. deceleration slide; 3. dense multi-tube accessories; 4. diversion slide; 5. conveyor belt; 6. partition; 7. baffle; 8. shell; 9. X-ray receiver; 10. X-ray transmitter. DETAILED DESCRIPTION
[0088] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0089] Example 1: Please refer to Figure 1-4 The present embodiment provides an intelligent fish fry specification, color and gender screening system based on morphometric feature recognition, which includes a fish fry sequencing module, a diversion and transmission module for processing the fish fry fed through the fish fry sequencing module, and a fish fry feature and specification discrimination module located above the diversion and transmission module.
[0090] The fry batching module includes a fish pouring box 1, a deceleration slide 2, and a dense multi-tube fitting 3 for transferring the fry from the fish pouring box 1 to the deceleration slide 2. Several groups of deceleration plates are fixedly installed on the deceleration slide 2, and the several groups of deceleration plates are arranged in a stepped interval. It should be noted that the deceleration plates of this embodiment should be slightly inclined toward the bottom of the deceleration slide 2 to ensure that the fry can pass through without clogging.
[0091] The dense multi-tube fitting 3 is composed of a plurality of densely arranged pipes, wherein one end of the pipe is arranged in the fish pouring box 1, and the other end extends outward to the deceleration slide 2. It should be noted that the inner diameter size of the pipe in this embodiment and the specifications of the fish pouring box 1 can be replaced according to needs to meet the needs of fry of different sizes.
[0092] The fry sequencing module of this embodiment is used as follows: the fry are poured into the fish pouring box 1 and sent into the deceleration slide 2 through the dense multi-tube accessories 3. During the above process, the fry are preliminarily sorted and sequenced when passing through the dense multi-tube accessories 3, and the deceleration partition is used to reduce the sliding speed of the fry, and the fry sliding down the deceleration slide 2 are sorted and sequenced again.
[0093] The diversion conveying module includes three groups of diversion chutes 4 installed at the outlet of the deceleration chute 2, a conveyor belt 5 and a partition 6 installed on the corresponding diversion chute 2, and two groups of baffles 7 installed in a V shape at the position where the partition 6 faces the corresponding conveyor belt 5. Based on the diversion conveying module, the fry fed through the fry sequencing module are diverted. This embodiment takes the three groups of diversion chutes 4 as an example for explanation. In other embodiments, according to the actual number of fry and the diversion scale, the number of diversion chutes 4 can be adaptively increased to improve the diversion and sorting efficiency of the fry.
[0094] The three groups of diverter chutes 4 are arranged in a horizontal arrangement, and the diverter chutes 4 are arranged to be inclined downward. The partition 6 is vertically fixed on the sliding surface of the corresponding diverter chutes 4, and the partition 6 is located on the side of the conveyor belt 5 that is opposite to the deceleration chute 2. It should be noted that the inclination of the side where the partition 6 is located in the diverter chute 4 is greater than the side where the conveyor belt 5 is located, so that the fry can slide down by gravity.
[0095] The conveyor belt 5 is made of rubber, and a matching cavity for the corresponding conveyor belt 5 to pass through is provided on the diversion chute 4. In this embodiment, in order to provide driving force for the conveyor belt 5 to run so as to realize its function of directional transmission of fry, a rotating motor and two groups of conveyor rollers are installed in the matching cavity of the diversion chute 4, one group of conveyor rollers is rotatably arranged on the diversion chute 4, and the remaining group of conveyor rollers is fixedly connected to the output end of the rotating motor. The conveyor belt 5 is paved between the two groups of conveyor rollers. When the rotating motor is powered on to drive the conveyor rollers to rotate, the conveyor belt 5 is pulled to realize the directional transmission of the fry thereon. The aforementioned conveying structure is a mature prior art and will not be described in detail here.
[0096] The partition 6 divides the corresponding diversion chute 2 into a qualified channel and an unqualified channel, and the two groups of baffles 7 are used to control the opening and closing of the qualified channel and the unqualified channel respectively. The diversion chute 4 is equipped with a rotating structure for driving the baffle 7, and the baffle 7 performs a unidirectional opening and closing movement under the action of the rotating structure. The rotating structure of this embodiment is described by taking a motor and a rotating shaft as an example. The side of the baffle 7 close to the wall of the diversion chute 4 is fixed to the rotating shaft, and the motor drives the rotating shaft to rotate so as to adjust the angle of the baffle 7 and achieve the effect of opening and closing the baffle 7.
[0097] In this embodiment, the area where the partition 6 is located in the diversion slide 4 is divided into two, forming two screening channels, namely a qualified channel and an unqualified channel, which are used to directional pass qualified fry and unqualified fry respectively. The software system is used to screen the fry. When it is determined to be qualified, the baffle 7 that controls the opening and closing of the qualified channel is opened to screen out the qualified fry. When it is determined to be unqualified, the baffle 7 of the unqualified slide is controlled to open and the unqualified fry are eliminated.
[0098] The fish fry characteristic specification discrimination module in this embodiment obtains fish fry characteristic information (fish fry body color, fish fry species, fish fry gender) and morphological measurement information such as fish fry body shape and fish fry weight according to the color or black and white images of the fish fry to provide a basis for diversion. The fish fry characteristic specification discrimination module includes a housing 8 installed at the side of the diversion transmission module through a hinge, a high-definition camera and a lighting lamp embedded in the housing 8 facing the diversion slide 4, an image processing component installed in the housing 8, an X-ray imaging component, and a fish fry characteristic specification discrimination module installed in the housing 8 including (an improved fish characteristic image recognition and training model, an improved fish body length and weight prediction model), a baffle control module, a fish fry counting module, and a human-computer interaction module.
[0099] In this embodiment, during screening, the fry characteristic specification discrimination module and the diversion transmission module form a relatively dark environment, and a high-definition camera and a lighting lamp are used to capture clear images of the fry. The high-definition camera and the lighting lamp should be fixed on the lower surface of the housing 8 in an embedded manner and arranged vertically with the conveyor belt 5 to ensure that the acquired image information is clear and accurate.
[0100] In order to meet the requirements of waterproof, rust-proof and impact-resistant, the housing 8 of this embodiment is made of stainless steel, and in order to reduce X-ray radiation, the housing 8 of this embodiment is covered with a rubber lead baffle. A touch-screen display is embedded on the outside of the housing 8, and the display is fixed to the upper surface of the housing 8 in an embedded manner. The display should have a touch interaction function to meet the user's operational interaction with the fry sorting equipment. The image processing component is composed of a memory and a processor to identify the fry image information. In addition, in order to meet the heat dissipation requirements of the image processing component during operation, a cooling fan is provided in the housing 8 of this embodiment to dissipate heat.
[0101] The X-ray imaging assembly includes an X-ray transmitter 10 placed below the shunt transmission module and an X-ray receiver 9 embedded in the housing 8 facing the shunt transmission module. The X-ray transmitter 10 corresponds to the X-ray receiver 9. It should be noted that in this embodiment, the positive electrode material of the transmitting end of the X-ray transmitter is tungsten steel to meet the high temperature resistance requirements, and the positive and negative electrode glass plates of the transmitting end of the X-ray transmitter and the glass tube should form a vacuum condition inside after being combined.
[0102] In this embodiment, a screening device is formed based on the combination of a fry sequencing module, a shunting transmission module and a fry characteristic specification discrimination module to provide a fry screening space. In order to overcome the difficulty of manually selecting fry, which is relatively cumbersome, this embodiment designs a screening device for fry, which is easy to use, time-saving and labor-saving, high in accuracy, easy to operate in the fish farm, and not easy to damage individual fry, and can prevent large fry from cannibalizing small fry. In addition, the device of this embodiment can be operated by a single person, which is convenient for promotion and use.
[0103] In this embodiment, the fry feature specification discrimination module combines the adaptive enhancement algorithm, improves the CA attention mechanism, the RESNET feature extraction network and the maximum suppression, etc., to obtain a recognition system with stronger feature extraction capability and higher accuracy. The improved image recognition system is pre-trained and recognized according to specific species, specifications, colors, gonadal characteristics, etc. to obtain a recognition model with higher recognition accuracy and stronger feature extraction capability.
[0104] See also Figure 8-11 The method for obtaining the features by processing and the effect of improving the judgment accuracy after the improvement are specifically performed as follows:
[0105] S1 obtains color image data of fry;
[0106] S2 adaptive image enhancement MSRCR algorithm preprocesses fry images;
[0107] S3 uses the improved fry feature recognition model to judge the fry color image to see whether the feature value meets the requirements;
[0108] If yes, execute S4; if no, execute S9;
[0109] The image information processing module uses Python language to grayscale the image, and detects the edges of the collected fish fry image information by traversing the edge or differential operator to obtain the edge image of the identified fish fry, and obtains morphometric data through recognition processing operations such as morphometrics.
[0110] The fish feature and specification recognition and comparison module identifies the comprehensive feature values of the screened fry image information through the fry feature recognition model output by the improved feature extraction module and the attention mechanism image training model, thereby determining and outputting the fry type, size, color and gender recognition results, and outputting the confidence value.
[0111] The human-computer interaction module consists of a single-chip microcomputer and a color touch screen connected through the FSMC interface. The system status and the fry screening parameters are displayed based on the human-computer interaction module. When the system is running, the screening results are displayed in real time on the color touch screen, which is convenient for observing the fry screening effect and adjusting the screening parameters in time.
[0112] See also Figure 5-7 and Fig.12 The method for processing to obtain morphological data is specifically performed as follows:
[0113] S31 extracts characteristic points of the fry color image;
[0114] S32 performs grayscale processing on the fry image;
[0115] S33 extracts the grayscale image contour of the fry;
[0116] S34 performs fish fry characterization extraction and obtains morphometric data;
[0117] Among them, S31~S34 are all processed using Python language.
[0118] S4 determines whether it is a desired fish species according to the morphological data;
[0119] If yes, execute S5; if no, execute S9;
[0120] S5 obtains X-ray gonad image data of the fry to determine whether the sex of the fry is as expected;
[0121] If yes, execute S6; if no, execute S9;
[0122] S6 extracts body length and height from morphological data to determine whether the body shape of the fry meets the specifications;
[0123] If yes, execute S7; if no, execute S9;
[0124] S7 calculates the weight of the fry and determines whether it is within the deviation;
[0125] If yes, execute S8; if no, execute S9;
[0126] S8 opens the qualified channel, and the qualified fry count is +1;
[0127] S9 opens the unqualified channel, and the unqualified fry count is +1.
[0128] The baffle control module receives the identification results of the fish feature and specification identification comparison module and triggers the signal. By controlling the change of the logic input, the level change is realized. The hardware cooperates with the specific power supply module to realize the opening / closing of the baffle 7, thereby determining the opening and closing of the qualified channel and the unqualified channel.
[0129] In summary, the fry screening system of the present embodiment has designed a multi-angle screening system for fry specifications, fry body color and fry gender, and uses a fry feature recognition model that combines different fish morphological measurement features, color features and gender features. The built-in fry feature recognition model has greatly improved the accuracy of identifying fry by improving the recognition of small fry, and has overcome the three key difficulties of specification screening, color screening and gender screening in the process of fish breeding, and effectively solved the problems of cannibalization of large and small fish, selection of ornamental fish and selection of male and female fish in the fry stage during breeding, filling the domestic gap, greatly saving labor, accelerating the process of artificial breeding, and improving production efficiency. It should be noted that in the screening system of the present embodiment, the three functions of specification screening, color screening and gender screening can exist separately or in combination, and should all fall within the scope of protection of this patent.
[0130] Embodiment 2: This embodiment takes selecting goldfish with reddish body color from goldfish fry of different colors and eliminating goldfish with single tail type, retaining normal tail type and selecting larger fry as an example, and provides a method for screening fry, which uses an intelligent fry specification color sex screening system based on morphometric feature recognition as described in Embodiment 1 to screen fry. The above-mentioned fry screening method comprises the following steps:
[0131] S1, provide fish feature dataset to the training module;
[0132] The image recognition system improves the CA attention mechanism, RESNET feature extraction network and maximum suppression to obtain a recognition system with stronger feature extraction capability and higher accuracy. The improved image recognition system is pre-trained to recognize fry sample images according to specific species, specifications, colors, gonadal characteristics, etc., and the fish feature and specification recognition system is stored in the form of an image recognition model and deployed on the device.
[0133] S2, sorting the fry poured in batches;
[0134] A dense multi-tube fitting 3 of corresponding specifications is selected, and a batch of fry is poured into the fish pouring box 1. After the fry passes through the dense multi-tube fitting 3 and the deceleration slide 2, they are sorted and diverted and enter the fry identification link.
[0135] S3, photograph and extract the image information of the fry and pre-process the fry image through the image adaptive enhancement algorithm to remove interference factors such as reflection and noise as much as possible:
[0136] The appearance image information of the fry entering the fry identification stage will be captured by the high-definition camera with the help of the lighting lamp, and the gonad image information of the fry will be captured by the imaging structure composed of the X-ray receiver 9 and the X-ray transmitter 10. The captured information is pre-processed by the image adaptive enhancement algorithm to obtain clearer fry image information.
[0137] S4, analyzing the fry image information, extracting the fry color and gender as well as the overall feature information;
[0138] The method for analyzing the fry image information and extracting the morphological measurement and color feature information of the fry is specifically performed as follows:
[0139] S41, the image information processing module analyzes the image information acquired by the improved image recognition model and processes it through the image adaptive enhancement algorithm, and then obtains the feature data required for the fry such as color, tail type, etc. by YOLOv5s with improved CA attention and resnet feature extraction network;
[0140] Select the detected features in the specified area of the image. If the confidence level is lower than the preset threshold, the system will determine it as unqualified.
[0141] S42, gray-scaling the captured fish fry image using Python language;
[0142] When graying the captured fry image, spatial domain filtering or frequency domain filtering is used to filter the color RGB image to remove the noise of the image. It should be noted that since Gaussian noise and salt and pepper noise are mainly present in production, this embodiment uses a median filtering algorithm with a filtering window of 3*3 to filter the fry color image.
[0143] S43, after image filtering, utilizing gradient operator to perform edge extraction on the grayscale fry image;
[0144] The gradient operators include a first-order edge detection operator, a Sobel operator, a Robert operator, and a second-order edge detection operator, a Laplacian operator and a Canny operator.
[0145] S44, using Python language, using the edge traversal algorithm to calculate and extract the morphometric data of the image information of the fry after the edge extraction in S43, obtain the morphometric feature data of the size of the fry, and determine the comprehensive recognition result of the fry entering the diversion transmission module according to multiple recognition results, compare with the pre-stored data in the fish feature database to determine the type, morphological characteristics and gender of the fry, and calculate the weight coefficient according to the preset formula (the weight coefficient calculation formula is as follows:
[0146] Wherein, W is the weight of the fry, R is the coefficient, and L is the total length of the fry) to obtain the converted weight of the tested fry;
[0147] S5, compare with the preset confidence threshold to determine whether to open qualified or unqualified channels and the counting of fry;
[0148] After color comparison and morphological recognition and confidence output, qualified fry are judged as qualified by the system if the confidence is higher than the preset threshold. After the system judges them as qualified, it sends a signal to open the baffle 7 that controls the opening and closing of the qualified channel, and the fry are screened out.
[0149] Because the cyan goldfish only meets the morphometric data comparison and does not reach the color confidence threshold, the system determines it as unqualified and sends a signal to open the baffle 7 that controls the opening and closing of the unqualified channel, and the fry is screened out; the red single tail only meets the color confidence result, and the tail shape does not reach the confidence threshold. After the system determines it as unqualified, it sends a signal to open the baffle 7 that controls the opening and closing of the unqualified channel, and the fry is screened out; the smaller goldfish fry does not meet the preset deviation value because the weight calculation, the system determines it as unqualified and sends a signal to open the baffle 7 that controls the opening and closing of the unqualified channel, and the fry is screened out.
[0150] When the qualified channel is opened once, a signal is sent to the fry counting module, and the qualified fry count is increased by 1; when the unqualified channel is opened once, the unqualified fry count is increased by 1.
[0151] Example 3: This example takes the conventional image recognition algorithm YOLOV5S and our improved algorithm GD-YOLOV5S (YOLOV5s that integrates the image adaptive enhancement MSRCR algorithm and the CA attention mechanism and replaces the resnet feature extraction network), YOLOv5s-CA (only the CA attention mechanism is added), YOLOv5s-resnet101 (only the resnet101 feature extraction network is replaced), and YOLOv5s-resnet50 (only the resnet50 feature extraction network is replaced) as an example. The mAP50:95 and loss value and the final discrimination accuracy are used as the evaluation criteria for comparison. When using the trained GD-YOLOv5s model for model testing, we selected a series of image files that have not been seen in the model training process as the test set to objectively evaluate the difference between the two after the improvement:
[0152]
[0153] mAP50:95 (average precision, 50% to 95% IoU threshold range): AP is a key indicator to measure the average detection performance of the model at different IoU thresholds. When evaluating, the area under the Precision-Recall curve is usually calculated at multiple IoU thresholds (from 0.5 to 0.95, with a step size of 0.05), and the average of these areas is taken as the AP value. AP50:95 specifically refers to the average precision calculated over the entire range of IoU thresholds from 50% to 95%. The higher the AP value, the more stable and excellent the detection performance of the model at different IoU thresholds.
[0154]
[0155] Table 1 Ablation experiment results
[0156] After the same 800 epochs of training, the mAP50:95 value of the original YOLOV5s was 0.592, while that of the improved feature recognition model was 0.536, which is a 10.4% improvement in mAP50-95 compared to the original YOLOv5s model.
[0157] After the same 800 epochs training, the total loss of the GD-YOLOv5s model for S2 reached 0.104326, while the total loss of the original YOLOv5s model was 0.105525. This reduction suggests that GD-YOLOv5s fits the data better during training, thus reducing prediction errors.
[0158] In the task of identifying and analyzing the tail fin features of fish fry, the original GD-YOLOv5s model showed a significant improvement in confidence compared to the original YOLOV5s. In particular, the confidence in the identification of the tail fin of fish fry has been greatly improved. GD-YOLOv5s also achieved an improvement of about 4% in the accuracy of skin color recognition, verifying its effectiveness in improving target detection accuracy.
[0159] When analyzing the recognition performance of fish fry tail fins, we observed that the original YOLOv5s model was not up to the task. Specifically, when the model recognized the characteristics of the fish fry tail fins, not only was the confidence generally low, but it also frequently missed detections, which directly affected the accuracy and reliability of the recognition results. Fig.15 , 16. The confidence before the improvement was obviously low, and there was a phenomenon that one feature output two judgment results, but it was more accurate after the improvement.
[0160] The fry screening method of the present embodiment can be applied in the form of software, such as being designed as an independently running program and installed on a computer terminal. In other embodiments, it can also be designed as an embedded running program and installed on a computer terminal, where the computer terminal can be a computer or other intelligent device.
[0161] In summary, the fry screening method of this embodiment combines the comprehensive characteristic points of fish to construct a targeted and multifunctional fry identification system, which can perform multi-condition fry identification and sorting, thereby improving the efficiency of fry identification and screening.
[0162] The naming of each component involved is based on its function described in the specification and is not limited to the specific terms used in the present invention. Those skilled in the art may also choose other terms to describe the names of the components of the present invention.
[0163] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0164] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0165] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. An intelligent fish fry specification, color and gender screening system based on morphometric feature recognition, characterized in that: It includes a fry sequencing module, a flow separation and transmission module for processing the fry fed through the fry sequencing module, and a fry characteristic and specification discrimination module located above the flow separation and transmission module; The fry characteristic specification discrimination module comprises the following steps: Feature identification: Take different feature images of fry, label the features, build the initial data set, and use the initial data set to expand the data set by rotation and translation, and then divide the test set and training set to obtain the final data set; The YoloV5s model was introduced and improved. The fry features were trained according to the improved Yolov5s model to obtain the final GD-YoloV5s model. The model obtained the fry feature information according to the fry image to provide the basis for diversion. Among them, the GD-YOLOV5S model was obtained by pre-processing the collected images with the MSRCR image enhancement algorithm combined with the YOLO algorithm on the basis of the image recognition algorithm YOLOV5S, integrating the CA attention mechanism into the C3 module, and using the resnet feature extraction network to replace its original feature extraction network, and integrating maximum suppression.
2. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 1 is characterized in that: The fry batching module comprises a fish pouring box (1), a deceleration slideway (2), and a dense multi-tube fitting (3) for transferring the fry from the fish pouring box (1) to the deceleration slideway (2); A plurality of groups of deceleration plates are fixedly mounted on the deceleration slideway (2), and the plurality of groups of deceleration plates are arranged in steps and at intervals; The dense multi-tube fitting (3) is composed of a plurality of densely arranged pipes, wherein one end of the pipe is arranged in the fish dumping box (1) and the other end extends outward to the deceleration slideway (2); The number of the deceleration slideways (2) is one or more; and the dense multi-tube fittings are configured with different inner diameters.
3. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 1 is characterized in that: The diversion conveying module comprises a diversion chute (4) installed at the outlet of the deceleration chute (2), a conveyor belt (5) and a partition (6) installed on the corresponding diversion chute (2), and two groups of baffles (7) installed in a V-shape at a position where the partition (6) faces the corresponding conveyor belt (5); The diverter slideways (4) are arranged in a transverse arrangement, and the diverter slideways (4) are arranged to be inclined downward; the partitions (6) are vertically fixed on the sliding surfaces of the corresponding diverter slideways (4), and the partitions (6) are located at the side of the conveyor belt (5) that is opposite to the deceleration slideway (2); The conveyor belt (5) is made of rubber or metal, and a coordination cavity for the corresponding conveyor belt (5) to pass through is provided on the diversion slideway (4); The number of the diversion chute (4) and the conveyor belt (5) is one or more.
4. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 3 is characterized in that: The partition (6) divides the corresponding diversion channel (2) into a qualified channel and an unqualified channel, and the two groups of baffles (7) are used to control the opening and closing of the qualified channel and the unqualified channel respectively; The diversion slideway (4) is provided with a rotating structure for driving the baffle plate (7), and the baffle plate (7) performs a unidirectional opening and closing movement under the action of the rotating structure.
5. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 1 is characterized in that: The fry characteristic specification identification module comprises a housing (8) mounted on the side of the diversion conveying module via a hinge, a high-definition camera and a lighting fixture embedded in the housing (8) facing the diversion slideway (4), an image processing component mounted in the housing (8), and an X-ray imaging component; The X-ray imaging assembly comprises an X-ray transmitter (10) placed below the diversion structure, and an X-ray receiver (9) embedded in the housing (8) facing the diversion structure.
6. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 1 is characterized in that: The fry characteristic specification discrimination module is also used to obtain a unique and most confident discrimination result according to the GD-YOLOV5S model, and send a signal to the baffle control module; The fry feature specification discrimination module is also used to extract the contour of the fry image by calling the function in OpenCV, call the function in OpenCV to obtain the minimum enclosing rectangle of the fry contour, and approximate the minimum enclosing rectangle width to the width of the contour, and then establish a weight prediction model according to the three parameters of the fry skeleton line length, body length and reference object; when generating the weight, the weight of the fry is estimated according to the body length weight coefficient; The baffle control module receives the judgment result of the fry characteristic specification judgment module and receives the signal, realizes the change of the level by controlling the change of the logic input, and cooperates with the power supply module to realize the opening / closing of the baffle (7), thereby determining the opening and closing of the qualified channel and the unqualified channel; The human-computer interaction module is composed of a single-chip microcomputer and a touch screen connected through an interface, and the system status is displayed and the fry screening parameters are adjusted based on the human-computer interaction module.
7. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 1 is characterized in that: The specific discrimination process of the fry characteristic specification discrimination module is as follows: S1 obtains color image data of fry S2 uses the adaptive image enhancement MSRCR algorithm to pre-process and remove the interference of shallow water light refraction before proceeding to the next step; S3 selects features or specifications for screening according to needs. If fry feature screening is selected, the improved feature image recognition system is used to determine whether the body color meets the preset reliability requirements; If yes, execute; If not, execute S9; S4 selects features or specifications based on demand, and identifies the desired fish species through the improved feature image recognition system; If yes, execute S5; if no, execute S9; S5 obtains the X-ray gonad image data of the fry, and determines whether the sex of the fry is as expected according to the improved feature image recognition system; If yes, execute S6; if no, execute S9; S6 performs edge processing after graying and binarizing the color image of the fry, extracts the edge and traverses each point of the outline of each fry, calculates the outline and the perimeter, and obtains the fry morphological data; S7 extracts morphological data and calculates weight based on body length to see if it meets the requirements If yes, execute S8; If not, execute S9; S8 opens the qualified channel, and the qualified fry count is +1; S9 opens the unqualified channel, and the unqualified fry count is +1.
8. The intelligent fish fry specification, color and gender screening system based on morphometric feature recognition according to claim 7 is characterized in that: The method for processing to obtain morphological data, the specific operations are as follows: S31 image adaptive enhancement MSRCR algorithm pre-enhances image information; S32 extracts characteristic points of the fry color image; S33 performs grayscale processing on the fry image; S34 extracts the grayscale image contour of the fry; S35 obtains morphometric data by traversing edges to form contours.
9. A method for screening fry by using an intelligent fry specification, color and sex screening system based on morphometric feature recognition as described in any one of claims 1 to 8, characterized in that: The following steps are involved: S1 presets a database of fish length and weight coefficients and a divided fish fry feature data set, and obtains a fish fry feature recognition model through pre-training of an improved recognition system, and provides a screening system as described in any one of claims 1 to 8; The S2 screening system sorts the fry poured in batches and pours the batches of unsorted fry with water into the fish pouring box 1. The fish pouring box 1 realizes the process of storing fry and cooperates with the dense multi-tube accessories 3 to roughly sort the fry in batches. Then the fry flows into the deceleration slide 2 and under the action of the deceleration plate, the secondary batch sorting is realized to ensure that the fry will slowly flow into the conveyor belt 5 of the discrimination module in batches to enter the discrimination; The S3 screening system captures and extracts image information of fry; S4 analyzes and enhances the image information of the fry, extracting the color, sex and morphometric feature information of the fry; S5 compares the confidence threshold with the preset confidence threshold, determines whether to open a qualified or unqualified channel according to whether it is above or below the confidence threshold, and counts the fry.
10. The method for screening fry according to claim 9, characterized in that: The method for analyzing the fry image information and extracting the morphological measurement, color and gender characteristic information of the fry is specifically performed as follows: S41 image information processing module analyzes the captured image information to obtain the color characteristic data of the fry; S42 grayscale processing of the captured fish fry image; S43 performs edge extraction on the grayscale fry image; S44 calculates the morphometric data of the image information of the fry after edge extraction to obtain morphometric feature data of the size of the fry; S45 X-ray imaging or CT imaging extracts the information on the development of the internal gonads of the fry and obtains the sex characteristic data of the fry.
Citation Information
Patent Citations
Early warning method for burst pollution of source water through aquatic organism behavior image extraction
CN102339521A
Method for increasing proportion of cynoglossus semilaevis female fry
CN107581105A
Automatic fry separating device and control method thereof
CN109566512A
Fish disease recognition processing device based on machine vision
CN113598098A
Unmanned aerial vehicle electric power inspection system based on intelligent vision and detection method thereof
CN115100554A
Cited By
Prawn body length nondestructive measurement device and method based on computer vision
CN120976103A
A computer vision-based non-destructive shrimp body length measuring device and method
CN120976103B