A ship identification method when the ship license plate cannot be fully identified
By extracting and splicing ship plate and hull features, and comparing them with the pre-established ship feature library, the problem of ship identification is solved when the ship plate is invisible, blurred or too small, and effective identification in non-clear environments is achieved. , a ship feature library containing unclear ship plate features and hull features was established to improve the accuracy and reliability of identification.
Patent Information
- Application Number
- CN202210479617.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-05-05
AI Technical Summary
Existing technology cannot achieve effective ship identification when the ship plate is invisible, blurred or too small, leading to the abandonment of visual recognition in these situations.
By extracting the features of ship plates and hulls, performing normalization processing and splicing, combined with the pre-established ship feature library for comparison, the similarity is calculated to achieve ship identification. Specific steps include detecting the ship's plate and hull position, extracting features and performing normalization processing. If the ship's plate is not visible, set it to a predetermined value. Resnet18 and Resnet50 neural network models are used to calculate the Euclidean distance and weighted sum to determine the ship's identity.
Ship identification can still be achieved in non-clear environments, which has good promotion value. A ship feature library including non-clear ship plate features and hull features has been established to improve the accuracy and reliability of identification.
Smart Images

Figure CN114863374B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of ship number plate recognition and ship identification technology, and in particular relates to a ship identification method when the ship plate cannot be completely identified. Background Art
[0002] The current scheme for ship identity confirmation is generally based on license plate recognition. The license plate recognition system is an integral and important part of the intelligent transportation system. The system can comprehensively utilize target detection, video image processing, and pattern recognition technologies to locate and identify the license plate. The usual practice in the industry is to use OCR for license plate recognition when the license plate can be fully identified, and compare the license plate number with the ship plate in the database to obtain the ship ID. Unfortunately, researchers can only design recognition systems for clear license plate images, but cannot classify and distinguish occluded, defaced, truncated, blurred, and other license plate images. When this happens, we can only give up using vision for ship recognition. Summary of the invention
[0003] The purpose of the present invention is to overcome the defects of the prior art and propose a ship identification method when the ship license plate cannot be completely identified.
[0004] In order to achieve the above object, the present invention proposes a ship identification method when the ship plate cannot be completely identified, wherein the ship plate cannot be completely identified including: the ship plate is invisible, the ship plate is blurred, and the ship plate is too small; the method comprises:
[0005] Step 1) extracting the ship plate features and the hull features from the collected images of the ship to be identified, and splicing them to obtain the overall features;
[0006] Step 2) compare the overall features of the ship to be identified with the pre-established ship feature library, and determine the corresponding ship by calculating the similarity.
[0007] As an improvement of the above method, the step 1) specifically includes:
[0008] Step S1-1) searching for the location of the ship plate from the collected images of the ship to be identified. If the ship plate is found, pre-processing is performed to extract the features of the ship plate and normalize them; otherwise, the features of the ship plate are set to a predetermined value;
[0009] Step S1-2) finding the hull position from the collected pictures of the ship to be identified, obtaining the hull image, extracting the hull features and performing normalization processing;
[0010] Step S1-3) The normalized ship plate features and the normalized hull features are combined to obtain the overall features of the ship to be identified.
[0011] As an improvement of the above method, if the ship plate is found in step S1-1), pre-processing is performed to extract the features of the ship plate and perform normalization processing; specifically, the following steps are performed:
[0012] If the license plate is found, the license plate image is rectified and segmented to complete the preprocessing;
[0013] The preprocessed ship license plate image is input into the pre-established and trained ship license plate feature extraction model to obtain a 512-dimensional ship license plate feature plate = [plate_f1, plate_f2, .., plate_fn.., plate_f512], where plate_fn is the n-th dimension ship license plate feature value;
[0014] The plate feature is normalized according to the following formula to obtain the normalized plate feature value plate_norm:
[0015]
[0016]
[0017] Among them, plate_length is the characteristic length value of the ship plate.
[0018] As an improvement of the above method, the ship plate feature of step S1-1) is set to a predetermined value; specifically, the ship plate feature plate is set to all 0s and a length of 512.
[0019] As an improvement of the above method, the step S1-2) of extracting the hull features and performing normalization processing specifically includes:
[0020] The preprocessed hull image is input into the pre-established and trained hull feature extraction model to obtain the 2048-dimensional hull feature ship = [ship_f1, ship_f2, ..., ship_fm, ..., ship_f2048], where ship_fm is the m-th dimensional hull feature value;
[0021] The hull characteristics are normalized according to the following formula to obtain the normalized hull characteristic value ship_norm:
[0022]
[0023]
[0024] Among them, ship_length is the characteristic length of the hull.
[0025] As an improvement of the above method, the ship plate feature extraction model is a Resnet18 neural network with the FC layer removed; the hull feature extraction model is a Resnet50 neural network with the FC layer removed.
[0026] As an improvement of the above method, the overall characteristics of the ship to be identified in step S1-3) are:
[0027]
[0028] As an improvement of the above method, the step 2) specifically includes:
[0029] According to the normalized hull feature value ship_norm, the hull of the ship to be identified is respectively calculated from the front, back, left and right sides of the hull using Euclidean distance to calculate the front similarity ShipScoreF, back similarity ShipScoreB, left side similarity ShipScoreL and right side similarity ShipScoreR of the hull of each ship in the ship feature library;
[0030] According to the normalized plate feature value plate_norm, the Euclidean distance is used to calculate the similarity PlateScore between the plate of the ship to be identified and the plate of each ship in the ship feature database;
[0031] The total score Score is obtained by weighted summing the hull similarity and the ship plate similarity according to the following formula:
[0032] Score=0.6PlateScore+0.4·max(ShipScoreF,ShipScoreB,ShipScoreL,ShipScoreR)
[0033] According to the total score, the ship is sorted in descending order, and the highest score MaxScore is selected. If the MaxScore is greater than or equal to the threshold, the ship identification is completed and the corresponding ID is obtained. Otherwise, the ship does not exist in the ship feature library. The joint comparison result of the license plate feature and the hull is:
[0034] The similarity of all IDs in the on-site image and the registration database is calculated according to the above formula, and they are arranged in descending order according to the total score. The highest score MaxScore is selected. If MaxScore is greater than or equal to the threshold, the ship identification is completed and the corresponding ID is obtained. Otherwise, the ship does not exist in the ship feature database.
[0035] As an improvement of the above method, the method further includes the step of establishing a ship feature library; specifically including:
[0036] The following treatments are performed for each ship:
[0037] Record the ship registration information, which includes: ship ID, Chinese name of the ship plate, English name of the ship plate, and photos of the front, back, left side and right side of the ship, where the ship ID is unique;
[0038] Record the license plate features extracted by the ship license plate feature extraction model;
[0039] The front features, back features, left side features and right side features of the hull extracted by the hull feature extraction model are recorded.
[0040] A ship identification system when the ship plate cannot be completely identified, the system comprises: an extraction and splicing module and a comparison and identification module; wherein:
[0041] The extraction and splicing module is used to extract the ship plate features and the hull features respectively according to the collected pictures of the ship to be identified, and splice them to obtain the overall features;
[0042] The comparison and identification module is used to compare the overall characteristics of the ship to be identified with the pre-established ship feature library, and determine the corresponding ship by calculating the similarity.
[0043] Compared with the prior art, the advantages of the present invention are:
[0044] 1. The method of the present invention can still be used to compare unclear ship plate features and hull features with the ship feature library to achieve ship identification in a poor environment, and has great promotion value;
[0045] 2. The method of the present invention proposes to establish a ship feature library containing unclear ship plate features and front, rear, left and right hull features. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of the ship identification method of the present invention when the ship plate cannot be completely identified;
[0047] Figure 2 It is the record style of the ship feature database;
[0048] Figure 3 It is a schematic diagram of the feature comparison process. DETAILED DESCRIPTION
[0049] The present invention adopts the method of establishing a ship registration database, extracting the features of the ship plate and the hull respectively, and comparing them with the features of the ship plate and the hull extracted from the on-site image, so as to confirm the ship information of the on-site image. The main design idea is: when the ship plate cannot be fully recognized, detect the ship plate. If it can be detected, extract the CNN features of the ship plate and the CNN features of the hull. The two types of features are normalized and spliced into ship features; if the ship plate cannot be detected, only the CNN features of the hull are extracted, and they are normalized and recorded as ship features. The ship features are compared with the ship features in the database, and a detailed design is made on how to calculate the confidence when there is a ship plate feature or not. If the confidence is greater than the threshold, the corresponding ship ID in the database is output.
[0050] The technical solution of the present invention is described in detail below with reference to the accompanying drawings and embodiments.
[0051] Example 1
[0052] like Figure 1 As shown, embodiment 1 of the present invention provides a method for identifying a ship when the ship plate cannot be completely identified. Specifically, the method comprises the following steps:
[0053] Step S1: Establishing a ship registration database
[0054] S1-1) Vessel registration information includes: vessel ID, Chinese name of the vessel license plate, English name of the vessel license plate, and photos of the front, back, left side and right side of the vessel.
[0055] S1-2) Detect the ship license plate in the four photos of the front, back, left side and right side of the ship, resize the ship license plate to (224,224), extract the resnet18 features (remove the FC layer for classification, and the output is 512 dimensions), and normalize the features to a modulus of 1.
[0056] S1-3) Detect the hull from the front, back, left side, and rear side photos of the ship, resize the ship license plate to (224, 224), extract resnet50 features (remove the FC layer for classification, and output 2048 dimensions), and normalize the features to a modulus of 1.
[0057] S1-4) Synchronously record the results of 2 and 3 into the ship registration database, that is, the ship registration database includes: ship ID, Chinese name of the ship plate, English name of the ship plate, front, back, left side and rear side photos of the ship, ship plate features, hull front features, hull back features, hull left side features and hull right side features. The format is as follows Figure 2 As shown:
[0058] Step S2: Scene image feature extraction
[0059] S2-1) Ship detection: Use a general ship detection algorithm to find the location of the ship.
[0060] S2-2) Ship plate detection: A general ship plate detection algorithm is used to find the location of the ship plate.
[0061] S2-3) If there is a ship license plate, correct and segment the license plate number, resize it to (224, 224), and extract the resnet18 features (remove the FC layer for classification, and the output is 512 dimensions). The ship license plate features are recorded as:
[0062] plate=[plate_f1,plate_f2,..,plate_fn..,plate_f512],n∈[1,512],
[0063] Where plate_fn is the n-th dimension ship plate feature value;
[0064] S2-4) If there is no ship plate, the ship plate feature is recorded as: plate = [0,0,..,0], with a length of 512.
[0065] S2-5) If there is a ship license plate, normalize the ship license plate feature to a modulus length of 1
[0066]
[0067]
[0068] Among them, plate_length is the characteristic length value of the ship plate.
[0069] S2-5) Resize the hull image obtained in step 1 to (224, 224), extract the resnet50 features (remove the FC layer for classification, and output 2048 dimensions). The hull features are recorded as ship = [ship_f1, ship_f2, ... ship_fm], m = 2048 dimensions.
[0070] S2-6) Normalize the hull characteristics to a modulus of 1:
[0071] ship=[ship_f1,ship_f2,...,ship_fm,...,ship_f2048], where ship_fm is the m-th dimension of the ship’s eigenvalue;
[0072]
[0073]
[0074] Among them, ship_length is the characteristic length of the hull.
[0075] S2-7) Feature stitching: The overall feature of the scene image is the stitching of the ship plate feature and the hull feature.
[0076] [plate_f1,plate_f2,..,plate_fn..,plate_f512,ship_f1,ship_f2,...ship_fm,...,ship_f2048]
[0077] Step S3: Compare the on-site image features with the ship registration database, such as Figure 3 shown.
[0078] S3-1) The process of comparing the on-site image features with any ID in the ship registration database is as follows
[0079] The similarity between the ship to be identified and each ship in the ship feature database is calculated according to the following formula:
[0080] The distance ShipScoreF between the ship to be identified and the front of the ship in the library is:
[0081]
[0082] The distance between the ship to be identified and the back of the ship in the library is:
[0083]
[0084] The distance between the left side of the hull of the ship to be identified and the ships in the library is:
[0085]
[0086] The distance between the right side of the hull of the ship to be identified and the ships in the library is:
[0087]
[0088] The characteristic distance between two ship plates is calculated as follows. When the ship plate to be identified has no characteristics, it is 0. When there are characteristics, it is calculated according to the normalized Euclidean distance:
[0089]
[0090]
[0091] S3-2) The similarity between the on-site image and all IDs in the registration database is calculated according to S3-1)
[0092] Score=0.6PlateScore+0.4·max(ShipScoreF,ShipScoreB,ShipScoreL,ShipScoreR)
[0093] Arrange in descending order according to the total score, select the highest score MaxScore, and judge that MaxScore is greater than or equal to the threshold. Then the ship identification is completed and the corresponding ID is obtained. Otherwise, there is no such ship in the ship feature library.
[0094] Example 2
[0095] Embodiment 2 of the present invention proposes a ship identification system when the ship plate cannot be completely identified, which is implemented based on the method of embodiment 1. The system includes: an extraction and splicing module and a comparison and identification module; wherein:
[0096] The extraction and splicing module is used to extract the ship plate features and the hull features respectively according to the collected pictures of the ship to be identified, and splice them to obtain the overall features;
[0097] The comparison and identification module is used to compare the overall features of the ship to be identified with a pre-established ship feature library, and determine the corresponding ship by calculating the similarity.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention is described in detail with reference to the embodiments, it should be understood by those skilled in the art that any modification or equivalent replacement of the technical solutions of the present invention does not depart from the spirit and scope of the technical solutions of the present invention and should be included in the scope of the claims of the present invention.
Claims
1. A method for identifying a ship when the ship license plate cannot be completely identified, wherein the ship license plate cannot be completely identified including: The ship plate is not visible, the ship plate is blurred, and the ship plate is too small; the method comprises: Step 1) Extract the ship plate features and hull features from the collected images of the ship to be identified, and then combine them to obtain the overall features; Step 2) Compare the overall features of the ship to be identified with the pre-established ship feature library, and determine the corresponding ship by calculating the similarity; The step 1) specifically includes: Step S1-1) Find the location of the ship plate from the collected images of the ship to be identified. If the ship plate is found, pre-process it, extract the features of the ship plate and perform normalization processing; otherwise, set the features of the ship plate to a predetermined value; Step S1-2) Find the hull position from the collected pictures of the ship to be identified, obtain the hull image, extract the hull features and perform normalization processing; Step S1-3) concatenating the normalized ship plate features and the normalized hull features to obtain the overall features of the ship to be identified; The step 2) specifically includes: According to the normalized hull characteristic value , respectively from the front, back, left side and right side of the hull, the Euclidean distance is used to calculate the similarity between the hull of the ship to be identified and the front hull of each ship in the ship feature library , back similarity , left side similarity Similarity to the right side ; According to the normalized ship license plate feature value , use Euclidean distance to calculate the similarity between the ship license plate of the ship to be identified and the ship license plate of each ship in the ship feature database ; The total score is obtained by weighted summing the hull similarity and the ship plate similarity according to the following formula : ; Arrange in descending order according to the total score, select the highest score MaxScore, and judge that MaxScore is greater than or equal to the threshold. Then the ship identification is completed and the corresponding ID is obtained. Otherwise, there is no such ship in the ship feature library.
2. The ship identification method according to claim 1 when the ship plate cannot be completely identified, characterized in that: If the ship plate is found in step S1-1), pre-processing is performed to extract the features of the ship plate and perform normalization processing; specifically, the following steps are performed: If the license plate is found, the license plate image is rectified and segmented to complete the preprocessing; The pre-processed ship license plate image is input into the pre-established and trained ship license plate feature extraction model to obtain a 512-dimensional ship license plate feature. ,in is the n-th dimension ship plate eigenvalue; The ship plate features are normalized according to the following formula to obtain the normalized ship plate feature value: : ; ; in, is the characteristic length value of the ship license plate.
3. The ship identification method according to claim 2 when the ship plate cannot be completely identified, characterized in that: The step S1-1) sets the ship plate feature to a predetermined value; specifically, the ship plate feature is set to a predetermined value. Set to all 0s and length to 512.
4. The ship identification method according to claim 3 when the ship plate cannot be completely identified, characterized in that: The step S1-2) extracts the hull features and performs normalization processing; specifically includes: The preprocessed hull image is input into the pre-established and trained hull feature extraction model to obtain the 2048-dimensional hull feature ,in is the m-th dimensional hull eigenvalue; The hull characteristics are normalized according to the following formula to obtain the normalized hull characteristic value: : ; ; in, is the characteristic length of the hull.
5. The ship identification method according to claim 4 when the ship plate cannot be completely identified, characterized in that: The ship plate feature extraction model is a Resnet18 neural network with the FC layer removed; the hull feature extraction model is a Resnet50 neural network with the FC layer removed.
6. The ship identification method according to claim 5 when the ship plate cannot be completely identified, characterized in that: The overall characteristics of the ship to be identified in step S1-3) are: 。 7. The ship identification method according to claim 1 when the ship plate cannot be completely identified, characterized in that: The method also includes a step of establishing a ship feature library; specifically including: The following treatments are performed for each ship: Record the ship registration information, which includes: ship ID, Chinese name of the ship plate, English name of the ship plate, and photos of the front, back, left side and right side of the ship, where the ship ID is unique; Record the license plate features extracted by the ship license plate feature extraction model; The front features, back features, left side features and right side features of the hull extracted by the hull feature extraction model are recorded.
8. A system for ship identification method based on claim 1 when the ship plate cannot be completely identified, characterized in that: The system comprises: an extraction and splicing module and a comparison and recognition module; wherein, The extraction and splicing module is used to extract the ship plate features and the hull features respectively according to the collected pictures of the ship to be identified, and splice them to obtain the overall features; The comparison and identification module is used to compare the overall features of the ship to be identified with a pre-established ship feature library, and determine the corresponding ship by calculating the similarity.
Citation Information
Patent Citations
Automatic detection method and system for external target of intelligent ship in autonomous navigation
CN111368658A
Ship license plate recognition method, computing device, and storage medium
CN111985475A
Ship license plate recognition method and system based on deep learning
CN112183233A
Method and apparatus for recognizing license plate information about object
WO2021242048A1
