Ship overload determination method and device based on image recognition

By combining visible light and infrared image recognition models, super-resolution reconstruction and multi-modal sensors, the problem of inaccurate recognition in ship overload determination is solved, and high-accuracy and all-weather automated ship overload detection is achieved.

CN118470641BActive Publication Date: 2024-10-22WUHAN MINGFEI WEIYE SCIENCE & TECHNOLOGY INNOVATION IND DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410636646.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-10-22
Estimated Expiration
2044-05-22

AI Technical Summary

Technical Problem

Existing image detection technology has the problem of insufficient recognition accuracy in ship overload determination. It is especially affected by light and weather factors, resulting in large detection errors. It lacks accurate recognition technology that uses artificial intelligence combined with multi-source image data.

Method used

A ship overload determination method based on image recognition is adopted, which combines visible light and infrared image recognition models, improves image clarity through super-resolution reconstruction models, combines lidar and sonar sensors to determine the shape and distance of the ship, and uses the temperature difference in infrared images to distinguish between ships and On the water surface, the recognition results are optimized based on ambient brightness and weather conditions.

Benefits of technology

It improves the accuracy and applicability of ship overload judgment, reduces the cost of camera use, and realizes all-weather automated ship overload judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470641B_ABST
    Figure CN118470641B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for determining ship overload based on image recognition, which relates to the field of ship overload detection. The method comprises: inputting a visible light image to be identified into a first ship prediction model to obtain a first recognition result, inputting an infrared image to be identified into a second ship prediction model to obtain a second recognition result; determining the ship model according to the first recognition result and the second recognition result; inputting the visible light image to be identified into a preset segmentation model to obtain a segmented image and determine the actual waterline; determining the target overload waterline of the ship model from the corresponding relationship between the preset ship model and the preset overload waterline, and determining that the target ship is overloaded when the actual waterline is higher than the target overload waterline. The present invention can identify visible light images and infrared images in combination with an image recognition model, and identify infrared images in combination with an image segmentation model, thereby improving the applicability and accuracy of ship overload determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ship overload detection, and in particular to a ship overload determination method and device based on image recognition. Background Art

[0002] Currently, image-based ship overload detection technology is widely used. Chinese invention patent CN 101323355A discloses a ship overload detection system and a ship overload detection method. First, the type of ship to which the target ship belongs is identified based on the image of the target ship, and the draft of the target ship is detected based on the image of the target ship. Then, the load capacity of the target ship is determined according to the ship type and draft of the target ship, and the load capacity of the target ship is compared with the maximum load capacity of the ship type to which the target ship belongs, so as to determine whether the target ship is loaded.

[0003] However, image detection technology also has some problems. For example, due to the influence of light or weather factors, the existing image detection technology cannot accurately identify the ship model. The detection and determination of the waterline requires very high image accuracy, and there will be large detection errors in actual application.

[0004] However, there is currently no technical solution that uses artificial intelligence technology in combination with multi-source image data to accurately identify and determine the ship model and waterline, and there is no method and device for determining ship overload based on image recognition. Summary of the invention

[0005] The present invention provides a method and device for determining ship overload based on image recognition, which recognizes visible light images and infrared images in combination with an image recognition model, and recognizes infrared images in combination with an image segmentation model, thereby improving the applicability and accuracy of ship overload determination.

[0006] In a first aspect, the present invention provides a method for determining ship overloading based on image recognition, comprising:

[0007] Inputting a visible light image of a target ship to be identified into a first ship prediction model, obtaining a first recognition result output by the first ship prediction model, inputting an infrared image of the target ship to be identified into a second ship prediction model, obtaining a second recognition result output by the second ship prediction model; determining a ship model of the target ship according to the first recognition result and the second recognition result;

[0008] Inputting the visible light image to be identified into a preset segmentation model, obtaining a segmented image output by the preset segmentation model, and determining the actual waterline from the segmented area between the ship and the water surface in the segmented image;

[0009] Determine a target overload waterline of the ship model from a correspondence between a preset ship model and a preset overload waterline, and determine that the target ship is overloaded when the actual waterline is higher than the target overload waterline;

[0010] The first ship prediction model is determined after training based on all visible light image samples and the probability of ship models corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of ship models corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished based on the different temperatures of the above-water part and the underwater part of the ship.

[0011] According to the ship overload determination method based on image recognition provided by the present invention, before inputting the visible light image to be identified of the target ship into the first ship prediction model, the method further includes:

[0012] Inputting an original visible light image into a preset super-resolution reconstruction model, and obtaining a visible light image to be identified output by the preset super-resolution reconstruction model;

[0013] Inputting the original infrared image into the preset super-resolution reconstruction model, and obtaining the infrared image to be identified output by the preset super-resolution reconstruction model;

[0014] The preset super-resolution reconstruction model is determined by collecting a high-resolution image dataset as training data, generating corresponding low-resolution images as input data, and learning the mapping relationship between high-resolution images and low-resolution images through a deep convolutional neural network to optimize the network structure SRResNet.

[0015] According to the ship overloading determination method based on image recognition provided by the present invention, before inputting the original visible light image to the preset super-resolution reconstruction model and obtaining the visible light image to be identified output by the preset super-resolution reconstruction model, the method further includes:

[0016] Acquire an image group taken at the same time using a visible light camera and a thermal imaging camera, wherein the image group includes an original visible light image and an original infrared image;

[0017] All image groups taken at different times are acquired, and for each image group, an overload determination instruction is generated, wherein the overload determination instruction is used to instruct the input of the visible light image to be identified of the target ship to the first ship prediction model, and the input of the infrared image to be identified of the target ship to the second ship prediction model.

