A method for detecting foot exploration behavior of shellfish and predicting attachment ability

By using a unified shell-guided hierarchical query detection Transformer model, the automated and high-precision identification of the foot exploration behavior of thick-shelled mussels and the quantitative prediction of early attachment ability are realized. This solves the problems of automated identification and early prediction in existing technologies and supports the efficient screening of superior varieties and antifouling materials.

CN123178672APending Publication Date: 2026-11-27SHANGHAI OCEAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611683601.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-29
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies cannot automate, accurately identify, or quantitatively predict the foot exploration behavior of thick-shelled mussels, making it difficult to meet the needs of breeding superior varieties and rapid screening of antifouling materials.

Method used

A unified shell-guided hierarchical query detection Transformer model is adopted, which combines a multi-scale attention encoder, a shell query decoder, a foot topology query decoder, and a cross-frame trajectory query decoder branch. The shell, foot topology, and toe contact are identified through video image analysis to predict adhesion capability.

Benefits of technology

It enables automated, high-precision identification of foot exploration behavior in thick-shelled mussels and quantitative prediction of early attachment ability, reducing false detections and mismatches. It provides verifiable frame-by-frame detection results and individual-level summary phenotypes, supporting efficient screening of superior varieties and antifouling materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178672A_ABST
    Figure CN123178672A_ABST
Patent Text Reader

Abstract

The application discloses a kind of shellfish foot exploration behavior detection and attachment capacity prediction method, it is related to aquatic animal behavior phenotype detection, collection prediction machine vision and intelligent breeding technical field, including S1 standardization behavior observation device and video acquisition;S2 unified shell guiding layered query detection Transformer model;S3 shell local coordinate system and foot tip trajectory normalization;S4 shell local trajectory query propagation, occlusion memory and foot tip reappearance;S5 state query time series Transformer and continuous behavior identification and S6 foot exploration behavior event and phenotype calculation.The algorithm innovation of the application lies in the four-level query dependence established for thick shell mussel behavior: shell query generates local coordinates and parent query identification;Foot topology query is decoded in the ventral region of parent shell according to the order from foot base to foot tip;Foot tip query transmits across frames with query identity and dimensionless local state, and is recovered through occlusion memory and reappearance query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of aquatic animal behavioral phenotypic detection, ensemble prediction machine vision, and intelligent breeding technology, specifically a method for detecting the foot exploration behavior and predicting the attachment ability of thick-shelled mussels. Background Technology

[0002] Currently, the thick-shelled mussel is an important aquaculture shellfish in my country, and also one of the main biofouling organisms on the surfaces of marine engineering facilities. The attachment ability of the thick-shelled mussel directly determines its survival rate and yield per unit area, and also directly affects the efficiency of marine antifouling technology effectiveness evaluation. The attachment process of the thick-shelled mussel depends on the directional exploration behavior of its foot and the secretion of byssal threads. The activity level, spatial range, and movement pattern of foot exploration are strongly correlated with the final attachment strength and attachment success rate. Currently, the assessment of the attachment ability of thick-shelled mussels mainly relies on manual observation and subsequent attachment strength testing. Manual observation requires continuous monitoring by experimental personnel to record the timing and quantity of byssal secretion, which is inefficient, labor-intensive, and subject to large subjective errors from different observers. Subsequent attachment strength testing requires waiting for the byssal threads to fully solidify before conducting a pull-out test, with a testing cycle usually exceeding 24 hours, making it impossible to predict attachment ability in the early stages. Although some existing technologies include image detection methods for the survival status and population density of some shellfish, they have not yet achieved automated and high-precision identification of the fine exploration behavior of thick-shelled mussels' feet, nor do they have a quantitative prediction technology for attachment ability based on early behavioral characteristics. This makes it difficult to meet the efficient testing needs for breeding superior varieties and rapid screening of antifouling materials. Summary of the Invention

[0003] The purpose of this invention is to provide a method for detecting the exploratory behavior of the foot of thick-shelled mussels and predicting their attachment ability, so as to solve the problems mentioned in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for detecting the exploratory behavior of the foot of a thick-shelled mussel and predicting its attachment ability, comprising the following steps: Step 1: Place the thick-shelled mussel to be tested in an observation area with an attachment substrate, scale calibration information and stable lighting, and acquire continuous video images including the shell, foot and attachment substrate; Step 2: Input the frame video images into a unified shell-guided hierarchical query detection Transformer model. The Transformer model is a complete Transformer detection architecture trained end-to-end. It integrates a multi-scale attention encoder, a shell query decoder, a conditional query generator, a foot topology query decoder, a toe-contact query decoder, and a cross-frame trajectory query decoding branch. The multi-scale attention encoder generates visual feature tokens. First, the shell query group outputs the shell outline, shell reference points, and shell local coordinate axes and ventral candidate regions. Then, the shell query is used as the parent query to conditionally generate the foot topology query group, toe query group, and contact query group, outputting the foot mask, foot skeleton, foot base, toe, and toe-base contact candidate points. Step 3: Based on the shell reference point, the shell's major axis and ventral direction, and the shell's major and minor axis scale matrix, convert the toe image coordinates into dimensionless shell local coordinates; Step 4: The confirmed toe query embedding, toe local state encoding and current frame parent shell query embedding of the previous frame are fused into the current frame trajectory query. The trajectory query and the current frame newborn detection query are jointly entered into the cross-frame trajectory query decoding branch of the unified model. Continuous toe trajectories are obtained through query identity propagation, occlusion memory and toe reproduction. Step 5: Input the continuous trajectory query, foot morphology token and contact token into the state query timing Transformer, and output the resting, extended, exploring, base contact, continuous contact, retraction and foot silk formation completion states under the constraints of the allowed state transition matrix; Step 6: Calculate the foot exploration behavior phenotype and prospective exploration index EI_pre, and calibrate the independent prediction head in combination with the byssal formation trait or attachment trait, and output the attachment probability and attachment tendency level, predicted byssal number or predicted first byssal formation time.

[0005] Preferably, the observation area in step one includes at least one of a transparent observation tank, an individual restraint structure, a replaceable attachment substrate and a proportional calibration object and a uniform lighting device, and the image acquisition device is located in at least one of the following directions: bottom, side, lower or upper of the observation area.

