Method, device, program product and electronic equipment for determining identity information of a ferry

By combining OCR character recognition and appearance feature retrieval in a dual-branch approach, the problem of low accuracy in detecting the identity information of docking vessels is solved, achieving stable and accurate identification in complex port environments and outputting a unique and reliable vessel identity identifier.

CN123142180APending Publication Date: 2026-11-20CHINA TOWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611279752.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-21
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing technologies have low accuracy in detecting the identity information of connecting vessels, especially in complex port areas. When the image quality of the vessel license plate is poor, the recognition rate is low. The retrieval of appearance features is easily affected by the quality fluctuation of the image library, and the lack of a unified decision-making logic leads to unstable recognition results.

Method used

A dual-branch identity recognition method combining OCR character recognition and appearance feature retrieval is adopted. By cropping and recognizing characters in port monitoring images, the ship license plate text is obtained. If the conditions are not met, image encoding is performed to obtain appearance features. A preset sample library is used for matching, and confidence and grammatical rules are combined to ensure the accuracy and stability of the recognition results.

Benefits of technology

In complex port area scenarios, it improves the stability and accuracy of barge identification, avoids the problems of low recognition rate or fluctuation in appearance retrieval when relying solely on OCR, and ensures the output of reliable ship identification information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123142180A_ABST
    Figure CN123142180A_ABST
Patent Text Reader

Abstract

The application discloses a method and device for determining identity information of a transfer ship, a program product and electronic equipment, and relates to the technical field of intelligent security and protection, wherein the method comprises: cropping a port monitoring image to obtain a ship image of a target region; performing character recognition on the ship image to obtain target ship plate text, the confidence of the target ship plate text being greater than a preset confidence and conforming to a ship plate syntax rule corresponding to the target region; in the case where the target ship plate text is not recognized, performing image coding on the ship image; matching in a preset sample library based on query features obtained through coding to obtain a target identity label; and taking the target ship plate text / target identity label as identity information of a transfer ship to be detected. The application solves the technical problem of low detection accuracy of identity information of a transfer ship in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent security technology, and more specifically, to a method, apparatus, program product, and electronic device for determining the identity information of a shuttle boat. Background Technology

[0002] With the continuous development of smart port construction, the functional positioning of port video systems has gradually expanded from basic monitoring to higher-level business support such as production scheduling, safety supervision, and incident tracing. Early video systems primarily undertook the task of "visibility," that is, detecting the presence of ships, personnel, or operational activities, with their role largely limited to post-event verification and real-time observation. However, at the current stage of development, port management not only needs to detect the presence of targets but also further confirm their identity and establish a stable correlation between the identification results and subsequent business processes to meet the needs of refined management and intelligent decision-making. Against this backdrop, barge identification has gradually become a crucial foundational capability in the visual perception system of smart ports. Barges are characterized by frequent use, wide operating range, and dispersed operational scenarios in port production activities. They can undertake personnel transport tasks, participate in short-distance transportation, inspection assistance, or berthing and unberthing coordination operations. Their identification is a necessary link to achieve dynamic management of port vessels and automation of operational processes.

[0003] The identification of port-connecting vessels can typically be represented by explicit character information such as vessel license plates or painted serial numbers, or by external hull features. The former has strong business semantics and can be directly used as vessel identification in management systems, making it the mainstream method for current vessel identification. However, under conditions of long-distance blurring, tilted viewing angles, and partial occlusion, license plates are difficult to read reliably. The latter, on the other hand, can still provide effective identification clues even with lower character imaging quality. Furthermore, smart port applications place higher demands on barge identification, requiring not only high single-frame recognition accuracy but also stability under complex imaging conditions, latency control in multi-vessel concurrent scenarios, and the ability to directly serve ship-level business systems.

[0004] There is currently no effective solution to the problem of low accuracy in detecting the identity information of shuttle boats in the existing technologies mentioned above. Summary of the Invention

[0005] This application provides a method, apparatus, program product, and electronic device for determining the identity information of a shuttle boat, so as to at least solve the technical problem of low detection accuracy of the identity information of shuttle boats in the related art.

[0006] According to one aspect of this application, a method for determining the identity information of a shuttle vessel is provided, comprising: cropping a port monitoring image to obtain a vessel image of a target area; performing character recognition on the vessel image to obtain target vessel license plate text, wherein the target vessel license plate text is used to characterize the identity information of the shuttle vessel to be detected in the vessel image, the confidence level of the target vessel license plate text is greater than a preset confidence level and conforms to the vessel license plate grammar rules corresponding to the target area; if the target vessel license plate text is not identified, performing image encoding on the vessel image to obtain query features, wherein the query features are used to characterize the appearance information of the shuttle vessel to be detected; matching the query features in a preset sample library to obtain a target identity label, wherein the preset sample library includes N query samples, where N is a positive integer, each query sample includes a sample feature of a sample image and an identity label of a sample shuttle vessel in the sample image; and using the target vessel license plate text / target identity label as the identity information of the shuttle vessel to be detected.

[0007] Optionally, cropping the port monitoring image to obtain a ship image of the target area includes: performing target detection on the port monitoring image to obtain L detection boxes, where L is a positive integer, and each detection box carries the coordinate information of a docking vessel to be detected in the target area; selecting the detection boxes with a confidence level greater than a preset confidence level among the L detection boxes as target detection boxes; determining the cropping area based on the coordinate information carried by each target detection box and a preset extrapolation amount; and cropping the port monitoring image based on the cropping area indicated by each target detection box to obtain a ship image corresponding to each target detection box.

[0008] Optionally, character recognition is performed on the ship image to obtain the target ship license plate text, including: recognizing characters in the ship image to obtain an initial ship license plate set, wherein the initial ship license plate set includes at least one initial ship license plate text; normalizing each initial ship license plate text in the initial ship license plate set with a confidence level greater than a preset confidence level to obtain a candidate ship license plate set, wherein the normalization process is used to remove noise symbols and convert full-width numbers to half-width numbers, and the candidate ship license plate set includes at least one candidate ship license plate text; and selecting the candidate ship license plate text in the candidate ship license plate set that conforms to the ship license plate grammar rules corresponding to the target region and has the highest confidence level as the target ship license plate text.

[0009] Optionally, before matching the target identity label in a preset sample library based on query features, the method for determining the identity information of the shuttle boat further includes: acquiring cross-date images of shuttle boats in different port areas and with different berthing postures under different lighting conditions using cameras from different perspectives, obtaining at least one sample image corresponding to each shuttle boat; summarizing all the sample images corresponding to all shuttle boats and removing sample images with quality scores lower than a preset score to obtain a target image library, wherein the quality score is used to characterize the clarity, cropping offset, and subject occlusion degree of the shuttle boats in the sample images; iteratively training the initial model based on each sample image in the target image library and the identity label labeled for each sample image until the model converges, wherein the initial model includes an appearance feature extraction network and a classifier; using the appearance feature extraction network in the last trained model as the target encoder, wherein the target encoder is used to encode the ship images.

[0010] Optionally, the initial model is iteratively trained based on each sample image in the target image library and the identity label annotated on each sample image, including: dividing the sample images included in the target image library into batches to obtain at least one training batch, wherein each training batch includes M sample images corresponding to different identity labels of the shuttle boats, where M is a positive integer; encoding each sample image in the current training batch through the appearance feature extraction network in the initial model to obtain an intermediate feature vector corresponding to each sample image; inputting the intermediate feature vector into the classifier in the initial model to obtain a predicted score vector for each sample image on each identity label; performing a probability transformation on each predicted score vector to obtain the predicted probability of each sample image belonging to each identity label; determining the target loss function of the current training batch based on the identity label annotated on each sample image, the predicted probability of each sample image belonging to each identity label, and a preset label smoothing mechanism; and updating the model parameters of the initial model based on the backpropagation algorithm and the target loss function of the current training batch, wherein the model parameters include the network parameters of the appearance feature extraction network and the classifier parameters of the classifier.

[0011] Optionally, after using the appearance feature extraction network in the model obtained from the last training as the target encoder, the method for determining the identity information of the shuttle boat further includes: encoding each sample image in the target image library through the target encoder to obtain the sample features corresponding to each sample image; associating and storing the sample features corresponding to each sample image and the identity label marked on each sample image to obtain a preset sample library.

[0012] Optionally, matching is performed in a preset sample library based on query features to obtain target identity labels, including: normalizing the query features and sample features in each query sample in the preset sample library to obtain a normalized vector corresponding to the query features and a normalized vector corresponding to each sample feature; calculating the Euclidean distance between the normalized vector corresponding to the query features and the normalized vector corresponding to each sample feature to obtain the query distance between each sample feature and the query features; taking sample features with the same identity labels in the preset sample library as a group of sample features, and taking the average of the K query distances corresponding to each group of sample features as the target distance of the corresponding identity label, where K is a positive integer, and the K query distances are the first K query distances in the distance sequence obtained by arranging all query distances corresponding to each group of sample features in ascending order; and taking the identity label with the smallest target distance among all identity labels included in the preset sample library as the target identity label.