[0018] According to the ship overload determination method based on image recognition provided by the present invention, before using a visible light camera and a thermal imaging camera to obtain an image group taken at the same time, the method further includes:

[0019] Determine a first distance between the target ship and the laser radar by using a laser radar, and determine a second distance between the target ship and the sonar sensor by using a sonar sensor;

[0020] When the first distance is less than or equal to a preset distance, and the second distance is less than or equal to the preset distance, generating a shooting instruction;

[0021] The shooting instruction is used to instruct to use the visible light camera and the thermal imaging camera to obtain an image group shot at the same time.

[0022] According to the ship overload determination method based on image recognition provided by the present invention, after generating the shooting instruction, the actual ship shape of the target ship is determined by using the laser radar;

[0023] After determining the ship model of the target ship according to the first recognition result and the second recognition result, the method further includes:

[0024] determining a target ship shape of the target ship according to the ship model of the target ship;

[0025] In a case where the similarity between the target ship shape and the actual ship shape is greater than or equal to a preset similarity, generating an input instruction, wherein the input instruction is used to input the visible light image to be identified into a preset segmentation model;

[0026] When the similarity between the target ship shape and the actual ship shape is less than the preset similarity, a reshooting instruction is generated, wherein the reshooting instruction is used to instruct to use the visible light camera and the thermal imaging camera again to obtain a group of images shot at the same time.

[0027] According to the ship overload determination method based on image recognition provided by the present invention, the ship model of the target ship is determined according to the first recognition result and the second recognition result, including:

[0028] Use the brightness sensor to obtain the current ambient brightness and the weather conditions in the current area;

[0029] When the current environment brightness is greater than the preset brightness and the weather condition in the current area is clear, determining that the ship model with the highest probability in the first recognition result is the ship model of the target ship;

[0030] When the current environment brightness is less than or equal to the preset brightness and the weather condition in the current area is sunny, determine a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result according to the current environment brightness, and determine the ship model of the target ship according to the first recognition result, the second recognition result, the first weight coefficient and the second weight coefficient;

[0031] When the weather condition in the current area is not clear, it is determined that the ship model with the highest probability in the second recognition result is the ship model of the target ship.

[0032] According to the ship overload determination method based on image recognition provided by the present invention, the first weight coefficient of the first recognition result and the second weight coefficient of the second recognition result are determined according to the current ambient brightness, including:

[0033] Inputting the current environment brightness into a preset nonlinear equation to obtain a first weight coefficient output by the preset nonlinear equation;

[0034] Determine the second weight coefficient according to the first weight coefficient;

[0035] The preset nonlinear equation includes:

[0036] y=x 2 +ax

[0037] Among them, x is the current environment brightness, a is the preset coefficient, and y is the first weight coefficient.

[0038] According to the ship overloading determination method based on image recognition provided by the present invention, the ship model of the target ship is determined according to the first recognition result, the second recognition result, the first weight coefficient and the second weight coefficient, including:

[0039] Determine a first weight value of each ship model probability according to the product of each ship model probability in the first recognition result and the first weight coefficient;

[0040] Determine a second weight value of each ship model probability according to the product of each ship model probability in the second recognition result and the second weight coefficient;

[0041] Determining a final weight value of each ship model probability according to a first weight value of each ship model probability and a second weight value of each ship model probability;

[0042] The ship model corresponding to the ship model probability with the highest final weight value is determined as the ship model of the target ship.

[0043] According to the ship overload determination method based on image recognition provided by the present invention, the actual waterline is determined from the segmented area between the ship and the water surface in the segmented image, including:

[0044] Determining a segmentation ratio of the segmented area in the segmented image;

[0045] The actual height of the target ship is determined according to the ship model of the target ship, and the actual waterline is determined according to the segmentation ratio and the actual height of the target ship.

[0046] In a second aspect, a ship overload determination device based on image recognition is provided, comprising:

[0047] An input unit, used to input a visible light image of a target ship to be identified into a first ship prediction model, obtain a first recognition result output by the first ship prediction model, input an infrared image of the target ship to be identified into a second ship prediction model, obtain a second recognition result output by the second ship prediction model; and determine a ship model of the target ship according to the first recognition result and the second recognition result;

[0048] A determination unit, configured to input the visible light image to be identified into a preset segmentation model, obtain a segmented image output by the preset segmentation model, and determine an actual waterline from a segmented area between the ship and the water surface in the segmented image;

[0049] a determination unit, configured to determine a target overload waterline of the ship model from a correspondence between a preset ship model and a preset overload waterline, and to determine that the target ship is overloaded when the actual waterline is higher than the target overload waterline;

[0050] The first ship prediction model is determined after training based on all visible light image samples and the probability of ship models corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of ship models corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished based on the different temperatures of the above-water part and the underwater part of the ship.

[0051] The present invention recognizes visible light images and infrared images through different image recognition models, determines the ship model and actual waterline, and then judges based on the target overload waterline and actual waterline corresponding to the ship model to determine whether the ship is overloaded. The present invention combines multimodal data to identify and determine the ship model, and uses the infrared image's sensitivity to the temperature difference between the above-water part and the underwater part of the ship to distinguish the segmented area between the ship and the water surface in the image, and then determines the actual waterline.

