A method, device and electronic equipment for water surface target recognition based on visual images
By taking multiple images of water targets at different angles at night, calculating the comprehensive credibility coefficient and using a deep learning model for identification, the problem of reduced recognition accuracy under the influence of light and angle is solved, and the accuracy of recognition of water targets at night is improved.
Patent Information
- Application Number
- CN202410254580.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-06
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-03-06
AI Technical Summary
In the existing technology, the recognition accuracy is reduced due to the influence of light intensity and shooting angle in nighttime image recognition, especially when the overall characteristics of the water target are not conducive to display, recognition errors are prone to occur.
Take multiple target images from different angles in a night environment, calculate the illumination value of each image and the length and height of the bounding box, generate a comprehensive credibility coefficient, and identify it through the Faster R-CNN and Mask R-CNN models. Finally, according to Credibility level selects the most credible target type.
By comprehensively considering the effects of light intensity and shooting angle, the accuracy of recognition of water targets in the night environment is improved and the occurrence of recognition errors is reduced.
Smart Images

Figure CN118071997B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of visual recognition technology, and in particular to a method, device and electronic equipment for water surface target recognition based on visual images. Background Art
[0002] Object detection is to find all objects of interest in an image, which includes two subtasks: object location and object classification, that is, to determine the category and location of the object at the same time. Object detection is a popular direction in computer vision and image processing. It is widely used in many fields such as robot navigation, intelligent video surveillance, industrial inspection, etc. It has important practical significance to reduce the consumption of human capital through computer vision. Therefore, object detection has become a hot research topic in theory and application in recent years. It is an important branch of image processing and computer vision, and also the core part of intelligent monitoring system. At the same time, object detection is also a basic algorithm in the field of pan-identity recognition, which plays a vital role in subsequent tasks such as face recognition, gait recognition, crowd counting, instance segmentation, etc.
[0003] Due to the widespread use of deep learning, target detection algorithms have developed rapidly. Since 2006, under the leadership of Hinton, Bengio, Lecun and others, a large number of papers on deep neural networks have been published. In particular, in 2012, Hinton's research group participated in the ImageNet image recognition competition for the first time, and won the championship by building a CNN network AlexNet. Since then, neural networks have begun to receive widespread attention. Deep learning uses multi-layer computing models to learn abstract data representations and can discover complex structures in big data. At present, this technology has been successfully applied to a variety of pattern classification problems including computer vision.
[0004] In the prior art, a method for detecting and identifying ships in day and night images with a publication number of "CN110334703B" (classification number G06K9 / 32) includes the following steps: S1, using a photosensitive element to detect the illumination of ship images at different time periods, and dividing the ship images into two categories: daytime images and nighttime images according to different illumination ranges; S2, for daytime images, firstly detecting all objects that appear within the detection range, and then screening out ship-like objects therefrom; S3, for nighttime images, firstly detecting significant targets in nighttime images, and screening out ship-like objects therefrom; S4, based on the screened-out ship-like objects, obtaining the real-time positions and category information of all ships in the current video frame, thereby realizing the detection and identification of ship targets in all-time scenarios, and having good robustness.
[0005] However, the existing technology still has major defects. For example, in order to solve the problem of large difference in light intensity between daytime images and nighttime images, the existing technology sets two different recognition methods to recognize daytime images and nighttime images respectively, so as to achieve recognition in all-time scenes. However, nighttime images will be affected by factors such as light intensity and image shooting angle during the recognition and analysis process. For example, night images taken under low light intensity and image shooting angles that are not conducive to displaying the overall characteristics of surface targets are prone to recognition and judgment errors, resulting in a decrease in the accuracy of nighttime image recognition. Summary of the invention
[0006] The purpose of the present invention is to provide a method, device and electronic equipment for surface target recognition based on visual images to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] A method for recognizing a surface target based on a visual image comprises the following steps:
[0009] S1, taking multiple target images of the same surface target at different angles in a night environment, and obtaining the illumination value of each target image;
[0010] S2, locating the target object in the target image and drawing a bounding box of the target object, and calculating the maximum shooting length and maximum shooting height of the target object according to the length and height of the bounding box;
[0011] S3, generating a comprehensive credibility coefficient of the target image according to the illumination value of the target image, the maximum shooting length of the target object, and the maximum shooting height;
[0012] S4, input the target image into the Faster R-CNN model, the Faster R-CNN model identifies the target object in each target image and outputs the corresponding target object type;
[0013] S5, accumulating and averaging the comprehensive credibility coefficients of the target images corresponding to the same target object type to generate a credibility coefficient of the target object type, and taking the target object type with the largest credibility coefficient as the most credible target object type.
[0014] Furthermore, the illumination value is calibrated as E i , i represents the number of different target images, and i = 1, 2, 3, ..., m, and m represents the total number of different target images, and m ≥ 5, m ∈ N + , the length of the bounding box is marked as L1 i , mark the height of the bounding box as H1 i , the maximum shooting length of the target is calibrated as L2i , calibrate the maximum shooting height of the target as H2 i .
[0015] Furthermore, the specific logic of locating the target object in the target image and drawing the bounding box of the target object, and calculating the maximum shooting length and maximum shooting height of the target object according to the length and height of the bounding box is:
[0016] S21, train and generate a Mask R-CNN model, input the target image into the Mask R-CNN model, and the Mask R-CNN model outputs the location information and pixel-level mask of the target object in the target image;
[0017] S22, according to the target position information output by the Mask R-CNN model, draw a rectangular bounding box inscribed in the outer edge of the target, and obtain the length and height of the bounding box;
[0018] S23, calculating the size ratio of the target image according to the reference object of known size in the target image, and generating the maximum shooting length and maximum shooting height of the target object according to the size ratio and the length and height of the bounding box, and the calculation formula is as follows:
[0019]
[0020] Among them, Hsj i Indicates the actual height of the selected reference object in the i-th target image, Hxs i Indicates the height of the selected reference object in the target image in the i-th target image, λ i Represents the size ratio of the i-th target image.
[0021] Furthermore, the specific logic of generating the comprehensive credibility coefficient of the target image according to the illumination value of the target image, the maximum shooting length of the target object, and the maximum shooting height is:
[0022] S31, order To generate the intermediate first credibility coefficient of each target image, and is a constraint condition, for w11, w12, w13, ..., w1 i , …, w1 m The first credibility coefficients w11', w12', w13', ..., w1 are generated by scaling the target images. i ', ..., w1 m ';
[0023] S32, order To generate the intermediate second credibility coefficient of each target image, and As a constraint condition, w21, w22, w23, ..., w2 i , ..., w2 m Scaling is performed to generate the second credibility coefficients w21', w22', w23', ..., w2 of each target image. i ', ..., w2 m ';
[0024] Wherein, α1, α2, and α3 are all preset proportional coefficients, and α1+α2+α3=1, and 0<α3<α2<α1<1;
[0025] S33, based on the first credibility coefficient w1 of the target image i ', and the second credibility coefficient w2 i ', generate the comprehensive credibility coefficient w1 of the target image i , the calculation formula is as follows:
[0026] w i '=β1*w1 i '+β2*w2 i '
[0027] Wherein, β1 and β2 are both preset proportional coefficients, β1+β2=1, and 0<β2<β1<1.
[0028] Furthermore, the value range of α1 is 0.5-0.7, the value range of α2 is 0.2-0.3, and the value range of α3 is 0.1-0.2.
[0029] Furthermore, the value range of β1 is 0.6-0.8, and the value range of β2 is 0.2-0.4.
[0030] Furthermore, the target object types include passenger ships, cargo ships, light ships, warships, sailboats and others.
[0031] A surface target recognition device based on visual images, used in the above-mentioned surface target recognition method based on visual images, comprising:
[0032] A photographing and illuminance value acquisition module, which is used to take multiple target images of the same surface target at different angles in a night environment and obtain the illuminance value of each target image;
[0033] A shooting size acquisition module, the shooting size acquisition module is used to locate the target object in the target image and draw a boundary box of the target object, and calculate the maximum shooting length and maximum shooting height of the target object according to the length and height of the boundary box;
[0034] A comprehensive credibility coefficient calculation module, the comprehensive credibility coefficient calculation module is used to generate a comprehensive credibility coefficient of the target image according to the illumination value of the target image, the maximum shooting length and the maximum shooting height of the target object;
[0035] A target object type output module, wherein the target object type output module is used to input the target image into the Faster R-CNN model, and the Faster R-CNN model recognizes the target in each target image and outputs the corresponding target object type;
[0036] The most credible target type generation module is used to accumulate and average the comprehensive credibility coefficients of target images corresponding to the same target type to generate a credibility coefficient of the target type, and take the target type with the largest credibility coefficient as the most credible target type.
[0037] An electronic device, comprising:
[0038] Memory, used to store computer programs;
[0039] A processor is used to execute the computer program to implement the above-mentioned surface target recognition method based on visual images.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The surface target recognition method, device and electronic device based on visual images of the present invention shoot multiple target images for the same target and output the target type respectively, then calculate the comprehensive credibility coefficient of each target image according to the illumination value of the target image, the maximum shooting length and the maximum shooting height of the target, and finally calculate the credibility coefficient of each target type according to the comprehensive credibility coefficient to screen out the most credible target type. Compared with the single target image recognition, the influence factors of light intensity and shooting angle on target recognition are comprehensively considered, and the credibility of the output multiple target types is analyzed and judged, so as to screen out the most credible target type, thereby improving the accuracy of water target recognition in night environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of the method for recognizing a water surface target based on a visual image of the present invention;
[0043] Figure 2 This is a module unit diagram of the surface target recognition device based on visual images of the present invention. DETAILED DESCRIPTION
[0044] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0045] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0046] Embodiment 1:
[0047] See also Figure 1 The present invention provides a method for identifying a surface target based on a visual image according to an embodiment of the present invention, comprising the following steps:
[0048] S1, taking multiple target images of the same surface target at different angles in a night environment, and obtaining the illumination value of each target image;
[0049] Among them, the illumination value is calibrated as E i , i represents the number of different target images, and i = 1, 2, 3, ..., m, and m represents the total number of different target images, and m ≥ 5, m ∈ N + ;
[0050] It should be noted that a common optical camera can be used to photograph a surface target. When photographing a surface target in motion, the optical camera can be installed in a fixed position, and the camera head of the optical camera rotates to capture the surface target in motion, so that the optical camera can capture multiple target images at different shooting angles. Similarly, when photographing a surface target in a stationary state, the optical camera can be installed on a water vessel, and the water vessel drives the optical camera to move past the surface target, so that the optical camera can capture multiple target images at different shooting angles.
[0051] It should be noted that the illumination value of the target image can be obtained by using a photosensitive element detection method, that is, the illumination value of the target image transmitted by the optical camera is detected by a photosensitive element. This is a prior art and will not be described in detail here.
[0052] S2, locating the target object in the target image and drawing a bounding box of the target object, and calculating the maximum shooting length and maximum shooting height of the target object according to the length and height of the bounding box;
[0053] Among them, the length of the bounding box is marked as L1 i , L1 i Represents the length of the bounding box of the target object in the i-th target image, and the height of the bounding box is calibrated as H1 i , H1 i Represents the bounding box height of the target object in the i-th target image;
[0054] Among them, the maximum shooting length of the target object is calibrated as L2 i , L2 i It represents the maximum shooting length of the target object under the shooting angle when shooting the i-th target image, and the maximum shooting height of the target object is calibrated as H2 i , H2 i It represents the maximum shooting height of the target object under the shooting angle when shooting the i-th target image;
[0055] Step S2 specifically includes the following steps:
[0056] S21, train and generate a Mask R-CNN model, input the target image into the Mask R-CNN model, and the Mask R-CNN model outputs the location information and pixel-level mask of the target object in the target image;
[0057] It should be noted that training and generating a Mask R-CNN model and then outputting the position information of the target object in the target image according to the Mask R-CNN model is an existing technology. Taking the target object as a ship as an example, the method of training and generating a Mask R-CNN model is as follows:
[0058] S211, select the pre-trained Mask R-CNN model as the basic model, select multiple surface ship images from the image library and randomly divide them into training sets or test sets;
[0059] S212, inputting the surface ship image in the training set into the pre-trained Mask R-CNN model for training, adjusting the model structure and parameters during the training process, specifically using an appropriate loss function to optimize the model parameters, the loss function including a bounding box regression loss and a segmentation loss, the bounding box regression loss is used to accurately locate the position of the target object, and the segmentation loss is used to generate a pixel-level mask of the target;
[0060] S213, using the test set to evaluate the trained Mask R-CNN model to ensure that the model has good generalization ability and accuracy, wherein the evaluation indicators may include target detection accuracy, recall rate, and F1 score, etc., so as to obtain a Mask R-CNN model that can identify the target object in the target image;
[0061] S22, according to the target position information output by the Mask R-CNN model, draw a rectangular bounding box inscribed in the outer edge of the target, and obtain the length and height of the bounding box;
[0062] It should be noted that the position information of the bounding box is determined by the coordinates of the bounding box of the target object output by the Mask R-CNN model. Drawing a bounding box for the target object and obtaining the length and height of the bounding box are existing technologies, which can be obtained using existing Python code.
[0063] S23, calculating the size ratio of the target image according to the reference object of known size in the target image, and generating the maximum shooting length and maximum shooting height of the target object according to the size ratio and the length and height of the bounding box, and the calculation formula is as follows:
[0064]
[0065] It should be noted that Hsj i Indicates the actual height of the selected reference object in the i-th target image, Hxs i Indicates the height of the selected reference object in the target image in the i-th target image, λ i Indicates the size ratio of the i-th target image, Hsj i It can be obtained by on-site measurement or by retrieving from a known database. i It can be directly obtained from the target image through image processing software. This is a prior art and will not be described in detail here.
[0066] S3, generating a comprehensive credibility coefficient of the target image according to the illumination value of the target image, the maximum shooting length of the target object, and the maximum shooting height, including the following steps:
[0067] S31, order To generate the intermediate first credibility coefficient of each target image, and is a constraint condition, for w11, w12, w13, ..., w1 i , ..., w1 m The first credibility coefficients w11', w12', w13', ..., w1 are generated by scaling the target images. i ', ..., w1 m ';
[0068] It should be noted that w1 i represents the first intermediate credibility coefficient of the i-th target image, w1 i ' represents the first credibility coefficient of the i-th target image, E0 is the preset illumination standard value, and E0 can be set to 1Lx;
[0069] It should be noted that E i The larger the value, the greater the illumination value of the i-th target image when it was shot, that is, the better the light, the clearer the features of the target object are photographed, and the higher the accuracy of feature recognition and analysis of the target object through the target image. The intermediate first credibility coefficient w1 of the i-th target image is i , and the first credibility coefficient w1 i 'The bigger it is;
[0070] S32, order To generate the intermediate second credibility coefficient of each target image, and As a constraint condition, w21, w22, w23, ..., w2 i , …, w2 m Scaling is performed to generate the second credibility coefficients w21', w22', w23', ..., w2 of each target image. i ', ..., w2 m ';
[0071] It should be noted that α1, α2, and α3 are all preset proportional coefficients, α1 represents the weight of the maximum shooting length of the target object in the calculation of the intermediate second credibility coefficient, α2 represents the weight of the maximum shooting height of the target object in the calculation of the intermediate second credibility coefficient, α3 represents the weight of the maximum shooting area of the target object in the calculation of the intermediate second credibility coefficient, and α1+α2+α3=1, and 0<α3<α2<α1<1, and the specific values of α1, α2, and α3 are generally determined by those skilled in the art according to actual conditions;
[0072] As an implementation mode, the value range of α1 is 0.5-0.7, the value range of α2 is 0.2-0.3, and the value range of α3 is 0.1-0.2;
[0073] It should be noted that L2 max L21, L22, L23, ..., L2 i , …, L2 m The maximum value in H2 max H21, H22, H23, ..., H2 i , …, H2 m The maximum value in L2 max and H2 maxAll can be obtained from L21, L22, L23, ..., L2 through data processing software i , …, L2 m 、H21、H22、H23、…、H2 i , …, H2 m This is a prior art and will not be described in detail here;
[0074] It should be noted that L2 i and H2 i The larger the value, the larger the maximum length and the maximum height of the target object captured under the shooting angle of the i-th target image, that is, the more features of the target object are captured, and the higher the accuracy of feature recognition analysis of the target object through the target image. The second intermediate credibility coefficient w2 of the i-th target image is i , and the second credibility coefficient w2 i 'The bigger it is;
[0075] S33, based on the first credibility coefficient w1 of the target image i ', and the second credibility coefficient w2 i ', generate the comprehensive credibility coefficient w of the target image i ', the calculation formula is as follows:
[0076] w i '=β1*w1 i '+β2*w2 i '
[0077] It should be noted that β1 and β2 are both preset proportional coefficients, and β1 represents the first credibility coefficient w1 i 'In the comprehensive credibility coefficient w i 'The weight in the calculation, β2 represents the second credibility coefficient w2 i 'In the comprehensive credibility coefficient w i 'The weights in the calculation, and β1+β2=1, and 0<β2<β1<1, the specific values of β1 and β2 are generally determined by those skilled in the art according to actual conditions;
[0078] As an implementation mode, the value range of β1 is 0.6-0.8, and the value range of β2 is 0.2-0.4;
[0079] It should be noted that w i ' represents the comprehensive credibility coefficient of the i-th target image, the first credibility coefficient w1 i ', and the second credibility coefficient w2 i The larger the value, the higher the accuracy of feature recognition and analysis of the target object through the i-th target image, that is, the more reliable the recognition and judgment of the target object is, and the comprehensive credibility coefficient w i'The bigger it is.
[0080] S4, input the target image into the Faster R-CNN model, the Faster R-CNN model identifies the target object in each target image and outputs the corresponding target object type;
[0081] Among them, the target type is marked as LX j , j represents the number of different target types, and j = 1, 2, 3, ..., n, and n represents the total number of different target types, and m ≥ 5, m ∈ N + ;
[0082] As a real-time method, for ship type recognition, the Faster R-CNN model outputs object types including passenger ships, cargo ships, light ships, warships, sailboats, and others;
[0083] It should be noted that training and generating a Faster R-CNN model for identifying target types, then using the Faster R-CNN model to identify targets in target images and outputting the corresponding target types is an existing technology. Taking the identification of ship types as an example, the method of outputting the target type using the Faster R-CNN model is as follows:
[0084] S41, selecting multiple types of ship images and other images from the image library and randomly dividing them into training sets or test sets, initializing RPN network parameters with the pre-trained network model, and fine-tuning the RPN network parameters through the stochastic gradient descent algorithm and the back propagation algorithm;
[0085] S42, using the pre-trained network model to initialize the Faster R-CNN target detection network parameters, and using the RPN network of step S41 to extract the candidate region, and using the training set to train the target detection network;
[0086] S43, reinitialize and fine-tune the RPN network parameters using the target detection network in step S42;
[0087] S44, using the RPN network in step S43 to extract candidate regions and fine-tune the target detection network parameters;
[0088] S45, repeating step S43 and step S44 until the maximum number of iterations is reached or the network converges;
[0089] S46, use the test set to verify the model performance and save the Faster R-CNN model with qualified performance;
[0090] S47, inputting the target image into a Faster R-CNN model with qualified performance, and the Faster R-CNN model recognizes the target object in each target image and outputs the corresponding target object type;
[0091] It should be noted that the initial learning rate in the Faster R-CNN network is 0.0002 and the iterations are 25,000 times.
[0092] S5, accumulating and averaging the comprehensive credibility coefficients of the target images corresponding to the same target type to generate a credibility coefficient of the target type, and taking the target type with the largest credibility coefficient as the most credible target type;
[0093] For example, there are m1 target images corresponding to the jth target type, and the m1 target images are numbered i1, i2, i3, ..., ik, and i1, i2, i3, ..., ik are all positive integers between 1 and m. The credibility coefficient of the jth target type is calibrated as KX j , then the credibility coefficient KX of the j-th target type j The calculation formula is:
[0094]
[0095] Embodiment 2:
[0096] See also Figure 2 The present invention provides a surface target recognition device based on visual images according to an embodiment of the present invention, which is used in the surface target recognition method based on visual images, and comprises:
[0097] The photographing and illumination value acquisition module is used to take multiple target images of the same surface target at different angles in a night environment and obtain the illumination value of each target image;
[0098] The shooting size acquisition module is used to locate the target object in the target image and draw the bounding box of the target object, and calculate the maximum shooting length and maximum shooting height of the target object according to the length and height of the bounding box;
[0099] A comprehensive credibility coefficient calculation module is used to generate a comprehensive credibility coefficient of a target image according to an illumination value of the target image, a maximum shooting length of the target object, and a maximum shooting height;
[0100] The target type output module is used to input the target image into the Faster R-CNN model. The Faster R-CNN model recognizes the target in each target image and outputs the corresponding target type.
[0101] The most credible target type generation module is used to accumulate and average the comprehensive credibility coefficients of target images corresponding to the same target type to generate a credibility coefficient for the target type, and take the target type with the largest credibility coefficient as the most credible target type.
[0102] Embodiment three:
[0103] An electronic device, comprising:
[0104] Memory, used to store computer programs;
[0105] A processor is used to execute a computer program to implement the above-mentioned surface target recognition method based on visual images.
[0106] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0107] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A method for surface target recognition based on visual images, characterized in that: The steps include: S1, taking multiple target images of the same surface target at different angles in a night environment, and obtaining the illumination value of each target image; S2, locating the target object in the target image and drawing a bounding box of the target object, and calculating the maximum shooting length and maximum shooting height of the target object according to the length and height of the bounding box; S3, generating a comprehensive credibility coefficient of the target image according to the illumination value of the target image, the maximum shooting length of the target object, and the maximum shooting height; S4, input the target image into the Faster R-CNN model, the Faster R-CNN model identifies the target object in each target image and outputs the corresponding target object type; S5, accumulating and averaging the comprehensive credibility coefficients of the target images corresponding to the same target type to generate a credibility coefficient of the target type, and taking the target type with the largest credibility coefficient as the most credible target type; The illumination value is calibrated as E i , i represents the number of different target images, and i = 1, 2, 3, ..., m, and m represents the total number of different target images, and m ≥ 5, m ∈ N + , the length of the bounding box is marked as L1 i , mark the height of the bounding box as H1 i , the maximum shooting length of the target is calibrated as L2 i , calibrate the maximum shooting height of the target as H2 i ; The step S2 comprises: S21, train and generate a Mask R-CNN model, input the target image into the Mask R-CNN model, and the Mask R-CNN model outputs the location information and pixel-level mask of the target object in the target image; S22, according to the target position information output by the Mask R-CNN model, draw a rectangular bounding box inscribed in the outer edge of the target, and obtain the length and height of the bounding box; S23, calculating the size ratio of the target image according to the reference object of known size in the target image, and generating the maximum shooting length and maximum shooting height of the target object according to the size ratio and the length and height of the bounding box, and the calculation formula is as follows: Among them, Hsj i Indicates the actual height of the selected reference object in the i-th target image, Hxs i Indicates the height of the selected reference object in the target image in the i-th target image, λ i Represents the size ratio of the i-th target image; The step S3 comprises: S31, order To generate the intermediate first credibility coefficient of each target image, and is a constraint condition, for w11, w12, w13, ..., w1 i , …, w1 m Scaling is performed to generate the first credibility coefficients w11', w12', w13', ..., w1 of each target image. i ', ..., w1 m '; S32, order To generate the intermediate second credibility coefficient of each target image, and As a constraint condition, w21, w22, w23, ..., w2 i , …, w2 m Scaling is performed to generate the second credibility coefficients w21', w22', w23', ..., w2 of each target image. i ', ..., w2 m '; Wherein, α1, α2, and α3 are all preset proportional coefficients, and α1+α2+α3=1, and 0<α3<α2<α1<1; S33, based on the first credibility coefficient w1 of the target image i ', and the second credibility coefficient w2 i ', generate the comprehensive credibility coefficient w1 of the target image i , the calculation formula is as follows: w i '=β1*w1 i '+β2*w2 i ' Wherein, β1 and β2 are both preset proportional coefficients, β1+β2=1, and 0<β2<β1<1.
2. The method for surface target recognition based on visual images according to claim 1, characterized in that: The value range of α1 is 0.5-0.7, the value range of α2 is 0.2-0.3, and the value range of α3 is 0.1-0.
2.
3. The method for surface target recognition based on visual images according to claim 1, characterized in that: The value range of β1 is 0.6-0.8, and the value range of β2 is 0.2-0.
4.
4. The method for surface target recognition based on visual images according to claim 1, characterized in that: The target types include passenger ships, cargo ships, light ships, warships, sailing ships and others.
5. A surface target recognition device based on visual images, used in the surface target recognition method based on visual images as described in any one of claims 1 to 4, characterized in that: include: A photographing and illuminance value acquisition module, which is used to take multiple target images of the same surface target at different angles in a night environment and obtain the illuminance value of each target image; A shooting size acquisition module, the shooting size acquisition module is used to locate the target object in the target image and draw a boundary box of the target object, and calculate the maximum shooting length and maximum shooting height of the target object according to the length and height of the boundary box; A comprehensive credibility coefficient calculation module, the comprehensive credibility coefficient calculation module is used to generate a comprehensive credibility coefficient of the target image according to the illumination value of the target image, the maximum shooting length and the maximum shooting height of the target object; A target object type output module, wherein the target object type output module is used to input the target image into the Faster R-CNN model, and the Faster R-CNN model recognizes the target in each target image and outputs the corresponding target object type; The most credible target type generation module is used to accumulate and average the comprehensive credibility coefficients of target images corresponding to the same target type to generate a credibility coefficient of the target type, and take the target type with the largest credibility coefficient as the most credible target type.
6. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the surface target recognition method based on visual images as described in any one of claims 1 to 4.