[0013] According to another aspect of this application, a device for determining the identity information of a shuttle vessel is also provided, comprising: a cropping unit for cropping a port monitoring image to obtain a vessel image of a target area; a character recognition unit for performing character recognition on the vessel image to obtain target vessel license plate text, wherein the target vessel license plate text is used to characterize the identity information of the shuttle vessel to be detected in the vessel image, the confidence level of the target vessel license plate text is greater than a preset confidence level and conforms to the vessel license plate grammar rules corresponding to the target area; an image encoding unit for performing image encoding on the vessel image to obtain query features when the target vessel license plate text has not been recognized, wherein the query features are used to characterize the appearance information of the shuttle vessel to be detected; a feature matching unit for performing matching based on the query features in a preset sample library to obtain a target identity label, wherein the preset sample library includes N query samples, where N is a positive integer, each query sample includes a sample feature of a sample image and an identity label of a sample shuttle vessel in the sample image; and an identity determination unit for using the target vessel license plate text / target identity label as the identity information of the shuttle vessel to be detected.

[0014] According to another aspect of this application, a computer program product is also provided, which stores a computer program, wherein, when the computer program is running, it controls the computer program product to execute any of the above-mentioned methods for determining the identity information of the shuttle ship.

[0015] According to another aspect of this application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the identification information of the shuttle ship as described above.

[0016] In this application, the port monitoring image is first cropped to obtain the ship image of the target area. Character recognition is then performed on the ship image to obtain the target ship license plate text, which is used to represent the identity information of the docking vessel to be detected in the ship image. The confidence level of the target ship license plate text is greater than the preset confidence level and conforms to the ship license plate grammar rules corresponding to the target area. Then, without recognizing the target ship license plate text, the ship image is image encoded to obtain query features, which are used to represent the appearance information of the docking vessel to be detected. Then, based on the query features, a matching is performed in a preset sample library to obtain the target identity label. The preset sample library includes N query samples, where N is a positive integer. Each query sample includes the sample features of a sample image and the identity label of the sample docking vessel in the sample image. Subsequently, the target ship license plate text / target identity label is used as the identity information of the docking vessel to be detected.

[0017] As can be seen from the above, this application uses OCR (Optical Character Recognition). This dual-branch identity recognition architecture, which integrates optical character recognition (OCR) and appearance feature retrieval, prioritizes OCR character recognition of the vessel area after cropping from port monitoring images. If the confidence level of the recognition result exceeds a preset confidence level and conforms to the target area's vessel license plate grammar rules, the recognition result is directly output as the identity information of the detected docking vessel. If no valid result is obtained, the vessel image is image-encoded to obtain query features, and the target identity label is obtained by matching these query features in a preset sample library. This achieves the goal of quickly calling the OCR character identification branch when the vessel license plate in the image is clear and readable, and using the appearance feature retrieval branch as a fallback when the vessel license plate is blurry or obscured, ensuring accurate output of vessel identity information. This improves the stability and accuracy of docking vessel identity recognition in complex port scenarios, avoiding the low recognition rate of related technologies that rely solely on OCR character recognition when the vessel license plate image quality is poor, or the susceptibility to fluctuations in image library sample quality when relying solely on appearance retrieval mechanisms. This solves the technical problem of low detection accuracy of docking vessel identity information in related technologies. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 This is a flowchart of an optional method for determining the identity information of a shuttle boat according to an embodiment of this application;

[0020] Figure 2This is a flowchart of an optional system for determining the identity information of a shuttle boat according to an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of an optional device for determining the identity information of a shuttle boat according to an embodiment of this application;

[0022] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

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

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] It should also be noted that all information and data (including but not limited to information used for display and analysis) involved in this application are authorized by the user or fully authorized by all parties. For example, if there is an interface between this system and the relevant user or organization, before obtaining the relevant information, it is necessary to send a request to the aforementioned user or organization through the interface, and obtain the relevant information only after receiving consent from the aforementioned user or organization.

[0026] Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of relevant information and data involved in this application all comply with the relevant laws, regulations, and standards of the relevant regions, and necessary security measures have been taken. They do not violate public order and good morals. In addition, this application provides corresponding operation entry points for users to choose to agree to authorization or refuse authorization. If the user chooses to refuse authorization, the corresponding expert decision-making process will be initiated.

[0027] In related technical embodiments, a method for detecting ship license plate text based on character recognition technology is provided. The basic idea is to first locate the ship or license plate area using a target detection model, and then use an OCR model for text detection and recognition. Common OCR technologies include Tesseract-OCR (an optical character recognition engine), EasyOCR (a simplified optical character recognition engine), and PaddleOCR (a PaddlePaddle optical character recognition toolkit). Among these, PaddleOCR is more commonly used in engineering applications due to its balance of detection and recognition efficiency and adaptability to Chinese scenarios. PaddleOCR adopts a two-stage serial architecture of "detection + recognition." In the detection stage, a probability map of the text region is generated based on a differentiable binarization algorithm, and the bounding boxes of the license plate characters are obtained through post-processing. In the recognition stage, the cropped character region is input into the recognition network, which uses CNN (Convolutional Neural Network) + RNN (Recurrent Neural Network) + CTC (Connectionist Temporal Network). The classification (connecting temporal classification networks) structure includes a CNN for extracting visual features, an RNN for modeling sequence relationships, and a CTC for automatically handling character alignment issues, outputting the complete ship license plate string without requiring character-by-character annotation. Text results recognized using OCR technology directly correspond to ship business identifiers, facilitating manual verification and system archiving. However, OCR technology is highly dependent on the visibility and clarity of the character areas on the ship license plate. If the license plate is too small, character edges are compressed and blurred, or parts of the text are partially obscured, the recognition result may be incomplete. For application scenarios like port areas, which are far-reaching and highly reflective, relying solely on OCR often makes long-term stable operation difficult.

[0028] In related technical embodiments, a method for detecting ship license plate text based on appearance feature retrieval is provided, which belongs to the ReID (Re-identification) technology. In this method, the appearance feature vector of the ship is first obtained through a feature extraction network; then, the extracted feature vector is compared with the features of a pre-built image library, with a smaller distance indicating that the two are closer in the feature space and more likely to belong to the same ship; finally, the corresponding ship license plate label is output based on the nearest neighbor sample. The core of ReID technology is not character recognition, but learning a feature representation that ensures the same target maintains feature similarity under different perspectives and times, while different targets, even if they are similar in appearance, should be effectively distinguishable. During the training phase, the model typically uses data with identity labels, using classification loss, metric learning loss, or a combination of both to encourage samples with the same identity to be closer to each other in the feature space, and samples with different identities to be further apart. During the inference phase, the model directly encodes the query image into a feature vector and compares it with the image library samples. However, ReID methods also have certain limitations. On the one hand, the colors and structures of port shuttle vessels may be quite similar, easily leading to fine-grained identification confusion. On the other hand, the appearance of the same vessel can vary significantly under different camera positions, especially when there are significant changes in shooting angle, lighting conditions, and hull orientation, which can affect feature stability. Therefore, although the ReID method can utilize appearance features for retrieval and identification, it is still difficult to meet the high reliability requirements of shuttle vessel identification alone in actual port scenarios.

[0029] In summary, the above embodiments have the following main technical shortcomings regarding the identification of port shuttle vessels:

[0030] (1) Character recognition-based methods are highly dependent on the quality of character imaging. In port area videos, ship identification plates are often not presented from a standard upright angle, but rather as tilted, smaller, or partially missing. Even if text areas are detected, the recognition results may only cover part of the characters, accompanied by problems such as misspellings and omissions. In addition, since the OCR output is essentially an open text result, without subsequent rule filtering and business constraints, the system has difficulty in reliably selecting the true ship identification from multiple candidates.

[0031] (2) Appearance feature-based retrieval methods are susceptible to fluctuations in the quality of image library samples. Existing solutions typically retrieve a single nearest neighbor sample from the entire image library during the inference stage and use its label as the final recognition result. This approach works effectively when the image library samples are of high quality and have a balanced viewpoint distribution. However, in actual port areas, some samples may have issues such as being taken earlier, having blurred images, or having target occlusion. Such low-quality samples can adversely affect the retrieval results.

[0032] (3) Related technologies typically treat character recognition results and appearance retrieval results as independent candidate outputs, lacking a unified decision-making logic. The core requirement of port operations is to output valid ship identification, rather than the number of candidate results generated internally by the system. Without clear priorities and fusion rules, different image frames are prone to frequent switching between character recognition results and appearance retrieval results, resulting in inconsistent identification results for the same ship during continuous processing.

[0033] In summary, neither character recognition nor appearance feature retrieval methods can reliably support the identification of docking vessels in complex port environments. The former is limited by the quality of vessel license plate imaging, while the latter is susceptible to fluctuations in the quality of image samples in the database. Furthermore, the simple parallel approach lacks an effective fusion decision-making mechanism. Therefore, there is an urgent need for a docking vessel identification method that organically combines the advantages of character recognition and appearance feature retrieval, while possessing a clear fusion strategy, to improve the stability and operational availability of identification in complex port scenarios.