[0052] Before recognizing an image, the present invention uses a super-resolution reconstruction model to improve the clarity of the image to be recognized, thereby making the image recognition result more accurate; it also uses a laser radar to identify the distance of the ship, and then determines the shooting time, so that the camera does not have to be in a working state all the time, which not only reduces the cost of using the camera, but also improves the accuracy of the image taken by the camera; it also uses a laser radar to determine the actual shape of the ship, and compares the target ship shape with the actual ship shape, thereby improving the accuracy of recognition; it also combines the current ambient brightness and the weather conditions in the current area, thereby making the recognition of the ship model more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0054] Figure 1 This is one of the flow charts of the ship overloading determination method based on image recognition provided by the present invention;

[0055] Figure 2 This is the second flow chart of the method for determining ship overloading based on image recognition provided by the present invention;

[0056] Figure 3 It is a structural schematic diagram of a ship overload determination device based on image recognition provided by the present invention;

[0057] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] Figure 1 This is one of the flow charts of the ship overload determination method based on image recognition provided by the present invention. The ship overload determination method based on image recognition includes:

[0060] Step 101: inputting a visible light image of a target ship to be identified into a first ship prediction model, obtaining a first recognition result output by the first ship prediction model, inputting an infrared image of the target ship to be identified into a second ship prediction model, obtaining a second recognition result output by the second ship prediction model; and determining a ship model of the target ship according to the first recognition result and the second recognition result.

[0061] Step 102: input the visible light image to be identified into a preset segmentation model, obtain a segmented image output by the preset segmentation model, and determine the actual waterline from the segmented area between the ship and the water surface in the segmented image;

[0062] Step 103: determining a target overload waterline of the ship model from a correspondence between a preset ship model and a preset overload waterline, and determining that the target ship is overloaded when the actual waterline is higher than the target overload waterline;

[0063] The first ship prediction model is determined after training based on all visible light image samples and the probability of ship models corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of ship models corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished based on the different temperatures of the above-water part and the underwater part of the ship.

[0064] In step 101, the present invention determines the first ship prediction model after training based on all visible light image samples and the probability of the ship model corresponding to each visible light image sample, and determines the second ship prediction model after training based on all infrared image samples and the probability of the ship model corresponding to each infrared image sample. Optionally, the present invention can use a target recognition model (You Only Look Once version 8, YOLOv8) to complete the target recognition task. YOLOv8 uses a single neural network to simultaneously predict multiple targets in an image, which means that it can not only identify the category of the target, but also locate the bounding box of the target. Multi-scale feature fusion: YOLOv8 uses multi-scale feature fusion technology to enable it to detect targets of different sizes. The present invention can also introduce a new loss function and anchor box mechanism to improve the accuracy and speed of target detection.

[0065] The present invention inputs a visible light image of a target ship to be identified into a first ship prediction model, obtains a first recognition result output by the first ship prediction model, the first recognition result includes confidence results corresponding to different ship models, inputs an infrared image of the target ship to be identified into a second ship prediction model, obtains a second recognition result output by the second ship prediction model, due to different inputs and applied models, the second recognition result includes confidence results corresponding to different ship models that are different from the first recognition result, and finally determines the ship model of the target ship according to the first recognition result and the second recognition result.

[0066] Optionally, the present invention can use the first recognition result alone as a reference object to determine the ship model of the target ship based on factors such as current settings, weather conditions or brightness conditions, and can also use the second recognition result alone as a reference object to determine the ship model of the target ship. The first recognition result and the second recognition result can also be used together as reference objects and different reference weights can be set to determine the ship model of the target ship.

[0067] In step 102, the present invention determines the preset segmentation model after training based on all infrared image samples and the segmented surface part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, wherein for each infrared image sample, since there is a temperature difference between the surface and underwater parts of the ship in the infrared image, it is easier to distinguish them. The present invention uses the area where the temperature difference between the surface and underwater parts of the ship displayed in the infrared image changes sharply to judge the relative position of the actual waterline of the ship, that is, distinguishes according to the difference in temperature between the surface and underwater parts of the ship, and determines the segmented surface part of the ship and the segmented underwater part of the ship.

[0068] Optionally, the present invention can use the YOLOv8 segmentation algorithm to complete the target segmentation task. YOLOv8 can not only identify targets, but also perform instance segmentation. Instance segmentation refers to segmenting each target in an image into pixel-level masks to accurately locate the contour of the target. The instance segmentation capability of YOLOv8 is similar to the deep learning model (Mask Region-based Convolutional Neural Network, Mask R-CNN) used for target detection and instance segmentation, but is more efficient.

[0069] Optionally, the visible light image to be identified is input into a preset segmentation model, a segmented image output by the preset segmentation model is obtained, and the actual waterline is determined from the segmented area between the ship and the water surface in the segmented image.

[0070] Optionally, determining the actual waterline from the segmented area between the ship and the water surface in the segmented image includes: determining a segmentation ratio of the segmented area in the segmented image; determining the actual height of the target ship according to the ship model of the target ship, and determining the actual waterline according to the segmentation ratio and the actual height of the target ship.

[0071] Optionally, the present invention first determines the segmentation ratio according to the position of the segmented area in the segmented image, and then searches and determines the actual height of the target ship from the correspondence between the preset ship model and the preset actual height of the ship according to the ship model of the target ship determined in advance, and then determines the actual waterline according to the segmentation ratio and the actual height of the target ship.

[0072] Optionally, those skilled in the art understand that target recognition is to identify a specific target in an image, such as a ship, and target segmentation is to separate the target in the image from the background for further analysis. The present invention has three independent algorithm branches, namely visible light image target recognition, infrared image target recognition and infrared image instance segmentation, and each branch is configured with a separately trained algorithm model, wherein the visible light image target recognition and infrared image target recognition branches are trained by providing the algorithm model with visible light and infrared pictures of the ship model information that have been manually marked, and the infrared image instance segmentation is trained by providing the algorithm model with infrared pictures of the ship contour information that have been manually segmented.