[0006] Preferably, the unified shell-guided hierarchical query detection Transformer model in step two is a complete Transformer detection architecture trained end-to-end. The unified model integrates a multi-scale attention encoder, a shell query decoder, a conditional query generator, a foot topology query decoder, a toe-contact query decoder, and a cross-frame trajectory query decoding branch. Each internal module shares visual feature tokens, parent shell identifiers, and query embeddings, and is uniformly optimized by the same joint loss function. The shell query decoder assigns a unique identifier to each shell and outputs a shell contour mask, shell reference points, shell local coordinate axes, major and minor axis scales, and ventral candidate regions. For the j-th local template point, the conditional query generator maps it to an image reference point according to the following formula and generates a component query that inherits the parent shell identifier: in, j h is a dimensionless local template point of the shell. t shell For parent shell query embedding, ρ t,j The reference point for cross-attention is used; the corresponding query is sampled only in the candidate region on the ventral side of the parent shell, and the attention mask outside the region is negative infinity, so that each group of foot queries corresponds only to its parent shell.

[0007] Preferably, the foot topology query decoder sets the queries according to the topological order of foot base, proximal midline, distal midline, and toe, and jointly outputs the foot instance mask, edge, skeleton or centerline, and topological key points. The toe-contact query decoder outputs toe coordinates, contact candidate points, and contact probabilities based on the skeleton end, base distance transformation map, and parent shell identifier. During the training phase, one-to-one matching of shell queries is first completed, and then component query matching is solved within the same parent shell. The matching cost between query i and manually labeled target j satisfies: The one-to-one matching is solved by bipartite graph allocation with the minimum total cost. Candidate pairs with inconsistent parent shell identifiers are not included in the feasible candidate set, which structurally prohibits mismatches of toe-crossing shells between adjacent shells or mirror shells. The joint training loss of the hierarchical query detection Transformer includes at least six of the following: set classification loss L_set, shell segmentation loss L_shell, foot segmentation loss L_foot, foot edge loss L_edge, foot skeleton loss L_skel, keypoint loss L_kp, contact loss L_contact, parent shell affiliation loss L_own, cross-frame trajectory query consistency loss L_trk, and state query loss L_state. The weights of each loss term are learned from the training set or determined from the validation set.

[0008] Preferably, in step three, the coordinates of the toe image in frame t are pt, the reference point of the shell is ot, the positive unit major axis e1,t is determined by the front and rear reference points of the shell, and the positive unit minor axis e2,t is determined by the ventral direction of the shell, thus forming... Shell Dimension Matrix Where lt and wt are the pixel scales of the shell's major and minor axes, respectively, and the dimensionless local coordinates of the toe are determined according to... get.

[0009] Preferably, step four involves saving the toe query embedding z_t^tip, the parent shell query identifier, and the local state vector for each confirmed toe trajectory: The current frame trajectory query is obtained by weighted fusion of the previous frame toe query embedding, the previous frame local state encoding, and the current frame parent shell query embedding. The image coordinates obtained by mapping the local coordinate prediction values ​​are used as deformable cross-attention reference points. The cross-frame trajectory query consistency loss during the training phase includes at least parent shell consistency, local coordinate displacement, foot skeleton end connectivity, contact state, and query embedding consistency.

[0010] Preferably, when the toe is not directly decoded in the current frame, the corresponding trajectory query is transferred to the occlusion memory and retained for 1 to 20 frames. The toe reference point is predicted based on the local velocity and the shell coordinates of the current frame. For occlusion memory query i and subsequent toe candidate query j, the toe reproduction score is calculated according to the following formula: Candidate queries are restored to their original trajectory identities only when the parent shell identifier is the same, the dimensionless local distance does not exceed the threshold τq, and Sre(i,j) is not lower than the threshold τre. Otherwise, a new trajectory is established or the connection is rejected. α, β, γ and δ are learned by the training set or determined by the validation set.

[0011] Preferably, in step S5, the trajectory query embedding of length T and the foot morphology, motion, and contact features are encoded into a temporal token, and the temporal encoder outputs frame-by-frame latent variables; seven learnable state queries are set and frame-by-frame state probabilities Pt,k are obtained, and the event boundary header outputs the start probability and end probability; during inference, the optimal state path is solved by combining the frame-by-frame state probabilities, state transition scores, and event boundary consistency scores according to the following formula: Where A is the allowed state transition matrix, Bt is the boundary consistency score between the event start or end probability in frame t and the candidate transition, η and ξ are the weights determined by the validation set, and the training loss includes at least frame-by-frame state loss, event boundary loss and illegal transition penalty. The state transition matrix A must satisfy at least the following conditions: all seven states are allowed to maintain their current state: ① Resting can be converted to foot extension; ② Foot extension can be converted to exploration or retraction; ③ Exploration can be converted to base contact or retraction; ④ Base contact can be converted to continuous contact, exploration, or retraction; ⑤ Continuous contact can be converted to byssal formation completion, exploration, or retraction; ⑥ Byssal formation completion can be converted to retraction or resting; ⑦ Retraction can be converted to resting, or directly converted to foot extension at the start of the next round of foot extension at the adjacent sampling time. For any states a and b, In implementations requiring soft-constraint training, negative infinity can be replaced with a preset negative penalty -ρ; illegal transitions during the inference phase do not enter the optimal path candidate set.

[0012] Preferably, the output is organized according to a hierarchical convergence relationship into frame-by-frame detection results, event-level behavior records, and individual-level summary phenotypes. The frame-by-frame detection results include shell local coordinates, foot mask, toe position, toe-base contact candidate points, behavior state probability, and trajectory quality control information. The event-level behavior records are formed by state decoding and event boundary localization of continuous frame-by-frame detection results of the same trajectory, including the start and end times and durations of events such as foot extension, exploration, base contact, continuous contact, completion of byelet formation, and retraction. The individual-level summary phenotype is formed by summarizing the event-level behavior records and frame-by-frame statistics of the same individual, including at least three of the following: initial foot extension latency, number of effective exploration events, maximum foot extension length, cumulative toe exploration distance, exploration coverage area, number of base contacts, and cumulative contact duration.