[0034] Therefore, this application aims to propose a method for identifying shuttle vessels that integrates ship area character recognition and appearance feature retrieval. Addressing the adaptability issues of existing technologies in port scenarios, this application focuses on solving the following technical problems:

[0035] (1) Addressing the issue of sensitivity to character imaging quality when relying solely on OCR technology. Ship license plates in port monitoring images are often located at long distances, are small targets, are viewed from oblique angles, or are partially obscured. Furthermore, the character area is susceptible to glare and paint wear. Under these conditions, if the system relies solely on OCR technology for identification, misidentification and missed identification are likely. Therefore, this application aims to improve the stability and accuracy of ship identification, ensuring that the system can still output usable and reliable identification information even when character recognition is unreliable, rather than failing completely.

[0036] (2) Addressing the issue of open-ended candidate text output by OCR technology with numerous impurities. The OCR model outputs open-ended text recognition results, which may contain misspellings, omissions, and background interference. If the system cannot constrain these results into standardized business identifiers, it will be difficult to directly support subsequent business processes. Therefore, this application requires screening the candidate results obtained by OCR technology to extract ship identifiers with high credibility and in accordance with port area ship nameplate naming specifications.

[0037] (3) Addressing the issue of appearance feature retrieval being susceptible to the influence of image database quality. The images of shuttle boats vary significantly depending on the camera used and the time of day, potentially leading to the inclusion of blurry or outdated low-quality images during the actual database construction process. Furthermore, some shuttle boats within the port area are quite similar in color and structure, easily causing confusion. If the retrieval stage directly adopts the single-sample nearest neighbor decision from the entire image database, it is easily affected by similar appearances and low-quality samples, resulting in fluctuating identity results. Therefore, this application requires the construction of a higher-quality shuttle boat image database and the design of a more stable appearance retrieval mechanism. It aims to mitigate the impact of dirty samples through tag-level aggregation, thereby providing reliable identity identification even when character recognition is unreliable.

[0038] (4) Solving the problem of the lack of a unified decision-making logic between OCR recognition results and appearance retrieval results. If the system lacks clear priority rules, the identity of the same vessel may fluctuate repeatedly during continuous processing. Therefore, this application needs to establish a unified decision-making mechanism between character recognition and appearance retrieval that conforms to the business habits of the port area, so that the system can stably switch branches and finally output a unique vessel identifier.

[0039] The present application will now be described in detail with reference to various embodiments.

[0040] Example 1

[0041] According to an embodiment of this application, an embodiment of a method for determining the identity information of a shuttle boat is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0042] This application provides a system for determining the identity information of a shuttle vessel (hereinafter referred to as the determination system) for executing the method for determining the identity information of the shuttle vessel in this application. Figure 1 This is a flowchart of an optional method for determining the identity information of a shuttle boat according to an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:

[0043] Step S101: Crop the port monitoring image to obtain the ship image of the target area.

[0044] Optionally, the system inputs the port monitoring image into a pre-trained target detection model (such as YOLO (YouOnly Look Once, a target detection model)) for detection, obtaining L detection boxes carrying confidence scores and coordinate information of the barge to be detected. Then, the system selects the detection boxes with confidence scores greater than a preset confidence score from the L detection boxes as target detection boxes. Subsequently, to avoid feature truncation caused by the detection boxes being too close to the edge of the hull, the coordinate information of the target detection boxes is expanded by a preset number of pixels, and the expanded coordinates are constrained within the image boundary range, thereby cropping out the image region containing complete ship information.

[0045] Optionally, port surveillance images refer to raw video frames or still images collected by video surveillance equipment deployed in the port; target detection models are intelligent models used to locate the position of specific targets (such as barges) in the images; target detection boxes are rectangular boxes that surround the ship and contain coordinate information, output by the model; and ship images are partial images of the ship that have been cropped and expanded for subsequent identification purposes.

[0046] Optionally, the determination system locates the target detection box and crops the ship area based on the target detection box, removing irrelevant interference (such as water surface, other ships, dock facilities, etc.) in the complex background of the original port monitoring image. It also ensures the integrity of the ship's edge features (such as the ship's license plate and the distribution of ship's color) through outward expansion processing, preventing the loss of key recognition features due to excessive cropping. This provides high-quality input data for subsequent high-precision character recognition and appearance feature extraction, and helps to improve the robustness of the determination system.

[0047] Step S102: Perform character recognition on the ship image to obtain the target ship license plate text. The target ship license plate text is used to represent the identity information of the docking vessel to be detected in the ship image. The confidence level of the target ship license plate text is greater than the preset confidence level and conforms to the ship license plate grammar rules corresponding to the target area.

[0048] Optionally, the system inputs the ship image into the OCR model to obtain several candidate texts and the confidence level of each candidate text. Then, it filters out candidate texts with a confidence level greater than a preset confidence level. Subsequently, the filtered candidate texts are normalized (e.g., removing spaces, symbols, etc.). Finally, the normalized candidate texts are matched according to the preset ship license grammar rules of the target region (e.g., regular expressions of a specific format). Only when a candidate text meets the confidence threshold and conforms to the ship license grammar rules is it determined as the target ship license text.

[0049] Optionally, character recognition refers to the process of detecting and recognizing text content from an image using OCR technology; target vessel license plate text refers to the valid and reliable vessel identification string that has been screened and validated according to rules; vessel license plate syntax rules are the naming conventions for vessel numbers defined for a specific port area, used to filter invalid recognition results.

[0050] Optionally, the system utilizes character recognition to obtain direct semantic identity information, which has high accuracy and high interpretability. Through a dual detection mechanism of confidence filtering and grammatical rule verification, it effectively filters out misspelled words, missing words, or background interference text generated by the OCR model, ensuring that the output identity identifier conforms to business specifications, preventing invalid or erroneous identifiers from entering downstream business systems, and improving the usability and accuracy of the recognition results.

[0051] Step S103: In the absence of identifying the target vessel's license plate text, the vessel image is image encoded to obtain query features, wherein the query features are used to characterize the appearance information of the docking vessel to be detected.

[0052] Optionally, if no text that meets the preset reliability requirements and conforms to the ship's license grammar rules is found, the system determines that the character recognition branch has failed. In this case, the system inputs the same ship image into a pre-trained appearance feature extraction network (i.e., target encoder), and through the forward propagation calculation of the neural network, maps the image pixel information into a high-dimensional vector to obtain the query features.

[0053] Optionally, image encoding refers to the process of converting image data into high-dimensional vectors using deep learning networks; query features are high-dimensional vectors describing the appearance of ships (such as color, structure, and ship type) and used for similarity matching in the feature space.

[0054] Optionally, the above steps address the issue that OCR models cannot function effectively in scenarios where the vessel license plate is blurred, obscured, or reflective. By extracting the appearance features (i.e., query features) of the docking vessel to be detected, the system can utilize the overall visual information of the vessel for identity determination, thus overcoming the limitations of relying solely on local character information. This ensures that the system can continue to operate under extreme imaging conditions and improves the overall fault tolerance of the system.

[0055] Step S104: Match the query features in a preset sample library to obtain the target identity label. The preset sample library includes N query samples, where N is a positive integer. Each query sample includes the sample features of a sample image and the identity label of the sample docking ship in the sample image.

[0056] Optionally, the system determines the distance between the query feature and each sample feature in the preset sample library (e.g., Euclidean distance) to obtain the query distance between the query feature and each sample feature. Then, a two-level decision mechanism based on identity labels is adopted. Specifically, the system first detects the query distance between each sample feature and the query feature for multiple sample features under each identity label. Then, the system arranges the multiple query distances corresponding to the multiple sample features under each identity label in ascending order and takes the average of the first K query distances in the arranged distance sequence as the representative distance (i.e., the target distance) of the corresponding identity label. After that, the system selects the minimum value among the multiple representative distances corresponding to all identity labels in the preset sample library and takes the identity label corresponding to the minimum value as the target identity label.

[0057] Optionally, the preset sample library is a pre-built dataset containing known appearance features of shuttle vessels and their corresponding identity tags; the target identity tag is a unique identifier of the vessel determined by matching appearance features.

[0058] Optionally, the system determines that identity retrieval is based on appearance features. By introducing a two-level decision-making mechanism based on identity tags, it can take advantage of the multi-angle, multi-state, and multi-sample advantages of the same ship to suppress the negative impact of low-quality or abnormal samples in the target image library on the matching results. This improves the accuracy of the matching results obtained based on appearance features, so that the system can more accurately identify the ship's identity information when the appearances are similar or the quality of the image library samples is uneven.

[0059] Step S105: Use the target vessel license plate text / target identity tag as the identity information of the shuttle vessel to be detected.

[0060] Optionally, the system establishes a clear priority logic based on the preceding steps, namely, character recognition technology takes priority and appearance feature matching mechanism is the last resort. This priority-guided decision-making mechanism avoids the problem of result conflict and frequent switching of detection branches when multiple branches are running in parallel, which helps to ensure the stability, accuracy and business availability of barge identification in complex port environments.