[0073] Optionally, the present invention inputs the visible light image and the infrared image into their respective target recognition models, and obtains two relatively independent ship recognition results. Since the target recognition model outputs the confidence result of a certain ship model category in the figure, it is set to p(x1|y) and p(x2|y), where p(x1|y) represents the visible light modal recognition confidence and p(x2|y) represents the infrared modal recognition confidence. This scheme fuses the visible light and infrared recognition results based on the following formula:

[0074]

[0075] Wherein, M is the input mode number, and in the present invention, the input modes are visible light and infrared modes.

[0076] In step 103, each ship model corresponds to a preset overload waterline, and the target overload waterline of the ship model is determined from the correspondence between the preset ship model and the preset overload waterline. When the actual waterline is higher than the target overload waterline, the target ship is determined to be overloaded; when the actual waterline is lower than or equal to the target overload waterline, the target ship is determined to be not overloaded.

[0077] In view of the defects of the existing methods such as insufficient recognition ability and large errors, the present invention adopts a method of processing visible light and infrared images separately and verifying the results with each other to improve the accuracy and practicality of the ship overload determination method. Before recognizing the image, the present invention uses a super-resolution reconstruction model to improve the clarity of the image to be recognized, thereby making the image recognition result more accurate; it also uses a laser radar to identify the distance of the ship and then determine the shooting time, so that the camera does not have to be in working state all the time, which not only reduces the cost of camera use, but also improves the accuracy of the image taken by the camera; it also uses a laser radar to determine the actual shape of the ship, and compares the target ship shape with the actual ship shape, thereby improving the accuracy of recognition; it also combines the current ambient brightness and the weather conditions in the current area to make the recognition of the ship model more accurate.

[0078] Optionally, before inputting the visible light image to be identified of the target ship into the first ship prediction model, the method further includes:

[0079] Inputting an original visible light image into a preset super-resolution reconstruction model, and obtaining a visible light image to be identified output by the preset super-resolution reconstruction model;

[0080] Inputting the original infrared image into the preset super-resolution reconstruction model, and obtaining the infrared image to be identified output by the preset super-resolution reconstruction model;

[0081] The preset super-resolution reconstruction model is determined by collecting a high-resolution image dataset as training data, generating corresponding low-resolution images as input data, and learning the mapping relationship between high-resolution images and low-resolution images through a deep convolutional neural network to optimize the network structure SRResNet.

[0082] Optionally, the present invention pre-collects a high-resolution image data set as training data, generates corresponding low-resolution images as input data, and learns the mapping relationship between high-resolution images and low-resolution images through a deep convolutional neural network to optimize the network structure SRResNet and then determine the preset super-resolution reconstruction model. Super-resolution processing is an image processing technology that can improve the resolution of an image, making the image clearer and easier to identify.

[0083] Optionally, SRResNet uses a deep network structure based on residual learning to complete the mapping from low resolution to high resolution. The key idea of ​​residual learning is to introduce shortcuts. Unlike the previous neural network model, each layer learns the mapping y=f(x). The mapping relationship of each layer of residual learning is y=f(x)+x, that is, the input of each layer is directly added to the output of the layer. Based on the shortcut, when a layer in the deep network has a gradient vanishing problem, the gradient can directly skip the layer through the shortcut and propagate directly to a shallower layer, which effectively alleviates the gradient vanishing problem and can also realize a deeper network to improve the overall performance of the model. Sub-pixel convolution, also known as pixel shuffle, is a method of upsampling through convolution operation. It is often used in image super-resolution reconstruction. In image super-resolution reconstruction, common scaling methods include bilinear interpolation, deconvolution, etc. Compared with bilinear interpolation, the upsampling process of sub-pixel convolution is learnable, and the model can learn more complex mappings with better results.

[0084] Optionally, before inputting the visible light image to be identified of the target ship into the first ship prediction model, the present invention inputs the original visible light image and the original infrared image into a preset super-resolution reconstruction model to obtain the visible light image to be identified and the infrared image to be identified output by the preset super-resolution reconstruction model. SRResNet significantly improves the performance of super-resolution tasks by introducing technologies such as deep structure, residual learning and sub-pixel convolution, making the high-resolution images it generates more realistic and clear.

[0085] Optionally, before inputting the original visible light image into a preset super-resolution reconstruction model and obtaining the visible light image to be identified output by the preset super-resolution reconstruction model, the method further includes:

[0086] Acquire an image group taken at the same time using a visible light camera and a thermal imaging camera, wherein the image group includes an original visible light image and an original infrared image;

[0087] All image groups taken at different times are acquired, and for each image group, an overload determination instruction is generated, wherein the overload determination instruction is used to instruct the input of the visible light image to be identified of the target ship to the first ship prediction model, and the input of the infrared image to be identified of the target ship to the second ship prediction model.

[0088] Optionally, the present invention needs to collect images before inputting the original visible light image into a preset super-resolution reconstruction model and obtaining the visible light image to be identified output by the preset super-resolution reconstruction model. Specifically, the visible light camera and the thermal imaging camera can be set at the same collection point, such as a bridge, a checkpoint, etc., and perform image collection operations at the same time to obtain the original visible light image and the original infrared image collected at the same time, and use them as an image group as the input of the subsequent preset super-resolution reconstruction model.

