Image processing method, storage medium and system
By segmenting the image and generating a rotating external frame, combined with the dynamic query model, the problem of low accuracy of the rotating object detection model is solved, and more efficient rotating object detection is achieved.
Patent Information
- Application Number
- CN202111499587.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-12-09
AI Technical Summary
In the prior art, the accuracy of the rotation object detection model is low, and the accuracy of rotation object detection cannot be effectively improved.
By segmenting the image to be processed, the target point set and target classification are obtained, the rotating external boxes are generated, and the target detection results are determined in combination with the dynamic query model to avoid the boundary discontinuity caused by angle regression.
The accuracy and efficiency of the rotation object detection model are optimized, the quality of rotation object detection is improved, and the problem of low accuracy of the rotation object detection model is solved.
Smart Images

Figure CN114359574B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to an image processing method, storage medium and system. Background Art
[0002] In application scenarios such as urban planning and traffic management, intelligent analysis of remote sensing images, especially the detection of target objects, plays an increasingly important role. Unlike objects in natural images, aerial objects in remote sensing images are usually distributed in arbitrary directions. Therefore, it is necessary to train more accurate object detection models to detect the rotation direction information of objects.
[0003] In the related technologies, there is no effective solution for how to build a rotating target detection model and improve the accuracy of rotating target detection. Summary of the invention
[0004] The embodiments of the present invention provide an image processing method, a storage medium and a system to at least solve the technical problem of low accuracy of the rotating target detection model provided in the related art.
[0005] According to one aspect of an embodiment of the present invention, there is provided an image processing method, comprising: acquiring an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; segmenting the image to be processed to obtain a plurality of image blocks; based on the plurality of image blocks, acquiring a target point set and a target classification; generating a rotating bounding box using the target point set; and determining a target detection result through the rotating bounding box and the target classification.
[0006] According to another aspect of an embodiment of the present invention, an image processing method is also provided, including: obtaining a regional planning remote sensing image, wherein the display content of the regional planning remote sensing image includes: a target building to be detected; segmenting the regional planning remote sensing image to obtain a plurality of image blocks; based on the plurality of image blocks, obtaining a target point set and a target classification; and determining a building detection result by rotating an external frame and a target classification.
[0007] According to another aspect of an embodiment of the present invention, there is also provided an image processing method, including: acquiring a traffic management remote sensing image, wherein the display content of the traffic management remote sensing image includes: a target vehicle to be detected; segmenting the traffic management remote sensing image to obtain a plurality of image blocks; based on the plurality of image blocks, acquiring a target point set and a target classification; using the target point set to generate a rotating bounding box; and determining a vehicle detection result through the rotating bounding box and the target classification.
[0008] According to another aspect of an embodiment of the present invention, a storage medium is further provided. The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the above-mentioned image processing methods.
[0009] According to another aspect of an embodiment of the present invention, there is also provided an image processing system, comprising: a processor; and a memory, connected to the above-mentioned processor, for providing the above-mentioned processor with instructions for processing the following processing steps: obtaining an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; segmenting the image to be processed to obtain a plurality of image blocks; based on the plurality of image blocks, obtaining a target point set and a target classification; generating a rotating bounding box using the target point set; and determining a target detection result through the rotating bounding box and the target classification.
[0010] In an embodiment of the present invention, an image to be processed is obtained, wherein the display content of the image to be processed includes: a target object to be detected, the image to be processed is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating bounding box is generated by using the target point set, and a target detection result is determined by the rotating bounding box and the target classification.
[0011] It is easy to notice that the image to be processed is appropriately segmented in advance, a point set containing the rotation information of the target object is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target object, and finally the target detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the rotation target detection model, thereby achieving the technical effect of improving the quality of rotation target detection, and further solving the technical problem of low accuracy of the rotation target detection model provided in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0013] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing an image processing method is shown;
[0014] Figure 2 is a flow chart of an image processing method according to an embodiment of the present invention;
[0015] Figure 3 is a schematic diagram of an optional end-to-end object-oriented detection model according to an embodiment of the present invention;
[0016] Figure 4ais a schematic diagram of an optional query feature decoupling process according to an embodiment of the present invention;
[0017] Figure 4b is a schematic diagram of another optional query feature decoupling process according to an embodiment of the present invention;
[0018] Figure 5 is a schematic diagram of an optional regression loss of a prediction point according to an embodiment of the present invention;
[0019] Figure 6 is a flowchart of another image processing method according to an embodiment of the present invention;
[0020] Figure 7 is a flowchart of another image processing method according to an embodiment of the present invention;
[0021] Figure 8 is a flowchart of another image processing method according to an embodiment of the present invention;
[0022] Fig. 9 is a structural schematic diagram of an image processing device according to an embodiment of the present invention;
[0023] Fig.10 is a structural block diagram of another computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] First, some nouns or terms that appear in the process of describing the embodiments of the present invention are subject to the following explanations:
[0027] Remote sensing image recognition: Use computers to analyze the spectral and spatial information of various types of objects in remote sensing images, select features, and use certain means to divide the feature space into non-overlapping subspaces, and then assign each pixel in the image to the corresponding object category in each subspace.
[0028] Rotating target detection: In remote sensing image recognition, detecting the minimum circumscribed rectangular box of a target object is called rotating target detection.
[0029] Example 1
[0030] According to an embodiment of the present invention, an image processing method embodiment is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0031] The method embodiment provided in the first embodiment of the present invention may be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing an image processing method. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0032] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As involved in the embodiments of the present invention, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0033] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the image processing method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned image processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0035] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0036] It should be noted that, in some optional embodiments, the above Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or mobile device).
[0037] Under the above operating environment, the present invention provides Figure 2 An image processing method is shown. Figure 2 is a flowchart of an image processing method according to an embodiment of the present invention. Figure 2 As shown, the image processing method includes:
[0038] Step S202, obtaining an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected;
[0039] Step S204, dividing the image to be processed into multiple image blocks;
[0040] Step S206, obtaining a target point set and a target classification based on the multiple image blocks;
[0041] Step S208, generating a rotational bounding box using the target point set;
[0042] Step S210, determining the target detection result by rotating the external frame and classifying the target.
[0043] In an embodiment of the present invention, an image to be processed is obtained, wherein the display content of the image to be processed includes: a target object to be detected, the image to be processed is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating bounding box is generated by using the target point set, and a target detection result is determined by the rotating bounding box and the target classification.
[0044] It is easy to notice that the image to be processed is appropriately segmented in advance, a point set containing the rotation information of the target object is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target object, and finally the target detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the rotation target detection model, thereby achieving the technical effect of improving the quality of rotation target detection, and further solving the technical problem of low accuracy of the rotation target detection model provided in the related technology.
[0045] It should be noted that the above-mentioned image processing method provided by the present invention can be applicable to, but not limited to, actual application scenarios of ground object change detection, ground object classification, remote sensing image classification, and ground object recognition. For example, it can also be applied to the following technical fields: urban planning (for example, road network extraction (satellite, drone), building extraction, building change detection (satellite, drone), fire protection, etc.), natural resources and ecological environment (for example, weather forecast, change detection, ecological red line change detection, multi-classification change detection, ground object classification, greenhouse extraction, road network extraction, building extraction, building change detection (satellite, drone), etc.; water conservancy (for example, water area change detection, greenhouse extraction, water body extraction (optical, radar), forest extraction, cage aquaculture extraction, sand mining site extraction, riverside house extraction, dam extraction, photovoltaic power plant extraction, etc.); agriculture and forestry (for example, land identification, production area change detection, etc.).
[0046] Unlike objects in natural images, aerial objects in remote sensing images are usually distributed in arbitrary directions. Therefore, more parameters are required in remote sensing target detection models to encode the directional information of target objects, which is usually highly redundant and inefficient. Moreover, since Convolution Neural Network (CNN) usually does not explicitly model the directional detection of target objects, a large amount of rotation enhancement data is required to improve the accuracy of the rotation target detection model when training the rotation target detection model.
[0047] In an embodiment of the present invention, the remote sensing image to be processed is appropriately segmented in advance, a point set containing the rotation information of the target object is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target object, and finally the target detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the rotation target detection model.
[0048] The above-mentioned image to be processed may be a remote sensing image, i.e., a film or photo recording the electromagnetic wave size of various ground objects, and may include aerial photos and satellite photos. The display content of the image to be processed may at least include: a target object to be detected, wherein the target object may be a building, vehicle, ship, airplane, etc. displayed in the remote sensing image.
[0049] Remote sensing images can be obtained by aerial photography, aerial scanning, microwave radar, etc. Usually, the amount of data of remote sensing images is large, so the remote sensing images are segmented in advance to obtain multiple image blocks of appropriate sizes for subsequent processing operations.
[0050] The rotating circumscribed frame may be used to determine the location area of the target object in the image to be processed. The attribute information of the rotating circumscribed frame may include the pixel size and angle (usually expressed in radians) of the rotating circumscribed frame.
[0051] Based on the above multiple image blocks, the above target point set and target classification can be obtained. Based on the target point set, a rotational bounding box corresponding to the above target object can be generated, and then the detection result of the target object can be determined through the rotational bounding box and the above target classification corresponding to the target object.
[0052] In particular, by determining the rotational bounding box corresponding to the target object through the target point set, and further determining the rotational direction information of the target object, the problem of discontinuous detection boundaries caused by the angle regression processing method used in the related art can be avoided, thereby improving the accuracy of the detection model. In addition, determining the category to which the target object belongs and further determining the target detection result can reduce the amount of calculation in the detection process while ensuring the accuracy of the detection model, thereby improving the efficiency of the detection model.
[0053] In an optional embodiment, the target point set includes: a plurality of points, the plurality of points are used to determine the attribute information of the rotating circumscribed frame corresponding to the target object, and the target classification is used to determine the category to which the target object belongs.
[0054] Based on the above-mentioned multiple image blocks, the above-mentioned target point set and target classification can be obtained. The above-mentioned target point set may include multiple representative points (equivalent to the above-mentioned multiple points) corresponding to the above-mentioned target object, and the target point set can be used to determine the attribute information of the rotating external bounding box corresponding to the target object. The above-mentioned target classification can be used to determine the attribution category of the target object, and the attribution category may include: buildings, roads, vehicles, green spaces, waters, etc. In an optional embodiment, in step S206, based on multiple image blocks, the target point set and target classification are obtained, including the following method steps:
[0055] Step S261, using a target model to analyze multiple image blocks to obtain a target point set and a target classification, wherein the target model is an end-to-end object-oriented detection model.
[0056] In the above optional embodiment, the above target model can be an end-to-end object-oriented detection model, which can analyze the above multiple image blocks to obtain the above target point set and the above target classification. The target point set can be used to determine the attribute information of the rotational bounding box corresponding to the target object, and the target classification can be used to determine the category of the target object.
[0057] For example, to perform rotating target detection on a remote sensing image of a certain area, first, obtain the remote sensing image of the area (equivalent to the above-mentioned image to be processed), which is recorded as image 0. The content displayed in image 0 may include at least multiple target objects. Then, image 0 is cut into multiple image blocks with a pixel size of 1024×1024, which are recorded as image 1.
[0058] Figure 3 is a schematic diagram of an optional end-to-end object-oriented detection model according to an embodiment of the present invention, such as Figure 3 As shown, the end-to-end object-oriented detection model is named D2Q-DETR model. The D2Q-DETR model can be used as the above target model to analyze the image 1. The result of the above analysis can include: multiple representative points (equivalent to the above target point set) and category probabilities (equivalent to the above target classification).
[0059] Still like Figure 3 As shown in Figure 1, the use of the D2Q-DETR model to detect rotated targets in remote sensing images of a certain area includes: representative point prediction, query feature decoupling, dynamic query, and label reassignment. Therefore, the D2Q-DETR model can achieve the technical effect of improving the accuracy and efficiency of rotating target detection in remote sensing images.
[0060] In an optional embodiment, in step S261, the target model includes: the encoder uses the target model to analyze multiple image blocks to obtain a target point set and a target classification, including the following method steps:
[0061] Step S2611, encoding multiple image blocks using an encoder to obtain encoding features;
[0062] Step S2612, obtaining pre-generated query features;
[0063] Step S2613, decoupling the query features to obtain classification features and regression features;
[0064] Step S2614, cross-attention regression processing is performed on the regression features and the coding features to obtain a target point set, and cross-attention classification processing is performed on the classification features and the coding features to obtain a target classification.
[0065] In the above optional embodiment, the target model may include an encoder. The encoder in the target model may be used to encode the above multiple image blocks, thereby obtaining the above encoding features.
[0066] The above-mentioned pre-generated query features are obtained, and the query features may include at least classification features and regression features, and the classification features and the regression features are usually coupled to each other. That is, when querying through the query features, each of the multiple input features will affect all output results, and each of the multiple output results will be affected by all input features. Due to the coupling relationship between the features, the query system is often difficult to control and has poor performance.
[0067] The above decoupling may be to separate two or more features that are coupled by mathematical methods, thereby simplifying the subsequent query process. By decoupling the above query features, the above classification features and regression features may be obtained.
[0068] Utilizing the target model to obtain the target point set and target classification based on the multiple image blocks may include: performing cross-attention regression processing on the regression features and the coding features to obtain the target point set; performing cross-attention classification processing on the classification features and the coding features to obtain the target classification.
[0069] Still taking the detection of rotating targets in remote sensing images of a certain area as an example, for the method provided by the related art, a five-dimensional vector (xc; yc; w; h; θ) is output each time the target box (Target Box) is predicted. In this five-dimensional vector, xc and yc are used to represent the coordinates of the center point of the target box; w represents the height of the target box; h represents the width of the target box; θ is a parameter introduced by angle regression, which is used to describe the direction of the target box. However, the method of angle regression will lead to the problem of discontinuous boundaries, so the detection accuracy of this method is poor.
[0070] Different from the methods provided by related technologies, the use of the D2Q-DETR model to detect rotated targets in remote sensing images of a certain area includes: representative point prediction, query feature decoupling, dynamic query and label reassignment.
[0071] Still like Figure 3 As shown in the figure, when performing the above representative point prediction process, the D2Q-DETR model adopts the angle-free regression method to obtain the target box (equivalent to the above rotational bounding box) by predicting multiple representative points, thereby effectively avoiding the boundary discontinuity problem caused by angle regression. In each prediction, a set of K (K = 9 by default) representative points is obtained, which is recorded as the prediction point set In the process of rotating target detection, by using the above representative point prediction method, point data can be learned more flexibly, and the predicted point set The distribution of the K representative points can reflect the angle and size of the target frame, thereby improving the accuracy of rotated target detection.
[0072] It should be noted that in the D2Q-DETR model, the minAreaRect function provided by the open source software library OpenCV can be used to obtain the predicted point set based on each query. Generate a target box.
[0073] Still taking the use of the D2Q-DETR model to detect rotating targets in remote sensing images of a certain area as an example, Figure 3 As shown in the figure, in the encoder of the D2Q-DETR model, image 1 is encoded to obtain the encoded features. That is, after the multi-scale deformable self-attention process, a multi-scale feature map is obtained, which includes: image 2, four images 3 and image 4, each of which includes the corresponding encoded features. The encoded features are transmitted to the cross attention module in the decoder.
[0074] Still like Figure 3 As shown in FIG. 1 , in the D2Q-DETR model, the pre-generated query features are transmitted to the decoder. The decoder may include: the self-attention module of the query features itself, and the cross-attention module between the query features and the encoder features.
[0075] Optionally, Figure 4a is a schematic diagram of an optional query feature decoupling process according to an embodiment of the present invention, such as Figure 4a As shown in the figure, when decoupling the query features, the self-attention module and the cross-attention module in the decoder are decoupled. In the D2Q-DETR model, the query features are divided into two groups: classification features (Class queries) and regression features (Boxqueries), where the classification features are used to predict the category of the target object, and the regression features are used to regress the representative points of the target object. The number of classification features and regression features is the same, and the classification features and the regression features are paired one by one in order to output the category probability (equivalent to the above target classification) and the predicted point set (including a set of K representative points, equivalent to the above target point set) corresponding to the same target object. After decoupling the query features, there is no information exchange between the classification features and the regression features, that is, the classification features and the regression features perform self-attention and cross-attention independently of each other.
[0076] Optionally, Figure 4b is a schematic diagram of another optional query feature decoupling process according to an embodiment of the present invention, such as Figure 4b As shown in the figure, when decoupling the query features, only the cross-attention module in the decoder is decoupled, while the self-attention module remains unchanged. In the D2Q-DETR model, the query features are divided into two groups: classification features and regression features, where the classification features are used to predict the category of the target object, and the regression features are used to regress the representative points of the target object. When multiple decoding layers are stacked in the decoder, the pre-generated query features are input into the first decoding layer of the multiple decoding layers. For each decoding layer except the first decoding layer in the multiple decoding layers, the classification features and regression features output by the previous decoding layer are fused using an element-wise adder (Element-wiseAddition) to obtain the input query features of the decoding layer. Therefore, when only the cross-attention module in the decoder is decoupled, the classification features and regression features are cross-attended independently of each other, and the self-attention module in the decoder still plays a role in exchanging information between the classification features and the regression features.
[0077] Still like Figure 3 As shown, in the decoder of the D2Q-DETR model, the decoupled regression features and the encoded features obtained by the encoder are subjected to cross-attention regression processing to obtain a prediction point set (including a set of K representative points, equivalent to the above target point set); the decoupled classification features and the encoded features obtained by the encoder are subjected to cross-attention classification processing to obtain the category probability (equivalent to the above target classification). It should be noted that Figure 3 In the D2Q-DETR model shown in Figure 2, the query feature decoupling process uses Figure 4a The decoupling method shown.
[0078] In an optional embodiment, the target model further includes a decoder, the decoder includes: a plurality of decoding layers, and the image processing method further includes the following method steps:
[0079] Step S212, obtaining a first object query quantity and a second object query quantity, wherein the first object query quantity is a query quantity corresponding to the first decoding layer of the query feature in the multiple decoding layers, and the second object query quantity is a query quantity corresponding to the last decoding layer of the query feature in the multiple decoding layers;
[0080] Step S214: determining the query quantity corresponding to the query feature in the remaining decoding layers in the multiple decoding layers based on the first object query quantity and the second object query quantity.
[0081] In the above optional embodiment, the target model may include a decoder, and the decoder may include multiple decoding layers. The above first object query quantity may be the query quantity corresponding to the first decoding layer of the query feature in the multiple decoding layers, and the above second query quantity may be the query quantity corresponding to the last decoding layer of the query feature in the multiple decoding layers.
[0082] The first object query number and the second object query number are obtained, and then, based on the first object query number and the second object query number, the query number corresponding to the query feature in the remaining decoding layers in the multiple decoding layers can be determined. In practical applications, the number of queries in the decoder directly affects the quality and efficiency of the query. By determining the number of queries corresponding to each encoding layer in the encoder, the number of queries in the decoder can be reduced without reducing the model query quality, thereby improving the query efficiency.
[0083] Still taking the example of rotating target detection in remote sensing images of a certain area, for the method provided by the relevant technology, the number of object queries corresponding to each decoding layer of the decoder is the same. Unlike this method, the D2Q-DETR model reduces the number of object queries in the decoder and improves query efficiency by using a dynamic query method without reducing the query quality.
[0084] In the D2Q-DETR model, the number of object queries in the first decoding layer among multiple decoding layers is set to the initial value N first , and calculate the number of object queries corresponding to the remaining decoding layers according to the following formula (1):
[0085] N i =( N first -N last ) × ρ i + N last Formula (1)
[0086] In formula (1), N last Indicates the number of object queries corresponding to the last decoding layer among multiple decoding layers (N last <N first );N i Represents the number of object queries corresponding to the i-th decoding layer among multiple decoding layers. ρ i represents a hyperparameter (ρ i <1).
[0087] It is easy to notice that the number of object queries at the i-th decoding layer is less than the number of queries at the (i-1)-th decoding layer. Therefore, we need to start from the N corresponding to the (i-1)-th decoding layer. i-1 In the object query, select the N corresponding to the i-th decoding layer i Object query.
[0088] Specifically, in the decoder of the D2Q-DETR model, the intermediate decoding layers (the remaining decoding layers except the first and last decoding layers in the multiple decoding layers) can include an auxiliary loss prediction head, which can be used for category prediction and representative point regression. The category probability obtained by the category prediction can directly indicate whether the query object belongs to an existing object or background. Therefore, the N corresponding to the (i-1)th decoding layer can be i-1 Among the object queries, select N with the largest category probability prediction result. i object query and use it as the N corresponding to the i-th decoding layer i Object query.
[0089] In an optional embodiment, the image processing method further includes the following method steps:
[0090] Step S216, checking whether the overlap between the target classification and the rotational bounding box is lower than a preset threshold;
[0091] Step S218, when the overlap is lower than a preset threshold, determine the reassigned classification label corresponding to the target classification.
[0092] In the above optional embodiment, a preset threshold is set to determine the reassigned classification label corresponding to the above target classification. Check whether the overlap (Intersection over Union, IoU) between the target classification and the above rotational bounding box is lower than the preset threshold. When it is checked that the IoU is lower than the preset threshold, the reassigned classification label corresponding to the target classification can be determined.
[0093] It should be noted that in the above process of determining the reassigned label corresponding to the target classification by the IoU between the target classification and the rotated external frame, IoU methods such as convex hull IoU (convex-hull Intersection over Union) and polygon IoU (Polygons Intersection over Union) can be used.
[0094] Still taking the use of the D2Q-DETR model to detect rotating targets in remote sensing images of a certain area as an example, in order to improve the query quality, the D2Q-DETR model after 50 rounds of training is used for verification based on the DOTA-v1.0 validation set. After the best match (described later), the target query is calculated using the following formula (2): The target box that matches The convex hull IoU between:
[0095]
[0096] Set a hyperparameter (equivalent to the above preset threshold) τ = 0.5. The CBIoU calculated according to formula (2) and the hyperparameter τ are the target labels actually matched with the remote sensing image. (When there is no query object, it is expressed as φ). The above label re-assignment process can be performed to obtain the re-assigned classification label When CBIoU>τ, take Otherwise, take
[0097] In addition, in order to study the effect of rotating target detection by D2Q-DETR model, it is also necessary to calculate the total training loss L in the use of D2Q-DETR model. The calculation process of the total training loss L includes: the first step is to calculate the pairing loss Step 2: Query the best match The third step is to calculate the total training loss L.
[0098] Specifically, in the first step above, the prediction result is calculated and the actual matching result of the remote sensing image (y σ(i) ,B σ(i) ) At this time, the pairing σ(i) is used as the index.
[0099] The calculation method is: when y σ(i) =φ, When σ(i) ≠φ, Calculated by the following formula (3):
[0100]
[0101] In formula (3), for the i-th query, represents the predicted category probability (equivalent to the above target classification), represents the predicted point set (including a set of K representative points), y σ(i) represents the target label actually matched by the remote sensing image (expressed as φ when there is no query object), B σ(i) Represents the point set consisting of the four vertices of the target box that actually matches the remote sensing image (Four corners of matched oriented target box, referred to as matching point set).
[0102] In formula (3), L cls , L L1 and L iou Respectively represent classification loss, first regression loss and second regression loss; λ cls, L1 and λ iou Respectively represent the balance L cls , L L1 and L iou Hyperparameters for the three loss terms (if not specified, the default value is λ cls =2.0,λ L1 =5.0,λ iou =2.0).
[0103] In formula (3), and Λ(B σ(i) ) represent the points used to calculate the prediction and matching point set B σ(i) The function of the center point coordinates. For example, Among them, K represents the prediction point set represents the number of points.
[0104] In formula (3), and Γ(B σ(i) ) respectively represent the use of Jarvis March algorithm to transform the prediction point set and matching point set B σ(i) Function that converts to minimum convex hull.
[0105] Specifically, in the second step above, based on the prediction results and the actual matching results of the remote sensing images, the best one-to-one pairing without duplication is queried. The query method is shown in the following formula (4):
[0106]
[0107] In formula (4), σ∈S N , N represents the number of query features, S N Represents the permutation and combination of N query features.
[0108] In formula (4), for the i-th query, represents the predicted category probability (equivalent to the above target classification), represents the predicted point set (including a set of K representative points), y σ(i) represents the target label actually matched by the remote sensing image (expressed as φ when there is no query object), B σ(i) Represents the matching point set obtained by actual matching of remote sensing images.
[0109] Specifically, in the third step above, the total training loss L is calculated. At this time, As an index. The calculation method of L is: When L=0; when When L is calculated by the following formula (5):
[0110]
[0111] In formula (5), the best pair obtained in the second step is As the index for the i-th query, represents the predicted category probability (equivalent to the above target classification), represents the predicted point set (including a set of K representative points), represents the above reassigned classification labels, Represents the matching point set obtained by actual matching of remote sensing images.
[0112] In formula (5), N represents the number of query features, N pos Indicates the number of query features that match the actual data; L cls , L L1 and L iou Respectively represent classification loss, first regression loss and second regression loss; λ cls , L1 and λ iou Respectively represent the balance L cls , L L1 and L iou Hyperparameters for the three loss terms (if not specified, the default value is λ cls =2.0,λ L1 =5.0,λ iou =2.0).
[0113] In formula (5), and Respectively represent the points used to calculate the prediction and matching point set The function of the center point coordinates. For example, Among them, K represents the prediction point set represents the number of points.
[0114] In formula (5), and Respectively represent the use of Jarvis March algorithm to predict the point set and matching point set Function that converts to minimum convex hull.
[0115] Figure 5 is a schematic diagram of an optional regression loss of a prediction point according to an embodiment of the present invention, such as Figure 5 As shown, the first regression loss L L1Represents the prediction point set The center point and matching point set The center point Λ(B σ(i) ) between the L1 loss. The first regression loss L L1 Can be used to narrow down the prediction point set and matching point set The distance between them can also be used to help the convergence of the point set learning process. However, the first regression loss L L1 It does not promote the prediction of point sets With matching point set alignment.
[0116] In order to transform the above prediction point set With matching point set For better alignment, the second regression loss L can be calculated using the convex hull GIoU loss iou , the calculation method is shown in the following formula (6):
[0117]
[0118] In formula (6), R i Represented by the convex hull and the convex hull Determine the minimum bounding polygon.
[0119] It should be noted that the best match is The method can be effectively calculated by the Hungarian algorithm. In addition, the classification loss L can be calculated using the focal loss method cls .
[0120] In an optional embodiment, a graphical user interface is provided by a terminal device, and the content displayed by the graphical user interface at least partially includes a rotating target detection scene. The image processing method further includes the following method steps:
[0121] Step S220, displaying multiple candidate objects in the graphical user interface;
[0122] Step S222, in response to a first touch operation on the graphical user interface, determining a target object from a plurality of candidate objects;
[0123] Step S224 , in response to the second touch operation on the target object, displaying a rotating bounding box and a target category corresponding to the target object in the graphical user interface.
[0124] In the above optional embodiment, the user can at least partially obtain the above rotating target detection scene through the graphical user interface content displayed by the terminal device. Since the content displayed by the image to be processed in the image processing method provided by the present invention at least includes the target object to be detected, and the image to be processed usually includes multiple objects, the graphical user interface can display multiple candidate objects for the user to select the target object to be detected from the multiple candidate objects.
[0125] In the above optional embodiment, when the above first touch operation of the above graphical user interface is received, the above target object is determined from the above multiple candidate objects. In addition, when the above second touch operation of the above graphical user interface is received, the rotating external frame and target classification corresponding to the target object are displayed in the graphical user interface. The rotating external frame can be generated by multiple points corresponding to the object; the target classification can be used to determine the category to which the target object belongs.
[0126] In particular, the above-mentioned touch operation refers to the user touching the display screen of the above-mentioned terminal device with a finger and controlling the operation of the terminal device. The touch operation may include single-point touch and multi-point touch, wherein the touch operation of each touch point may include clicking, long pressing, hard pressing, swiping, etc.
[0127] In an optional embodiment, the image processing method further includes the following method steps:
[0128] Step S226, in response to the first editing operation on the rotating circumscribed frame, adjusting the display range of the rotating circumscribed frame to obtain a first adjustment result, and / or, in response to the second editing operation on the target classification, adjusting the display color of the target classification to obtain a second adjustment result;
[0129] Step S228: updating the target detection result based on the first adjustment result and / or the second adjustment result.
[0130] In the above optional embodiment, the above first editing operation can be performed on the above rotating circumscribed frame, thereby adjusting the display range of the rotating circumscribed frame and obtaining the above first adjustment result. The above second editing operation can also be performed on the above target classification, thereby adjusting the display color of the target classification and obtaining the above second adjustment result.
[0131] In the above optional embodiment, the above target detection result can be updated by one of the following three methods:
[0132] The first method is to update the adjusted display range of the rotational bounding box in the target detection result based on the first adjustment result.
[0133] The second method is to update the display color of the adjusted target classification in the target detection result based on the second adjustment result.
[0134] The third method is to update the adjusted display range of the rotating external frame and the adjusted display color of the target classification in the target detection result based on the first adjustment result and the second adjustment result.
[0135] According to the image processing method provided in the above optional embodiment, a more accurate target detection result obtained by the above target detection model can be provided to the user, and the user can be supported to adjust the target detection result according to the needs of the actual application scenario. Through the above method, the performance of the rotation target detection model can be further improved, which has practical application significance.
[0136] Under the above operating environment, the present invention provides Figure 6 An image processing method is shown. Figure 6 is a flowchart of another image processing method according to an embodiment of the present invention. Figure 6 As shown, the image processing method comprises:
[0137] Step S602, obtaining a water area control remote sensing image, wherein the display content of the water area control remote sensing image includes: a target ship to be detected;
[0138] Step S604, segmenting the water area control remote sensing image to obtain multiple image blocks;
[0139] Step S606, obtaining a target point set and a target classification based on the multiple image blocks;
[0140] Step S608, generating a rotating ship external frame using the target point set;
[0141] Step S610, determining the ship detection result by rotating the ship external frame and classifying the target.
[0142] In an embodiment of the present invention, a water area control remote sensing image is obtained, wherein the display content of the water area control remote sensing image includes: a target ship to be detected, the water area control remote sensing image is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating ship bounding box is generated by using the target point set, and the ship detection result is determined by the rotating ship bounding box and the target classification.
[0143] It is easy to notice that the water area control remote sensing image is appropriately segmented in advance, a point set containing the rotation information of the target ship is predicted, and a rotating ship external frame is generated. The dynamic query model is further combined to obtain the category of the target ship, and finally the ship detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the target ship detection model, thereby achieving the technical effect of improving the detection quality of rotating target ships, and then solving the technical problem of low accuracy of the rotating target detection model provided in the relevant technology.
[0144] It should be noted that the above-mentioned image processing method provided in the embodiment of the present invention can be but is not limited to being applicable to the field of river water area management and control (for example, waterway network extraction (satellite, drone), ship extraction, ship change detection (satellite, drone), ship scheduling, etc.); the field of marine water area management and control (for example, waterway network extraction (satellite, drone), ship extraction, ship change detection (satellite, drone), etc.).
[0145] Ships in water control remote sensing images are usually distributed in arbitrary directions. Therefore, more parameters are required in the water control remote sensing target detection model to encode the direction information of the target ship, which is usually highly redundant and inefficient. Moreover, since CNN usually does not explicitly model the direction detection of the target ship, a large amount of rotation enhancement data is required to improve the accuracy of the rotating target ship detection model when training the rotating target ship detection model.
[0146] In an embodiment of the present invention, the water area control remote sensing image is appropriately segmented in advance, a point set containing the rotation information of the target ship is predicted, and a rotating ship external frame is generated. The dynamic query model is further combined to obtain the category of the target ship, and finally the ship detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the target ship detection model.
[0147] The water area control remote sensing image can be a film or photo that records the electromagnetic wave size of various ground objects, and can include aerial photos and satellite photos. The display content of the water area control remote sensing image can at least include: the target ship to be detected, wherein the target ship can be a small civilian ship, a military warship, a large commercial transport ship, an engineering operation ship, etc. displayed in the remote sensing image.
[0148] The imaging methods of water area control remote sensing images usually include: aerial photography, aerial scanning and microwave radar, etc. Usually, the data volume of water area control remote sensing images is large, so the water area control remote sensing images are segmented in advance to obtain multiple image blocks of appropriate sizes for subsequent processing operations.
[0149] The rotating ship external frame can be used to determine the location area of the target ship in the water area control remote sensing image. The attribute information of the rotating ship external frame can include the pixel size and angle (usually expressed in radians) of the rotating ship external frame. Based on the multiple image blocks, the target point set and target classification can be obtained. Based on the target point set, a rotating ship external frame corresponding to the target ship can be generated, and then the detection result of the target ship can be determined through the rotating ship external frame and the target classification corresponding to the target ship.
[0150] In particular, by determining the rotating ship external frame corresponding to the target ship through the target point set, and further determining the rotation direction information of the target ship, the problem of discontinuous detection boundaries caused by the angle regression processing method used in the related art can be avoided, thereby improving the accuracy of the target ship detection model. In addition, determining the category of the target ship and further determining the ship detection result can reduce the calculation amount of the detection process while ensuring the accuracy of the target ship detection model, thereby improving the efficiency of the target ship detection model.
[0151] In an optional embodiment, the target point set includes: a plurality of points, the plurality of points are used to determine the attribute information of the rotating ship circumscribed frame corresponding to the target ship, and the target classification is used to determine the category of the target ship.
[0152] Based on the above-mentioned multiple image blocks, the above-mentioned target point set and target classification can be obtained. The above-mentioned target point set may include multiple representative points (equivalent to the above-mentioned multiple points) corresponding to the above-mentioned target ship, and the target point set may be used to determine the attribute information of the rotating ship external frame corresponding to the target ship. The above-mentioned target classification can be used to determine the category of the target ship, and the category may include: small civilian ships, military warships, large commercial transport ships, engineering operation ships, etc.
[0153] In an optional embodiment, in step S606, obtaining a target point set and a target classification based on multiple image blocks includes the following method steps:
[0154] Step S661, using a target model to analyze multiple image blocks to obtain a target point set and a target classification, wherein the target model is an end-to-end object-oriented detection model.
[0155] In the above optional embodiment, the above target model may be an end-to-end object-oriented detection model, which may analyze the above multiple image blocks to obtain the above target point set and the above target classification. The target point set may be used to determine the attribute information of the rotating ship circumscribed frame corresponding to the target ship, and the target classification may be used to determine the category to which the target ship belongs.
[0156] In an optional embodiment, in step S661, the target model includes: the encoder uses the target model to analyze multiple image blocks to obtain a target point set and a target classification, including the following method steps:
[0157] Step S6611, encoding multiple image blocks using an encoder to obtain encoding features;
[0158] Step S6612, obtaining pre-generated query features;
[0159] Step S6613, decoupling the query features to obtain classification features and regression features;
[0160] Step S6614, cross-attention regression processing is performed on the regression features and the coding features to obtain a target point set, and cross-attention classification processing is performed on the classification features and the coding features to obtain a target classification.
[0161] In the above optional embodiment, the target model may include an encoder. The encoder in the target model may be used to encode the above multiple image blocks, thereby obtaining the above encoding features.
[0162] The above-mentioned pre-generated query features are obtained, and the query features may include at least classification features and regression features, and the classification features and the regression features are usually coupled to each other. That is, when querying through the query features, each of the multiple input features will affect all output results, and each of the multiple output results will be affected by all input features. Due to the coupling relationship between the features, the query system is often difficult to control and has poor performance.
[0163] The above decoupling may be to separate two or more features that are coupled by mathematical methods, thereby simplifying the subsequent query process. By decoupling the above query features, the above classification features and regression features may be obtained.
[0164] Utilizing the target model to obtain the target point set and target classification based on the multiple image blocks may include: performing cross-attention regression processing on the regression features and the coding features to obtain the target point set; performing cross-attention classification processing on the classification features and the coding features to obtain the target classification.
[0165] In an optional embodiment, the target model further includes a decoder, the decoder includes: a plurality of decoding layers, and the image processing method further includes the following method steps:
[0166] Step S612, obtaining a first object query quantity and a second object query quantity, wherein the first object query quantity is a query quantity corresponding to the first decoding layer of the query feature in the multiple decoding layers, and the second object query quantity is a query quantity corresponding to the last decoding layer of the query feature in the multiple decoding layers;
[0167] Step S614: determining the query quantity corresponding to the query feature in the remaining decoding layers in the multiple decoding layers based on the first object query quantity and the second object query quantity.
[0168] In the above optional embodiment, the target model may include a decoder, and the decoder may include multiple decoding layers. The above first object query quantity may be the query quantity corresponding to the first decoding layer of the query feature in the multiple decoding layers, and the above second query quantity may be the query quantity corresponding to the last decoding layer of the query feature in the multiple decoding layers.
[0169] The first object query number and the second object query number are obtained, and then, based on the first object query number and the second object query number, the query number corresponding to the query feature in the remaining decoding layers in the multiple decoding layers can be determined. In practical applications, the number of queries in the decoder directly affects the quality and efficiency of the query. By determining the number of queries corresponding to each encoding layer in the encoder, the number of queries in the decoder can be reduced without reducing the model query quality, thereby improving the query efficiency.
[0170] In an optional embodiment, the image processing method further includes the following method steps:
[0171] Step S616, checking whether the overlap between the target classification and the rotating ship external frame is lower than a preset threshold;
[0172] Step S618: When the overlap is lower than a preset threshold, determine the re-assigned classification label corresponding to the target classification.
[0173] In the above optional embodiment, a preset threshold is set to determine the re-assigned classification label corresponding to the above target classification. Check whether the overlap (Intersection over Union, referred to as IoU) between the target classification and the above rotating ship external frame is lower than the preset threshold. When it is checked that the IoU is lower than the preset threshold, the re-assigned classification label corresponding to the target classification can be determined.
[0174] It should be noted that in the above process of determining the reassigned label corresponding to the target classification by the IoU between the target classification and the rotating ship external frame, IoU methods such as convex hull IoU (convex-hull Intersection over Union) and polygon IoU (Polygons Intersection over Union) can be used.
[0175] In an optional embodiment, a graphical user interface is provided by a terminal device, and the content displayed by the graphical user interface at least partially includes a ship detection scene. The image processing method further includes the following method steps:
[0176] Step S620, displaying multiple controlled water areas and control information of each of the multiple controlled water areas in a graphical user interface;
[0177] Step S622, in response to a first touch operation on the graphical user interface, determining a target controlled water area from a plurality of controlled water areas;
[0178] Step S624, in response to the second touch operation applied to the target controlled water area, displaying the ship detection result corresponding to the target controlled water area in the graphical user interface.
[0179] In the above optional embodiment, the user can at least partially obtain the above ship detection scene through the graphical user interface content displayed by the terminal device. Since the content displayed by the water area control remote sensing image in the image processing method provided by the present invention at least includes the target ship to be detected, and the water area control remote sensing image usually includes multiple controlled water areas, the graphical user interface can display multiple controlled water areas, and can also display the control information of each controlled water area in the multiple controlled water areas, and the control information can be the ship information in the controlled water area.
[0180] In the optional embodiment, when the first touch operation of the graphical user interface is received, the target controlled water area is determined from the multiple controlled water areas. In addition, when the second touch operation of the graphical user interface is received, the ship detection result corresponding to the target controlled water area is displayed in the graphical user interface.
[0181] In particular, the above-mentioned touch operation refers to the user touching the display screen of the above-mentioned terminal device with a finger and controlling the operation of the terminal device. The touch operation may include single-point touch and multi-point touch, wherein the touch operation of each touch point may include clicking, long pressing, hard pressing, swiping, etc.
[0182] In an optional embodiment, the image processing method further includes the following method steps:
[0183] Step S626, in response to the first editing operation on the rotating ship circumference frame, adjusting the display range of the rotating ship circumference frame to obtain a first adjustment result, and / or, in response to the second editing operation on the target classification, adjusting the display color of the target classification to obtain a second adjustment result;
[0184] Step S628: updating the ship detection result based on the first adjustment result and / or the second adjustment result.
[0185] In the above optional embodiment, the above first editing operation can be performed on the above rotating ship circumference frame, thereby adjusting the display range of the rotating ship circumference frame and obtaining the above first adjustment result. The above target classification can also be subjected to a second editing operation, thereby adjusting the display color of the target classification and obtaining the above second adjustment result.
[0186] In the above optional embodiment, the above ship detection result can be updated by one of the following three methods:
[0187] The first method is to update the adjusted display range of the rotating ship external frame in the ship detection result based on the first adjustment result.
[0188] The second method is to update the display color of the adjusted target classification in the ship detection result based on the second adjustment result;
[0189] The third method is to update the adjusted display range of the rotating ship external frame and the adjusted display color of the target classification in the ship detection result based on the first adjustment result and the second adjustment result.
[0190] According to the image processing method provided in the above optional embodiment, a more accurate ship detection result obtained by the above ship detection model can be provided to the user, and the user is supported to adjust the ship detection result according to the needs of the actual application scenario. Through the above method, the performance of the rotating ship detection model can be further improved, which has practical application significance in the water area management scenario.
[0191] Under the above operating environment, the present invention provides Figure 7 An image processing method is shown. Figure 7 is a flowchart of another image processing method according to an embodiment of the present invention. Figure 7 As shown, the image processing method comprises:
[0192] Step S702, obtaining a regional planning remote sensing image, wherein the display content of the regional planning remote sensing image includes: a target building to be detected;
[0193] Step S704, segmenting the regional planning remote sensing image to obtain a plurality of image blocks;
[0194] Step S706, obtaining a target point set and a target classification based on the multiple image blocks;
[0195] Step S708, generating a rotational bounding box using the target point set;
[0196] Step S710, determining the building detection result by rotating the external frame and classifying the target.
[0197] In an embodiment of the present invention, a regional planning remote sensing image is obtained, wherein the display content of the regional planning remote sensing image includes: a target building to be detected, the regional planning remote sensing image is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating bounding box is generated by using the target point set, and the building detection result is determined by the rotating bounding box and the target classification.
[0198] It is easy to notice that the regional planning remote sensing image is appropriately segmented in advance, a point set containing the rotation information of the target building is predicted, and a rotating bounding box is generated. The dynamic query model is further combined to obtain the category of the target building, and finally the building detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the target building detection model, thereby achieving the technical effect of improving the detection quality of the rotated target building, and then solving the technical problem of low accuracy of the rotated target detection model provided in the relevant technology.
[0199] It should be noted that the above-mentioned image processing method provided in the embodiment of the present invention can be but is not limited to being applicable to the field of urban area planning (for example, road network extraction (satellite, drone), building extraction, building change detection (satellite, drone), fire fighting, etc.).
[0200] For example, it can also be applied to the following technical fields: natural resources and ecological environment (for example, weather forecasting, change detection, ecological red line change detection, multi-classification change detection, land feature classification, greenhouse extraction, etc.); water conservancy (for example, water area change detection, greenhouse extraction, water body extraction (optical, radar), forest extraction, cage aquaculture extraction, sand mining site extraction, riverside house extraction, dam extraction, photovoltaic power plant extraction, etc.); agriculture and forestry (for example, land parcel identification, production area change detection, etc.).
[0201] Buildings in regional planning remote sensing images are usually distributed in arbitrary directions. Therefore, more parameters are required in the regional planning remote sensing target detection model to encode the directional information of the target building, which is usually highly redundant and inefficient. Moreover, since CNN usually does not explicitly model the direction detection of the target building, a large amount of rotation enhancement data is required when training the rotated target building detection model to improve the accuracy of the rotated target building detection model.
[0202] In an embodiment of the present invention, the regional planning remote sensing image is appropriately segmented in advance, a point set containing the rotation information of the target building is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target building, and finally the building detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the target building detection model.
[0203] The above-mentioned regional planning remote sensing image can be a film or photo recording the electromagnetic wave size of various ground objects, and can include aerial photos and satellite photos. The display content of the regional planning remote sensing image can at least include: a target building to be detected, wherein the target building can be an industrial building, a civil building, an agricultural building, etc. displayed in the remote sensing image.
[0204] The imaging methods of regional planning remote sensing images usually include: aerial photography, aerial scanning and microwave radar, etc. The data volume of regional planning remote sensing images is usually large, so the regional planning remote sensing images are segmented in advance to obtain multiple image blocks of appropriate sizes for subsequent processing operations.
[0205] The rotating external frame can be used to determine the location area of the target building in the regional planning remote sensing image. The attribute information of the rotating external frame can include the pixel size and angle (usually expressed in radians) of the rotating external frame. Based on the multiple image blocks, the target point set and target classification can be obtained. Based on the target point set, a rotating external frame corresponding to the target building can be generated, and then the detection result of the target building can be determined through the rotating external frame and the target classification corresponding to the target building.
[0206] In particular, by determining the rotational bounding box corresponding to the target building through the target point set, and further determining the rotational direction information of the target building, the problem of discontinuous detection boundaries caused by the angle regression processing method used in the related art can be avoided, thereby improving the accuracy of the target building detection model. In addition, determining the category of the target building and further determining the building detection result can reduce the amount of calculation in the detection process while ensuring the accuracy of the target building detection model, thereby improving the efficiency of the target building detection model.
[0207] In an optional embodiment, a graphical user interface is provided by a terminal device, and the content displayed by the graphical user interface at least partially includes a building detection scene. The image processing method further includes the following method steps:
[0208] Step S712, displaying the plurality of planning areas and planning information of each of the plurality of planning areas in the graphical user interface;
[0209] Step S714, in response to a first touch operation on the graphical user interface, determining a target planning area from a plurality of planning areas;
[0210] Step S716 , in response to the second touch operation on the target planning area, displaying the building detection result corresponding to the target planning area in the graphical user interface.
[0211] In the above optional embodiment, the user can at least partially obtain the above building detection scene through the graphical user interface content displayed by the terminal device. Since the content displayed by the regional planning remote sensing image in the image processing method provided by the present invention at least includes the target building to be detected, and the regional planning remote sensing image usually includes multiple planning areas, the graphical user interface can display multiple planning areas and can also display the planning information of each planning area in the multiple planning areas, and the planning information can be the building information in the planning area.
[0212] In the optional embodiment, when the first touch operation of the graphical user interface is received, the target planning area is determined from the multiple planning areas. In addition, when the second touch operation of the graphical user interface is received, the building detection result corresponding to the target planning area is displayed in the graphical user interface.
[0213] In particular, the above-mentioned touch operation refers to the user touching the display screen of the above-mentioned terminal device with a finger and controlling the operation of the terminal device. The touch operation may include single-point touch and multi-point touch, wherein the touch operation of each touch point may include clicking, long pressing, hard pressing, swiping, etc.
[0214] Under the above operating environment, the present invention provides Figure 8 An image processing method is shown. Figure 8 is a flowchart of another image processing method according to an embodiment of the present invention. Figure 8 As shown, the image processing method comprises:
[0215] Step S802, obtaining a traffic management remote sensing image, wherein the display content of the traffic management remote sensing image includes: a target vehicle to be detected;
[0216] Step S804, segmenting the traffic management remote sensing image to obtain a plurality of image blocks;
[0217] Step S806, obtaining a target point set and a target classification based on the multiple image blocks;
[0218] Step S808, generating a rotational bounding box using the target point set;
[0219] Step S810, determining the vehicle detection result by rotating the external frame and classifying the target.
[0220] In an embodiment of the present invention, a traffic management remote sensing image is obtained, wherein the display content of the traffic management remote sensing image includes: a target vehicle to be detected, the traffic management remote sensing image is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating bounding box is generated by using the target point set, and a vehicle detection result is determined by the rotating bounding box and the target classification.
[0221] It is easy to notice that the traffic management remote sensing image is appropriately segmented in advance, a point set containing the rotation information of the target vehicle is predicted, and a rotating external frame is generated. The dynamic query model is further combined to obtain the category of the target vehicle, and finally the vehicle detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the vehicle detection model, thereby achieving the technical effect of improving the detection quality of rotating target vehicles, and then solving the technical problem of low accuracy of the rotating target detection model provided in the relevant technology.
[0222] It should be noted that the above-mentioned image processing method provided in the embodiment of the present invention can be but is not limited to being applicable to the field of traffic management (for example, road network extraction (satellite, drone), vehicle extraction, road network change detection (satellite, drone), traffic accident monitoring, road condition information monitoring, etc.).
[0223] For example, it can also be applied to the following technical fields: urban area planning (for example, road network extraction (satellite, drone), building extraction, building change detection (satellite, drone), fire protection, etc.); natural resources and ecological environment (for example, weather forecast, change detection, ecological red line change detection, multi-classification change detection, land feature classification, greenhouse extraction, etc.); water conservancy (for example, water area change detection, greenhouse extraction, water body extraction (optical, radar), forest extraction, cage aquaculture extraction, sand mining site extraction, riverside house extraction, dam extraction, photovoltaic power plant extraction, etc.); agriculture and forestry (for example, land parcel identification, production area change detection, etc.).
[0224] Vehicles in traffic management remote sensing images are usually distributed in arbitrary directions. Therefore, more parameters are needed in traffic management remote sensing target detection models to encode the direction information of target vehicles, which is usually highly redundant and inefficient. Moreover, since CNNs usually do not explicitly model the direction detection of target vehicles, a large amount of rotation augmentation data is required when training a rotation target vehicle detection model to improve the accuracy of the rotation target vehicle detection model.
[0225] In an embodiment of the present invention, the traffic management remote sensing image is appropriately segmented in advance, a point set containing the rotation information of the target vehicle is predicted, and a rotational bounding box is generated. The dynamic query model is further combined to obtain the category of the target vehicle, and finally the vehicle detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the target vehicle detection model.
[0226] The above-mentioned traffic management remote sensing image can be a film or photo recording the electromagnetic wave size of various ground objects, and can include aerial photos and satellite photos. The display content of the traffic management remote sensing image can at least include: the target vehicle to be detected, wherein the target vehicle can be a land vehicle, a water vehicle, or an air vehicle displayed in the remote sensing image.
[0227] The imaging methods of traffic management remote sensing images usually include: aerial photography, aerial scanning and microwave radar, etc. Usually, the data volume of traffic management remote sensing images is large, so the traffic management remote sensing images are segmented in advance to obtain multiple image blocks of appropriate sizes for subsequent processing operations.
[0228] The rotating circumscribed frame may be used to determine the location area of the target vehicle in the traffic management remote sensing image. The attribute information of the rotating circumscribed frame may include the pixel size and angle (usually expressed in radians) of the rotating circumscribed frame.
[0229] Based on the above multiple image blocks, the above target point set and target classification can be obtained. Based on the target point set, a rotating circumscribed frame corresponding to the above target vehicle can be generated, and then the detection result of the target vehicle can be determined through the rotating circumscribed frame and the above target classification corresponding to the target vehicle.
[0230] In particular, by determining the rotational bounding box corresponding to the target vehicle through the target point set, and further determining the rotational direction information of the target vehicle, the problem of discontinuous detection boundaries caused by the angle regression processing method used in the related art can be avoided, thereby improving the accuracy of the target vehicle detection model. In addition, determining the category to which the target vehicle belongs and further determining the vehicle detection result can reduce the amount of calculation in the detection process while ensuring the accuracy of the target vehicle detection model, thereby improving the efficiency of the target vehicle detection model.
[0231] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0232] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0233] Example 2
[0234] According to an embodiment of the present invention, a device embodiment for implementing the above-mentioned image processing method is also provided. Fig. 9 is a schematic diagram of the structure of an image processing device according to an embodiment of the present invention. Fig. 9 As shown, the device comprises:
[0235] The first acquisition module 901 is used to acquire the image to be processed, wherein the display content of the image to be processed includes: the target object to be detected; the segmentation module 902 is used to segment the image to be processed to obtain multiple image blocks; the second acquisition module 903 is used to acquire the target point set and the target classification based on the multiple image blocks; the generation module 904 is used to generate a rotating external frame using the target point set; the determination module 905 is used to determine the target detection result through the rotating external frame and the target classification.
[0236] It should be noted that the first acquisition module 901, the segmentation module 902, the second acquisition module 903, the generation module 904, and the determination module 905 correspond to steps S202 to S210 in Example 1, and the five modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0237] In an embodiment of the present invention, first, a first acquisition module is used to acquire an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; secondly, a segmentation module is used to segment the image to be processed to obtain a plurality of image blocks; then, a second acquisition module is used to acquire a target point set and a target classification based on the plurality of image blocks; further, a generation module is used to generate a rotated bounding box using the target point set; finally, a determination module is used to determine the target detection result through the rotated bounding box and the target classification.
[0238] It is easy to notice that the image to be processed is appropriately segmented in advance, a point set containing the rotation information of the target object is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target object, and finally the target detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the rotation target detection model, thereby achieving the technical effect of improving the quality of rotation target detection, and further solving the technical problem of low accuracy of the rotation target detection model provided in the related technology.
[0239] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0240] Example 3
[0241] According to an embodiment of the present invention, an embodiment of an electronic device is also provided, and the electronic device may be any computing device in a computing device group. The electronic device includes: a processor and a memory, wherein:
[0242] A memory is connected to the above-mentioned processor and is used to provide the above-mentioned processor with instructions for processing the following processing steps: obtaining an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; segmenting the image to be processed to obtain multiple image blocks; based on the multiple image blocks, obtaining a target point set and a target classification; using the target point set to generate a rotating external frame; and determining a target detection result through the rotating external frame and the target classification.
[0243] In an embodiment of the present invention, an image to be processed is obtained, wherein the display content of the image to be processed includes: a target object to be detected, the image to be processed is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating bounding box is generated by using the target point set, and a target detection result is determined by the rotating bounding box and the target classification.
[0244] It is easy to notice that the image to be processed is appropriately segmented in advance, a point set containing the rotation information of the target object is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target object, and finally the target detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the rotation target detection model, thereby achieving the technical effect of improving the quality of rotation target detection, and further solving the technical problem of low accuracy of the rotation target detection model provided in the related technology.
[0245] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.
[0246] Example 4
[0247] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0248] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0249] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the image processing method: obtaining the image to be processed, wherein the display content of the image to be processed includes: the target object to be detected; dividing the image to be processed to obtain multiple image blocks; based on the multiple image blocks, obtaining the target point set and target classification; using the target point set to generate a rotating external frame; determining the target detection result through the rotating external frame and target classification.
[0250] Optionally, Fig.10 is a structural block diagram of another computer terminal according to an embodiment of the present invention. Fig.10 As shown, the computer terminal may include: one or more (only one is shown in the figure) processors 122 , a memory 124 , and a peripheral interface 126 .
[0251] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the image processing method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned image processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0252] The processor can call the information and application stored in the memory through the transmission device to execute the following steps: obtain the image to be processed, wherein the display content of the image to be processed includes: the target object to be detected; divide the image to be processed to obtain multiple image blocks; based on the multiple image blocks, obtain the target point set and target classification; use the target point set to generate a rotating external frame; determine the target detection result through the rotating external frame and target classification.
[0253] Optionally, the processor may also execute program code of the following steps: analyzing multiple image blocks using a target model to obtain a target point set and a target classification, wherein the target model is an end-to-end object-oriented detection model.
[0254] Optionally, the processor may also execute the program code of the following steps: using an encoder to encode multiple image blocks to obtain encoding features; obtaining pre-generated query features; decoupling the query features to obtain classification features and regression features; performing cross-attention regression processing on the regression features and the encoding features to obtain a target point set, and performing cross-attention classification processing on the classification features and the encoding features to obtain a target classification.
[0255] Optionally, the processor may also execute the program code of the following steps: obtaining a first object query number and a second object query number, wherein the first object query number is the query number corresponding to the query feature in the first decoding layer among multiple decoding layers, and the second object query number is the query number corresponding to the query feature in the last decoding layer among multiple decoding layers; determining the query number corresponding to the query feature in the remaining decoding layers among the multiple decoding layers based on the first object query number and the second object query number.
[0256] Optionally, the processor may also execute program code for the following steps: displaying multiple candidate objects in a graphical user interface; determining a target object from multiple candidate objects in response to a first touch operation applied to the graphical user interface; and displaying a rotating bounding box and target classification corresponding to the target object in the graphical user interface in response to a second touch operation applied to the target object.
[0257] Optionally, the processor may also execute program code for the following steps: in response to a first editing operation on a rotating external frame, adjusting the display range of the rotating external frame to obtain a first adjustment result, and / or, in response to a second editing operation on a target classification, adjusting the display color of the target classification to obtain a second adjustment result; and based on the first adjustment result and / or the second adjustment result, updating the target detection result.
[0258] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the regional planning remote sensing image, wherein the display content of the regional planning remote sensing image includes: the target building to be detected; divide the regional planning remote sensing image to obtain multiple image blocks; based on the multiple image blocks, obtain the target point set and target classification; generate a rotating external frame using the target point set; and determine the building detection result through the rotating external frame and target classification.
[0259] Optionally, the processor may also execute program codes of the following steps: displaying multiple planning areas and planning information of each of the multiple planning areas in a graphical user interface; determining a target planning area from the multiple planning areas in response to a first touch operation applied to the graphical user interface; and displaying building detection results corresponding to the target planning area in the graphical user interface in response to a second touch operation applied to the target planning area.
[0260] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain traffic management remote sensing images, wherein the display content of the traffic management remote sensing images includes: target vehicles to be detected; segment the traffic management remote sensing images to obtain multiple image blocks; based on the multiple image blocks, obtain target point sets and target classifications; generate a rotating external frame using the target point set; and determine the vehicle detection results through the rotating external frame and target classification.
[0261] In an embodiment of the present invention, an image to be processed is obtained, wherein the display content of the image to be processed includes: a target object to be detected, the image to be processed is segmented to obtain a plurality of image blocks, a target point set and a target classification are obtained based on the plurality of image blocks, a rotating bounding box is generated by using the target point set, and a target detection result is determined by the rotating bounding box and the target classification.
[0262] It is easy to notice that the image to be processed is appropriately segmented in advance, a point set containing the rotation information of the target object is predicted, and a rotation bounding box is generated. The dynamic query model is further combined to obtain the category of the target object, and finally the target detection result is determined, thereby achieving the purpose of optimizing the accuracy and efficiency of the rotation target detection model, thereby achieving the technical effect of improving the quality of rotation target detection, and further solving the technical problem of low accuracy of the rotation target detection model provided in the related technology.
[0263] It can be understood by those skilled in the art that Fig.10 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.10 It does not limit the structure of the above electronic device. For example, the computer terminal may also include Fig.10 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.10 Different configurations are shown.
[0264] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0265] According to an embodiment of the present invention, an embodiment of a computer-readable storage medium is also provided. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the image processing method provided in the first embodiment.
[0266] Optionally, in this embodiment, the computer-readable storage medium may be located in any one of the computer terminals in a computer terminal group in a computer network, or in any one of the mobile terminals in a mobile terminal group.
[0267] Optionally, in this embodiment, a computer-readable storage medium is configured to store program codes for executing the following steps: obtaining an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; segmenting the image to be processed to obtain a plurality of image blocks; based on the plurality of image blocks, obtaining a target point set and a target classification; generating a rotating bounding box using the target point set; and determining a target detection result through the rotating bounding box and the target classification.
[0268] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: analyzing multiple image blocks using a target model to obtain a target point set and a target classification, wherein the target model is an end-to-end object-oriented detection model.
[0269] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: encoding multiple image blocks using an encoder to obtain encoding features; obtaining pre-generated query features; decoupling the query features to obtain classification features and regression features; performing cross-attention regression processing on the regression features and the encoding features to obtain a target point set, and performing cross-attention classification processing on the classification features and the encoding features to obtain a target classification.
[0270] Optionally, in this embodiment, a computer-readable storage medium is configured to store program code for executing the following steps: obtaining a first object query number and a second object query number, wherein the first object query number is the query number corresponding to the query feature in the first decoding layer among multiple decoding layers, and the second object query number is the query number corresponding to the query feature in the last decoding layer among the multiple decoding layers; determining the query number corresponding to the query feature in the remaining decoding layers among the multiple decoding layers based on the first object query number and the second object query number.
[0271] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: displaying multiple candidate objects in a graphical user interface; determining a target object from the multiple candidate objects in response to a first touch operation applied to the graphical user interface; and displaying a rotating external frame and target classification corresponding to the target object in the graphical user interface in response to a second touch operation applied to the target object.
[0272] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: in response to a first editing operation acting on the rotating external frame, adjusting the display range of the rotating external frame to obtain a first adjustment result, and / or, in response to a second editing operation acting on the target classification, adjusting the display color of the target classification to obtain a second adjustment result; based on the first adjustment result and / or the second adjustment result, updating the target detection result.
[0273] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: obtaining a regional planning remote sensing image, wherein the display content of the regional planning remote sensing image includes: a target building to be detected; segmenting the regional planning remote sensing image to obtain a plurality of image blocks; based on the plurality of image blocks, obtaining a target point set and a target classification; generating a rotating bounding box using the target point set; and determining the building detection result through the rotating bounding box and the target classification.
[0274] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: displaying multiple planning areas and planning information of each of the multiple planning areas in a graphical user interface; determining a target planning area from the multiple planning areas in response to a first touch operation applied to the graphical user interface; and displaying building detection results corresponding to the target planning area in the graphical user interface in response to a second touch operation applied to the target planning area.
[0275] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: acquiring a traffic management remote sensing image, wherein the display content of the traffic management remote sensing image includes: a target vehicle to be detected; segmenting the traffic management remote sensing image to obtain a plurality of image blocks; acquiring a target point set and a target classification based on the plurality of image blocks; generating a rotating bounding box using the target point set; and determining a vehicle detection result through the rotating bounding box and the target classification.
[0276] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0277] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0278] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0279] 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, that is, they 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.
[0280] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0281] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, 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, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0282] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An image processing method, characterized in that: include: Acquire an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; Segmenting the image to be processed to obtain a plurality of image blocks; Encoding the multiple image blocks using an encoder in the target model to obtain encoding features; Decouple the pre-generated query features to obtain classification features and regression features; Performing cross-attention regression processing on the regression features and the encoding features to obtain a target point set; Performing cross-attention classification processing on the classification features and the encoding features to obtain a target classification; Generate a rotational bounding box using the target point set; The target detection result is determined by the rotating external frame and the target classification.
2. The image processing method according to claim 1, characterized in that: The target point set includes: a plurality of points, the plurality of points are used to determine the attribute information of the rotational bounding box corresponding to the target object, and the target classification is used to determine the belonging category of the target object.
3. The image processing method according to claim 1, characterized in that: Based on the multiple image blocks, acquiring the target point set and the target classification includes: The plurality of image blocks are analyzed using a target model to obtain the target point set and the target classification, wherein the target model is an end-to-end object-oriented detection model.
4. The image processing method according to claim 1, characterized in that: The target model also includes a decoder, the decoder includes: a plurality of decoding layers, and the image processing method also includes: Obtaining a first object query quantity and a second object query quantity, wherein the first object query quantity is the query quantity corresponding to the first decoding layer of the query feature in the multiple decoding layers, and the second object query quantity is the query quantity corresponding to the last decoding layer of the query feature in the multiple decoding layers; The query quantity corresponding to the query feature in the remaining decoding layers in the multiple decoding layers is determined based on the first object query quantity and the second object query quantity.
5. The image processing method according to claim 1, characterized in that: A graphical user interface is provided by a terminal device, wherein the content displayed by the graphical user interface at least partially includes a rotating target detection scene, and the image processing method further includes: displaying a plurality of candidate objects in the graphical user interface; In response to a first touch operation applied to the graphical user interface, determining the target object from the plurality of candidate objects; In response to a second touch operation on the target object, the rotating circumscribed frame and the target classification corresponding to the target object are displayed in the graphical user interface.
6. The image processing method according to claim 5, characterized in that: The image processing method further comprises: In response to a first editing operation on the rotating circumscribed frame, adjusting the display range of the rotating circumscribed frame to obtain a first adjustment result, and / or, in response to a second editing operation on the target classification, adjusting the display color of the target classification to obtain a second adjustment result; Based on the first adjustment result and / or the second adjustment result, the target detection result is updated.
7. An image processing method, characterized in that: include: Acquiring a regional planning remote sensing image, wherein the display content of the regional planning remote sensing image includes: a target building to be detected; Segmenting the regional planning remote sensing image to obtain a plurality of image blocks; Encoding the multiple image blocks using an encoder in the target model to obtain encoding features; Decouple the pre-generated query features to obtain classification features and regression features; Performing cross-attention regression processing on the regression features and the encoding features to obtain a target point set; Performing cross-attention classification processing on the classification features and the encoding features to obtain a target classification; Generate a rotational bounding box using the target point set; The building detection result is determined by the rotational external frame and the target classification.
8. The image processing method according to claim 7, characterized in that: A graphical user interface is provided through a terminal device, and the content displayed by the graphical user interface at least partially includes a building detection scene. The image processing method further includes: Displaying a plurality of planning areas and planning information of each of the plurality of planning areas in the graphical user interface; In response to a first touch operation applied to the graphical user interface, determining a target planning area from the plurality of planning areas; In response to a second touch operation applied to the target planning area, a building detection result corresponding to the target planning area is displayed in the graphical user interface.
9. An image processing method, characterized in that: include: Acquiring a traffic management remote sensing image, wherein the display content of the traffic management remote sensing image includes: a target vehicle to be detected; Segmenting the traffic management remote sensing image to obtain a plurality of image blocks; Encoding the multiple image blocks using an encoder in the target model to obtain encoding features; Decouple the pre-generated query features to obtain classification features and regression features; Performing cross-attention regression processing on the regression features and the encoding features to obtain a target point set; Performing cross-attention classification processing on the classification features and the encoding features to obtain a target classification; Generate a rotational bounding box using the target point set; The vehicle detection result is determined by the rotating external frame and the target classification.
10. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the image processing method according to any one of claims 1 to 9.
11. An image processing system, characterized in that: include: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Step 1, obtaining an image to be processed, wherein the display content of the image to be processed includes: a target object to be detected; Step 2, dividing the image to be processed into multiple image blocks; Step 3, using the encoder in the target model to encode the multiple image blocks to obtain encoding features; decoupling the pre-generated query features to obtain classification features and regression features; performing cross-attention regression processing on the regression features and the encoding features to obtain a target point set; performing cross-attention classification processing on the classification features and the encoding features to obtain a target classification; Step 4, generating a rotational bounding box using the target point set; Step 5: determining the target detection result through the rotation of the external frame and the target classification.
Citation Information
Patent Citations
Image processing model training method and device and storage medium
CN110503097A
High-resolution remote sensing image target detection method and device and computer equipment
CN112132093A