[0013] Preferably, the comprehensive exploration index includes a forward-looking exploration index EI_pre and / or a complete behavior evaluation index EI_full; the forward-looking exploration index EI_pre is calculated according to... The calculation is performed, where Z_i is the standardized value of the foot exploration behavior phenotype obtained within a preset early observation time window. The foot exploration behavior phenotype does not include the number of byssal threads formed, the number of byssal discs, the attachment result, or the CR obtained after the early observation time window ends. w_i is the weight of the corresponding phenotype. The complete behavior evaluation index EI_full further includes the exploration-byssal thread formation conversion rate CR, which is calculated according to... The calculation is performed, where N_byssus is the number of exploration events that form new byssus within the preset associated time window, and N_effective is the total number of effective exploration events; The prediction model calibrated by byssal formation traits or attachment traits takes the core foot exploration behavior phenotype and / or prospective exploration index EI_pre obtained within a preset early observation time window as input, and takes the stable attachment success state Y_attach at the end evaluation 24 hours after the start of observation as the main prediction target, and outputs the probability that the individual meets the stable attachment judgment criteria at the end evaluation 24 hours later; the probability is a single prediction value for the end state at 24 hours later, and does not represent a time-varying probability that changes continuously from the start of observation to 24 hours later; and can also select attachment tendency level, number of byssal threads formed within a preset time or time of first byssal thread formation as independent prediction targets according to the application purpose, and output the corresponding level, quantity or time, wherein each prediction task is trained and validated separately, and it is not required that all prediction results be output simultaneously in the same implementation method.

[0014] Compared with the prior art, the beneficial effects of the present invention are: This invention places shell attribution, foot topology, toe contact, and cross-frame identity continuity into the same set of prediction frameworks. The parent shell query limits the attention range of the foot query, the topology query maintains the connectivity of the foot end, the trajectory query propagates in the local coordinates of the shell and retains occlusion memory, and the state query allows the transition matrix to constrain the behavior sequence. This can reduce false detections, mismatches, and state jumps caused by shell mirroring, adjacent individuals, base texture, and short-term foot occlusion, and obtain verifiable frame-by-frame detection results, event-level behavior records, and individual-level summary phenotypes. The innovation of this invention lies in the establishment of a four-level query dependency for the behavior of thick-shelled mussels. The shell query generates local coordinates and a parent query identifier. The foot topology query is decoded in the ventral region of the parent shell in the order from the foot base to the toe. The toe query is propagated across frames with query identity and dimensionless local state, and recovered through occlusion memory and query re-enactment. The state query decodes continuous behavior under the constraints of the biologically permissible transition matrix. The above query dependencies and structured matching together constitute the technical features of this invention that distinguish it from the direct application of general detection Transformer. This invention forms a verifiable data aggregation chain: frame-by-frame detection results include local shell coordinates, continuous foot contours, toe area, and contact candidate points; continuous frame-by-frame detection results are processed through state decoding and event boundary localization to form event-level behavioral records; the event-level behavioral records and frame-by-frame statistics of the same individual are then summarized into an individual-level behavioral phenotype, including latency, frequency, length, distance, area, and contact duration. These three represent the data granularity and aggregation order from frame-by-frame identification results to individual phenotypes, rather than three independent or parallel prediction tasks. Attachment prediction is an independent downstream task built upon early individual-level phenotypes. Its main output is the single probability that the individual will reach the stable attachment criterion at the endpoint evaluation 24 hours after the start of observation; attachment level, byssal silk number, and first byssal silk formation time can be set as other independent tasks according to the application purpose. Attached Figure Description

[0015] Figure 1 This is the overall flowchart of the present invention from standardized data collection, multi-scale encoding, shell condition hierarchical query, trajectory query propagation, state query decoding to hierarchical phenotype and attachment prediction; query constraints are continuously propagated within the model, the parent shell identifier limits the foot query affiliation, the shell local state limits trajectory propagation, and the allowed state transition matrix limits the behavior sequence.

[0016] Figure 2 This is a schematic diagram of the behavioral observation device and image acquisition direction; where: 1-transparent observation cavity, 2-replaceable attachment substrate, 3-thick-shelled mussel shell, 4-foot / toe movement area, 5-ruler calibration object, 6-bottom or obliquely lower camera device, 7-side camera device.

[0017] Figure 3 This diagram illustrates the hierarchical relationship between the shell query as the parent query and the foot topology query, toe query, and contact query. The parent-child query constraints are as follows: the child query only accesses the candidate region on the ventral side of the corresponding shell and inherits the unique parent shell identifier; the local reference point is updated with the shell coordinate transformation, and the query layer suppresses mismatches of mirrored shells, adjacent individuals, and base textures.

[0018] Figure 4 This is a schematic diagram showing the connection of the multi-scale attention encoder, shell query decoder, conditional query generator, foot topology query decoder, and toe-contact query decoder.

