CN112232289A - Ship retrieval method and device, electronic equipment and storage medium - Google Patents
Ship retrieval method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN112232289A CN112232289A CN202011232448.8A CN202011232448A CN112232289A CN 112232289 A CN112232289 A CN 112232289A CN 202011232448 A CN202011232448 A CN 202011232448A CN 112232289 A CN112232289 A CN 112232289A
- Authority
- CN
- China
- Prior art keywords
- ship
- image
- retrieved
- similarity
- retrieval
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/10—Terrestrial scenes
- G06V20/13—Satellite images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/53—Querying
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Astronomy & Astrophysics (AREA)
- Remote Sensing (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Image Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the invention provides a ship retrieval method, a ship retrieval device, electronic equipment and a storage medium. The method comprises the following steps: acquiring an image of a ship to be retrieved; carrying out ship position identification on ship images to be retrieved by utilizing a pre-constructed neural network model, and extracting ship feature vectors; comparing the ship to be retrieved with a pre-constructed feature database based on the feature vector, and calculating a first similarity between the ship to be retrieved and the ship in the feature database; selecting ships with similarity greater than a first preset threshold value to obtain a pre-retrieval result; intercepting a local image from the identified ship position; traversing the local image through each ship image in the pre-retrieval result, and calculating a second similarity of the local image and each ship image in the pre-retrieval result, wherein the second similarity is the same as the local image in size; and when the target ship with the second similarity reaching a second preset threshold exists, determining the ship to be retrieved as the target ship. By implementing the method, the accuracy of ship retrieval is improved.
Description
Technical Field
The invention relates to the field of image processing, in particular to a ship retrieval method, a ship retrieval device, electronic equipment and a storage medium.
Background
With the advancement of observation technology, the amount of image data that can be acquired is increasing at an alarming rate. Meanwhile, the data are diversified day by day, the data acquisition speed is higher, the acquisition period is shorter, and the timeliness is stronger. However, unlike rapid development in data acquisition, the existing data processing technology is far from meeting the requirements, resulting in waste of much data and insufficient use of the value of the data. The research on how to accurately acquire effective target information from massive data retrieves required images, and is beneficial to efficient utilization of a database. However, in many current images, the features are complex and wide in coverage, and ships have relatively less characteristic information as small features, so that retrieval is very difficult.
In the prior art, the ship image retrieval usually calculates the similarity between the ship to be retrieved and the ship in the database, and determines the identity of the ship to be retrieved according to the similarity, however, in the actual processing, because the ship image can only shoot the local image of the ship, when the characteristic comparison and the similarity calculation are performed, the similarity threshold value is usually adjusted downward correspondingly for the influence of the synthesis and the local image, which causes that when the ship influences the retrieval, the retrieval result has large noise, resulting in inaccurate retrieval result.
Therefore, it is still a problem to be solved urgently to research how to accurately identify the identity of the ship from the massive ship image data.
Disclosure of Invention
In view of this, embodiments of the present invention provide a ship retrieval method, apparatus, electronic device and storage medium, so as to solve the technical problem in the prior art that the ship retrieval accuracy is low.
According to a first aspect, an embodiment of the present invention provides a ship retrieval method, including the following steps: acquiring an image of a ship to be retrieved; identifying a ship position from the ship image to be retrieved by utilizing a pre-constructed neural network model, and extracting a characteristic vector of the ship to be retrieved; comparing the ship to be retrieved with a pre-constructed feature database based on the feature vector, and calculating a first similarity between the ship to be retrieved and the ship in the feature database, wherein the feature database stores ship feature vectors and corresponding relations between the ship feature vectors and the ship; selecting ships with similarity greater than a first preset threshold value to obtain a pre-retrieval result; intercepting a local image on the ship to be retrieved from the position of the ship on the ship image to be retrieved; traversing the local image through each ship image in the pre-retrieval result, and calculating a second similarity of the local image and an area, which has the same size as the local image, in each ship image in the pre-retrieval result; and when the pre-retrieval result has a target ship of which the second similarity reaches a second preset threshold value, determining that the ship to be retrieved is the target ship.
According to the ship retrieval method provided by the embodiment of the invention, the position of a ship is identified based on a ship image, a ship feature vector is extracted, the extracted feature vector is compared with a pre-constructed feature database, and a preliminary retrieval result is obtained according to a first preset threshold and a first similarity comparison result; and then intercepting the local images at the determined ship positions, using the intercepted local images to go through all ship images in the preliminary retrieval result, obtaining a target ship of a final retrieval result according to a comparison result of a second preset threshold and a second similarity, determining the ship to be retrieved as the target ship in the final retrieval result, and finishing ship retrieval. The preliminary result is a feature retrieval step commonly used in the prior art, but only a retrieval result can be obtained roughly, and other ship images which are not ships to be retrieved are not included, so that the embodiment of the invention further utilizes the feature comparison of the local images in the preliminary retrieval result in the prior art, sets different second preset thresholds according to different image entropies of the local images, and further screens the preliminary retrieval result to obtain a final retrieval result, so that the obtained retrieval result is a result obtained by two-time screening, the accuracy of ship retrieval is improved, other interference options are basically eliminated, and a target ship of the final result can be only determined as the ship to be retrieved.
With reference to the first aspect, in a first embodiment of the first aspect, the intercepting a partial image on the ship to be retrieved from the ship position on the ship image to be retrieved includes: determining a target frame of a local image to be intercepted; traversing from the ship image to be retrieved according to the size of the target frame, and calculating the image entropy of each target frame position; and intercepting the local image in the area where the target frame with the maximum image entropy is located at the ship position.
In the ship retrieval method provided by the embodiment of the invention, in the process of intercepting the local image of the ship, the local image containing the maximum image entropy is selected as an intercepted object, and the specific intercepting method comprises the following steps: firstly, determining the size of a local image target frame, then traversing on a ship image to be retrieved according to the size of the target frame, calculating the image entropy of the position where no target frame passes, comparing the image entropy of all positions, and selecting the position with the maximum image entropy for interception. The position containing the maximum image entropy is selected as a local image, so that the position containing the maximum image entropy can be matched with the ship image picture in the retrieval result more accurately when the position containing the maximum image entropy is compared with the ship image picture in the retrieval result in a large-scale comparison mode, compared with the large-scale comparison mode of the initial ship information characteristic vector to be retrieved and the ship image picture in the characteristic database, the position containing the maximum image entropy is locked, the ship information characteristic quantity containing the maximum image entropy is included, the accurate comparison of the ship information characteristic quantity and the area, with the same size as the intercepted local image, in the ship image of the pre-retrieval result can be realized, the pre-retrieval result can be further screened at this time, and the target ship with the maximum similarity is determined to be the ship to be retrieved.
With reference to the first embodiment of the first aspect, in the second embodiment of the first aspect, after the local image is obtained by capturing the area where the target frame with the maximum image entropy at the ship position is located, the method further includes: carrying out background image identification on the local image to obtain the background image; and removing the background image from the local image.
According to the ship retrieval method provided by the embodiment of the invention, after the local image is intercepted, the background elimination method is adopted to eliminate the interference noise of the intercepted local image, so that the images in the intercepted local image are all effective ship characteristic information, the precision comparison can be realized when the subsequent comparison and the pre-retrieval result are compared, and the ship retrieval accuracy is improved. When the local image is intercepted, the ship image to be retrieved is obtained through passing, background noise interference elimination is not carried out on the ship image to be retrieved before, the local image intercepted based on the ship image to be retrieved does not exclude other interference information, the intercepted local image is subjected to denoising through a background elimination method, and the characteristic information in the obtained local image only has effective ship characteristic information.
With reference to the first aspect, in a third embodiment of the first aspect, the second preset threshold is greater than the first preset threshold.
According to the ship retrieval method provided by the embodiment of the invention, when the first preset threshold and the second preset threshold are set, the setting of the second preset threshold is larger than the first threshold, so that effective implementation of secondary screening can be ensured, accurate retrieval of ships can be further ensured, and the accuracy of ship retrieval is improved. The difference between the first preset threshold and the second preset threshold is mainly different from the image entropy contained in the contrast image, the ship contrast based on the first preset threshold adopts all ship feature information in the ship image to be retrieved, the value of the image entropy is low, and the image entropy is compared with all ship feature information in the ship image in the feature database, because the distribution of the feature information is not uniform, the contrast similarity is not particularly high, and the required limited threshold is not required to be too large; the ship comparison under the second threshold value basis adopts the ship local image after denoising, the effective ship characteristic information quantity is greatly improved, the image entropy is improved accordingly, and only the ship image which is highly similar to the image entropy is the target ship.
With reference to the first aspect, in a fourth embodiment of the first aspect, before the identifying the ship position from the ship image to be retrieved by using the pre-constructed neural network model, the method further includes: acquiring a plurality of ship images; classifying according to the ship types of the ship images, and marking the ship positions on all the ship images to obtain a ship image sample set used for training a model; and training an initial neural network model by using the ship image sample set to obtain a neural network model for detecting the position of the ship image on the ship.
With reference to the first aspect, in a fifth embodiment of the first aspect, identifying a ship position from the ship image to be retrieved by using a pre-constructed neural network model includes: dividing the ship image into a plurality of first areas; calculating the similarity of each adjacent area of the plurality of first areas; merging the two first areas with the highest similarity to obtain at least one second area; calculating the similarity of the second area and other adjacent first areas; combining the second region with the first region with the highest similarity to obtain a third region; and repeating the steps until all the first areas are combined to obtain the area where the final ship position is located.
According to the ship retrieval method provided by the embodiment of the invention, when ship position identification is carried out on a ship image to be retrieved, the ship image to be retrieved is initialized based on an image segmentation method, and a plurality of area blocks are generated; calculating the similarity of every two adjacent area blocks, and combining the two most similar adjacent area blocks into a new area; and repeatedly calculating the similarity of each adjacent region block based on the new region block, and selecting two adjacent region blocks with the highest similarity to combine into a new region block until the similarity calculation of all the region blocks is completed. Through the steps, the ship position target area in the ship image to be retrieved is determined, the ship is accurately positioned, the interference of other non-ship target ground objects in the ship image to be retrieved is eliminated, and the accuracy of ship retrieval is guaranteed.
With reference to the first aspect, in a sixth embodiment of the first aspect, the ship images and the ship image to be retrieved are both satellite images or aerial images.
According to a second aspect, an embodiment of the present invention provides a ship retrieval apparatus, including:
the acquisition module is used for acquiring the image of the ship to be retrieved; the extraction module is used for identifying the ship position from the ship image to be retrieved by utilizing a pre-constructed neural network model and extracting the characteristic vector of the ship to be retrieved; the comparison module is used for comparing the ship to be retrieved with a pre-constructed feature database based on the feature vector and calculating a first similarity between the ship to be retrieved and the ship in the feature database, wherein the feature database stores ship feature vectors and a corresponding relation between the ship feature vectors and the ship; the first determining module is used for selecting ships with the similarity greater than a first preset threshold value to obtain a pre-retrieval result; the intercepting module is used for intercepting a local image on the ship to be retrieved from the position of the ship on the ship image to be retrieved; the screening module is used for traversing the local image through each ship image in the pre-retrieval result and calculating a second similarity of the local image and an area, with the same size as the local image, in each ship image in the pre-retrieval result; and the second determining module is used for determining the ship to be retrieved as the target ship when the second similarity reaches a second preset threshold value in the pre-retrieval result.
According to a third aspect, embodiments of the present invention provide an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, and the processor executing the computer instructions to perform the ship retrieval method according to the first aspect or any one of the embodiments of the first aspect.
According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions for causing a computer to execute the ship retrieval method described in the first aspect or any one of the implementation manners of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a specific example of a ship search method according to embodiment 1 of the present invention;
fig. 2 is a flowchart of a specific example of local image capturing in the ship search method according to embodiment 1 of the present invention;
fig. 3 is a flowchart of a specific example of the neural network model construction in the ship search method according to embodiment 1 of the present invention;
fig. 4 is a flowchart of a specific example of the ship position identification in the ship retrieval method according to embodiment 1 of the present invention;
fig. 5 is a schematic structural diagram of a specific example of the ship image retrieval device according to embodiment 2 of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a specific example of the electronic device in embodiment 3 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment provides a ship retrieval method, which is used for retrieving ship images. It should be noted that the steps illustrated in the flow charts of the figures may be performed in a computing system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flow charts, in some cases, the steps illustrated or described may be performed in an order different than presented herein. As shown in fig. 1, the method may include the steps of:
s10, acquiring the image of the ship to be retrieved;
s11, identifying the ship position from the ship image to be retrieved by utilizing a pre-constructed neural network model, and extracting the feature vector of the ship to be retrieved;
according to the ship retrieval method provided by the embodiment of the invention, after the ship image to be retrieved is obtained, the pre-constructed neural network model is utilized to extract the feature vector of the ship image to be retrieved, and simultaneously, the position of the ship is identified, so that the target area of the ship is initially locked, the comparison data volume of subsequent ship feature comparison is reduced, meanwhile, the interference of other non-ship feature vectors can be eliminated, the comparison effectiveness of the subsequent ship feature vectors and a feature database is ensured, and the accuracy of ship retrieval is improved.
S12, comparing the ship to be retrieved with a pre-constructed feature database based on the feature vector, and calculating a first similarity between the ship to be retrieved and the ship in the feature database, wherein the feature database stores ship feature vectors and a corresponding relation between the ship feature vectors and the ship;
the ship retrieval method provided by the embodiment of the invention can determine the ship feature vector by comparing with the pre-constructed feature database based on similarity calculation, specifically can calculate the similarity of the pre-constructed feature database and the extracted characteristic information of the ship to be retrieved according to the SURF algorithm, and can also calculate the similarity of the pre-constructed feature database and the extracted characteristic information of the ship to be retrieved according to the Euclidean distance. The similarity calculation algorithm is not limited in the embodiment of the invention and can be determined according to the requirement.
S13, selecting ships with the similarity larger than a first preset threshold value to obtain a pre-retrieval result;
according to the ship retrieval method provided by the embodiment of the invention, based on the calculation of the similarity of the pre-constructed feature database and the extracted feature vector of the ship to be retrieved, all obtained similarity results are compared with a first preset threshold, and the ship image with the similarity exceeding the first preset threshold is used as a preliminary screening result, for example, the ship image A, B, C, D, so as to lay a cushion for subsequent further screening. For example, the first preset threshold may be 90%. The first preset threshold is not limited, and can be determined according to needs.
S14, intercepting a local image on the ship to be retrieved from the position of the ship on the ship image to be retrieved;
according to the ship retrieval method provided by the embodiment of the invention, after the primary retrieval result is obtained, in order to realize comparison with higher precision so as to achieve the effect of secondary screening, the ship image to be retrieved is subjected to local image interception, so that the data volume of the compared feature vector is reduced, and meanwhile, the relative density of the compared ship feature vector is improved, on the basis, compared with the first retrieval comparison, the requirement is higher, and the accuracy of ship retrieval is improved.
S15, traversing the local image through each ship image in the pre-search result, and calculating a second similarity of the local image and an area in each ship image in the pre-search result, wherein the area is the same as the local image in size;
illustratively, after the bow local image in the ship image to be retrieved is captured, the captured bow local image is slid in the ship image a in the preliminary retrieval result over the whole ship image a, the similarity of the bow local image and the area of the ship image a locked by sliding each time is calculated, the same pass and similarity calculation are performed with the ship image B, C, D in other preliminary retrieval results, a set of similarities of all the pass areas in the ship image A, B, C, D is obtained respectively, and the second similarity is determined.
The ship retrieval method provided by the embodiment of the invention is based on the interception of the local images of the ship, and in the process of carrying out the second comparison, the main steps are that the intercepted local images pass through all ship images in the primary retrieval result, and then the similarity of the local images and all local images in each ship image passing through the same-size area is respectively calculated, so that the second similarity is obtained. Through the calculation of the similarity of the second system, a new reference basis can be provided for subsequent screening, and meanwhile, the difference of the modes obtained by the similarity of two times can be ensured, so that the effective secondary screening is ensured to be realized, and the accuracy of ship retrieval is improved.
S16, when the pre-retrieval result has a target ship with the second similarity reaching a second preset threshold value, determining that the ship to be retrieved is the target ship.
Illustratively, the second preset threshold is 96%, and the highest similarity compared in the preliminary search ship image A, B, C, D is 90%, 91%, 94%, and 98%, respectively, so that the ship corresponding to the ship image D can be determined as the ship in the ship image to be searched. The second preset threshold is not limited in the embodiment of the invention and can be determined according to requirements.
The ship retrieval method provided by the embodiment of the invention is based on the repeated identification degree calculation of the intercepted local ship image and the ship image of each preliminary retrieval result, each obtained second similarity result is compared with a second preset threshold value, the ship image containing the area with the similarity reaching or exceeding the second preset threshold value is taken as a final retrieval result, and the ship corresponding to the ship image is determined to be the ship to be retrieved. On the basis, secondary screening can be effectively realized, and the accuracy of ship retrieval is further ensured.
Preferably, the second preset threshold is greater than the first preset threshold.
Specifically, the difference between the first preset threshold and the second preset threshold is mainly different from the image entropy contained in the comparison image, the ship comparison based on the first preset threshold adopts all ship feature information in the ship image to be retrieved, the value of the image entropy is relatively low, and the comparison result is also all ship feature information of the ship image in the feature database, because the distribution of the feature information is not uniform, the comparison similarity is not particularly high, and the required limited threshold is not required to be too large; the ship comparison under the second threshold value basis adopts the ship local image after denoising, the effective ship characteristic information quantity is greatly improved, the image entropy is improved accordingly, only the ship image which is highly similar to the image entropy is the target ship, and therefore the setting of the second preset threshold value is higher than the first preset threshold value.
According to the ship retrieval method provided by the embodiment of the invention, when the first preset threshold and the second preset threshold are set, the setting of the second preset threshold is larger than the first threshold, so that effective implementation of secondary screening can be ensured, accurate retrieval of ships can be further ensured, and the accuracy of ship retrieval is improved.
Preferably, as shown in fig. 2, when the capturing of the local image in S14 is implemented, the method includes the following steps:
s131, determining a target frame of a local image to be intercepted;
s132, traversing from the ship image to be retrieved according to the size of the target frame, and calculating the image entropy of each target frame position;
s133, the local image is obtained by intercepting the area where the target frame with the maximum image entropy is located at the ship position.
Specifically, the size of a target frame of the captured local image is determined, for example, 4% of the captured ship image to be retrieved is determined as the size of the target frame, then the target frame is regularly slid in the ship image to be retrieved, and the image entropy of the area through which each target frame passes is calculated, and the calculation method may be:
wherein p isiIs the probability that the ship feature information appears in the area through which each target box passes. The embodiment of the invention does not limit the calculation mode of the image entropy and can determine the calculation mode according to the requirement.
And then selecting the area with the maximum image entropy as the intercepted object according to the size of the image entropy.
According to the ship retrieval method provided by the embodiment of the invention, the area with the largest intercepted image entropy is the local image, so that the intercepted local image contains the ship characteristic information quantity as much as possible, the method is suitable for the second image comparison, the second screening is effectively implemented, meanwhile, the ship retrieval method can realize the image comparison with higher precision due to more ship characteristic information quantities, and the ship retrieval accuracy is improved.
Preferably, based on the capturing of the local ship image in S14, in order to ensure that the comparison is performed for the second time, the method further includes, after capturing the local image:
carrying out background image identification on the local image to obtain the background image;
and removing the background image from the local image.
Specifically, the interference noise elimination method is adopted to eliminate the interference noise of the ship on the intercepted local images, the images in the intercepted local images are guaranteed to be effective ship characteristic information, the accuracy comparison can be realized when the follow-up and pre-retrieval results are compared, and the ship retrieval accuracy is improved.
Preferably, as shown in fig. 3, when the ship position recognition in S11 described above is implemented, the method includes the steps of:
s111, dividing the ship image into a plurality of first areas;
s112, calculating the similarity between the plurality of first areas and each adjacent area;
s113, combining the two first areas with the highest similarity to obtain at least one second area;
s114, calculating the similarity between the second area and other adjacent first areas;
s115, merging the second region with the first region with the highest similarity to obtain a third region;
and S116, repeating the steps until all the first areas are combined to obtain the area where the final ship position is located.
Specifically, firstly, a ship image to be retrieved is divided to generate a plurality of area blocks, then similarity calculation is carried out on each area block and adjacent area blocks, two adjacent area blocks with the highest similarity are determined and combined into a new area block, then the similarity of the area blocks adjacent to the area blocks is calculated based on the combined new area block, two area blocks with the highest similarity are selected again and combined into a new area block, the steps are repeated until the similarity calculation of all the area blocks is completed, the last combined area block is determined, and ship position identification is completed.
According to the ship retrieval method provided by the embodiment of the invention, the ship position is preferentially identified before the ship image to be retrieved is compared with the characteristic database, so that the ship characteristic information in the ship image can be ensured to be more obvious, the interference of other noises is eliminated, and the accuracy of ship retrieval is improved.
Optionally, the building of the neural network in S11 includes the following steps:
s21, acquiring a plurality of ship images;
s22, classifying according to the ship types of the ship images, and labeling the positions of the ships on all the ship images to obtain a ship image sample set for training a model;
and S23, training the initial neural network model by using the ship image sample set to obtain the neural network model for detecting the position of the ship on the ship image.
The ship retrieval method provided by the embodiment of the invention is not limited to the construction of the neural network, and for the identification and detection of the ship position, the specific steps are as described in the above step S11 for identifying the ship position, which are not described herein again.
According to the ship retrieval method provided by the embodiment of the invention, in the preliminary retrieval result obtained in the prior art, the local image is compared with the ship image in the preliminary retrieval result, and a second preset threshold higher than the first preset threshold is set according to the actual situation to screen the preliminary retrieval result, so that a more accurate ship retrieval result is obtained, the accuracy of ship retrieval can be ensured, and the accuracy of ship retrieval is improved.
Example 2
In this embodiment, a ship retrieval apparatus is provided, which is used to implement the above embodiment 1 and the preferred embodiments thereof, and the description thereof is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The embodiment of the invention provides a ship retrieval device, which can be used for realizing the ship retrieval method described in embodiment 1 or any optional implementation manner thereof. As shown in fig. 5, the apparatus includes: the system comprises an acquisition module 10, an extraction module 20, a comparison module 30, a first determination module 40, an interception module 50, a screening module 60 and a second determination module 70.
The acquiring module 10 is configured to acquire a ship image to be retrieved, and a specific implementation manner is shown in step S10 in the embodiment, which is not described herein again.
The extracting module 20 is configured to identify a ship position from the ship image to be retrieved by using a pre-constructed neural network model, and extract a feature vector of the ship to be retrieved, where a specific implementation manner is shown in step S11 in the embodiment, and details are not described here.
A comparison module 30, configured to compare the ship to be retrieved with a pre-constructed feature database based on the feature vector, and calculate a first similarity between the ship to be retrieved and a ship in the feature database, where the feature database stores ship feature vectors and their corresponding relationships to ships, and a specific implementation is shown in step S12 in the embodiment and is not described herein again.
The first determining module 40 is configured to select a ship with a similarity greater than a first preset threshold to obtain a pre-retrieval result, and a specific implementation manner is step S13 in the embodiment, which is not described herein again.
The capturing module 50 is configured to capture a local image of the ship to be retrieved from the ship position on the ship image to be retrieved, and a specific implementation manner is shown in step S14 in the embodiment, which is not described herein again.
The screening module 60 is configured to traverse the local image through each ship image in the pre-search result, and calculate a second similarity between the local image and an area of the pre-search result, where the area is the same as the local image in size, in which a specific implementation is shown in step S15 in the embodiment, and details are not repeated here.
A second determining module 70, configured to determine, when the pre-retrieval result has a target ship of which the second similarity reaches a second preset threshold, that the ship to be retrieved is the target ship, where a specific embodiment is step S16 in the embodiment, and details are not described here again.
Example 3
An electronic device according to an embodiment of the present invention is provided, as shown in fig. 6, the electronic device includes a processor 31 and a memory 32, where the processor 31 and the memory 32 may be connected by a bus or in another manner, and fig. 6 illustrates an example of a connection by a bus.
The processor 31 may be a Central Processing Unit (CPU). The processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of such chips.
The memory 32 is a non-transitory computer readable storage medium, and can be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the ship retrieval method in the embodiment of the present invention. The processor 31 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 32, namely, implements the ship retrieval method in the above method embodiment.
The memory 32 may further include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 31, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, and these remote memories may be connected to the processor 31 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The memory 32 stores one or more modules that, when executed by the processor 31, perform the ship retrieval method of the embodiment shown in fig. 1-4.
The details of the electronic device described above can be understood with reference to the corresponding descriptions and effects of the embodiment shown in fig. 1 to 4. And will not be described in detail herein.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.
Claims (10)
1. A ship retrieval method, comprising the steps of:
acquiring an image of a ship to be retrieved;
identifying a ship position from the ship image to be retrieved by utilizing a pre-constructed neural network model, and extracting a characteristic vector of the ship to be retrieved;
comparing the ship to be retrieved with a pre-constructed feature database based on the feature vector, and calculating a first similarity between the ship to be retrieved and the ship in the feature database, wherein the feature database stores ship feature vectors and corresponding relations between the ship feature vectors and the ship;
selecting ships with similarity greater than a first preset threshold value to obtain a pre-retrieval result;
intercepting a local image on the ship to be retrieved from the position of the ship on the ship image to be retrieved;
traversing the local image through each ship image in the pre-retrieval result, and calculating a second similarity of the local image and an area, which has the same size as the local image, in each ship image in the pre-retrieval result;
and when the pre-retrieval result has a target ship of which the second similarity reaches a second preset threshold value, determining that the ship to be retrieved is the target ship.
2. The ship retrieval method of claim 1, wherein the capturing a partial image of the ship to be retrieved from the ship position on the ship image to be retrieved comprises:
determining a target frame of a local image to be intercepted;
traversing from the ship image to be retrieved according to the size of the target frame, and calculating the image entropy of each target frame position;
and intercepting the local image in the area where the target frame with the maximum image entropy is located at the ship position.
3. The ship retrieval method of claim 2, wherein after the local image is obtained by clipping the area where the target frame with the maximum image entropy at the ship position is located, the method further comprises:
carrying out background image identification on the local image to obtain the background image;
and removing the background image from the local image.
4. The vessel retrieval method of claim 1, wherein the second preset threshold is greater than the first preset threshold.
5. The method for searching ships according to claim 1, wherein before the identifying the ship position from the ship image to be searched by using the pre-constructed neural network model, the method further comprises:
acquiring a plurality of ship images;
classifying according to the ship types of the ship images, and marking the ship positions on all the ship images to obtain a ship image sample set used for training a model;
and training an initial neural network model by using the ship image sample set to obtain a neural network model for detecting the position of the ship image on the ship.
6. The ship retrieval method of claim 1, wherein identifying ship positions from the ship images to be retrieved by using a pre-constructed neural network model comprises:
dividing the ship image into a plurality of first areas;
calculating the similarity between the plurality of first areas and each adjacent area;
merging the two first areas with the highest similarity to obtain at least one second area;
calculating the similarity of the second area and other adjacent first areas;
combining the second region with the first region with the highest similarity to obtain a third region;
and repeating the steps until all the first areas are combined to obtain the area where the final ship position is located.
7. The ship retrieval method according to claim 1, wherein the ship images and the ship image to be retrieved are both satellite images or aerial images.
8. A ship retrieval apparatus, comprising:
the acquisition module is used for acquiring the image of the ship to be retrieved;
the extraction module is used for identifying the ship position from the ship image to be retrieved by utilizing a pre-constructed neural network model and extracting the characteristic vector of the ship to be retrieved;
the comparison module is used for comparing the ship to be retrieved with a pre-constructed feature database based on the feature vector and calculating a first similarity between the ship to be retrieved and the ship in the feature database, wherein the feature database stores ship feature vectors and a corresponding relation between the ship feature vectors and the ship;
the first determining module is used for selecting ships with the similarity greater than a first preset threshold value to obtain a pre-retrieval result;
the intercepting module is used for intercepting a local image on the ship to be retrieved from the position of the ship on the ship image to be retrieved;
the screening module is used for traversing the local image through each ship image in the pre-retrieval result and calculating a second similarity of the local image and an area, with the same size as the local image, in each ship image in the pre-retrieval result;
and the second determining module is used for determining the ship to be retrieved as the target ship when the second similarity reaches a second preset threshold value in the pre-retrieval result.
9. An electronic device, comprising:
a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the vessel retrieval method of any of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the ship retrieval method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011232448.8A CN112232289A (en) | 2020-11-06 | 2020-11-06 | Ship retrieval method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011232448.8A CN112232289A (en) | 2020-11-06 | 2020-11-06 | Ship retrieval method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112232289A true CN112232289A (en) | 2021-01-15 |
Family
ID=74122112
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011232448.8A Pending CN112232289A (en) | 2020-11-06 | 2020-11-06 | Ship retrieval method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112232289A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113849703A (en) * | 2021-11-30 | 2021-12-28 | 亿海蓝(北京)数据技术股份公司 | Ship information query method and device and readable storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104463104A (en) * | 2014-11-14 | 2015-03-25 | 武汉工程大学 | Fast detecting method and device for static vehicle target |
CN106227851A (en) * | 2016-07-29 | 2016-12-14 | 汤平 | Based on the image search method searched for by depth of seam division that degree of depth convolutional neural networks is end-to-end |
CN107679250A (en) * | 2017-11-01 | 2018-02-09 | 浙江工业大学 | A kind of multitask layered image search method based on depth own coding convolutional neural networks |
CN108256551A (en) * | 2017-12-15 | 2018-07-06 | 安徽四创电子股份有限公司 | A kind of vehicle checking method based on region convolutional neural networks |
CN109543579A (en) * | 2018-11-14 | 2019-03-29 | 杭州登虹科技有限公司 | Recognition methods, device and the storage medium of target object in a kind of image |
CN111553182A (en) * | 2019-12-26 | 2020-08-18 | 珠海大横琴科技发展有限公司 | Ship retrieval method and device and electronic equipment |
-
2020
- 2020-11-06 CN CN202011232448.8A patent/CN112232289A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104463104A (en) * | 2014-11-14 | 2015-03-25 | 武汉工程大学 | Fast detecting method and device for static vehicle target |
CN106227851A (en) * | 2016-07-29 | 2016-12-14 | 汤平 | Based on the image search method searched for by depth of seam division that degree of depth convolutional neural networks is end-to-end |
CN107679250A (en) * | 2017-11-01 | 2018-02-09 | 浙江工业大学 | A kind of multitask layered image search method based on depth own coding convolutional neural networks |
CN108256551A (en) * | 2017-12-15 | 2018-07-06 | 安徽四创电子股份有限公司 | A kind of vehicle checking method based on region convolutional neural networks |
CN109543579A (en) * | 2018-11-14 | 2019-03-29 | 杭州登虹科技有限公司 | Recognition methods, device and the storage medium of target object in a kind of image |
CN111553182A (en) * | 2019-12-26 | 2020-08-18 | 珠海大横琴科技发展有限公司 | Ship retrieval method and device and electronic equipment |
Non-Patent Citations (1)
Title |
---|
李湘滨 等: "大孔径静态干涉成像光谱仪图像校正技术", 《光电工程》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113849703A (en) * | 2021-11-30 | 2021-12-28 | 亿海蓝(北京)数据技术股份公司 | Ship information query method and device and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107153817B (en) | Pedestrian re-identification data labeling method and device | |
Zamir et al. | Accurate image localization based on google maps street view | |
CN105512683B (en) | Object localization method and device based on convolutional neural networks | |
US9747687B2 (en) | System and method for detecting polyps from learned boundaries | |
US20150054824A1 (en) | Object detection method, object detection device, and image pickup device | |
CN106529602B (en) | A kind of millimeter-wave image automatic target recognition method and device | |
Maurya et al. | Road extraction using k-means clustering and morphological operations | |
CN103699905B (en) | Method and device for positioning license plate | |
CN109145803B (en) | Gesture recognition method and device, electronic equipment and computer readable storage medium | |
CN105469105A (en) | Cigarette smoke detection method based on video monitoring | |
CN105426903A (en) | Cloud determination method and system for remote sensing satellite images | |
CN106557740B (en) | The recognition methods of oil depot target in a kind of remote sensing images | |
CN110348289B (en) | Finger vein identification method based on binary image | |
CN109255802B (en) | Pedestrian tracking method, device, computer equipment and storage medium | |
CN103530648A (en) | Face recognition method based on multi-frame images | |
CN111814690B (en) | Target re-identification method, device and computer readable storage medium | |
CN111639653A (en) | False detection image determining method, device, equipment and medium | |
CN111553182A (en) | Ship retrieval method and device and electronic equipment | |
Matteoli et al. | Automatic target recognition within anomalous regions of interest in hyperspectral images | |
US20200034649A1 (en) | Object tracking system, intelligent imaging device, object feature extraction device, and object feature extraction method | |
CN111695572A (en) | Ship retrieval method and device based on convolutional layer feature extraction | |
CN112232289A (en) | Ship retrieval method and device, electronic equipment and storage medium | |
CN118262388A (en) | Fingerprint identification method and device, electronic equipment and storage medium | |
US20230012137A1 (en) | Pedestrian search method, server, and storage medium | |
CN106778675B (en) | A kind of recognition methods of target in video image object and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210115 |