[0061] As described above, this application employs a dual-branch identity recognition architecture that integrates OCR character recognition and appearance feature retrieval. It prioritizes OCR character recognition of the vessel area after cropping from the port monitoring image. When the confidence level of the recognition result exceeds a preset confidence level and conforms to the target area's vessel license plate grammar rules, the recognition result is directly output as the identity information of the detected docking vessel. If no valid result is obtained, the vessel image is image-encoded to obtain query features, and the target identity label is obtained by matching these query features in a preset sample library. This achieves the goal of quickly calling the OCR character identification branch when the vessel license plate in the image is clear and readable, and using the appearance feature retrieval branch as a fallback when the vessel license plate is blurry or obscured, ensuring accurate output of vessel identity information. This improves the stability and accuracy of docking vessel identity recognition in complex port scenarios, avoiding the low recognition rate of related technologies that rely solely on OCR character recognition when the vessel license plate image quality is poor, or the susceptibility to fluctuations in the quality of image library samples when relying solely on appearance retrieval mechanisms. This solves the technical problem of low detection accuracy of docking vessel identity information in related technologies.

[0062] In this embodiment, during the cropping process of the port monitoring image, the system first performs target detection on the port monitoring image to obtain L detection boxes, where L is a positive integer. Each detection box carries the coordinate information of a docking vessel to be detected in the target area. Then, the system selects the detection boxes with a confidence level greater than a preset confidence level from the L detection boxes as target detection boxes. Next, the system determines the cropping area based on the coordinate information carried by each target detection box and a preset expansion amount. Subsequently, the system crops the port monitoring image based on the cropping area indicated by each target detection box to obtain the ship image corresponding to each target detection box.

[0063] In practical applications, the system inputs port monitoring images into a pre-trained YOLO model for detecting barge vessels to obtain detection boxes corresponding to the vessel targets. Each detection box carries coordinate information and the confidence level obtained from the detection. Then, the system removes detection boxes with confidence levels less than or equal to the preset confidence level and uses detection boxes with confidence levels greater than the preset confidence level as target detection boxes. Subsequently, to avoid detection boxes being too close to the edge of the hull and causing local feature truncation, the system can expand the detection boxes by a preset number of pixels (i.e., a preset expansion amount) and constrain the expanded coordinates within the image boundary range.

[0064] Assume the coordinate information of the shuttle boat detection frame is as follows: ,in, and These are the coordinates of the top-left and bottom-right corners of the detection frame, respectively, with a preset expansion amount of [value missing]. Then the cropping area The calculation formula is as follows:

[0065] (1)

[0066] in, For the original image, and These represent the image height and width, respectively. The image can be cropped to 10 pixels, allowing the system to convert barge targets in complex scenes into relatively concentrated area images, thereby reducing the interference of irrelevant backgrounds on subsequent character recognition and appearance retrieval.

[0067] Therefore, it is evident that the deterministic system improves the quality and accuracy of ship image extraction by introducing a confidence-based filtering mechanism and a pre-defined expansion cropping strategy. Specifically, the deterministic system first filters the L detection boxes by confidence, eliminating false positives with low confidence, ensuring that subsequent processing only targets real-world docking vessels, reducing unnecessary computation and lowering the false alarm rate. Second, the deterministic system determines the cropping region based on the target detection box coordinates and a pre-defined expansion, solving the problem of key features (such as license plate characters and hull exterior details) being truncated because the target detection boxes are often close to the hull edge. By preserving the complete hull area, the deterministic system ensures that the subsequent character recognition branch can obtain clear and complete text information, while also providing the appearance feature retrieval branch with input images containing rich appearance information, thereby improving the robustness and accuracy of the overall identity recognition method.

[0068] In this embodiment, during the character recognition process of ship images, the system first identifies the characters in the ship images to obtain an initial ship license plate set, which includes at least one initial ship license plate text. Then, the system performs normalization processing on each initial ship license plate text in the initial ship license plate set whose confidence level is greater than a preset confidence level to obtain a candidate ship license plate set. The normalization processing is used to remove noise symbols and convert full-width numbers to half-width numbers. The candidate ship license plate set includes at least one candidate ship license plate text. Then, the system selects the candidate ship license plate text in the candidate ship license plate set that conforms to the ship license plate syntax rules corresponding to the target area and has the highest confidence level as the target ship license plate text.

[0069] In practical applications, the system will determine the cropped ship area. The system inputs an OCR model to detect and recognize text painted on the ship's hull or its license plate number. Here, the system is confirmed to use a pre-trained PaddleOCR model as the OCR model, outputting several candidate texts and their corresponding confidence scores. Then, for each candidate text, the system first determines its confidence score based on a pre-set confidence threshold. To filter, here, Setting it to 0.8 ensures the system only retains filters with a confidence level greater than 0.8. The system then normalizes the retained candidate text, removing spaces, line breaks, and other noise characters, and converting full-width numbers to half-width numbers. Next, the system matches the candidate text according to the grammatical rules of the target port area's vessel license plates. For example, if the identified candidate text representing the target port area's shuttle vessel license plate meets the text structure of "fixed Chinese prefix + three digits," then the corresponding regular expression template is used to match the candidate text string; candidate text that does not conform to the grammatical structure is considered invalid and discarded. If multiple candidate license plates conform to the rules, the system sorts them from highest to lowest confidence level and removes duplicates, resulting in a vessel license plate candidate set. Then, select the ship with the highest confidence level. As the output of the OCR character recognition branch; if there are no candidate texts that meet the confidence filtering rules and the ship name grammar rules, it is determined that the OCR character recognition branch has not obtained a priority result.

[0070] Therefore, it is evident that the determination system improves the business usability and accuracy of character recognition results through multi-stage text filtering and standardization. Specifically, firstly, the system performs confidence-based filtering and standardization (denoising and full-width / half-width character conversion) on the text in the initial vessel license plate set, eliminating low-reliability results generated by the OCR model and interfering text with messy formats, thus obtaining a high-quality set of candidate vessel license plates. Secondly, the system introduces vessel license plate grammar rules to match and constrain the candidate texts, ensuring that the output identification conforms to the specifications of the port area business system and preventing invalid or erroneous identifications from entering downstream processes. Finally, the system selects the candidate text with the highest confidence from those that meet the rules as the target vessel license plate text, further ensuring that the most reliable result is output when multiple compliant candidates exist.

[0071] In this embodiment, before matching the target identity label in a preset sample library based on query features, the determination system first collects cross-date images of shuttle boats in different port areas and with different docking postures under different lighting conditions using cameras from different perspectives, obtaining at least one sample image for each shuttle boat. Then, the determination system summarizes all the sample images corresponding to all shuttle boats collected and removes sample images with quality scores lower than a preset score to obtain the target image library. The quality score is used to characterize the clarity, cropping offset, and subject occlusion degree of the shuttle boats in the sample images. Subsequently, the determination system iteratively trains the initial model based on each sample image in the target image library and the identity label labeled for each sample image until the model converges. The initial model includes an appearance feature extraction network and a classifier. Then, the determination system uses the appearance feature extraction network in the last trained model as the target encoder, which is used to encode the ship images.

[0072] In practical applications, in order to reduce the impact of quality fluctuations in the barge image library on the recognition results of the appearance feature retrieval branch, the system adopts the method of "organizing by identity label and multi-sample coverage" to construct the target image library. That is, each barge in the constructed target image library corresponds to an identity label, and multiple sample images are retained under each identity label. In order to improve the adaptability of the system to real port scenes, the acquisition process of multiple sample images retained under each identity label covers different dates, different camera angles, different docking postures, and different lighting conditions.

[0073] Furthermore, to ensure the validity of the sample images in the constructed target image library, the system needs to evaluate the sharpness, crop offset, and subject occlusion degree of each sample image. Then, the sharpness, crop offset, and subject occlusion degree of each sample image are weighted and summed to obtain the quality score of each sample image. During the library construction, sample images with quality scores lower than the preset score are removed. In addition, the system can also directly remove low-quality sample images with sharpness lower than the preset sharpness, crop offset greater than the preset offset, or subject occlusion degree greater than the preset occlusion degree during the library construction, thereby quickly creating the target image library.

[0074] Furthermore, the same target image library is used in both the training and inference application phases of the appearance feature extraction network to ensure the consistency of the feature space. The above-mentioned library construction process utilizes multiple sample sets corresponding to the same ship to characterize the distribution of its appearance changes in real-world scenarios, which helps to improve the robustness and fault tolerance of identity retrieval based on ship appearance.

[0075] Therefore, it is evident that the determination system improves the robustness and recognition accuracy of the appearance feature retrieval branch by constructing a high-quality and diverse barge image library (i.e., the target image library) and employing targeted training strategies. Specifically, firstly, the determination system ensures that the image library covers the complex and ever-changing environmental factors of the port area by acquiring images across dates, multiple viewpoints, multiple lighting conditions, and multiple poses, thereby enhancing the model's adaptability to real-world scenarios. Secondly, the determination system determines a quality score based on the sharpness, cropping offset, and subject occlusion degree of each sample image, and removes interfering sample images with quality scores lower than the preset score, avoiding the negative impact of dirty data on model training and ensuring the image quality of the target image library. Finally, the system iteratively trains the initial model based on sample images and their labels in the target image library until the model converges. This enables the final trained appearance feature extraction network to learn a highly discriminative representation of ship appearance features. Furthermore, the system uses the trained appearance feature extraction network as the target encoder, ensuring that the query features extracted during the inference stage have higher stability and discriminative power. This solves the recognition confusion problem caused by fluctuations in the quality of image library samples or similar appearances, thereby improving the reliability of the overall identity recognition system.