[0089] Optionally, the present invention can continuously acquire image groups at different times, thereby acquiring multiple image groups. The present invention uses each image group to perform an overload determination, thereby obtaining multiple overload determination results, and all overload determination results are used to determine the final overload situation of the ship.

[0090] Optionally, before acquiring the image group taken at the same time by using the visible light camera and the thermal imaging camera, the method further includes:

[0091] Determine a first distance between the target ship and the laser radar by using a laser radar, and determine a second distance between the target ship and the sonar sensor by using a sonar sensor;

[0092] When the first distance is less than or equal to a preset distance, and the second distance is less than or equal to the preset distance, generating a shooting instruction;

[0093] The shooting instruction is used to instruct to use the visible light camera and the thermal imaging camera to obtain an image group shot at the same time.

[0094] Optionally, the present invention can not only use visible light images and infrared images for ship overload determination, but also use laser radar and sonar sensors to achieve multimodal ship overload determination. Specifically, the laser radar and sonar sensor are mainly used to measure the distance between the ship and the sensor. The images taken at a long distance may not be clear enough, resulting in inaccurate ship model recognition, which in turn leads to inaccurate overload determination. When the ship enters the effective shooting range of the visible light camera and the infrared camera, the images taken at this time have more recognition value, thereby making the overload determination result more accurate. The present invention takes into account the stability of the laser radar and the sonar sensor when working in collaboration. When and only when the first distance is less than or equal to the preset distance, and the second distance is less than or equal to the preset distance, that is, the ship not only enters the effective distance of the laser radar, but also enters the effective distance of the sonar sensor, a shooting instruction will be generated, thereby instructing the use of a visible light camera and a thermal imaging camera to obtain a group of images taken at the same time.

[0095] Optionally, after generating the shooting instruction, the actual ship shape of the target ship is determined by using the laser radar;

[0096] After determining the ship model of the target ship according to the first recognition result and the second recognition result, the method further includes:

[0097] determining a target ship shape of the target ship according to the ship model of the target ship;

[0098] In a case where the similarity between the target ship shape and the actual ship shape is greater than or equal to a preset similarity, generating an input instruction, wherein the input instruction is used to input the visible light image to be identified into a preset segmentation model;

[0099] When the similarity between the target ship shape and the actual ship shape is less than the preset similarity, a reshooting instruction is generated, wherein the reshooting instruction is used to instruct to use the visible light camera and the thermal imaging camera again to obtain a group of images shot at the same time.

[0100] Optionally, after determining the ship model of the target ship according to the first recognition result and the second recognition result, the present invention can directly use the ship model of the target ship for subsequent ship overload determination, and can also perform a secondary verification on the recognition accuracy of the ship model of the target ship. Specifically, the present invention uses the laser radar to determine the laser point cloud data of the target ship, and then obtains the actual ship shape of the target ship, and then determines the target ship shape of the target ship from the correspondence between the preset ship model and the preset ship shape according to the ship model of the target ship. When the similarity between the target ship shape and the actual ship shape is greater than or equal to the preset similarity, it is considered that the secondary verification has passed, and the subsequent step can be entered, that is, instructing the input of the visible light image to be identified into the preset segmentation model.

[0101] Optionally, when the similarity between the target ship shape and the actual ship shape is less than the preset similarity, it is considered that the secondary verification has failed. At this time, it is determined that the identification of the target ship model corresponding to the target ship shape is not accurate enough, that is, it is necessary to restart the previous image acquisition process, and instruct to use the visible light camera and the thermal imaging camera again to obtain the image group taken at the same time, so as to determine the ship model of the target ship again based on the image group.

[0102] Optionally, the main advantages of the present invention are:

[0103] Accuracy: By using super-resolution processing technology, the clarity of the image can be improved, making target recognition and segmentation more accurate, thereby improving the accuracy of overload judgment;

[0104] Real-time: This method can collect ship images in real time, and perform real-time image processing and analysis, and can promptly detect and warn of ship overloading;

[0105] Automation: This method uses advanced image processing and artificial intelligence technology to automatically determine whether a ship is overloaded, reducing the workload and errors of manual judgment;

[0106] Universality: This method can be applied not only to ships of various types and sizes, but also to overload judgment under various environmental conditions, and has good universality;

[0107] All-weather: The addition of lidar and sonar sensors enables this method to collect images of passing ships in advance all-weather, thereby realizing all-weather overload judgment;

[0108] Easy installation: Only a set of infrared and visible light cameras, an edge computing module, a remote device that transmits back to the target point, and multiple scalable multi-source sensors are needed to realize all the functions of the present invention.

[0109] Figure 2 This is a second flow chart of the ship overload determination method based on image recognition provided by the present invention, wherein the ship model of the target ship is determined according to the first recognition result and the second recognition result, including:

[0110] Step 201: Use a brightness sensor to obtain the current ambient brightness and the weather conditions in the current area;

[0111] Step 202: when the current environment brightness is greater than a preset brightness and the weather condition in the current area is clear, determine that the ship model with the highest probability in the first recognition result is the ship model of the target ship;

[0112] Step 203: when the current environment brightness is less than or equal to the preset brightness and the weather condition in the current area is sunny, determine a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result according to the current environment brightness, and determine the ship model of the target ship according to the first recognition result, the second recognition result, the first weight coefficient and the second weight coefficient;

[0113] Step 204: When the weather condition in the current area is not clear, determine that the ship model with the highest probability in the second recognition result is the ship model of the target ship.