[0019] Figure 5 This diagram illustrates the unified transformation between image coordinates, pixel-scale hull local coordinates, and dimensionless hull local coordinates; where R... t =[e1, t e2, t Determine the shell attitude, D t =diag(l t ,w tEliminate shell size differences; trajectory, velocity, distance, and coverage area are all within q t Calculated in coordinate system, r t = R t (p t o t ) q t = D t - ¹r t = D t - ¹R t (p t o t ).

[0020] Figure 6 The trajectory query is composed of toe-feet query embedding, local state, and current parent shell query. The conditional branch diagram shows that when the current frame is successfully detected, the trajectory is directly updated; when not detected, the process switches to occlusion memory and the trajectory identity is restored by toe-feet reproduction query. Where Q... t trk = W_z z t-1 tip + W_x φ(x t-1 ) + W_h h t shell Predict image location: t = o t + R t D t q t Cross-frame query consistency supervision: parent shell affiliation, dimensionless local displacement, foot end topology, and contact state; trajectory identity is directly maintained by query propagation and occlusion memory, without relying on target box matching after detection.

[0021] Figure 7 This diagram illustrates the trajectory query sequence entering the state query temporal Transformer and outputting seven types of behavioral states and hierarchical phenotypes under the constraint of the allowed state transition matrix. Among them, state pairs not included in the allowed transition matrix do not enter the hard-constrained optimal path candidate set, and all seven states are allowed to self-loop to express behavioral persistence. Exploration, basal contact, or persistent contact can be retracted. The prediction model only uses the behavioral phenotypes that can be obtained within the preset early observation window. CR and subsequent byssal formation results are only used for the evaluation of the complete process.

[0022] Figure 8 This is a schematic diagram of the structured recognition output for shell query, foot topology query, toe query, and contact query. Detailed Implementation

[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0024] Embodiments of the present invention Please see Figure 1-8 This invention provides a technical solution: a method for detecting the exploratory behavior of the foot of a thick-shelled mussel and predicting its attachment ability, comprising the following steps: S1 Standardized Behavioral Observation Device and Video Acquisition: Select thick-shelled mussels with intact bodies and normal condition, remove the attached substances from the shell surface, and place them in a transparent observation tank. The observation tank is equipped with a replaceable attachment substrate, a scale calibration plate, and a uniform lighting device. The ventral side of the thick-shelled mussel faces the camera equipment so that the area where the foot protrudes is within the effective field of view. Bottom view, side view, oblique view, or two or more views can be used for simultaneous acquisition.

[0025] The video resolution is preferably no less than 1280×720, the frame rate is preferably 15 to 120 frames / second, the single observation time is 10 minutes to 2 hours, and the water temperature, salinity, light, flow rate and processing conditions are recorded during the collection process.

[0026] S2 Unified Shell-Guided Layered Query Detection Transformer Model: The video is framed and labeled by combining preset intervals, behavioral events and difficult scenes. In addition to shell boundaries, foot instance masks, foot base, foot midline, toe, contact candidate points and attachment base, difficult sample labels are set for shell mirror, adjacent individual overlap, bubbles, grids, shell surface attachments, short-term foot occlusion and out-of-focus frames. The dataset is first divided according to thick-shelled mussel individuals. All videos, frames, continuous segments, query trajectories and attachment judgment labels of the same individual belong to only one dataset.

[0027] This embodiment designs and adopts a unified shell-guided hierarchical query detection Transformer model. The unified model constitutes a complete Transformer detection architecture that is jointly trained end-to-end. It integrates a multi-scale attention encoder, a shell query decoder, a conditional query generator, a foot topology query decoder, a toe-contact query decoder, and a cross-frame trajectory query decoding branch. Each internal module shares multi-scale visual feature tokens, parent shell identifiers, local coordinate parameters, and query embeddings, and accepts unified optimization of the same joint loss function. The t-th frame image I_t is processed by the multi-scale feature extraction network of the unified model to generate L-level features F_t^(1) to F_t^(L). After adding scale position encoding and attachment base position encoding to each level of features, they are input into the multi-scale deformable attention encoder. Each query only reads features at a small number of sampling positions near its reference point to preserve the high-resolution response of small targets on the toe and slender feet.

[0028] The shell query decoder sets up N_shell shell queries. Each successfully matched shell query outputs the shell category, shell mask M_shell, shell reference point o_t, positive unit major axis e_1,t, ventral positive unit minor axis e_2,t, shell major and minor axis scales l_t and w_t, and ventral candidate region B_t. The positive direction of the major axis points from the rear reference point of the shell to the front reference point, and the positive direction of the minor axis points to the ventral region, thus avoiding a 180-degree flip of the main contour direction between adjacent frames.

[0029] Let the dimensionless local template point queried for the j-th component be . j, where the foot base, proximal midline of the foot, distal midline of the foot, toe, and contact query each have independent template points. The condition query generator first uses the shell reference point o_t, rotation matrix R_t, and scale matrix D_t to... j is mapped to image reference point ρ_t,j. Then, the initial component query, parent shell query embedding, reference point position encoding, and parent shell identifier embedding are added together to generate conditional component query. The corresponding cross attention takes a negative infinity mask outside the candidate region B_t on the ventral side of the parent shell.

[0030] The set matching first completes a one-to-one matching between the shell query and the real shell based on the shell category, mask, and orientation reference point. Then, within each matched parent shell, it solves the bipartite graph allocation of the component query and the manually labeled target of the component. The matching cost includes category, foot mask, key point, topological order, skeleton end connectivity and contact consistency. When the parent shell identifier is inconsistent, the matching cost is set to positive infinity, and the candidate pair is prohibited from entering the feasible set.

[0031] The executable training parameters in this embodiment are as follows: after reading the video orientation metadata, rotate the vertical video to a unified viewing direction; maintain the original aspect ratio, scale and fill the image to 1280×768 pixels, while retaining the pixel-to-millimeter calibration parameters; set difficult sample labels for shell mirroring, adjacent individual overlap, bubbles, grids, shell surface attachments, foot occlusion, defocus, and different lighting conditions, and sample in the training batch according to the labels.

[0032] The backbone network uses ResNet-50 pre-trained on ImageNet, outputting C3 to C5 and adding a first-level downsampled feature P6, for a total of 4 levels of features. Each level is projected to 256 dimensions. The multi-scale deformable attention encoder has 6 layers, 8 attention heads, and a feedforward network dimension of 1024. Each head sets 4 sampling points on each level of features with a dropout rate of 0.1. The shell query decoder and conditional part query decoder each have 3 layers. Each frame has 32 shell queries. Each matching shell conditionally generates 4 foot topology queries, 1 toe query, and 1 contact query, and retains no more than 32 cross-frame trajectory queries. The state query temporal Transformer has 4 layers, 8 attention heads, 256-dimensional embedding, and a 1024-dimensional feedforward network, and sets 7 state queries. Training was performed using the AdamW optimizer, with an initial learning rate of 2×10 for the Transformer encoder, decoder, and task head. -4 The initial learning rate of the backbone network is 2×10. -5 The weight decays to 1×10 -4 The batch size of a single card is 4, the gradient is accumulated 4 times to form an equivalent batch size of 16, the gradient norm clipping threshold is 0.1, the training limit is 200 rounds, the first 5 rounds are linear warm-up, then cosine learning rate decay is used, and mixed precision training is enabled. The joint loss weights are fixed at λ_set=1, λ_shell=2, λ_foot=3, λ_edge=1, λ_skel=2, λ_kp=5, λ_contact=2, λ_own=2, λ_trk=2, and λ_state=3; the internal weights of the state loss are λ_b=2 and λ_tr=1. Validation set comprehensive index. Training stops if there is no improvement after 20 consecutive rounds, and the weights of the highest round in J_val are restored. The model structure, loss weights, threshold, and stopping rounds are determined only by the training and validation sets; the test set is not involved in the selection. The finalized model is registered as DETR-Mussel-v1.0.

[0033] During the inference phase, the model outputs end-to-end shell query sets, foot topology query sets, and toe-contact query sets, without setting anchor box generation or non-maximum suppression after detection. Figure 8 Anchor points 1 to 3 correspond to shell query output, anchor points 4 to 7 correspond to foot topology query output, anchor point 8 corresponds to toe query output, and anchor point 9 corresponds to contact query output.

[0034] Figure 8 In the query, the shell query outputs the shell outline, the shell origin o_t, and the shell edge reference point; the foot topology query outputs the foot protrusion or foot base, the proximal midline point, the distal midline point, and the foot flexion point; the toe query outputs the toe p_t; and the contact query outputs candidate toe-base contact points. All of these queries carry the parent shell identifier, used to establish local coordinates, calculate foot extension length, foot curvature, relative toe trajectory, explore coverage area, and contact duration.

[0035] S3 Shell Local Coordinate System and Toe Trajectory Normalization: For the t-th frame image, let the toe image coordinates be... The shell reference point is The rotation matrix is ​​formed by the unit vector e_1,t pointing from the rear end of the shell to the front end and the unit vector e_2,t pointing to the ventral side. It is composed of the shell's major axis dimension l_t and minor axis dimension w_t. First, define the local coordinates of the pixel scale shell. The dimensionless local coordinates q_t of the shell are defined as follows: When the shell undergoes slight translation, rotation, or scale changes due to variations in camera distance, q_t primarily reflects the position of the toe relative to its own shell. The positive direction of the major axis is determined by reference points at the front and rear of the fixed shell, while the positive direction of the minor axis is determined by the candidate region on the ventral side. If the dot product of directions in adjacent frames is less than zero, the current axis is flipped to ensure coordinate continuity. The foot extension length, local displacement in adjacent frames, velocity, and exploration coverage area are all calculated using q_t.

[0036] Pixel-scale local coordinates r_t are used only to map the predicted reference point back to image space; dimensionless coordinates q_t are used for phenotypic comparisons between individuals of different sizes. Using D_t=diag(l_t,w_t) can eliminate shell length and shell width differences separately; in implementations where only shell length can be reliably obtained, it can be set... However, the same normalization definition is maintained for the training, validation and testing phases of the same model.

[0037] S4 shell local trajectory query propagation, occlusion memory, and toe reconstruction: For confirmed toe trajectories, save the toe query embedding z_t^tip, the parent shell query identifier, and the local state vector. In frame t, the previous frame's toe query embedding, the previous frame's local state encoding, and the current parent shell query embedding are fused using linear mapping or multilayer perceptual mapping to form the trajectory query Q_t^trk; simultaneously, a set of new detection queries for discovering new toes is retained. Both types of queries are input into the current frame's detection Transformer decoder, but the trajectory query inherits the original query identity; the local reference points of the trajectory query are first... Prediction, and then by Mapped to the current image coordinates, serving as the deformable cross-attention sampling center. When there is no toe output in the current frame, the trajectory query is placed into the occlusion memory, which is continuously retained for no more than K frames. In this embodiment, K is 5. During the memory period, the parent shell coordinates and local predicted position are updated, but no new trajectory identity is established. When a toe candidate query appears in a subsequent frame, the similarity of the query embedding before occlusion, the distance decay between the candidate point and the local predicted point, the consistency of the skeleton end connectivity, and the consistency of the contact state are calculated and weighted to form a toe reproduction score S_re. Only when the parent shell identifier is the same, S_re reaches the threshold τ_re, and the dimensionless local distance does not exceed τ_q, does the candidate query inherit the trajectory identity before occlusion; when multiple candidates exist, only the candidate with the highest reproduction score and satisfying the one-to-one set constraint is retained. S5 State Query Temporal Transformer and Continuous Behavior Recognition: Embedding the trajectory query of each frame with morphological, motion, and contact features to form a temporal token: A continuous temporal token of length T is input into the temporal transformer for state queries. In this embodiment, the original video is downsampled to 10 frames / second, and continuous segments of 64 to 128 frames are used as samples. The temporal encoder outputs a frame-level latent variable h_t for each input frame; seven learnable state queries s_k correspond to resting, foot extension, exploration, basal contact, continuous contact or suspected secretion, completed byssal silk formation, and retraction, respectively. The similarity score between the frame-level latent variable and each state query is calculated and normalized to a frame-by-frame state probability P_t,k among the seven state classes; the event boundary header outputs the event start probability and end probability b_t for each h_t, used to locate the start and end frames of the state event.

[0038] The training labels include seven state labels for each frame, as well as start and end binary labels generated from the first and last frames of the state segment. State query loss. Where L_frame is the frame-by-frame state cross-entropy, L_boundary is the event boundary binary cross-entropy or focus loss, and L_illegal is the penalty for illegal state transitions. During inference, dynamic programming is performed by combining the frame-by-frame state probabilities, event boundary consistency, and allowed state transition matrix to obtain the optimal state path covering the entire sequence; all states are set with self-loops to express the persistence of behavior.

[0039] In addition to self-looping, the following transitions are allowed: resting to leg extension, leg extension to exploration or retraction, exploration to basal contact or retraction, basal contact to continuous contact, exploration, or retraction, continuous contact to byssal completion, exploration, or retraction, byssal completion to retraction or resting, and retraction to resting or leg extension. Specifically, when a distinguishable resting interval exists after retraction, "retraction → resting" is used; when the next leg extension begins immediately at an adjacent sampling time, "retraction → leg extension" is allowed, thus ensuring that continuous exploration cycles in long videos can be fully decoded. During hard-constraint inference, illegal transitions do not enter candidate paths; therefore, the number of illegal transitions after hard constraints should be 0.

[0040] In this embodiment, the extended foot state is determined by the increase in foot length from the resting baseline for at least 2 seconds; the exploration state is determined by the cumulative displacement or directional change of the toe in the local coordinate system of the shell exceeding a preset threshold; the substrate contact state is determined by the distance from the toe to the attached substrate being less than 0.05 times the shell length for at least 1 second; the continuous contact or suspected secretion state is determined by the contact duration being at least 10 seconds and the toe speed being lower than the exploration state speed threshold; and the completed byelet formation state is indicated by the formation of new byelets or byelet discs confirmed by subsequent microscopic or video observation.

[0041] S6 Foot Exploration Behavior Events and Phenotypic Calculation: A foot extension event is defined as a continuous process in which the foot length increases from the resting baseline and exceeds a preset threshold. A foot exploration event is defined as a continuous process in which the foot has extended and the toe has undergone cumulative displacement, directional change, or coverage area reaching a preset threshold within the local coordinate system of the shell. A base contact event is defined as a distance between the toe and the attached base that is below a distance threshold and lasts for at least a preset time. A valid exploration event includes at least foot extension and exploration, and preferably also base contact. Table 1. Phenotypes and Applications of Major Foot Exploration Behaviors For indicators such as the first extension latency, which indicate higher exploratory activity with smaller values, the direction is reversed before standardization. The weights w_i in EI_pre are learned only from the training set. The validation set is used for stopping rounds, weight regularization, and threshold selection. The test set does not participate in phenotypic screening, weight or model parameter determination. After completing the full observation process, CR and EI_full can be calculated separately to evaluate the observed exploration-byssal formation-attachment process.

[0042] Further embodiments The system outputs three data granularities organized in a hierarchical aggregation relationship: a frame-by-frame identification table records the shell's local coordinates, foot mask, toe position, contact candidate points, state probability, and trajectory quality; an event table, formed by the aggregation of continuous frame-by-frame identification results, records the start and end times, duration, and confidence levels of various behavioral events; and an individual-level phenotypic table, formed by the event records and frame-by-frame statistical summaries of the same individual, records seven core behavioral phenotypes and the optional EI_pre. The attachment prediction results, as an independent downstream result table, are associated with the individual ID, primarily recording the probability that the individual will meet the stable attachment criteria at the endpoint evaluation 24 hours after the start of observation; attachment tendency level, predicted byssal silk number, or predicted first byssal silk formation time are only added when the corresponding task is activated.

[0043] In the implementation of attachment prediction, the individual-level phenotypes and EI_pre in the early observation window are encoded as phenotype tokenh_i; the stable attachment binary classifier is configured according to... Outputs a single probability, P_attach, that the individual reaches the stable attachment criterion at the endpoint evaluation 24 hours after the start of observation. This output does not represent a time-varying probability curve that changes continuously from 0 to 24 hours. If the application requires attachment tendency grading, byssal silk number, or first byssal silk formation time, separate task heads should be set up and trained, validated, and reported separately. Early phenotypic encoding can be shared across tasks, but CR, number of formed byssal silk, number of byssal silk discs, or subsequent attachment results should not be used as prospective prediction inputs.

[0044] Attachment ability prediction and biological verification: After completing the video collection of the foot behavior of thick-shelled mussels, the video of each individual was divided into an early observation time window and a subsequent result observation time window. In this embodiment, the first 30 minutes after the start of video collection is used as the early observation time window, and the stable attachment state obtained at the end of the 24-hour observation period is used as the prediction label. The label is the binary classification result at the end of the 24-hour period, rather than the hourly probability sequence from 0 to 24 hours. The model output is the single predicted probability of the end state. The number of new byssal threads is recorded at 6 hours, 12 hours and 24 hours, and the formation time of the first byssal thread, the number of byssal threads in 24 hours, whether the attachment is maintained after the specified load disturbance and the stable attachment success state at the end of the 24-hour period are also recorded.

[0045] The load disturbance was implemented using a parallel lifting method with a digital force gauge at the end of the 24-hour observation period. The attached substrate was kept submerged and horizontally fixed. A non-elastic nylon ring was used to encircle the midpoint of the shell's long axis and connected to a digital force gauge with a range of 0 to 20 N and a resolution of 0.01 N. A preload of 0.05 N was applied along the projection direction of the shell's long axis on the substrate plane, away from the footstock disc, to eliminate slack. The tension was then increased to 0.50 N at a displacement speed of 10 mm / min and held for 10 seconds. If the shell did not separate from the substrate during the holding phase, it was recorded as 1; if it completely separated, it was recorded as 0. Each individual was tested only once, and the maximum force value, holding result, and operation time were recorded. 0.50 N was the judgment load fixed after the pre-test of the training batch in this embodiment and should not be adjusted before testing in the validation set and test set.

[0046] In this embodiment, the stable attachment success status evaluated at the end of the 24-hour observation period is used as the main attachment judgment label Y_attach. If an individual simultaneously meets the following conditions: forming no less than 3 new byssal threads within 24 hours, observing no less than 2 byssal discs or stable base connection points, and not detaching after being subjected to a 0.50N load for 10 seconds using the aforementioned digital force gauge parallel lifting method, then Y_attach=1; otherwise, Y_attach=0. The attachment tendency level is further divided into three levels: high, medium, and low. High attachment tendency is Y_attach=1 and the time for the formation of the first byssal thread does not exceed 6 hours, the number of byssal threads in 24 hours is no less than 8, and the number of byssal discs in 24 hours is no less than 6; medium attachment tendency is Y_attach=1 but does not meet the high attachment tendency standard; low attachment tendency is Y_attach=0.

[0047] The prediction task is divided into prospective attachment prediction and full process evaluation. Prospective attachment prediction uses only behavioral phenotypes that are available within the early observation window, including at least three of the following: initial extension latency, number of extensions, number of effective explorations, maximum extension length, cumulative toe exploration distance, exploration coverage area, number of base contacts, cumulative contact duration, average single contact duration, and EI_pre. CR, number of formed byssal threads, number of byssal discs, number of byssal threads in 24 hours, or subsequent attachment results must not be used as input. Full process evaluation is performed after the completion of video recordings of the covered byssal thread formation process or after subsequent observations. It can calculate CR, number of byssal threads formed per unit time, percentage of successful byssal threads formed after exploration, and EI_full. Table 2 Attachment Determination Fields and Rules Table 3. Distribution of attachment determination results in the stratification of 70 thick-shelled mussels (50 / 10 / 10 individuals). Table 4. Detailed attachment determination results for 10 individuals in the stratified test set. Layered Data Configuration, Performance Validation Metrics, and Module Contribution Experiment: To illustrate the feasible data organization for model training and independent validation, this embodiment uses 70 healthy thick-shelled mussels as the individual-level data configuration. Video acquisition units are set up with two segments per individual, each segment lasting 30 minutes, corresponding to 140 video segments and 70 hours of observation. Before any model training, individuals are first stratified according to their 24-hour attachment tendency level, and training, validation, and test sets are generated using fixed random seeds; these sets contain 50, 10, and 10 individuals respectively. Both the validation and test sets contain 2 high-attachment, 5 medium-attachment, and 3 low-attachment individuals. All videos, extracted frames, foot masks, trajectories, behavioral segments, and attachment judgment labels for the same individual belong to only one dataset. After the individual list is fixed, the training set is used for model parameter learning, the validation set is used for feature, weight, threshold, and model selection, and the test set is only used for final independent evaluation; individuals are not changed or thresholds are not adjusted based on test results.

[0048] The data configuration employs a combination of fixed-time frame extraction, behavioral event keyframe extraction, and difficult frame supplementation extraction, with 4900 frames as the fine-grained annotation scale. The training set, validation set, and test set are configured with 3500 frames, 700 frames, and 700 frames, respectively. Annotation fields include the thick-shelled mussel shell bounding box, shell segmentation contour, foot instance segmentation contour, foot edge, foot skeleton or centerline, foot base keypoints, midfoot keypoints, toe keypoints, toe-base contact candidate points, and attachment base boundary.

[0049] The temporal annotation scale is configured with approximately 3500 consecutive behavioral segments, with approximately 2500 segments in the training set, 500 in the validation set, and 500 in the test set. Each segment contains 64 to 128 frames, covering resting, foot extension, exploration, basal contact, sustained contact or suspected secretion, withdrawal, and completion of new footfilament formation. There are no fewer than 350 foot extension, exploration, and withdrawal events, no fewer than 250 basal contact events, no fewer than 100 sustained contact or suspected secretion events, and no fewer than 80 new footfilament formation events; each behavioral category is derived from no fewer than 20 independent individuals.

[0050] Table 5 Dataset partitioning and annotation configuration by individual. This embodiment validates the contribution of the query structure step by step from M0 to M5: M0 is the base set prediction DETR; M1 adds conditional query generation formulas, ventral sampling masks, and parent shell constraint matching; M2 adds foot topology query and mask, edge, skeleton, and end-effector connectivity supervision; M3 adds local trajectory query, occlusion memory, and toe reappearance scoring; M4 adds state query temporal Transformer and frame-by-frame probability, event boundary, and transition matrix joint path decoding; M5 validates the independent attachment prediction task based on the early individual-level phenotypes output from M4. CR and EI_full are only used for retrospective evaluation after complete observation and are not used as inputs to M5.

[0051] Table 6 shows the results of the hierarchical query detection of the Transformer version, original records, calculation process, and module contribution. Table 6 lists the original records of R_det, R_struct, R_track, R_state, and R_attach, organized by individual level. It also synchronously registers the training configuration file version, the SHA-256 summary of the best checkpoint, the inference script version, runtime, threshold, sample inclusion marker, and the numerator and denominator of each indicator. M0 to M4 use fixed test frames, events, or segments, while M5 uses the 10 fixed test individuals from Table 4. The test set is not used to change individuals, select checkpoints, or adjust thresholds. The 1.8% listed in M4 represents the proportion of segments in the sequence obtained by directly taking the argmax probability frame-by-frame before applying the transition matrix; after applying the negative infinity hard constraint, the illegal transition is 0 / 500, and the macro-average F1 and event boundary error are calculated from the optimal path after the hard constraint.

[0052] Table 7 shows the innovative units, inputs / outputs, and connections of the Transformer in a hierarchical query test. Table 7 further clarifies the module sequence: the multi-scale attention encoder first generates frame-level visual tokens; the shell query first determines the parent shell identifier, local coordinates, and ventral candidate regions; the conditional query generator then generates foot topology queries, toe queries, and contact queries; the toe queries and local states form trajectory queries across frames, and continuous trajectory queries enter the state query temporal Transformer; finally, the individual-level behavioral phenotype is summarized by frame-by-frame and event results and drives the selected attachment prediction task.

[0053] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0054] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for detecting exploratory behavior and predicting attachment ability of mollusks' feet, characterized by the following steps: include: Step 1: Place the thick-shelled mussel to be tested in an observation area with an attachment substrate, scale calibration information and stable lighting, and acquire continuous video images including the shell, foot and attachment substrate; Step 2: Input the frame video images into a unified shell-guided hierarchical query detection Transformer model. The Transformer model is a complete Transformer detection architecture trained end-to-end. It integrates a multi-scale attention encoder, a shell query decoder, a conditional query generator, a foot topology query decoder, a toe-contact query decoder, and a cross-frame trajectory query decoding branch. The multi-scale attention encoder generates visual feature tokens. First, the shell query group outputs the shell outline, shell reference points, and shell local coordinate axes and ventral candidate regions. Then, the shell query is used as the parent query to conditionally generate the foot topology query group, toe query group, and contact query group, outputting the foot mask, foot skeleton, foot base, toe, and toe-base contact candidate points. Step 3: Based on the shell reference point, the shell's major axis and ventral direction, and the shell's major and minor axis scale matrix, convert the toe image coordinates into dimensionless shell local coordinates; Step 4: The confirmed toe query embedding, toe local state encoding and current frame parent shell query embedding of the previous frame are fused into the current frame trajectory query. The trajectory query and the current frame newborn detection query are jointly entered into the cross-frame trajectory query decoding branch of the unified model. Continuous toe trajectories are obtained through query identity propagation, occlusion memory and toe reproduction. Step 5: Input the continuous trajectory query, foot morphology token and contact token into the state query timing Transformer, and output the resting, extended, exploring, base contact, continuous contact, retraction and foot silk formation completion states under the constraints of the allowed state transition matrix; Step 6: Calculate the foot exploration behavior phenotype and prospective exploration index EI_pre, and calibrate the independent prediction head in combination with the byssal formation trait or attachment trait, and output the attachment probability and attachment tendency level, predicted byssal number or predicted first byssal formation time.

2. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 1, characterized in that: The observation area in step one includes at least one of a transparent observation tank, an individual restraint structure, a replaceable attachment substrate and a proportional calibration object and a uniform lighting device, and the image acquisition device is set in at least one of the following directions: bottom, side, lower or upper of the observation area.

3. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 2, characterized in that: The unified shell-guided hierarchical query detection Transformer model in step two is a complete Transformer detection architecture trained end-to-end. The unified model integrates a multi-scale attention encoder, a shell query decoder, a conditional query generator, a foot topology query decoder, a toe-contact query decoder, and a cross-frame trajectory query decoding branch. Each internal module shares visual feature tokens, parent shell identifiers, and query embeddings, and is uniformly optimized by the same joint loss function. The shell query decoder assigns a unique identifier to each shell and outputs a shell contour mask, a shell reference point, shell local coordinate axes, major and minor axis scales, and ventral candidate regions. For the j-th local template point, the conditional query generator maps it to an image reference point according to the following formula and generates a component query that inherits the parent shell identifier.

4. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 3, characterized in that: Furthermore, the foot topology query decoder sets the query according to the topological order of foot base, proximal midline, distal midline and toe, and jointly outputs foot instance mask, edge, skeleton or centerline and topological key points. The toe-contact query decoder outputs toe coordinates, contact candidate points and contact probability based on the skeleton end, base distance transformation map and parent shell identifier. During the training phase, the one-to-one matching of shell queries is completed first, and then the component query matching is solved within the same parent shell. The one-to-one matching is solved by bipartite graph allocation with the minimum total cost. Candidate pairs with inconsistent parent shell identifiers are not included in the feasible candidate set, which structurally prohibits mismatches of toe-crossing shells between adjacent shells or mirror shells. The joint training loss of the hierarchical query detection Transformer includes at least six of the following: set classification loss L_set, shell segmentation loss L_shell, foot segmentation loss L_foot, foot edge loss L_edge, foot skeleton loss L_skel, keypoint loss L_kp, contact loss L_contact, parent shell affiliation loss L_own, cross-frame trajectory query consistency loss L_trk, and state query loss L_state. The weights of each loss term are learned from the training set or determined from the validation set.

5. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 4, characterized in that: Step 3: Let the coordinates of the toe image in frame t be pt, and the reference point of the shell be ot. Determine the positive unit major axis e1,t from the front and rear reference points of the shell, and determine the positive unit minor axis e2,t from the ventral direction of the shell, thus forming... Shell Dimension Matrix Where lt and wt are the pixel scales of the shell's major and minor axes, respectively, and the dimensionless local coordinates of the toe are determined according to... get.

6. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 5, characterized in that: Step four involves saving the toe query embedding z_t^tip, parent shell query identifier, and local state vector for each confirmed toe trajectory: The current frame trajectory query is obtained by weighted fusion of the previous frame toe query embedding, the previous frame local state encoding, and the current frame parent shell query embedding. The image coordinates obtained by mapping the local coordinate prediction values ​​are used as deformable cross-attention reference points. The cross-frame trajectory query consistency loss during the training phase includes at least parent shell consistency, local coordinate displacement, foot skeleton end connectivity, contact state, and query embedding consistency.

7. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 6, characterized in that: When the toe is not directly decoded in the current frame, the corresponding trajectory query is transferred to the occlusion memory and retained for 1 to 20 frames. The toe reference point is predicted based on the local velocity and the shell coordinates of the current frame. For occlusion memory query i and subsequent toe candidate query j.

8. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 7, characterized in that: Step S5 embeds the trajectory query of length T and encodes the foot morphology, motion, and contact features into a temporal token, which is then output as a frame-by-frame latent variable by the temporal encoder. Seven learnable state queries are set up to obtain the frame-by-frame state probabilities Pt,k, and the event boundary header outputs the start and end probabilities. During inference, the optimal state path is solved by combining the frame-by-frame state probabilities, state transition scores, and event boundary consistency scores according to the following formula: Where A is the allowed state transition matrix, Bt is the boundary consistency score between the event start or end probability in frame t and the candidate transition, η and ξ are the weights determined by the validation set, and the training loss includes at least frame-by-frame state loss, event boundary loss and illegal transition penalty. The state transition matrix A must satisfy at least the following conditions: all seven states are allowed to maintain their current state: ① Resting can be converted to foot extension; ② Foot extension can be converted to exploration or retraction; ③ Exploration can be converted to base contact or retraction; ④ Base contact can be converted to continuous contact, exploration, or retraction; ⑤ Continuous contact can be converted to byssal formation completion, exploration, or retraction; ⑥ Byssal formation completion can be converted to retraction or resting; ⑦ Retraction can be converted to resting, or directly converted to foot extension at the start of the next round of foot extension at the adjacent sampling time. For any states a and b, In implementations requiring soft-constraint training, negative infinity can be replaced with a preset negative penalty -ρ; illegal transitions during the inference phase do not enter the optimal path candidate set.

9. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 8, characterized in that: The output is organized according to a hierarchical convergence relationship into frame-by-frame detection results, event-level behavior records, and individual-level summary phenotypes. The frame-by-frame detection results include shell local coordinates, foot mask, toe position, toe-base contact candidate points, behavior state probability, and trajectory quality control information. The event-level behavior records are formed by state decoding and event boundary localization of continuous frame-by-frame detection results of the same trajectory, including the start and end times and durations of events such as foot extension, exploration, base contact, continuous contact, completion of byelet formation, and retraction. The individual-level summary phenotype is formed by summarizing the event-level behavior records and frame-by-frame statistics of the same individual, including at least three of the following: initial foot extension latency, number of effective exploration events, maximum foot extension length, cumulative toe exploration distance, exploration coverage area, number of base contacts, and cumulative contact duration.

10. The method for detecting exploratory behavior and predicting attachment ability of mollusks' feet according to claim 9, characterized in that: The comprehensive exploration index includes the forward-looking exploration index EI_pre and / or the complete behavior evaluation index EI_full; the forward-looking exploration index EI_pre is based on... The calculation is performed, where Z_i is the standardized value of the foot exploration behavior phenotype obtained within a preset early observation time window. The foot exploration behavior phenotype does not include the number of byssal threads formed, the number of byssal discs, the attachment result, or the CR obtained after the early observation time window ends. w_i is the weight of the corresponding phenotype. The complete behavior evaluation index EI_full further includes the exploration-byssal thread formation conversion rate CR, which is calculated according to the following formula: Where N_byssus is the number of exploration events that form new byssus within the preset associated time window, and N_effective is the total number of effective exploration events; The prediction model calibrated by byssal formation traits or attachment traits takes the core foot exploration behavior phenotype and / or prospective exploration index EI_pre obtained within a preset early observation time window as input, and takes the stable attachment success state Y_attach at the end evaluation 24 hours after the start of observation as the main prediction target. It outputs the probability that the individual reaches the stable attachment judgment criteria at the end evaluation 24 hours later. The probability is a single prediction value for the end state at 24 hours and does not represent a time-varying probability that changes continuously from the start of observation to 24 hours. Depending on the application purpose, the attachment tendency level, the number of byssal threads formed within a preset time, or the time of formation of the first byssal thread can be selected as independent prediction targets, and the corresponding level, quantity, or time can be output. Each prediction task is trained and validated separately, and it is not required that all prediction results be output simultaneously in the same implementation method.