[0076] In this embodiment, during the iterative training of the initial model, the determination system first divides the sample images included in the target image library into batches to obtain at least one training batch. Each training batch includes M sample images corresponding to different identity labels of the shuttle boats, where M is a positive integer. Then, the determination system encodes each sample image in the current training batch through the appearance feature extraction network in the initial model to obtain an intermediate feature vector corresponding to each sample image. Then, the determination system inputs the intermediate feature vector into the classifier in the initial model to obtain a predicted score vector for each sample image on each identity label. Subsequently, the determination system performs a probability transformation on each predicted score vector to obtain the predicted probability of each sample image belonging to each identity label. Then, the determination system determines the target loss function of the current training batch based on the identity label labeled for each sample image, the predicted probability of each sample image belonging to each identity label, and a preset label smoothing mechanism. Finally, the determination system updates the model parameters of the initial model based on the backpropagation algorithm and the target loss function of the current training batch. The model parameters include the network parameters of the appearance feature extraction network and the classifier parameters of the classifier.

[0077] In practical applications, during the model training phase, for each acquired ship sample image... and their corresponding identity tags First, determine the system's initial appearance feature extraction network. (That is, the appearance feature extraction network in the initial model) encodes the input sample image to obtain the intermediate feature vector. Subsequently, it was determined that the system would Input to the classification layer to obtain sample images Predicted score vectors for each identity category Next, determine the system's... Performing the Softmax transformation yields... The predicted probabilities of identity tags belonging to each category are calculated using the following formula:

[0078] (2)

[0079] in, Indicates the first The sample belongs to the first Predicted probabilities for each identity category, This indicates the total number of vessel identity categories in the training program. Indicates the first The sample at the th Predicted scores for each category.

[0080] Subsequently, the system employs Softmax classification loss for supervised optimization of the model during training. Simultaneously, a label smoothing mechanism is introduced to prevent the model from becoming overly sensitive to noise or local appearance differences in a small number of samples, thereby improving the model's generalization ability in complex port scenarios. For a batch of training samples, the overall loss function (i.e., the target loss function) is as follows:

[0081] (3)

[0082] in, Represents the smoothed target distribution, when When the target probability is high, the main category weight is taken; when At that time, the remaining categories are assigned smaller smoothing weights.

[0083] As the loss value propagates back through the system, the parameters of the appearance feature extraction network and the classification layer are updated. The model gradually learns the discrimination boundary between different ship identities, making ship samples of the same identity more consistent in the feature space, while ship samples of different identities have stronger discriminative power. After training, the system determines the appearance feature extraction network trained on the system. As the target encoder in the inference stage, it outputs appearance feature vectors for distance comparison and feature retrieval, providing query features as indexes for the subsequent matching process of the target image library.

[0084] Therefore, it is evident that the deterministic system optimizes the training process of the appearance feature extraction model by introducing batch training, Softmax probability transformation, and label smoothing mechanisms, thereby improving the model's generalization ability and robustness. Specifically, firstly, the deterministic system divides the target image library into batches, ensuring that each training batch contains samples with different identity labels. This helps the model learn more comprehensive inter-category differences in each iteration, accelerating convergence and avoiding local optima. Secondly, the deterministic system obtains predicted probabilities through forward propagation of the appearance feature extraction network and classifier, quantifying the model's confidence in each category. Furthermore, the introduction of a label smoothing mechanism to construct the target loss function alleviates the model's overconfidence in a single label and reduces the risk of overfitting caused by low-quality samples or noisy labels due to blurry or occluded images in the image library. Finally, the deterministic system updates model parameters based on the backpropagation algorithm, enabling the appearance feature extraction network to learn more discriminative feature representations. This makes samples of the same identity more clustered in the feature space and samples of different identities more separated, thus providing a high-quality feature foundation for subsequent appearance feature retrieval and improving the accuracy of identity recognition.

[0085] In this embodiment, after obtaining the target encoder, the system first encodes each sample image in the target image library using the target encoder to obtain the sample features corresponding to each sample image. Then, the system associates and stores the sample features corresponding to each sample image with the identity tags labeled on each sample image to obtain a preset sample library.

[0086] In practical applications, the system determines that each sample image from the target image library is input into the trained appearance feature extraction network. (i.e., the target encoder) obtains the corresponding feature vector. (i.e., sample features), and form a feature set for the image library. The feature set of the image library is shown in the following formula:

[0087] (4)

[0088] in, This indicates the identity label to which the sample belongs.

[0089] To improve online inference efficiency, the system pre-extracts features from sample images in the target image library during the initialization phase and caches all feature vectors to avoid repeatedly processing images from the image library during each recognition.

[0090] Therefore, it is evident that the deterministic system, by constructing a structured pre-defined sample library, provides a stable and efficient retrieval foundation for the appearance feature retrieval branch. Specifically, firstly, the deterministic system utilizes a trained target encoder to batch encode sample images in the target image library, transforming unstructured image data into structured feature vectors. This allows appearance similarity calculation to be performed in the feature space, improving computational efficiency. Secondly, by associating sample features with identity tags, the deterministic system establishes a mapping relationship between features and identities. This enables the direct and rapid location of specific ship identities during the inference phase through feature distance metrics. This library construction method not only solidifies the discriminative features learned during training but also ensures the consistency of feature representations during the retrieval process, thereby supporting a subsequent two-level retrieval mechanism based on identity tags. This contributes to improving the accuracy and response speed of appearance feature retrieval.

[0091] In this embodiment, during the matching process based on query features in a preset sample library, the system first normalizes the query features and the sample features in each query sample in the preset sample library to obtain the normalized vector corresponding to the query features and the normalized vector corresponding to each sample feature. Then, the system calculates the Euclidean distance between the normalized vector corresponding to the query features and the normalized vector corresponding to each sample feature to obtain the query distance between each sample feature and the query features. Next, the system takes the sample features with the same identity tags in the preset sample library as a group of sample features and takes the average of the K query distances corresponding to each group of sample features as the target distance of the corresponding identity tag, where K is a positive integer and the K query distances are the first K query distances in the distance sequence obtained by arranging all the query distances corresponding to each group of sample features in ascending order. Finally, the system takes the identity tag with the smallest target distance among all the identity tags included in the preset sample library as the target identity tag.

[0092] Optionally, in the appearance feature retrieval branch, in addition to calculating the Euclidean distance between the normalized vector corresponding to the query feature and the normalized vector corresponding to each sample feature, the system can also use cosine distance, Mahalanobis distance, and other methods that can reflect the closeness of samples in the feature space to calculate the similarity between the query feature and the sample feature.

[0093] In practical applications, when the OCR model fails to detect valid results, the system will determine the cropped ship area. The input is an appearance feature retrieval branch, which uses the ReID method to determine the ship's identity based on its hull appearance features. Specifically, the system determines the ship's region to be identified. Input the pre-trained appearance feature extraction network (i.e., the target encoder) obtains the query feature vector. To improve the consistency of distance metrics, the system performs normalization on query features and library sample features, mapping them to a unified feature space. The normalization process is shown in the following formula:

[0094] (5)

[0095] in, This represents the L2 norm.

[0096] After normalization, the system uses Euclidean distance to measure the sample distance (i.e., query distance) between the query feature and each sample feature. The sample distances between the query feature and the corresponding sample feature are shown below:

[0097] (6)

[0098] After obtaining the distance between the query region and all samples in the image library, the system determines that it does not directly use a single nearest neighbor sample from the target image library as the final result. Instead, it adopts a two-level decision-making approach based on identity labels to reduce the impact of similar appearances and low-quality samples on the recognition results. In the first-level decision-making process, the system determines the identity label for each image. Collect all that satisfy The sample distances are then used to sort all samples in ascending order that satisfy the condition. The sample distances are sorted, and the average of the first K sample distances in the sorted distance sequence is selected as the representative distance of the identity label. Here, K can be set to 5. In this way, the system retains the advantage of covering different perspectives and states among multiple samples belonging to the same ship identity, while avoiding the technical defect of low-quality samples directly lowering the matching results of the entire identity label. In the second-level decision-making process, the system makes an optimal decision among all identity labels, that is, the system calculates the representative distance of all identity labels. Then, the identity tag representing the smallest distance is selected as the final appearance retrieval result. .