[0114] In step 201, the present invention can set a brightness sensor in the ship overload determination device based on image recognition, use the brightness sensor to obtain the current ambient brightness, and obtain the weather conditions in the current area based on third-party software, such as visibility, whether it is raining, whether it is snowing, whether there is haze, etc.

[0115] In step 202, the visible light image has rich texture details and is more advantageous in the target recognition task, so the visible light image branch dominates the ship recognition task; while the infrared image has better contour features and is not affected by natural light, so the infrared image target recognition branch plays a contour supplement role in the ship recognition task and serves as an auxiliary recognition branch when the light is insufficient. In the present invention, when the current ambient brightness is greater than the preset brightness and the weather condition in the current area is clear, it is determined that the ship model with the highest probability in the first recognition result is the ship model of the target ship, and the visible light image is mainly used for ship model recognition.

[0116] In step 203, when the current environment brightness is less than or equal to the preset brightness and the weather condition in the current area is clear, it mainly targets low visibility, especially at night. At this time, the first recognition result and the second recognition result can be comprehensively considered.

[0117] Optionally, determining a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result according to the current ambient brightness includes:

[0118] Inputting the current environment brightness into a preset nonlinear equation to obtain a first weight coefficient output by the preset nonlinear equation;

[0119] Determine the second weight coefficient according to the first weight coefficient;

[0120] The preset nonlinear equation includes:

[0121] y=x 2 +ax (2)

[0122] Among them, x is the current environment brightness, a is the preset coefficient, and y is the first weight coefficient.

[0123] Optionally, for example, if the first weight coefficient is measured to be 0.38, the second weight coefficient is determined to be 0.62 according to the first weight coefficient.

[0124] Optionally, determining the ship model of the target ship according to the first recognition result, the second recognition result, the first weight coefficient, and the second weight coefficient includes:

[0125] Determine a first weight value of each ship model probability according to the product of each ship model probability in the first recognition result and the first weight coefficient;

[0126] Determine a second weight value of each ship model probability according to the product of each ship model probability in the second recognition result and the second weight coefficient;

[0127] Determining a final weight value of each ship model probability according to a first weight value of each ship model probability and a second weight value of each ship model probability;

[0128] The ship model corresponding to the ship model probability with the highest final weight value is determined as the ship model of the target ship.

[0129] Optionally, the first weight value of each ship model probability is determined according to the product of the probability of each ship model in the first recognition result and the first weight coefficient, including: according to the first recognition result, the probability of each ship model is 0.2 for ship model A, 0.3 for model B, 0.3 for ship model C, and 0.2 for ship model D, and the first weight coefficient is 0.4, then the first weight value of ship model A is 0.08, the first weight value of ship model B is 0.12, the first weight value of ship model C is 0.12, and the first weight value of ship model D is 0.08.

[0130] Furthermore, the second weight value of each ship model probability is determined according to the product of the probability of each ship model in the second recognition result and the second weight coefficient, including: according to the second recognition result, the probability of each ship model is 0.6 for ship model A, 0.1 for ship model B, 0.1 for ship model C, and 0.2 for ship model D, and the first weight coefficient is 0.6, then the second weight value of ship model A is 0.36, the second weight value of ship model B is 0.06, the second weight value of ship model C is 0.06, and the second weight value of ship model D is 0.12.

[0131] Furthermore, the final weight value of each ship model probability is determined according to the sum of the first weight value of each ship model probability and the second weight value of each ship model probability. Specifically, the final weight value of ship model A is 0.44, the final weight value of ship model B is 0.18, the final weight value of ship model C is 0.18, and the final weight value of ship model D is 0.2.

[0132] Further, since the final weight value of ship model A is 0.44, which is the highest value among all final weight values, ship model A is determined to be the ship model of the target ship.

[0133] In step 204, when the weather condition in the current area is not clear, it is considered that the visible light camera cannot be used to identify the ship model at this time, and the ship model with the highest probability in the second identification result is determined to be the ship model of the target ship.

[0134] Figure 3It is a structural schematic diagram of a ship overload determination device based on image recognition provided by the present invention. The ship overload determination device based on image recognition includes an input unit 1, which is used to input a visible light image of a target ship to be identified into a first ship prediction model, obtain a first recognition result output by the first ship prediction model, input an infrared image of the target ship to be identified into a second ship prediction model, obtain a second recognition result output by the second ship prediction model; determine the ship model of the target ship according to the first recognition result and the second recognition result. The working principle of the input unit 1 can refer to the aforementioned step 101 and will not be repeated here.

[0135] The ship overload determination device based on image recognition also includes a determination unit 2, which is used to input the visible light image to be identified into a preset segmentation model, obtain the segmented image output by the preset segmentation model, and determine the actual waterline from the segmented area between the ship and the water surface in the segmented image. The working principle of the determination unit 2 can refer to the aforementioned step 101 and will not be repeated here.

[0136] The ship overload determination device based on image recognition also includes a determination unit 3, which is used to determine the target overload waterline of the ship model from the correspondence between the preset ship model and the preset overload waterline, and to determine that the target ship is overloaded when the actual waterline is higher than the target overload waterline. The working principle of the determination unit 3 can be referred to the aforementioned step 103 and will not be repeated here.

[0137] The first ship prediction model is determined after training based on all visible light image samples and the probability of ship models corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of ship models corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished based on the different temperatures of the above-water part and the underwater part of the ship.

[0138] The present invention recognizes visible light images and infrared images through different image recognition models, determines the ship model and actual waterline, and then judges based on the target overload waterline and actual waterline corresponding to the ship model to determine whether the ship is overloaded. The present invention combines multimodal data to identify and determine the ship model, and uses the infrared image's sensitivity to the temperature difference between the above-water part and the underwater part of the ship to distinguish the segmented area between the ship and the water surface in the image, and then determines the actual waterline.

