Search

CN-121810695-B - Binocular vision-based fish body quality non-contact estimation method

CN121810695BCN 121810695 BCN121810695 BCN 121810695BCN-121810695-B

Abstract

The invention discloses a binocular vision-based fish body quality non-contact estimation method, which comprises the steps of firstly obtaining a fish head partial image through fish head region segmentation under a land-based facility circulating water high-density cultivation environment in which fish bodies freely move and are prone to be blocked, carrying out position alignment and scale normalization processing on the fish head partial image to construct a stable fish head geometric anchor point, then carrying out input on the fish head anchor point serving as a condition, deducing and complementing the whole fish body shape by using a generated model to restore the continuous geometric structure of the fish body, carrying out three-dimensional matching on the head and tail key points of the fish body by combining binocular stereo vision on the basis, and finally realizing automatic estimation of the fish body quality based on the mapping relation between the body length and the mass.

Inventors

  • YE HAIXIONG
  • CHEN ZIYI
  • WANG FANG

Assignees

  • 上海海洋大学

Dates

Publication Date
20260512
Application Date
20260311

Claims (9)

  1. 1. The fish body quality non-contact estimation method based on binocular vision is characterized by comprising the following steps of: S101, synchronously collecting left and right views of a fish body, extracting a fish head area mask from any view by using a fish head segmentation model, and calculating the geometric center of the fish head area mask as a fish head anchor point position; Step S102, inputting the standardized fish head image as a condition input to a pre-trained fish body generation model, wherein the fish body generation model relies on a priori learned fish body biological morphology distribution, uses the anchor point position of the fish head as an initial reference point, deduces and generates a complete fish body image matched with the fish head in morphology proportion and geometric structure along the main axis direction of the fish body, and is used for recovering a two-dimensional panoramic observation morphology of the fish body in a shielding or incomplete observation state; Step 103, obtaining a fish body pixel scale based on the complete fish body image, carrying out three-dimensional matching calculation on a fish head area by utilizing binocular three-dimensional vision to obtain a real depth scale, combining the fish body pixel scale with the real depth scale, and converting the pixel scale in an image space into a physical space scale through a small hole imaging model so as to obtain real three-dimensional morphological parameters of the fish body, wherein the parameters comprise the actual body length, the actual height and the actual side area of the fish body; And S104, inputting the real three-dimensional morphological parameters of the fish body into a pre-constructed multiple regression model of the fish body, establishing a mapping relation between the real three-dimensional morphological parameters of the fish body and the fish body, and outputting a fish body quality estimation result.
  2. 2. The binocular vision-based fish body quality non-contact estimation method according to claim 1, wherein the fish head segmentation model comprises a main network and a detection head, wherein multi-scale features are extracted from a fish head region in a fish body target image through the main network, boundary frame information and pixel level separation masks of the fish head region are simultaneously output from the detection head, a minimum boundary frame of the fish head region is extracted, the geometric center position of the minimum boundary frame is used as a fish head anchor point position, and the fish head anchor point position is used as a space alignment reference.
  3. 3. The binocular vision-based fish body quality non-contact estimation method is characterized in that translation transformation is carried out on a fish head partial image, the geometric center position is located at a preset standard coordinate position, centering alignment of a fish head area is achieved, after centering alignment is achieved, scale normalization processing is carried out on the fish head partial image according to a preset standard output size, the fish head images under different individuals and different shooting distances have consistent size expression proportion in a standard space, in the scale transformation process, pixel areas beyond the standard size boundary are cut, the incomplete parts are supplemented through a background filling mode, and the background filling value is a preset fixed pixel value or a pixel value consistent with an original background.
  4. 4. A binocular vision based fish mass non-contact estimation method according to claim 3, wherein the fish generation model generates an countermeasure network construction based on improved Pix2Pix conditions, comprising a generator for generating a complete fish two-dimensional profile from a standardized fish head image and a discriminator for performing authenticity discrimination on the generated fish image; when the whole fish body image is deduced and trained, the position of a fish head anchor point determined in the standardized fish head image is taken as an initial reference point, and a two-dimensional profile of the whole fish body is gradually generated along the main axis direction of the fish body, so that the shape of the generated fish body keeps a continuous structural relation with the fish head anchor point in a space position.
  5. 5. The binocular vision-based fish body mass non-contact estimation method of claim 4, wherein the discriminator of the fish body generation model adopts a double-flow parallel structure, comprising: The image flow branches, namely taking the complete fish body image output by the generator as input, extracting texture features and local appearance features through a convolution network and performing countermeasure discrimination on the generated fish body image and the real fish body image; Edge flow branching, namely taking an edge gradient map of the generated fish body image as input, extracting contour boundary features through a convolution network and judging continuity and geometric structure of the fish body contour; and the image flow branches and the high-level features of the edge flow branches are spliced or weighted and fused at the tail end of the discriminator to output the countermeasure discrimination result.
  6. 6. The binocular vision-based fish body mass non-contact estimation method of claim 5, wherein the fish body generation model is optimized using a composite loss function, the composite loss function being composed of an opposing loss term, an edge constraint loss term, and a geometric consistency loss term, wherein, The countering loss item is used for restraining the generated fish body image to approach to the real fish body image distribution on the whole distribution; The edge constraint loss term is used for constraining continuity and closure of the generated fish body outline by comparing the difference of the generated image and the real image in the gradient domain; the geometric consistency loss term is used for establishing a fish body proportion relation based on the fish head anchor point position and restraining the length, the height and the whole proportion parameters of the generated fish body, so that the generated fish body is kept stable in the structural scale and the proportion relation.
  7. 7. The binocular vision-based fish mass non-contact estimation method of claim 6, wherein the acquiring logic of the real three-dimensional morphological parameters is as follows: the complete fish body image complemented based on the fish body generation model has a complete two-dimensional morphological outline, and the pixel scale of the fish body corresponding to the two-dimensional morphological outline is extracted; Calibrating and three-dimensionally correcting the fish head area with clear texture and less shielding by using binocular three-dimensional vision, and taking the fish head area as a depth scale reference to obtain the real depth scale of the fish head area; Combining the pixel scale of the fish body in the complete fish body image with the real depth scale of the fish head area, and realizing accurate mapping from the image space to the physical space through a small-hole imaging model, so as to calculate the real three-dimensional morphological parameters of the fish body, wherein the real three-dimensional morphological parameters comprise the real length of the fish body, the real height of the fish body and the real lateral area of the fish body.
  8. 8. The binocular vision-based fish body quality non-contact estimation method according to claim 7, wherein the quality multiple regression model is a prediction model for establishing a mapping relationship between real three-dimensional morphological parameters of a fish body and the fish body quality, the quality multiple regression model takes the real fish body length, the real fish body height and the real fish body side area as input characteristic variables, takes the fish body quality as output prediction variables, and performs iterative optimization on model parameters by constructing an error function between the prediction quality and the real quality and taking minimizing the error function as a target, so as to learn the mapping relationship between the real three-dimensional morphological parameters of the fish body and the fish body quality, and after model training is completed, outputs a corresponding fish body quality estimation result according to the input real three-dimensional morphological parameters.
  9. 9. The binocular vision-based fish body quality non-contact estimation system based on the realization of the binocular vision-based fish body quality non-contact estimation method according to any one of claims 1 to 8, characterized by comprising a binocular vision acquisition module, an image processing and morphology inference module, a stereo measurement module and a quality estimation module, wherein: The binocular vision acquisition module is used for completing parameter calibration of internal parameters, external parameters and baseline parameters in a deployment stage of the binocular vision system and acquiring a fish body target image of the binocular vision system under the same acquisition node; The image processing and form deducing module is connected with the binocular vision acquisition module and is used for carrying out fish head detection on any fish body target image, extracting a fish head region, and carrying out cutting and scale normalization processing on the fish head region to obtain a standardized fish head image; The three-dimensional measurement module is connected with the binocular vision acquisition module and the image processing and morphology deducing module and is used for acquiring a fish body pixel scale based on the complete fish body image, carrying out three-dimensional matching calculation on a fish head area by utilizing binocular stereo vision to obtain a real depth scale, combining the fish body pixel scale with the real depth scale, and converting the pixel scale in an image space into a physical space scale through a small-hole imaging model so as to obtain a fish body real three-dimensional morphology parameter; The quality estimation module is connected with the three-dimensional measurement module and is used for inputting the real three-dimensional morphological parameters of the fish body into a pre-constructed multiple regression model of the fish body, establishing a mapping relation between the real three-dimensional morphological parameters of the fish body and the fish body quality and outputting a fish body quality estimation result.