[0099] Therefore, it is evident that the deterministic system improves the robustness and accuracy of appearance feature retrieval by introducing a normalized distance metric and a two-level decision-making mechanism based on identity labels. Specifically, firstly, the deterministic system normalizes query features and sample features, eliminating the impact of vector magnitude differences on the distance metric and ensuring that the Euclidean distance accurately reflects the similarity of feature vectors in direction, thus improving the consistency of the distance metric. Secondly, the deterministic system abandons the traditional single nearest neighbor decision and adopts a two-level decision-making strategy based on identity labels. In the first-level decision-making process, for each identity label, the deterministic system selects the average of the K smallest sample distances among all sample distances corresponding to all sample features under the same identity label as the representative distance for that identity label. This leverages the advantage of multiple sample images corresponding to the same identity label, effectively suppressing the negative impact of a single low-quality or abnormal sample on the overall label matching result. In the second-level decision-making process, the system compares the target distance of all identity tags and selects the tag corresponding to the minimum value as the target identity tag, which ensures the uniqueness and reliability of the final recognition result. The above two-level decision-making strategy helps to mitigate the risk of misjudgment caused by fluctuations in the quality of image library samples, differences in perspective, or similar appearances, thereby improving the stability of barge identity recognition in complex port area scenarios.

[0100] It is important to note that when multiple docking vessels are detected in the same image and none of these vessels have obtained valid OCR results, the system can group the corresponding multiple vessel regions into a batch input and feed them into a pre-trained appearance feature extraction network at once, thereby obtaining multiple query feature vectors simultaneously. Then, two-level decision-making based on identity labels is performed separately. This batch processing method can reduce the repetitive overhead caused by individual forward passes for each vessel, improve hardware utilization, and is suitable for real-time processing scenarios where multiple vessels appear on the same screen in port area videos.

[0101] In one alternative embodiment, Figure 2 This is a flowchart of an optional system for determining the identity information of a shuttle boat according to an embodiment of this application, as shown below. Figure 2 As shown, determining the system's workflow diagram includes the following steps:

[0102] (1) Input port monitoring images: The received raw video frames or static images serve as the initial data source for the ship identification task.

[0103] (2) Ship detection and region cropping: The target detection box of the shuttle ship is located in the image by the pre-trained target detection model, and the ship region image containing complete ship features is cropped according to the coordinate information of the target detection box and the preset expansion amount to remove irrelevant background interference.

[0104] (3) OCR recognition: The cropped ship area image is processed by a pre-trained OCR model (such as PaddleOCR) to detect and recognize text, and output several candidate texts and the confidence level of each candidate text.

[0105] (4) Candidate text confidence screening, normalization and rule extraction: For several candidate texts obtained by OCR recognition, firstly, candidate texts with low confidence are removed according to the preset confidence threshold; then, the candidate texts retained by the confidence filtering are normalized, that is, spaces, newlines and other noise symbols in the candidate text strings are removed, and the strings are converted to full-width and half-width characters; finally, it is checked whether the normalized candidate texts conform to the preset target port area's ship license grammar rules (can be set to regular expression format). If they do, the valid ship identification identifiers that meet the ship license grammar rules are extracted to obtain the OCR recognition result; if there are multiple candidate texts that conform to the ship license grammar rules, the valid ship identification identifier corresponding to the candidate text with the highest confidence is taken as the OCR recognition result.

[0106] (5) Extract ship appearance features: When the OCR character recognition branch does not output a valid recognition result, the cropped ship area image is input into the pre-trained appearance feature extraction network (i.e., target encoder) to generate a high-dimensional feature vector (i.e. query feature vector) to characterize the overall appearance of the ship.

[0107] (6) Sample distance calculation: The similarity between the query feature vector and the sample feature vectors of all known ships stored in the preset sample library is measured. Before the similarity measurement, the query feature vector and the sample feature vector are normalized. Then, the Euclidean distance is calculated based on the normalization result to obtain the sample distance between the query feature and each sample in the library.

[0108] (7) Two-level decision-making mechanism based on identity labels: In the first-level decision-making process, for each identity label, the average of the K smallest sample distances among all sample distances corresponding to all sample features associated with it is taken as the representative distance of the identity label; In the second-level decision-making process, the "label selection" strategy is adopted, that is, among all the representative distances of identity labels, the identity label corresponding to the minimum value is selected as the final recognition result.

[0109] (8) Output the ship identification, that is, use the OCR recognition result / identity tag obtained by matching the ship's appearance features as the identity information of the shuttle ship.

[0110] In summary, the system, based on the steps in the above embodiments, can achieve the following technical effects:

[0111] (1) Improve the overall reliability of barge identification: By simultaneously utilizing character information and vessel appearance features, character recognition is prioritized. When the character result does not meet the confidence threshold, the system switches to the appearance feature retrieval branch. This allows the model to directly output the standard vessel identification when the vessel license plate is clear, and to complete the identification by relying on the overall appearance of the vessel when the license plate is blurry, partially obscured, or the character area cannot be reliably read. Therefore, the system can maintain high availability under various port monitoring conditions, avoiding the problem of frequent failures of a single path in complex scenarios.

[0112] (2) Improve the availability of character recognition services: After character recognition, the system will further perform standardization processes such as confidence screening, blank character cleaning, number format unification and irrelevant symbol filtering. In addition, based on the preset port area vessel license grammar rules, valid identifiers will be extracted. This process can remove irrelevant text in the OCR output and output standardized identity information, which significantly improves the feasibility of character recognition results in actual port business systems.

[0113] (3) Improve the robustness of appearance retrieval under complex image library conditions: The system has constructed a high-quality barge image library, which includes images of barges from different periods, under different lighting conditions and from different perspectives. Low-quality samples with severe occlusion or blurred hulls have been removed, providing a reliable and clean sample set for appearance feature retrieval. In addition, in order to give full play to the advantage of "multiple samples of the same identity", the system abandons the single nearest neighbor decision mechanism of the whole image library in the appearance feature retrieval branch. Instead, it proposes a two-level decision mechanism based on identity labels. This mechanism can effectively avoid the influence of a single low-quality sample within the same identity label on the overall matching effect and enhance the model's adaptability to the unbalanced sample distribution in the image library.

[0114] (4) Improve the consistency of recognition results and the clarity of decision-making: The system defines the priority call relationship between character recognition and appearance retrieval, which is adapted to the ship identity information detection habit of "reading the license plate first when there is one and relying on the appearance when there is no license plate". This avoids the frequent changes in the output identity identifier of the same ship due to branch switching during continuous frame processing. It is conducive to maintaining the consistency of ship identity records in downstream systems such as subsequent statistical systems, alarm systems and traceability systems. It has obvious engineering value for application scenarios such as port areas that emphasize continuous tracking of objects and responsibility binding.

[0115] (5) Improve the feasibility of port area business system deployment: The application of the system not only improves the recognition accuracy, but also takes into account the actual implementation needs. In the multi-ship scenario, the system can use batch processing to extract the appearance features of ships, thereby reducing repeated forward calculations, improving hardware utilization, and reducing single-frame processing latency. Therefore, the application of the system not only improves the detection accuracy of ship identity information at the algorithm level, but also has strong engineering deployment feasibility.

[0116] Example 2

[0117] This application embodiment can also provide a device for determining the identity information of a shuttle boat. It should be noted that the device for determining the identity information of a shuttle boat in this application embodiment can be used to execute the method for determining the identity information of a shuttle boat provided in this application embodiment. The following describes the device for determining the identity information of a shuttle boat provided in this application embodiment.

[0118] According to an embodiment of this application, an apparatus for implementing the above-described method for determining the identity information of a shuttle boat is also provided. Figure 3 This is a schematic diagram of an optional device for determining the identity information of a shuttle boat according to an embodiment of this application, such as... Figure 3 As shown, the device includes: a cropping unit 301, used to crop port monitoring images to obtain ship images of a target area; a character recognition unit 302, used to perform character recognition on the ship images to obtain target ship license plate text, wherein the target ship license plate text is used to characterize the identity information of the docking vessel to be detected in the ship image, and the confidence level of the target ship license plate text is greater than a preset confidence level and conforms to the ship license plate grammar rules corresponding to the target area; an image encoding unit 303, used to perform image encoding on the ship image to obtain query features when the target ship license plate text is not recognized, wherein the query features are used to characterize the appearance information of the docking vessel to be detected; a feature matching unit 304, used to perform matching in a preset sample library based on the query features to obtain a target identity label, wherein the preset sample library includes N query samples, where N is a positive integer, and each query sample includes a sample feature of a sample image and an identity label of a sample docking vessel in the sample image; and an identity determination unit 305, used to use the target ship license plate text / the target identity label as the identity information of the docking vessel to be detected.

[0119] As described above, this device employs a dual-branch identity recognition architecture that integrates OCR character recognition and appearance feature retrieval. It prioritizes OCR character recognition of the vessel area after cropping from the port monitoring image. When the confidence level of the recognition result exceeds a preset confidence level and conforms to the target area's vessel license plate grammar rules, the recognition result is directly output as the identity information of the detected docking vessel. If no valid result is obtained, the vessel image is image-encoded to obtain query features, and the target identity label is obtained by matching these query features in a preset sample library. This achieves the goal of quickly calling the OCR character identification branch when the vessel license plate in the image is clear and readable, and using the appearance feature retrieval branch as a fallback when the vessel license plate is blurry or obscured, ensuring accurate output of vessel identity information. This improves the stability and accuracy of docking vessel identity recognition in complex port areas, avoiding the low recognition rate of related technologies that rely solely on OCR character recognition when the vessel license plate image quality is poor, or the susceptibility to fluctuations in the quality of image library samples when relying solely on appearance retrieval mechanisms. This solves the technical problem of low detection accuracy of docking vessel identity information in related technologies.