[0139] Figure 4Schematic diagram of the structure of the electronic device provided by the present invention. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute a ship overload determination method based on image recognition, the method comprising: inputting a visible light image of a target ship to be identified into a first ship prediction model, obtaining a first recognition result output by the first ship prediction model, inputting an infrared image of the target ship to be identified into a second ship prediction model, obtaining a second recognition result output by the second ship prediction model; determining the ship model of the target ship according to the first recognition result and the second recognition result; inputting the visible light image to be identified into a preset segmentation model, obtaining a segmented image output by the preset segmentation model, and determining the actual waterline from the segmented area between the ship and the water surface in the segmented image; and determining the actual waterline from the correspondence between the preset ship model and the preset overload waterline. The target overload waterline of the ship model is determined in the relationship, and when the actual waterline is higher than the target overload waterline, the target ship is determined to be overloaded; the first ship prediction model is determined after training based on all visible light image samples and the ship model probability corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the ship model probability corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished according to the different temperatures of the above-water part of the ship and the underwater part of the ship.

[0140] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0141] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a ship overload determination method based on image recognition provided by the above methods. The method includes: inputting a visible light image of a target ship to be identified into a first ship prediction model, obtaining a first recognition result output by the first ship prediction model, inputting an infrared image of the target ship to be identified into a second ship prediction model, obtaining a second recognition result output by the second ship prediction model; determining the ship model of the target ship according to the first recognition result and the second recognition result; inputting the visible light image to be identified into a preset segmentation model, obtaining a segmented image output by the preset segmentation model, and identifying the ship and The actual waterline is determined in the segmented area of ​​the water surface; the target overload waterline of the ship model is determined from the correspondence between the preset ship model and the preset overload waterline, and the target ship is judged to be overloaded when the actual waterline is higher than the target overload waterline; the first ship prediction model is determined after training based on all visible light image samples and the probability of the ship model corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of the ship model corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished according to the different temperatures of the above-water part of the ship and the underwater part of the ship.

[0142] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the ship overload determination method based on image recognition provided by the above methods, the method comprising: inputting a visible light image of a target ship to be identified into a first ship prediction model, obtaining a first recognition result output by the first ship prediction model, inputting an infrared image of the target ship to be identified into a second ship prediction model, obtaining a second recognition result output by the second ship prediction model; determining the ship model of the target ship according to the first recognition result and the second recognition result; inputting the visible light image to be identified into a preset segmentation model, obtaining a segmented image output by the preset segmentation model, and determining the actual waterline from the segmented area between the ship and the water surface in the segmented image; The target overload waterline of the ship model is determined from the correspondence between the preset ship model and the preset overload waterline, and the target ship is determined to be overloaded when the actual waterline is higher than the target overload waterline; the first ship prediction model is determined after training based on all visible light image samples and the probability of the ship model corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of the ship model corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part and the segmented underwater part of the ship are distinguished according to the different temperatures of the above-water part and the underwater part of the ship.

[0143] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0145] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A ship overloading determination method based on image recognition, It is characterized in that include: Inputting a visible light image of a target ship to be identified into a first ship prediction model, obtaining a first recognition result output by the first ship prediction model, inputting an infrared image of the target ship to be identified into a second ship prediction model, obtaining a second recognition result output by the second ship prediction model; determining a ship model of the target ship according to the first recognition result and the second recognition result; Inputting the infrared image to be identified into a preset segmentation model, obtaining a segmented image output by the preset segmentation model, and determining the actual waterline from the segmented area between the ship and the water surface in the segmented image; Determine a target overload waterline of the ship model from a correspondence between a preset ship model and a preset overload waterline, and determine that the target ship is overloaded when the actual waterline is higher than the target overload waterline; The first ship prediction model is determined after training based on all visible light image samples and the probability of the ship model corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of the ship model corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished according to the difference in temperature between the above-water part of the ship and the underwater part of the ship; The determining the ship model of the target ship according to the first recognition result and the second recognition result includes: Use the brightness sensor to obtain the current ambient brightness and the weather conditions in the current area; When the current environment brightness is greater than the preset brightness and the weather condition in the current area is clear, determining that the ship model with the highest probability in the first recognition result is the ship model of the target ship; When the current environment brightness is less than or equal to the preset brightness and the weather condition in the current area is sunny, determine a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result according to the current environment brightness, and determine the ship model of the target ship according to the first recognition result, the second recognition result, the first weight coefficient and the second weight coefficient; When the weather condition in the current area is not clear, determining that the ship model with the highest probability in the second recognition result is the ship model of the target ship; The determining, according to the current ambient brightness, a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result includes: Inputting the current environment brightness into a preset nonlinear equation to obtain a first weight coefficient output by the preset nonlinear equation; Determine the second weight coefficient according to the first weight coefficient; The preset nonlinear equation includes: ; in, is the current ambient brightness, is the preset coefficient, is the first weight coefficient.

2. The ship overloading determination method based on image recognition according to claim 1, It is characterized in that Before inputting the visible light image of the target ship to be identified into the first ship prediction model, the method further includes: Inputting an original visible light image into a preset super-resolution reconstruction model, and obtaining a visible light image to be identified output by the preset super-resolution reconstruction model; Inputting the original infrared image into the preset super-resolution reconstruction model, and obtaining the infrared image to be identified output by the preset super-resolution reconstruction model; The preset super-resolution reconstruction model is determined by collecting a high-resolution image dataset as training data, generating corresponding low-resolution images as input data, and learning the mapping relationship between high-resolution images and low-resolution images through a deep convolutional neural network to optimize the network structure SRResNet.