Description

Binocular vision-based fish body quality non-contact estimation method Technical Field The invention relates to the technical field of biological phenotype data processing and intelligent analysis, in particular to a binocular vision-based fish body quality non-contact estimation method. Background With the continuous promotion of the large-scale, intensive and intelligent level of aquaculture, the real-time perception and accurate assessment of the growth state of fish have become key technical requirements in modern aquaculture management. The quality of the fish body is used as an important index for reflecting the growth level, health condition and cultivation benefit of the fish, and is widely applied to a plurality of links such as cultivation density regulation, feed feeding decision, growth curve analysis, marketing grading and the like. How to realize the rapid and accurate acquisition of the fish body mass on the premise of not interfering the normal growth behavior of fish is a technical problem which needs to be solved in the current intelligent aquaculture field. The existing fish quality acquisition mode mainly depends on manual fishing weighing or sampling measurement. The mode generally needs to take the fish body out of the water body and carry out weighing operation, so that the measuring efficiency is low, the labor cost is high, the fish body is easy to cause stress reaction and even mechanical damage, the normal growth state of the fish is influenced, and the requirements of high-density continuous cultivation scenes on automatic and low-interference monitoring are difficult to meet. In addition, the sampling measurement mode can only reflect the growth condition of local individuals, and the quality distribution characteristics of the whole fish shoals in the culture pond are difficult to accurately describe, so that the problem of insufficient representativeness exists. With the development of computer vision and image processing technology, a fish shape measurement and quality estimation method based on images or videos is becoming a research hotspot. The method generally collects the images of the fish body through a camera, extracts geometric characteristics such as the length, the area or the outline of the fish body, and estimates the quality of the fish body by combining an empirical formula or a regression model, so that the human participation is reduced to a certain extent, and the non-contact measurement is realized. However, most vision measurement methods exist that are implemented primarily based on monocular vision systems. Because monocular imaging lacks a real depth scale, the size of a fish body is often converted by depending on a fixed shooting distance, a reference calibration object or an empirical proportional relation, when the distance between the fish body and a camera changes or the posture of the fish body is inclined or bent, a measuring result is easy to generate a remarkable error, the scale consistency and generalization capability are weaker, and the method is difficult to adapt to a complex scene of free swimming of fish in a real cultivation environment. In order to overcome the inherent defect of monocular vision in the aspect of scale recovery, research has been attempted to introduce a binocular stereoscopic vision technology, and three-dimensional space information of the fish body is obtained through parallax calculation, so that the measurement of the length of the fish body under the real scale is realized. Compared with a monocular method, binocular vision can effectively eliminate scale uncertainty caused by shooting distance change in theory, and has higher measurement precision potential. However, in an actual aquaculture environment, fishes are usually in a free swimming state, the posture is frequently changed, the fish body is obviously bent, and the complex conditions of swimming, mutual shielding and the like of multiple fishes in the same scene are often accompanied, so that the whole fish body is difficult to stably present in a binocular image. Particularly, under the high-density cultivation condition, the fish body area is often partially shielded or drawn, so that binocular matching and body length measurement based on the complete fish body outline are difficult to reliably implement, and the stability and accuracy of the subsequent quality estimation result are further affected. Under a complex scene, the fish head area is easier to accurately detect and divide compared with the fish body area due to relatively stable structure, small influence of gesture change and shielding, and is gradually used for fish body shape analysis and biological feature extraction. However, the existing partial technical scheme only carries out quality regression directly based on the characteristics of the fish head or the local area, lacks effective constraint on the overall morphological structure of the fish body, is difficult to fully reflect