[0120] Optionally, the cropping unit 301 includes: a detection subunit, used to perform target detection on the port monitoring image to obtain L detection boxes, where L is a positive integer, and each detection box carries the coordinate information of a docking vessel to be detected in the target area; a first determination subunit, used to select the detection boxes with a confidence level greater than a preset confidence level among the L detection boxes as target detection boxes; a second determination subunit, used to determine the cropping area based on the coordinate information carried by each target detection box and a preset expansion amount; and a cropping subunit, used to crop the port monitoring image based on the cropping area indicated by each target detection box to obtain the vessel image corresponding to each target detection box.

[0121] Optionally, the character recognition unit 302 includes: a recognition subunit for recognizing characters in a ship image to obtain an initial ship license plate set, wherein the initial ship license plate set includes at least one initial ship license plate text; a normalization processing subunit for normalizing each initial ship license plate text in the initial ship license plate set whose confidence level is greater than a preset confidence level to obtain a candidate ship license plate set, wherein the normalization processing is used to remove noise symbols and convert full-width numbers to half-width numbers, and the candidate ship license plate set includes at least one candidate ship license plate text; and a third determination subunit for selecting the candidate ship license plate text in the candidate ship license plate set that conforms to the ship license plate grammar rules corresponding to the target region and has the highest confidence level as the target ship license plate text.

[0122] Optionally, the device for determining the identity information of the shuttle boat further includes: a sample acquisition unit, used to acquire cross-date images of shuttle boats in different port areas and different docking postures under different lighting conditions using cameras from different perspectives before matching in a preset sample library based on query features to obtain target identity labels, thereby obtaining at least one sample image corresponding to each shuttle boat; a sample aggregation unit, used to aggregate all the sample images corresponding to the collected shuttle boats and remove sample images with quality scores lower than a preset score to obtain a target image library, wherein the quality score is used to characterize the clarity, cropping offset, and subject occlusion degree of the shuttle boats in the sample images; a model training unit, used to iteratively train an initial model based on each sample image in the target image library and the identity label labeled for each sample image until the model converges, wherein the initial model includes an appearance feature extraction network and a classifier; and an encoder determination unit, used to use the appearance feature extraction network in the last trained model as the target encoder, wherein the target encoder is used to encode the ship images.

[0123] Optionally, the model training unit includes: a batch partitioning subunit, used to partition the sample images included in the target image library into batches to obtain at least one training batch, wherein each training batch includes M sample images corresponding to different identity labels of the shuttle boats, where M is a positive integer; an encoding subunit, used to encode each sample image in the current training batch through the appearance feature extraction network in the initial model to obtain an intermediate feature vector corresponding to each sample image; an input subunit, used to input the intermediate feature vector into the classifier in the initial model to obtain a predicted score vector for each sample image on each identity label; a probability transformation subunit, used to perform probability transformation on each predicted score vector to obtain the predicted probability of each sample image belonging to each identity label; a fourth determination subunit, used to determine the target loss function of the current training batch based on the identity label labeled for each sample image, the predicted probability of each sample image belonging to each identity label, and a preset label smoothing mechanism; and a parameter update subunit, used to update the model parameters of the initial model based on the backpropagation algorithm and the target loss function of the current training batch, wherein the model parameters include the network parameters of the appearance feature extraction network and the classifier parameters of the classifier.

[0124] Optionally, the device for determining the identity information of the shuttle boat further includes: a sample encoding unit, used to encode each sample image in the target image library by using the appearance feature extraction network in the last trained model as the target encoder to obtain the sample features corresponding to each sample image; and an association storage unit, used to associate and store the sample features corresponding to each sample image and the identity label marked on each sample image to obtain a preset sample library.

[0125] Optionally, the feature matching unit 304 includes: a normalization processing subunit, used to normalize the query feature and the sample features in each query sample in the preset sample library to obtain the normalized vector corresponding to the query feature and the normalized vector corresponding to each sample feature; a calculation subunit, used to calculate the Euclidean distance between the normalized vector corresponding to the query feature and the normalized vector corresponding to each sample feature to obtain the query distance between each sample feature and the query feature; a fifth determination subunit, used to take the sample features with the same identity label in the preset sample library as a group of sample features, and take the average of the K query distances corresponding to each group of sample features as the target distance of the corresponding identity label, where K is a positive integer, and the K query distances are the first K query distances in the distance sequence obtained by arranging all the query distances corresponding to each group of sample features in ascending order; and a sixth determination subunit, used to take the identity label with the smallest target distance among all the identity labels included in the preset sample library as the target identity label.

[0126] It should be noted that the above-mentioned units 301 to 305 correspond to steps S101 to S105 in the method embodiment. The above-mentioned units and corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above-mentioned embodiments.

[0127] Example 3

[0128] Embodiments of this application can also provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application, such as... Figure 4 As shown, the electronic device includes: one or more ( Figure 4 (Only one is shown) processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0129] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and devices in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the above-mentioned method for determining the identity information of the shuttle boat.

[0130] The memory may include high-speed random access memory (RAM), and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, which can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks (LANs), mobile communication networks, and combinations thereof.

[0131] The processor can access the information and application programs stored in the memory via the transmission device to perform the following steps: cropping the port monitoring image to obtain a ship image of the target area; performing character recognition on the ship image to obtain the target ship license plate text, wherein the target ship license plate text is used to characterize the identity information of the docking vessel to be detected in the ship image, and the confidence level of the target ship license plate text is greater than a preset confidence level and conforms to the ship license plate syntax rules corresponding to the target area; if the target ship license plate text is not identified, performing image encoding on the ship image to obtain query features, wherein the query features are used to characterize the appearance information of the docking vessel to be detected; matching the query features in a preset sample library to obtain a target identity label, wherein the preset sample library includes N query samples, where N is a positive integer, and each query sample includes a sample feature of a sample image and an identity label of a sample docking vessel in the sample image; using the target ship license plate text / target identity label as the identity information of the docking vessel to be detected.

[0132] The processor can access the information and application program stored in the memory via the transmission device to perform the following steps: Detect targets in the port monitoring image to obtain L detection boxes, where L is a positive integer, and each detection box carries the coordinate information of a target vessel to be detected within the target area; Select the detection boxes with a confidence level greater than a preset confidence level from the L detection boxes as target detection boxes; Determine the cropping region based on the coordinate information carried by each target detection box and a preset extrapolation amount; Crop the port monitoring image based on the cropping region indicated by each target detection box to obtain the vessel image corresponding to each target detection box.

[0133] The processor can access the information and application program stored in the memory via the transmission device to perform the following steps: recognizing characters in the ship image to obtain an initial ship license plate set, wherein the initial ship license plate set includes at least one initial ship license plate text; normalizing each initial ship license plate text in the initial ship license plate set with a confidence level greater than a preset confidence level to obtain a candidate ship license plate set, wherein the normalization process is used to remove noise symbols and convert full-width numbers to half-width numbers, and the candidate ship license plate set includes at least one candidate ship license plate text; and selecting the candidate ship license plate text in the candidate ship license plate set that conforms to the ship license plate syntax rules corresponding to the target area and has the highest confidence level as the target ship license plate text.

[0134] The processor can access information and applications stored in memory via a transmission device to perform the following steps: Before matching against a preset sample library based on query features to obtain target identity labels, images of shuttle boats in different port areas and at different docking postures are acquired across dates using cameras from different perspectives under different lighting conditions, obtaining at least one sample image for each shuttle boat; all acquired sample images of shuttle boats are aggregated, and sample images with quality scores lower than a preset score are removed to obtain a target image library, where the quality score is used to characterize the clarity, cropping offset, and subject occlusion degree of the shuttle boats in the sample images; the initial model is iteratively trained based on each sample image in the target image library and the identity label labeled for each sample image until the model converges, where the initial model includes an appearance feature extraction network and a classifier; the appearance feature extraction network in the last trained model is used as the target encoder, where the target encoder is used to encode the ship images.

[0135] The processor can access information and applications stored in memory via a transmission device to perform the following steps: Divide the sample images in the target image library into batches to obtain at least one training batch, where each training batch includes M sample images corresponding to different identity labels of the shuttle boats, where M is a positive integer; Encode each sample image in the current training batch using the appearance feature extraction network in the initial model to obtain an intermediate feature vector corresponding to each sample image; Input the intermediate feature vector into the classifier in the initial model to obtain a predicted score vector for each sample image on each identity label; Perform a probability transformation on each predicted score vector to obtain the predicted probability that each sample image belongs to each identity label; Determine the target loss function for the current training batch based on the identity label labeled for each sample image, the predicted probability that each sample image belongs to each identity label, and a preset label smoothing mechanism; Update the model parameters of the initial model based on the backpropagation algorithm and the target loss function of the current training batch, where the model parameters include the network parameters of the appearance feature extraction network and the classifier parameters of the classifier.