3. The ship overloading determination method based on image recognition according to claim 2, It is characterized in that Before inputting the original visible light image into the preset super-resolution reconstruction model and obtaining the visible light image to be identified output by the preset super-resolution reconstruction model, the method further includes: Acquire an image group taken at the same time using a visible light camera and a thermal imaging camera, wherein the image group includes an original visible light image and an original infrared image; All image groups taken at different times are acquired, and for each image group, an overload determination instruction is generated, wherein the overload determination instruction is used to instruct the input of the visible light image to be identified of the target ship to the first ship prediction model, and the input of the infrared image to be identified of the target ship to the second ship prediction model.

4. The ship overloading determination method based on image recognition according to claim 3, It is characterized in that Before using the visible light camera and the thermal imaging camera to acquire a group of images taken at the same time, the method further includes: Determine a first distance between the target ship and the laser radar by using a laser radar, and determine a second distance between the target ship and the sonar sensor by using a sonar sensor; When the first distance is less than or equal to a preset distance, and the second distance is less than or equal to the preset distance, generating a shooting instruction; The shooting instruction is used to instruct to use the visible light camera and the thermal imaging camera to obtain an image group shot at the same time.

5. The ship overloading determination method based on image recognition according to claim 4, It is characterized in that After generating the shooting instruction, determining the actual ship shape of the target ship by using the laser radar; After determining the ship model of the target ship according to the first recognition result and the second recognition result, the method further includes: determining a target ship shape of the target ship according to the ship model of the target ship; In the case where the similarity between the target ship shape and the actual ship shape is greater than or equal to a preset similarity, generating an input instruction, wherein the input instruction is used to input the infrared image to be identified into a preset segmentation model; When the similarity between the target ship shape and the actual ship shape is less than the preset similarity, a reshooting instruction is generated, wherein the reshooting instruction is used to instruct to use the visible light camera and the thermal imaging camera again to obtain a group of images shot at the same time.

6. The ship overloading determination method based on image recognition according to claim 1, It is characterized in that The determining the ship model of the target ship according to the first recognition result, the second recognition result, the first weight coefficient, and the second weight coefficient includes: Determine a first weight value of each ship model probability according to the product of each ship model probability in the first recognition result and the first weight coefficient; Determine a second weight value of each ship model probability according to the product of each ship model probability in the second recognition result and the second weight coefficient; Determining a final weight value of each ship model probability according to a first weight value of each ship model probability and a second weight value of each ship model probability; The ship model corresponding to the ship model probability with the highest final weight value is determined as the ship model of the target ship.

7. The ship overloading determination method based on image recognition according to claim 1, It is characterized in that The determining of the actual waterline from the segmented area between the ship and the water surface in the segmented image comprises: Determining a segmentation ratio of the segmented area in the segmented image; The actual height of the target ship is determined according to the ship model of the target ship, and the actual waterline is determined according to the segmentation ratio and the actual height of the target ship.

8. A ship overload determination device based on image recognition, It is characterized in that include: An input unit, used to input a visible light image of a target ship to be identified into a first ship prediction model, obtain a first recognition result output by the first ship prediction model, input an infrared image of the target ship to be identified into a second ship prediction model, obtain a second recognition result output by the second ship prediction model; and determine a ship model of the target ship according to the first recognition result and the second recognition result; A determination unit, used for inputting the infrared image to be identified into a preset segmentation model, obtaining a segmented image output by the preset segmentation model, and determining an actual waterline from a segmented area between the ship and the water surface in the segmented image; a determination unit, configured to determine a target overload waterline of the ship model from a correspondence between a preset ship model and a preset overload waterline, and to determine that the target ship is overloaded when the actual waterline is higher than the target overload waterline; The first ship prediction model is determined after training based on all visible light image samples and the probability of the ship model corresponding to each visible light image sample, the second ship prediction model is determined after training based on all infrared image samples and the probability of the ship model corresponding to each infrared image sample, the preset segmentation model is determined after training based on all infrared image samples and the segmented above-water part of the ship and the segmented underwater part of the ship corresponding to each infrared image sample, and the segmented above-water part of the ship and the segmented underwater part of the ship are distinguished according to the difference in temperature between the above-water part of the ship and the underwater part of the ship; The determining the ship model of the target ship according to the first recognition result and the second recognition result includes: Use the brightness sensor to obtain the current ambient brightness and the weather conditions in the current area; When the current environment brightness is greater than the preset brightness and the weather condition in the current area is clear, determining that the ship model with the highest probability in the first recognition result is the ship model of the target ship; When the current environment brightness is less than or equal to the preset brightness and the weather condition in the current area is sunny, determine a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result according to the current environment brightness, and determine the ship model of the target ship according to the first recognition result, the second recognition result, the first weight coefficient and the second weight coefficient; When the weather condition in the current area is not clear, determining that the ship model with the highest probability in the second recognition result is the ship model of the target ship; The determining, according to the current ambient brightness, a first weight coefficient of the first recognition result and a second weight coefficient of the second recognition result includes: Inputting the current environment brightness into a preset nonlinear equation to obtain a first weight coefficient output by the preset nonlinear equation; Determine the second weight coefficient according to the first weight coefficient; The preset nonlinear equation includes: ; in, is the current ambient brightness, is the preset coefficient, is the first weight coefficient.