Bivalve shell opening and closing behavior recognition method, device and equipment and medium
By combining an image processing method with a bivalve detector and an open bivalve instance segmenter, the problems of sensor interference, illumination effects, and missed detections and false detections in the prior art are solved, and highly accurate recognition of the opening and closing behavior of bivalve mollusks is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies for recognizing the opening and closing behavior of bivalve mollusks suffer from problems such as sensor intrusive interference, susceptibility of traditional algorithms to lighting conditions, and missed detections and false detections in deep learning instance segmentation techniques.
A method combining a bivalve mollusk detector and an open bivalve mollusk instance segmenter is adopted to identify the opening and closing behavior of bivalve mollusks through image processing, thereby avoiding sensor installation, improving robustness and reducing missed detections and false detections.
It achieves high-accuracy recognition of the opening and closing behavior of bivalve mollusks without sensor installation and unaffected by light, thus improving the accuracy of recognition.
Smart Images

Figure CN121661712A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bivalve mollusks, and in particular to a method, apparatus, device, and medium for recognizing the opening and closing behavior of bivalve mollusks. Background Technology
[0002] The opening and closing of the shell is a fundamental physiological activity in bivalves, primarily controlled by the adductor muscle. This behavior is closely related to their filter feeding, respiration, and locomotion.
[0003] Currently, existing technologies offer several methods for identifying the opening and closing behavior of bivalve mollusks. First, sensors can be installed on the mollusks to acquire data through contact measurements, thereby enabling the identification of their opening and closing behavior. Second, traditional algorithms, such as Otsu's method, can be used for threshold segmentation, and the behavior can be judged based on indicators such as area, thus achieving the identification of bivalve opening and closing behavior. Furthermore, existing deep learning instance segmentation techniques can be used solely for training and detection to complete the identification of bivalve opening and closing behavior.
[0004] However, using existing technology to install sensors on bivalves can cause intrusive interference to the target of detection, namely the bivalves. Traditional algorithms are susceptible to light and lack robustness. Finally, based on deep learning instance segmentation technology, in batch detection scenarios, the small opening of bivalves and the extremely sensitive threshold used to determine whether they are open can lead to missed detections if the threshold is set too high, or false detections if the threshold is set too low. Summary of the Invention
[0005] The embodiments of the present invention provide a method, apparatus, device, and medium for recognizing the opening and closing behavior of bivalve mollusks. By combining the detection results of bivalve mollusks with the segmentation results of open bivalve mollusks, the opening and closing behavior of bivalve mollusks can be recognized. Unlike existing technologies, there is no need to install sensors on bivalve mollusks, and the traditional algorithms are not susceptible to the influence of light and have insufficient robustness. It can also avoid the phenomenon of missed detection and false detection when relying solely on deep learning instance segmentation technology to recognize the opening and closing behavior of bivalve mollusks, thereby improving the accuracy of recognizing the opening and closing behavior of bivalve mollusks.
[0006] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a method for recognizing the opening and closing behavior of bivalve mollusks, comprising: Acquire the image to be recognized; The image to be identified is input into a trained bivalve mollusk detector, and the bivalve mollusk detector detects whether at least one target bivalve mollusk exists in the image to be identified. If it does not exist, return to obtain the image to be identified; if it exists, obtain the target bivalve mollusks set. The image to be identified is input into a trained open bivalve molluskaloid instance segmenter. The image to be identified is detected by the open bivalve molluskaloid instance segmenter to obtain an initial set of open bivalve mollusks. The target bivalve mollusks set and the initial open bivalve mollusks set are matched to obtain the shell opening and closing behavior recognition result of the image to be identified.
[0007] In one embodiment, before inputting the image to be identified into a trained bivalve mollusk detector, and before detecting whether at least one target bivalve mollusk exists in the image to be identified based on the bivalve mollusk detector, the method further includes: A first training sample set is established based on multiple original images of bivalves and the corresponding bivalves label data for each original image. The initial bivalve mollusk detector is trained using the first training sample set. The weight parameters are adjusted according to the preset loss function until convergence, and the trained bivalve mollusk detector is obtained.
[0008] In one embodiment, before inputting the image to be identified into a trained open bivalve molluskaloid instance segmenter, and detecting the image to be identified according to the open bivalve molluskaloid instance segmenter to obtain an initial set of open bivalve mollusks, the method further includes: A second training sample set is established based on multiple original images of bivalves and the label data of each open bivalfelodeon corresponding to each original image of bivalves. The initial open-mouthed bivalve molluskaloid instance segmenter is trained using the second training sample set. The weight parameters are adjusted according to the preset loss function until convergence, and the trained open-mouthed bivalve molluskaloid instance segmenter is obtained.
[0009] In one embodiment, the target bivalve set includes: first location information of at least one target bivalve; the initial open bivalve set includes: second location information of at least one initial open bivalve; and the matching process of the target bivalve set and the initial open bivalve set to obtain the shell-opening / closing behavior recognition result of the image to be recognized includes: The first position information of at least one target bivalve mollusk is matched with the second position information of at least one initially open bivalve mollusk to obtain the shell opening and closing behavior recognition result of the image to be identified.
[0010] In one embodiment, the step of matching the first location information of at least one target bivalve mollusk with the second location information of at least one initially open bivalve mollusk to obtain the shell-opening and closing behavior recognition result of the image to be identified includes: For each initially opened bivalve mollusk, the second position information is matched with the first position information corresponding to at least one target bivalve mollusk to determine whether there is position information that is the same as the second position information. If it exists, then the initial open-mouthed bivalve corresponding to the current second location information is determined to be the target open-mouthed bivalve.
[0011] In one embodiment, the method further includes: If it does not exist, then the initial open bivalve mollusks corresponding to the current second location information are determined to be false detections.
[0012] In one embodiment, the method further includes: For each target bivalve molluskine's first location information, if it is determined that there is no second location information matching the first location information, then the target bivalve molluskine corresponding to the current first location information is determined to be a target closed bivalve molluskine.
[0013] Secondly, embodiments of the present invention provide a device for recognizing the opening and closing behavior of bivalve mollusks, comprising: The image acquisition module is used to acquire the image to be recognized. The judgment module is used to input the image to be identified into a trained bivalve mollusk detector, and to detect whether at least one target bivalve mollusk exists in the image to be identified based on the bivalve mollusk detector; The target bivalve mollusks set acquisition module is used to return to the process of acquiring the image to be identified if the target bivalve mollusks do not exist, and to acquire the target bivalve mollusks set if the target bivalve mollusks do exist. The initial open-mouthed bivalve mollusks set acquisition module is used to input the image to be identified into a trained open-mouthed bivalve mollusks instance segmenter, and to detect the image to be identified according to the open-mouthed bivalve mollusks instance segmenter to acquire an initial open-mouthed bivalve mollusks set. The recognition result acquisition module is used to match the target bivalve mollusks set and the initial open bivalve mollusks set to obtain the shell opening and closing behavior recognition result of the image to be recognized.
[0014] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the bivalve shell-opening and closing behavior recognition method described in the first aspect.
[0015] Fourthly, a computer-readable storage medium is provided, wherein at least one program is stored therein, the at least one program being executed by a processor to implement the steps of the bivalve shell-opening and closing behavior recognition method as described in the first aspect.
[0016] The above technical solution has the following technical effects: Thus, the bivalve shell-opening and closing behavior recognition method provided in this embodiment acquires an image to be recognized. The image is input into a trained bivalve shell detector, which detects whether at least one target bivalve shell exists in the image. If not, the process returns to acquiring the image; if it exists, a set of target bivalve shells is acquired. The image is then input into a trained open-shell bivalve shell instance segmenter, which detects the image to be recognized and acquires an initial set of open-shell bivalve shells. Finally, the target bivalve shell set and the initial set of open-shell bivalve shells are matched to obtain the shell-opening and closing behavior recognition result of the image to be recognized. In this way, by combining the results of bivalve detection with the segmentation results of open bivalve instances, the opening and closing behavior of bivalve mollusks can be recognized. Unlike existing technologies, there is no need to install sensors on bivalve mollusks, and the traditional algorithms are not susceptible to the influence of light and have insufficient robustness. It can also avoid the phenomenon of missed detection and false detection when relying solely on deep learning instance segmentation technology to identify the opening and closing behavior of bivalve mollusks, thereby improving the accuracy of the recognition of the opening and closing behavior of bivalve mollusks. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a method for recognizing the opening and closing behavior of bivalve mollusks according to an embodiment of the present invention. Figure 2 This is a schematic diagram of a bivalve shell-opening and closing behavior recognition device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0018] To further illustrate the various embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, primarily used to illustrate the embodiments and to explain the operating principles of the embodiments in conjunction with the relevant descriptions in the specification. With reference to these drawings, those skilled in the art should be able to understand other possible implementations and the advantages of the present invention. Components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0019] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments.
[0020] Example 1: Figure 1 This is a schematic flowchart illustrating a method for recognizing the opening and closing behavior of bivalve mollusks according to an embodiment of the present invention. This embodiment specifically includes the following steps: S10: Obtain the image to be recognized.
[0021] The image to be identified refers to an image used to identify whether bivalve mollusks exhibit shell-opening and closing behavior. The image to be identified can be acquired by taking a picture using a camera electronic device, or by capturing a video stream. The camera electronic device can be, for example, a mobile phone, tablet computer, camera, or other electronic devices, but is not limited to these. This invention does not impose specific limitations, and those skilled in the art can set the method according to the actual situation.
[0022] S11: Input the image to be identified into the trained bivalve mollusk detector, and detect whether there is at least one target bivalve mollusk in the image to be identified based on the bivalve mollusk detector.
[0023] The bivalve molluskal detector is used to set a high threshold to detect whether a target bivalve molluskal is present in the image to be identified. The high threshold effectively filters out non-bivalve mollusks. The bivalve molluskal detector can be, for example, a region-based convolutional neural network (R-CNN), a fast region-based convolutional neural network (Fast R-CNN), a single-shot multibox detector (SSD), or a YOLO series object detection model, such as the YOLOv12 and YOLOv13 object detection models. However, it is not limited to these specific models, and those skilled in the art can set the appropriate detector based on the actual situation.
[0024] Specifically, after obtaining the image to be identified, the image is input into a trained bivalve mollusk detector. The bivalve mollusk detector is then used to detect whether one or more target bivalve mollusks exist in the image.
[0025] S12: If it does not exist, return to obtain the image to be identified; if it exists, obtain the target bivalve mollusks set.
[0026] Specifically, if it is determined that the target bivalves do not exist in the image to be identified, the system returns to obtain the next image to be identified for recognizing the opening and closing behavior of bivalves. Conversely, if it is determined that the target bivalves exist in the image to be identified, the system obtains the set of target bivalves.
[0027] Optionally, based on the above embodiments, in some embodiments of the present invention, one way to obtain the target bivalve mollusks set may be: Obtain the first position information corresponding to each target bivalves, save each target bivalves and its corresponding first position information, and thus obtain a set of target bivalves.
[0028] Optionally, based on the above embodiments, in some embodiments of the present invention, before performing S11, the following steps are further included: S20: Based on multiple original images of bivalves and the corresponding bivalves' label data for each original image, establish the first training sample set.
[0029] Among them, bivalve label data refers to the location information of the first label corresponding to each bivalve in each original image of bivalve mollusks.
[0030] Specifically, multiple original images of bivalves and the label data of each bivalfalfa in each original image are obtained, i.e., the first label location information. Based on the multiple original images of bivalves and the label data of each bivalfalfa corresponding to each original image, a first training sample set is established.
[0031] S21: Train the initial bivalve mollusk detector using the first training sample set, adjust the weight parameters according to the preset loss function until convergence, and obtain the trained bivalve mollusk detector.
[0032] The preset loss function can be an existing loss function such as the cross-entropy loss function or the mean squared error loss function, but it is not limited to these. This invention does not impose specific limitations, and those skilled in the art can set it according to the actual situation.
[0033] Specifically, after obtaining the first training sample set, the first training sample set, which includes multiple original images of bivalves and the corresponding bivalves label data for each original image, is input into the initial bivalves detector. The initial bivalves detector is trained using the first training sample set. During the training process, the weight parameters are adjusted according to the preset loss function until convergence, and the trained bivalves detector is obtained.
[0034] S13: Input the image to be identified into the trained open bivalve molluskaloid instance segmenter, detect the image to be identified according to the open bivalve molluskaloid instance segmenter, and obtain the initial open bivalve molluskaloid set.
[0035] The open bivalve molluskaloid instance segmenter is used to set a low threshold to detect whether an open bivalve molluskaloid exists in the image to be identified. The open bivalve molluskaloid instance segmenter can be, for example, a masked version instance segmentation model based on a region-based convolutional neural network (Mask R-CNN), an instance segmentation model of the YOLO series, such as YOLOv5, YOLOv8, etc., or an instance segmentation model based on real-time mobile object detection (RTMDet), but it is not limited to these. This invention does not specifically limit the scope, and those skilled in the art can set it according to the actual situation.
[0036] Specifically, after obtaining the image to be identified, the image is input into the trained open bivalve mollusks instance segmenter. The open bivalve mollusks instance segmenter is used to perform instance segmentation and detection on the image to be identified, and an initial set of open bivalve mollusks is obtained.
[0037] Optionally, based on the above embodiments, in some embodiments of the present invention, one way to obtain the initial set of open bivalve mollusks may be: Obtain the second position information corresponding to each initially open bivalve mollusk, and save each initially open bivalve mollusk and its corresponding second position information to obtain a set of initially open bivalve mollusk.
[0038] Optionally, based on the above embodiments, in some embodiments of the present invention, before performing S13, the following steps are further included: S30: Based on multiple original images of bivalves and the label data of each open bivalfelodeon corresponding to each original image, establish a second training sample set.
[0039] Among them, the open bivalve label data refers to the second label location information corresponding to each open bivalve in each original image of bivalve.
[0040] Specifically, multiple original images of bivalves are acquired, along with the label data of each open bivalfern in each original image, i.e., the second label location information. Based on the multiple original images of bivalves and the label data of each open bivalfern corresponding to each original image, a second training sample set is established.
[0041] S31: Train the initial open-mouthed bivalve molluskaloid instance segmenter using the second training sample set, adjust the weight parameters according to the preset loss function until convergence, and obtain the trained open-mouthed bivalve molluskaloid instance segmenter.
[0042] The preset loss function can be an existing loss function such as the cross-entropy loss function or the mean squared error loss function, but it is not limited to these. This invention does not impose specific limitations, and those skilled in the art can set it according to the actual situation.
[0043] Specifically, after obtaining the second training sample set, the second training sample set, which includes multiple original images of bivalve mollusks and the label data of each open bivalve mollusk in each original bivalve mollusk image, is input into the initial open bivalve mollusk instance segmenter. The initial open bivalve mollusk instance segmenter is trained using the second training sample set. During the training process, the weight parameters are adjusted according to the preset loss function until convergence, and the trained open bivalve mollusk instance segmenter is obtained.
[0044] S14: Match the target bivalve set with the initial open bivalve set to obtain the shell opening and closing behavior recognition result of the image to be recognized.
[0045] Among them, the shell-opening and closing behavior recognition result refers to the result of the shell-opening and closing behavior of bivalve mollusks in the image to be recognized. The shell-opening and closing behavior recognition result can be the target open-shell bivalve mollusks, the target closed-shell bivalve mollusks, and false detections in the image to be recognized.
[0046] Specifically, after obtaining the target bivalve set and the initial open bivalve set, the target bivalve set and the initial open bivalve set are matched to obtain the shell opening and closing behavior recognition result of the image to be recognized.
[0047] Optionally, based on the above embodiments, the target bivalve set includes: first position information of at least one target bivalve, and the initial open bivalve set includes: second position information of at least one initial open bivalve. Therefore, in some embodiments of the present invention, one implementation of S14 may be: S141: Match the first position information of at least one target bivalve molluskine with the second position information of at least one initially open bivalve molluskine to obtain the shell opening and closing behavior recognition result of the image to be recognized.
[0048] Specifically, the first position information of each target bivalves in the target bivalves set is matched with the second position information of each initial open bivalves in the initial open bivalves set to obtain the shell opening and closing behavior recognition result of the image to be recognized.
[0049] Optionally, based on the above embodiments, in some embodiments of the present invention, one implementation of S141 may be: S1411: For the second position information of each initially open bivalve mollusk, match the second position information with the first position information corresponding to at least one target bivalve mollusk to determine whether there is position information that is the same as the second position information.
[0050] Specifically, for the second position information of each initial open-mouthed bivalve mollusks included in the initial open-mouthed bivalve mollusks set, the second position information is matched sequentially with the first position information corresponding to the multiple target bivalve mollusks, and it is determined whether there is any position information that is the same as the second position information among the first position information corresponding to the multiple target bivalve mollusks.
[0051] S1412: If it exists, then determine the initial open bivalve mollusc corresponding to the current second position information as the target open bivalve mollusc.
[0052] Specifically, when it is determined that there is a position information that is the same as the second position information in the first position information corresponding to multiple target bivalves, then the initial open bivalves corresponding to the current second position information can be determined as the target open bivalves.
[0053] Optionally, based on the above embodiments, in some embodiments of the present invention, another implementation of S141 may be: S1413: If it does not exist, then the initial open bivalve mollusks corresponding to the current second position information are determined to be false detections.
[0054] Specifically, when it is determined that there is no position information that is the same as the second position information in the first position information corresponding to multiple target bivalve mollusks, it can be determined that the initial open bivalve mollusk corresponding to the current second position information is a false detection, that is, the initial open bivalve mollusk corresponding to the current second position information is neither the target open bivalve mollusk nor the target closed bivalve mollusk.
[0055] Optionally, based on the above embodiments, in some embodiments of the present invention, another implementation of S141 may be: S1414: For the first position information of each target bivalve mollusk, if it is determined that there is no second position information that matches the first position information, then the target bivalve mollusk corresponding to the current first position information is determined to be the target closed bivalve mollusk.
[0056] Specifically, for the first position information of each target bivalve mollusk, if there is no matching position information in all the second position information, it indicates that the target bivalve mollusk corresponding to the current first position information is the target closed bivalve mollusk.
[0057] Thus, the bivalve shell-opening and closing behavior recognition method provided in this embodiment acquires an image to be recognized. The image to be recognized is input into a trained bivalve shell detector, which detects whether at least one target bivalve shell exists in the image. If not, the process returns to acquiring the image to be recognized; if it exists, a set of target bivalve shells is acquired. The image to be recognized is then input into a trained open-shell bivalve shell instance segmenter, which detects the image to be recognized and acquires an initial set of open-shell bivalve shells. The target bivalve shell set and the initial set of open-shell bivalve shells are matched to obtain the shell-opening and closing behavior recognition result of the image to be recognized. In this way, by combining the results of bivalve detection with the segmentation results of open bivalve instances, the opening and closing behavior of bivalve mollusks can be recognized. Unlike existing technologies, there is no need to install sensors on bivalve mollusks, and the traditional algorithms are not susceptible to the influence of light and have insufficient robustness. It can also avoid the phenomenon of missed detection and false detection when relying solely on deep learning instance segmentation technology to identify the opening and closing behavior of bivalve mollusks, thereby improving the accuracy of the recognition of the opening and closing behavior of bivalve mollusks.
[0058] Example 2: Figure 2 This is a schematic diagram of a bivalve shell-opening and closing behavior recognition device provided in an embodiment of the present invention, as shown below. Figure 2 As shown, it includes: a module 10 for acquiring the image to be recognized, a judgment module 11, a module 12 for acquiring the target bivalve mollusks, a module 13 for acquiring the initial open bivalve mollusks, and a module 14 for acquiring the recognition result.
[0059] The image acquisition module 10 is used to acquire the image to be recognized.
[0060] The judgment module 11 is used to input the image to be identified into the trained bivalve mollusk detector and detect whether there is at least one target bivalve mollusk in the image to be identified based on the bivalve mollusk detector.
[0061] The target bivalve mollusks set acquisition module 12 is used to return to the process of acquiring the image to be identified if the target bivalve mollusks do not exist, and to acquire the target bivalve mollusks set if the target bivalve mollusks do exist.
[0062] The initial open bivalve molluskaloid set acquisition module 13 is used to input the image to be identified into the trained open bivalve molluskaloid instance segmenter, and to obtain the initial open bivalve molluskaloid set by detecting the image to be identified according to the open bivalve molluskaloid instance segmenter.
[0063] The recognition result acquisition module 14 is used to match the target bivalve mollusks set and the initial open bivalve mollusks set to obtain the recognition result of the opening and closing behavior of the image to be recognized.
[0064] Thus, in this embodiment, the first judgment module inputs the image to be identified into a trained bivalve mollusk detector, which detects whether at least one target bivalve mollusk exists in the image. If the target bivalve mollusk set acquisition module does not find the target bivalve mollusk, it returns to acquiring the image to be identified; if it does find the target bivalve mollusk, it acquires the target bivalve mollusk set. The initial open bivalve mollusk set acquisition module inputs the image to be identified into a trained open bivalve mollusk instance segmenter, which detects the target bivalve mollusk instance segmenter and acquires the initial open bivalve mollusk set. The recognition result acquisition module matches the target bivalve mollusk set and the initial open bivalve mollusk set to obtain the shell-opening / closing behavior recognition result of the image to be identified. In this way, by combining the results of bivalve detection with the segmentation results of open bivalve instances, the opening and closing behavior of bivalve mollusks can be recognized. Unlike existing technologies, there is no need to install sensors on bivalve mollusks, and the traditional algorithms are not susceptible to the influence of light and have insufficient robustness. It can also avoid the phenomenon of missed detection and false detection when relying solely on deep learning instance segmentation technology to identify the opening and closing behavior of bivalve mollusks, thereby improving the accuracy of the recognition of the opening and closing behavior of bivalve mollusks.
[0065] Example 3: The present invention also provides an electronic device, such as... Figure 3 As shown, the electronic device includes a processor 1101, a memory 1102, a bus 1103, and a computer program stored in the memory 1102 and executable on the processor 1101. The processor 1101 includes one or more processing cores. The memory 1102 is connected to the processor 1101 via the bus 1103. The memory 1102 is used to store program instructions. When the processor executes the computer program, it implements the steps in the above-described method embodiment of Embodiment 1 of the present invention.
[0066] Furthermore, as an executable solution, the electronic device can be a computer unit, which can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. The computer unit may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above-described structure of the computer unit is merely an example and does not constitute a limitation on the computer unit. It may include more or fewer components, or combine certain components, or use different components. For example, the computer unit may also include input / output devices, network access devices, buses, etc., and this embodiment of the invention does not limit this.
[0067] Furthermore, as an executable solution, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit, connecting various parts of the entire computer unit via various interfaces and lines.
[0068] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the computer unit by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital card (SD card), flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0069] Example 4: The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.
[0070] If the modules / units integrated in the computer unit are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction.
[0071] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A method for recognizing the opening and closing behavior of bivalve mollusks, characterized in that, The method includes: Acquire the image to be recognized; The image to be identified is input into a trained bivalve mollusk detector, and the bivalve mollusk detector detects whether at least one target bivalve mollusk exists in the image to be identified. If it does not exist, return to obtain the image to be identified; if it exists, obtain the target bivalve mollusks set. The image to be identified is input into a trained open bivalve molluskaloid instance segmenter. The image to be identified is detected by the open bivalve molluskaloid instance segmenter to obtain an initial set of open bivalve mollusks. The target bivalve mollusks set and the initial open bivalve mollusks set are matched to obtain the shell opening and closing behavior recognition result of the image to be identified.
2. The method according to claim 1, characterized in that, Before inputting the image to be identified into the trained bivalve mollusk detector, and before detecting whether at least one target bivalve mollusk exists in the image to be identified based on the bivalve mollusk detector, the method further includes: A first training sample set is established based on multiple original images of bivalves and the corresponding bivalves label data for each original image. The initial bivalve mollusk detector is trained using the first training sample set. The weight parameters are adjusted according to the preset loss function until convergence, and the trained bivalve mollusk detector is obtained.
3. The method according to claim 2, characterized in that, Before inputting the image to be identified into the trained open bivalve mollusks instance segmenter, and detecting the image to be identified according to the open bivalve mollusks instance segmenter to obtain the initial open bivalve mollusks set, the method further includes: A second training sample set is established based on multiple original images of bivalves and the label data of each open bivalfelodeon corresponding to each original image of bivalves. The initial open-mouthed bivalve molluskaloid instance segmenter is trained using the second training sample set. The weight parameters are adjusted according to the preset loss function until convergence, and the trained open-mouthed bivalve molluskaloid instance segmenter is obtained.
4. The method according to claim 3, characterized in that, The target bivalve set includes: first location information of at least one target bivalve; the initial open bivalve set includes: second location information of at least one initial open bivalve; the matching process of the target bivalve set and the initial open bivalve set to obtain the shell opening and closing behavior recognition result of the image to be recognized includes: The first position information of at least one target bivalve mollusk is matched with the second position information of at least one initially open bivalve mollusk to obtain the shell opening and closing behavior recognition result of the image to be identified.
5. The method according to claim 4, characterized in that, The step of matching the first position information of at least one target bivalve mollusk with the second position information of at least one initially open bivalve mollusk to obtain the shell-opening and closing behavior recognition result of the image to be identified includes: For each initially opened bivalve mollusk, the second position information is matched with the first position information corresponding to at least one target bivalve mollusk to determine whether there is position information that is the same as the second position information. If it exists, then the initial open-mouthed bivalve corresponding to the current second location information is determined to be the target open-mouthed bivalve.
6. The method according to claim 5, characterized in that, The method further includes: If it does not exist, then the initial open bivalve mollusks corresponding to the current second location information are determined to be false detections.
7. The method according to claim 6, characterized in that, The method further includes: For each target bivalve molluskine's first location information, if it is determined that there is no second location information matching the first location information, then the target bivalve molluskine corresponding to the current first location information is determined to be a target closed bivalve molluskine.
8. A device for recognizing the opening and closing behavior of bivalve mollusks, characterized in that, include: The image acquisition module is used to acquire the image to be recognized. The judgment module is used to input the image to be identified into a trained bivalve mollusk detector, and to detect whether at least one target bivalve mollusk exists in the image to be identified based on the bivalve mollusk detector; The target bivalve mollusks set acquisition module is used to return to the process of acquiring the image to be identified if the target bivalve mollusks do not exist, and to acquire the target bivalve mollusks set if the target bivalve mollusks do exist. The initial open-mouthed bivalve mollusks set acquisition module is used to input the image to be identified into a trained open-mouthed bivalve mollusks instance segmenter, and to detect the image to be identified according to the open-mouthed bivalve mollusks instance segmenter to acquire an initial open-mouthed bivalve mollusks set. The recognition result acquisition module is used to match the target bivalve mollusks set and the initial open bivalve mollusks set to obtain the shell opening and closing behavior recognition result of the image to be recognized.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the bivalve shell-opening and closing behavior recognition method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one program, which is executed by a processor to implement the steps of the bivalve shell-opening and closing behavior recognition method as described in any one of claims 1 to 7.