[0136] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: After using the appearance feature extraction network in the model obtained from the last training as the target encoder, the target encoder encodes each sample image in the target image library to obtain the sample features corresponding to each sample image; the sample features corresponding to each sample image and the identity label labeled for each sample image are associated and stored to obtain the preset sample library.

[0137] The processor can access the information and application program stored in the memory via the transmission device to perform the following steps: normalize the query features and the sample features in each query sample in the preset sample library to obtain the normalized vector corresponding to the query features and the normalized vector corresponding to each sample feature; calculate the Euclidean distance between the normalized vector corresponding to the query features and the normalized vector corresponding to each sample feature to obtain the query distance between each sample feature and the query features; take the sample features with the same identity label in the preset sample library as a group of sample features, and take the average of the K query distances corresponding to each group of sample features as the target distance of the corresponding identity label, where K is a positive integer, and the K query distances are the first K query distances in the distance sequence obtained by arranging all the query distances corresponding to each group of sample features in ascending order; take the identity label with the smallest target distance among all the identity labels included in the preset sample library as the target identity label.

[0138] This application provides a scheme for determining the identity information of a shuttle vessel. The scheme employs a dual-branch identity recognition architecture that integrates OCR character recognition and appearance feature retrieval. It prioritizes OCR character recognition of the vessel area after cropping from port monitoring images. When the confidence level of the recognition result is greater than a preset confidence level and conforms to the target area's vessel license plate grammar rules, the recognition result is directly output as the identity information of the shuttle vessel to be detected. If no valid result is obtained, the vessel image is image-encoded to obtain query features, and the target identity label is obtained by matching these query features in a preset sample library. This achieves the goal of quickly calling the OCR character identification branch when the vessel license plate in the image is clear and readable, and using the appearance feature retrieval branch as a fallback when the vessel license plate is blurry or obscured, ensuring accurate output of the vessel's identity information. This improves the stability and accuracy of shuttle vessel identity recognition in complex port areas, avoiding the low recognition rate of relying solely on OCR character recognition when the vessel license plate image quality is poor, or the susceptibility to fluctuations in the quality of image library samples when relying solely on appearance retrieval mechanisms. This solves the technical problem of low detection accuracy of shuttle vessel identity information in related technologies.

[0139] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, PDAs, mobile internet devices, PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0140] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0141] Example 4

[0142] Embodiments of this application may also provide a storage medium.

[0143] Optionally, in this embodiment of the application, the storage medium can be used to store the program code executed by the method for determining the identity information of the shuttle boat provided in the above method embodiment.

[0144] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0145] This application also provides a computer program product, which, when executed on a data processing device, is suitable for performing the steps of a method for determining the identity information of a shuttle vessel.

[0146] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0147] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0148] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0149] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0150] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0151] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0152] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for determining the identity information of a shuttle boat, characterized in that, include: The port surveillance images are cropped to obtain images of ships in the target area; Character recognition is performed on the ship image to obtain the target ship license plate text, wherein the target ship license plate text is used to characterize the identity information of the docking vessel to be detected in the ship image, and the confidence level of the target ship license plate text is greater than the preset confidence level and conforms to the ship license plate grammar rules corresponding to the target area; Without identifying the target vessel's license plate text, the vessel image is image encoded to obtain query features, wherein the query features are used to characterize the appearance information of the docking vessel to be detected. Based on the query features, a matching is performed in a preset sample library to obtain the target identity label. The preset sample library includes N query samples, where N is a positive integer. Each query sample includes the sample features of a sample image and the identity label of the sample shuttle boat in the sample image. The target vessel license plate text / the target identity tag shall be used as the identity information of the shuttle vessel to be detected.

2. The method for determining the identity information of the shuttle boat according to claim 1, characterized in that, By cropping the port surveillance images, vessel images of the target area are obtained, including: Target detection is performed on the port monitoring image to obtain L detection boxes, where L is a positive integer, and each detection box carries the coordinate information of a docking vessel to be detected in the target area; The detection boxes with a confidence level greater than the preset confidence level among the L detection boxes are used as target detection boxes; The clipping region is determined based on the coordinate information carried by each target detection box and the preset expansion amount; The port monitoring image is cropped based on the cropping region indicated by each target detection box to obtain the ship image corresponding to each target detection box.

3. The method for determining the identity information of the shuttle boat according to claim 1, characterized in that, Character recognition is performed on the ship image to obtain the target vessel license plate text, including: Characters in the ship image are identified to obtain an initial set of ship license plates, wherein the initial set of ship license plates includes at least one initial ship license plate text; Normalization is performed on each initial boat license text in the initial boat license set whose confidence level is greater than the preset confidence level to obtain a candidate boat license set. The normalization process is used to remove noise symbols and convert full-width numbers to half-width numbers. The candidate boat license set includes at least one candidate boat license text. The candidate ship license text that conforms to the ship license grammar rules corresponding to the target region and has the highest confidence level in the candidate ship license set is taken as the target ship license text.

4. The method for determining the identity information of the shuttle boat according to claim 1, characterized in that, Before matching the target identity label in a preset sample library based on the query features, the method for determining the identity information of the shuttle boat further includes: By using cameras with different perspectives and under different lighting conditions, images of the shuttle boats in different port areas and at different docking positions were collected over a period of time, resulting in at least one sample image for each shuttle boat. All collected sample images of the shuttle boats are collected, and sample images with quality scores lower than the preset score are removed to obtain the target image library. The quality score is used to characterize the clarity, cropping offset, and subject occlusion of the shuttle boats in the sample images. The initial model is iteratively trained based on each sample image in the target image library and the identity label labeled on each sample image until the model converges. The initial model includes an appearance feature extraction network and a classifier. The appearance feature extraction network in the model obtained from the last training is used as the target encoder, wherein the target encoder is used to perform image encoding on the ship image.

5. The method for determining the identity information of the shuttle boat according to claim 4, characterized in that, The initial model is trained iteratively based on each sample image in the target image library and the identity label annotated for each sample image, including: The sample images included in the target image library are divided into batches to obtain at least one training batch, wherein each training batch includes M sample images corresponding to the shuttle boats with different identity tags, where M is a positive integer; The appearance feature extraction network in the initial model is used to encode each sample image in the current training batch to obtain the intermediate feature vector corresponding to each sample image. The intermediate feature vector is input into the classifier in the initial model to obtain the predicted score vector of each sample image on each identity label; Perform a probability transformation on each predicted score vector to obtain the predicted probability that each sample image belongs to each identity label; The target loss function for the current training batch is determined based on the identity label annotated in each sample image, the predicted probability of each sample image belonging to each identity label, and a preset label smoothing mechanism. The model parameters of the initial model are updated based on the backpropagation algorithm and the target loss function of the current training batch, wherein the model parameters include the network parameters of the appearance feature extraction network and the classifier parameters of the classifier.

6. The method for determining the identity information of the shuttle boat according to claim 4, characterized in that, After using the appearance feature extraction network from the last trained model as the target encoder, the method for determining the identity information of the shuttle boat further includes: Each sample image in the target image library is image encoded by a target encoder to obtain the sample features corresponding to each sample image. The sample features corresponding to each sample image and the identity tags labeled on each sample image are associated and stored to obtain the preset sample library.

7. The method for determining the identity information of a shuttle boat according to claim 1, characterized in that, Based on the query features, a matching process is performed in a preset sample database to obtain the target identity label, including: The query features and the sample features in each query sample in the preset sample library are normalized to obtain the normalized vector corresponding to the query features and the normalized vector corresponding to each sample feature. Calculate the Euclidean distance between the normalized vector corresponding to the query feature and the normalized vector corresponding to each sample feature to obtain the query distance between each sample feature and the query feature; The sample features with the same identity label in the preset sample library are taken as a group of sample features. The average of the K query distances corresponding to each group of sample features is taken as the target distance of the corresponding identity label. Here, K is a positive integer. The K query distances are the first K query distances in the distance sequence obtained by arranging all the query distances corresponding to each group of sample features in ascending order. The identity label with the smallest target distance among all identity labels included in the preset sample library is taken as the target identity label.

8. A device for determining the identity information of a shuttle boat, characterized in that, include: The cropping unit is used to crop port monitoring images to obtain ship images of the target area; A character recognition unit is used to perform character recognition on the ship image to obtain target ship license plate text, wherein the target ship license plate text is used to characterize the identity information of the docking vessel to be detected in the ship image, and the confidence level of the target ship license plate text is greater than a preset confidence level and conforms to the ship license plate grammar rules corresponding to the target area. An image encoding unit is used to encode the ship image to obtain query features when the target ship license plate text is not identified, wherein the query features are used to characterize the appearance information of the barge to be detected. The feature matching unit is used to perform matching in a preset sample library based on the query features to obtain the target identity label. The preset sample library includes N query samples, where N is a positive integer. Each query sample includes sample features of a sample image and the identity label of the sample docking ship in the sample image. An identity determination unit is used to use the target vessel license plate text / target identity tag as the identity information of the docking vessel to be detected.

9. A computer program product, characterized in that, The computer program product includes a computer program, wherein, when the computer program is executed, it controls the computer program product to perform the method for determining the identity information of the shuttle boat as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method for determining the identity information of the shuttle boat as described in any one of claims 1 to 7.