Image labeling method and device, electronic equipment and storage medium

By displaying the preset number of areas of interest in sliding windows in the image annotation interface and allowing users to adjust and confirm the properties of sliding windows, the problems of inefficient image annotation and high labor costs in the prior art are solved, and a more efficient image annotation process is achieved.

CN120236184AActive Publication Date: 2025-07-01HANGZHOU HIKROBOT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510708885.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-07-01
Estimated Expiration
2045-05-28

AI Technical Summary

Technical Problem

In the prior art, the labeling of image data sets is inefficient and requires a lot of labor costs.

Method used

An image labeling method is provided, by displaying the area of ​​interest of the image to be labeled in the image labeling interface, including a preset number of sliding windows. Users can adjust and confirm the properties of the sliding window, and automatically use the area included in the sliding window as the detection area.

Benefits of technology

Improve the efficiency of image annotation in machine vision tasks and reduce the labor cost of image annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236184A_ABST
    Figure CN120236184A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image annotation method and device, electronic equipment and a storage medium, and relates to the technical field of machine vision, in an image annotation interface of a machine vision task, a to-be-annotated image is displayed, and a region of interest of the to-be-annotated image comprises a preset number of sliding windows; in response to an attribute adjustment operation sent by a user for the sliding window, adjusting the attribute of the sliding window; and in response to the sliding window confirmation operation, taking an area included by each sliding window as a detection area. When image annotation is carried out, the region of interest of the to-be-annotated image displayed on the image annotation interface comprises a preset number of sliding windows, and a user can carry out attribute adjustment operation on the sliding windows through the image annotation interface. According to the technical scheme of the invention, the user can adjust the attributes of the sliding windows on the basis of the existing preset number of sliding windows, and does not need to manually label the detection area where each to-be-detected target in the to-be-labeled image is located, so that the efficiency of image labeling in a machine vision task can be improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision technology, and in particular, to an image annotation method, apparatus, electronic device, and storage medium. Background Art

[0002] Before training a deep learning model for defect detection, category recognition, etc. to perform machine vision tasks, it is necessary to annotate an image dataset. For each image included in the image dataset, it is necessary to annotate the detection area where the target to be detected is located in the image.

[0003] In the current related technologies, by manual means, the detection area where each target to be detected is located in each image included in the image dataset is annotated in sequence. The efficiency of image annotation is low, and it consumes a large amount of human cost. Summary of the Invention

[0004] The purpose of the embodiments of this application is to provide an image annotation method, apparatus, electronic device, and storage medium to improve the efficiency of image annotation in machine vision tasks and reduce the human cost required for image annotation. The specific technical solutions are as follows:

[0005] In a first aspect, the embodiments of this application provide an image annotation method, and the method includes:

[0006] In the image annotation interface of a machine vision task, display an image to be annotated, where the region of interest of the image to be annotated includes a preset number of sliding windows;

[0007] In response to an attribute adjustment operation issued by the user for the sliding window, adjust the attributes of the sliding window;

[0008] In response to a sliding window confirmation operation issued by the user, use the regions included in each sliding window in the current image annotation interface as the detection regions of the image to be annotated.

[0009] Optionally, the step of adjusting the attributes of the sliding window in response to an attribute adjustment operation issued by the user for the sliding window includes:

[0010] In response to a dragging operation issued by the user for the sliding window, determine the position targeted by the dragging operation; based on the position targeted by the dragging operation, adjust the attributes of the sliding window; and / or,

[0011] In response to an adjustment operation issued by the user for an attribute adjustment control included in the image annotation interface, based on the sliding window attribute value indicated by the adjusted adjustment control, adjust the attributes of the sliding window.

[0012] Optionally, the step of determining the position targeted by the drag operation in response to the user's drag operation on the sliding window and adjusting the attributes of the sliding window based on the position targeted by the drag operation includes:

[0013] In response to the user's drag operation on the edge of the selected target sliding window, following the drag operation, adjust the size of the target sliding window based on the direction of the drag operation until the position where the drag operation stops is within the preset drag limit range or the position indicated by the drag operation exceeds the preset drag limit range;

[0014] And / or,

[0015] In response to the user's drag operation inside the selected target sliding window, following the drag operation, adjust the position of the target sliding window based on the direction of the drag operation.

[0016] Optionally, before the step of adjusting the size of the target sliding window following the drag operation in response to the user's drag operation on the edge of the selected target sliding window and based on the direction of the drag operation, the method further includes:

[0017] In response to the cursor hovering over the sliding window edge hot zone corresponding to the selected target sliding window, adjust the cursor to a telescopic state, where the sliding window edge hot zone is the area of the edge of the target sliding window that does not coincide with the border of the region of interest, and the telescopic state is used to prompt the user that the edge corresponding to the cursor is draggable.

[0018] Optionally, the step of adjusting the size of the target sliding window following the drag operation in response to the user's drag operation on the edge of the selected target sliding window and based on the direction of the drag operation until the position where the drag operation stops is within the preset drag limit range or the position indicated by the drag operation exceeds the preset drag limit range includes:

[0019] In response to the user's drag operation on the edge of the selected target sliding window, following the drag operation, adjust the size of the target sliding window based on the direction of the drag operation and calculate the sliding window overlap rate, where the sliding window overlap rate is used to characterize the overlapping area between the target sliding window and the adjacent sliding window;

[0020] When the sliding window overlap rate of the target sliding window is within the preset overlap rate range when the drag operation stops, complete the size adjustment of the target sliding window;

[0021] When the window overlap rate of the target sliding window exceeds the preset overlap rate range, adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range, and complete the size adjustment of the target sliding window. Among them, when the dragging operation makes the size of the target sliding window larger, the extreme value of the preset overlap rate range is the maximum value; when the dragging operation makes the size of the target sliding window smaller, the extreme value of the preset overlap rate range is the minimum value.

[0022] Optionally, the method further includes:

[0023] When adjusting the size of the target sliding window based on the direction of the dragging operation, adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window.

[0024] Optionally, the step of adjusting the attributes of the sliding window based on the adjusted sliding window attribute values indicated by the adjusted adjustment control in response to the adjustment operation issued by the user for the attribute adjustment control included in the image annotation interface includes:

[0025] In response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface, adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control; and / or,

[0026] In response to the overlap rate adjustment instruction issued by the user for the sliding window overlap rate adjustment control included in the image annotation interface, adjust the size of the sliding windows based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control to complete the size adjustment of the sliding windows.

[0027] Optionally, the sliding window overlap rate adjustment control includes a range adjustment component;

[0028] The step of adjusting the size of the sliding windows based on the adjusted sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control in response to the overlap rate adjustment instruction issued by the user for the sliding window overlap rate adjustment control included in the image annotation interface includes:

[0029] In response to the dragging operation issued by the user for the range adjustment component, follow the dragging operation to adjust the size of the sliding windows so that the window overlap rates of the respective sliding windows are the same as the window overlap rate corresponding to the dragging operation in the range adjustment component.

[0030] Optionally, the sliding window quantity adjustment control includes a first sliding window quantity adjustment control and a second sliding window quantity adjustment control;

[0031] The step of adjusting the number of the sliding windows based on the number of sliding windows indicated by the adjusted sliding window quantity adjustment control in response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface includes:

[0032] In response to the horizontal sliding window quantity set by the user based on the first sliding window quantity adjustment control and the vertical sliding window quantity set by the user based on the second sliding window quantity adjustment control, display all the selected sliding windows as unselected;

[0033] In the image annotation interface, display the unselected sliding windows in the default arrangement;

[0034] Adjust the number of sliding windows included in the image to be annotated in the image annotation interface according to the horizontal sliding window quantity and the vertical sliding window quantity.

[0035] Optionally, after the step of adjusting the number of the sliding windows based on the number of sliding windows indicated by the adjusted sliding window quantity adjustment control in response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface, the method further includes:

[0036] Based on the horizontal sliding window quantity and the vertical sliding window quantity, determine the sliding window located at the central position of the region of interest from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows;

[0037] Display the determined sliding window as a selected state.

[0038] Optionally, the step of determining the sliding window located at the central position of the region of interest from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows based on the horizontal sliding window quantity and the vertical sliding window quantity includes:

[0039] In response to both the horizontal sliding window quantity and the vertical sliding window quantity being odd numbers, determine the sliding window located at the center position of the region of interest from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows;

[0040] In response to both the horizontal sliding window quantity and the vertical sliding window quantity being even numbers, determine the sliding window closest to the center position and in the first direction from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows;

[0041] In response to the horizontal sliding window quantity being an odd number and the vertical sliding window quantity being an even number, determine the sliding window closest to the center position and in the second direction from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows;

[0042] In response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window that is closest to the center position and in the third direction.

[0043] Optionally, after the step of displaying the image to be annotated in the image annotation interface for the machine vision task, the method further includes:

[0044] In response to an attribute adjustment operation issued by the user for the region of interest, adjust the attributes of the region of interest.

[0045] Optionally, the step of adjusting the attributes of the region of interest in response to an attribute adjustment operation issued by the user for the region of interest includes at least one of the following:

[0046] In response to a dragging operation issued by the user for a vertex or an edge of the region of interest, follow the dragging operation and adjust the size of the region of interest based on the direction of the dragging operation;

[0047] In response to a dragging operation issued by the user for the interior of the region of interest, follow the dragging operation and adjust the position of the region of interest;

[0048] In response to a dragging operation issued by the user for a rotation hot zone displayed at a preset position of the region of interest, follow the dragging operation and adjust the angle of the region of interest.

[0049] Optionally, the method further includes:

[0050] During the process of adjusting the size of the sliding windows, highlight the overlapping regions between the sliding windows;

[0051] After the adjustment of the sliding window size is completed, display the overlapping regions between the sliding windows in a non-highlighted state.

[0052] Optionally, identification points are displayed at the centers of the preset number of sliding windows, and the method further includes:

[0053] When adjusting the position or size of the sliding windows, display the center point of each sliding window based on the current position and size of each sliding window.

[0054] Optionally, the step of adjusting the attributes of the sliding window in response to an attribute adjustment operation issued by the user for the sliding window includes:

[0055] In response to an attribute adjustment operation issued by the user for the sliding window, and the trigger position of the attribute adjustment operation is in the overlapping region of multiple sliding windows, adjust the attributes of the sliding window with the highest corresponding priority among the multiple sliding windows.

[0056] In a second aspect, an embodiment of the present application provides an image annotation device, which includes:

[0057] An image display module, configured to display an image to be annotated in an image annotation interface of a machine vision task, where the region of interest of the image to be annotated includes a preset number of sliding windows;

[0058] A sliding window attribute adjustment module, configured to adjust the attributes of the sliding window in response to an attribute adjustment operation issued by a user for the sliding window;

[0059] A detection region confirmation module, configured to, in response to a sliding window confirmation operation issued by a user, use the regions included in each sliding window in the current image annotation interface as the detection regions of the image to be annotated.

[0060] Optionally, the sliding window attribute adjustment module includes:

[0061] A first sliding window attribute adjustment sub-module, configured to, in response to a dragging operation issued by a user for the sliding window, determine the position targeted by the dragging operation; and based on the position targeted by the dragging operation, adjust the attributes of the sliding window;

[0062] A second sliding window attribute adjustment sub-module, configured to, in response to an adjustment operation issued by a user for an attribute adjustment control included in the image annotation interface, adjust the attributes of the sliding window based on the sliding window attribute value indicated by the adjusted adjustment control.

[0063] Optionally, the first sliding window attribute adjustment sub-module includes:

[0064] A sliding window size adjustment unit, configured to, in response to a dragging operation issued by a user for the edge of a selected target sliding window, follow the dragging operation and adjust the size of the target sliding window based on the direction of the dragging operation until the position where the dragging operation stops is within a preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range;

[0065] A sliding window position adjustment unit, configured to, in response to a dragging operation issued by a user for the inside of a selected target sliding window, follow the dragging operation and adjust the position of the target sliding window based on the direction of the dragging operation.

[0066] Optionally, the device further includes:

[0067] A cursor display module, which is configured to respond to the cursor hovering over a hot zone at the edge of a selected target sliding window, and adjust the cursor to a telescopic state, where the hot zone at the edge of the sliding window is the area of the edge of the target sliding window that does not coincide with the border of the region of interest, and the telescopic state is used to prompt the user that the edge corresponding to the cursor is draggable.

[0068] Optionally, the sliding window size adjustment unit includes:

[0069] An overlap rate calculation subunit, which is configured to respond to a dragging operation issued by the user on the edge of a selected target sliding window, follow the dragging operation, adjust the size of the target sliding window based on the direction of the dragging operation, and calculate the sliding window overlap rate, where the sliding window overlap rate is used to characterize the overlapping area between the target sliding window and adjacent sliding windows;

[0070] A first size adjustment subunit, which is configured to complete the size adjustment of the target sliding window when the sliding window overlap rate of the target sliding window is within a preset overlap rate range when the dragging operation stops;

[0071] A second size adjustment subunit, which is configured to, when the sliding window overlap rate of the target sliding window exceeds the preset overlap rate range, adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range to complete the size adjustment of the target sliding window, where, when the dragging operation makes the size of the target sliding window larger, the extreme value of the preset overlap rate range is the maximum value, and when the dragging operation makes the size of the target sliding window smaller, the extreme value of the preset overlap rate range is the minimum value.

[0072] Optionally, the device further includes:

[0073] A synchronous adjustment module, which is configured to, when adjusting the size of the target sliding window based on the direction of the dragging operation, adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window.

[0074] Optionally, the second sliding window attribute adjustment sub-module includes:

[0075] A quantity adjustment unit, which is configured to respond to a quantity adjustment instruction issued by the user for a sliding window quantity adjustment control included in the image annotation interface, and adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control;

[0076] An overlap rate adjustment unit, which is configured to respond to an overlap rate adjustment instruction issued by the user for a sliding window overlap rate adjustment control included in the image annotation interface, and adjust the size of the sliding windows based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control to complete the size adjustment of the sliding windows.

[0077] Optionally, the sliding window overlap rate adjustment control includes a range adjustment component;

[0078] The overlap rate adjustment unit includes:

[0079] An overlap rate adjustment subunit, configured to, in response to a dragging operation issued by a user for the range adjustment component, follow the dragging operation and adjust the size of the sliding window, so that the sliding window overlap rate of each sliding window is the same as the sliding window overlap rate corresponding to the dragging operation on the range adjustment component.

[0080] Optionally, the sliding window quantity adjustment control includes a first sliding window quantity adjustment control and a second sliding window quantity adjustment control;

[0081] The quantity adjustment unit includes:

[0082] An uncheck subunit, configured to, in response to the horizontal sliding window quantity set by the user based on the first sliding window quantity adjustment control and the vertical sliding window quantity set by the user based on the second sliding window quantity adjustment control, display all the selected sliding windows as unselected;

[0083] A sliding window display subunit, configured to display the unselected sliding windows in the image annotation interface according to a default arrangement manner;

[0084] A quantity adjustment subunit, configured to adjust the quantity of the sliding windows included in the image to be annotated in the image annotation interface according to the horizontal sliding window quantity and the vertical sliding window quantity.

[0085] Optionally, the device further includes:

[0086] A sliding window determination module, configured to determine, based on the horizontal sliding window quantity and the vertical sliding window quantity, a sliding window located at the central position of the region of interest from among the sliding windows included in the image to be annotated after adjusting the sliding window quantity;

[0087] A sliding window selection module, configured to display the determined sliding window as a selected state.

[0088] Optionally, the sliding window determination module includes:

[0089] A first sliding window determination sub-module, configured to, in response to both the horizontal sliding window quantity and the vertical sliding window quantity being odd numbers, determine, from among the sliding windows included in the image to be annotated after adjusting the sliding window quantity, a sliding window located at the center position of the region of interest;

[0090] The second sliding window determination sub-module is configured to, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being even, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window that is closest to the center position and in the first direction;

[0091] The third sliding window determination sub-module is configured to, in response to the number of horizontal sliding windows being odd and the number of vertical sliding windows being even, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window that is closest to the center position and in the second direction;

[0092] The fourth sliding window determination sub-module is configured to, in response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window that is closest to the center position and in the third direction.

[0093] Optionally, the apparatus further includes:

[0094] The region of interest adjustment module is configured to, in response to an attribute adjustment operation issued by a user for the region of interest, adjust the attributes of the region of interest.

[0095] Optionally, the region of interest adjustment module includes:

[0096] The first region of interest adjustment sub-module is configured to, in response to a drag operation issued by a user for a vertex or an edge of the region of interest, follow the drag operation and adjust the size of the region of interest based on the direction of the drag operation;

[0097] The second region of interest adjustment sub-module is configured to, in response to a drag operation issued by a user for the interior of the region of interest, follow the drag operation and adjust the position of the region of interest;

[0098] The third region of interest adjustment sub-module is configured to, in response to a drag operation issued by a user for a rotation hot zone displayed at a preset position of the region of interest, follow the drag operation and adjust the angle of the region of interest.

[0099] Optionally, the apparatus further includes:

[0100] The highlighting module is configured to highlight the overlapping regions between the sliding windows during the process of adjusting the size of the sliding windows;

[0101] The non-highlighting module is configured to display the overlapping regions between the sliding windows in a non-highlighted state after the size adjustment of the sliding windows is completed.

[0102] Optionally, identification points are displayed at the centers of the preset number of sliding windows, and the apparatus further includes:

[0103] A center point display module, configured to display the center point of each sliding window based on the current position and size of each sliding window when adjusting the position or size of the sliding window.

[0104] Optionally, the sliding window attribute adjustment module includes:

[0105] A sliding window attribute adjustment sub-module, configured to, in response to an attribute adjustment operation issued by a user for the sliding window, and when the trigger position of the attribute adjustment operation is in the overlapping area of multiple sliding windows, adjust the attributes of the sliding window with the highest corresponding priority among the multiple sliding windows.

[0106] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0107] A memory, configured to store a computer program;

[0108] A processor, configured to implement the method according to any one of the first aspects when executing the program stored on the memory.

[0109] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0110] Beneficial effects of the embodiments of the present application:

[0111] In the solution provided by the embodiments of the present application, an electronic device can display an image to be annotated in an image annotation interface of a machine vision task, where the region of interest of the image to be annotated includes a preset number of sliding windows; in response to an attribute adjustment operation issued by a user for the sliding window, adjust the attributes of the sliding window; in response to a sliding window confirmation operation issued by the user, use the regions included in each sliding window in the current image annotation interface as the detection regions of the image to be annotated. In the above process, when performing image annotation, the region of interest of the image to be annotated displayed in the image annotation interface includes a preset number of sliding windows. If it is necessary to adjust the sliding window attributes, the user can issue an attribute adjustment operation for the sliding window through the image annotation interface. In this way, the user can adjust the sliding window attributes based on the existing preset number of sliding windows, without manually annotating the detection regions where each target to be detected in the image to be annotated is located. Therefore, the efficiency of image annotation in machine vision tasks can be improved, and the labor cost required for image annotation can be reduced. Of course, when implementing any product or method of the present application, it is not necessarily required to achieve all the above-mentioned advantages at the same time. Description of the Drawings

[0112] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other embodiments based on these drawings.

[0113] Figure 1 Flowchart of an image annotation method provided by an embodiment of the present application;

[0114] Figure 2 Based on Figure 1 The first schematic diagram of the image annotation interface according to the illustrated embodiment;

[0115] Figure 3(a) is the second schematic diagram of the image annotation interface according to the illustrated embodiment; Figure 1 The third schematic diagram of the image annotation interface according to the illustrated embodiment;

[0116] Figure 3(b) is the third schematic diagram of the image annotation interface according to the illustrated embodiment; Figure 1 The fourth schematic diagram of the image annotation interface according to the illustrated embodiment;

[0117] Figure 4 Based on Figure 1 A flowchart of a method for adjusting the size of a target sliding window according to the illustrated embodiment;

[0118] Figure 5 Based on Figure 1 The fourth schematic diagram of the image annotation interface according to the illustrated embodiment;

[0119] Figure 6 Based on Figure 1 A flowchart of a method for adjusting the number of sliding windows according to the illustrated embodiment;

[0120] Figure 7 Based on Figure 1 A flowchart of a method for determining a sliding window according to the illustrated embodiment;

[0121] Figure 8 Based on Figure 1 A flowchart of a method for displaying an overlapping area according to the illustrated embodiment;

[0122] Figure 9 Based on Figure 1 The fifth schematic diagram of the image annotation interface according to the illustrated embodiment;

[0123] Figure 10 Based on Figure 1 A flowchart of an image annotation method according to the illustrated embodiment;

[0124] Figure 11 For Figure 10 A specific flowchart of step S1004 in the illustrated embodiment;

[0125] Figure 12 For Figure 10 a specific flowchart of step S1005 in the illustrated embodiment;

[0126] Figure 13 For Figure 10 another specific flowchart of step S1005 in the illustrated embodiment;

[0127] Figure 14 a schematic structural diagram of an image annotation device provided by an embodiment of the present application;

[0128] Figure 15 a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific Embodiments

[0129] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.

[0130] To improve the efficiency of image annotation in machine vision tasks and reduce the labor cost required for image annotation, embodiments of the present application provide an image annotation method, device, electronic device, computer-readable storage medium, and computer program product. First, an image annotation method provided by an embodiment of the present application will be introduced below.

[0131] An image annotation method provided by an embodiment of the present application can be applied to any electronic device that needs to determine the number of stacked items. For example, it can be a desktop computer, a laptop computer, a tablet computer, etc., which are not specifically limited herein. For the sake of clear description, it will be referred to as an electronic device hereinafter.

[0132] As Figure 1 shown, an image annotation method, the method includes:

[0133] S101, in the image annotation interface of the machine vision task, display the image to be annotated; in response to an attribute adjustment operation issued by the user for the sliding window, execute step S102;

[0134] wherein, the region of interest of the image to be annotated includes a preset number of sliding windows.

[0135] S102, adjust the attributes of the sliding window; in response to a sliding window confirmation operation issued by the user, execute step S103;

[0136] S103. Use the regions included in each sliding window in the current image annotation interface as the detection regions of the to-be-annotated image.

[0137] It can be seen that in the solution provided by the embodiments of the present application, an electronic device can display a to-be-annotated image in an image annotation interface for a machine vision task, where the region of interest of the to-be-annotated image includes a preset number of sliding windows; in response to an attribute adjustment operation issued by the user for a sliding window, adjust the attributes of the sliding window; in response to a sliding window confirmation operation issued by the user, use the regions included in each sliding window in the current image annotation interface as the detection regions of the to-be-annotated image. When performing image annotation, the region of interest of the to-be-annotated image displayed in the image annotation interface includes a preset number of sliding windows. If it is necessary to adjust the attributes of the sliding window, the user can issue an attribute adjustment operation for the sliding window through the image annotation interface. In this way, the user can adjust the attributes of the sliding window on the basis of the existing preset number of sliding windows, without manually annotating the detection regions where each to-be-detected target in the to-be-annotated image is located. Therefore, the efficiency of image annotation in machine vision tasks can be improved, and the labor cost required for image annotation can be reduced.

[0138] In step S101, for an image annotation scenario in a machine vision task, an electronic device can display a to-be-annotated image in an image annotation interface for the machine vision task. Among them, the image annotation interface can be an interface for image annotation in software for performing machine vision tasks. In one implementation, since the to-be-detected targets are usually in the region of interest of the to-be-annotated image, in order to facilitate the user to perform image annotation, the electronic device can extract the region of interest (ROI) of the to-be-annotated image. Next, the to-be-annotated image can be displayed in the image annotation interface for the machine vision task according to the default display mode, and the to-be-annotated image displayed according to the default display mode can include a preset number of sliding windows.

[0139] Among them, the above-mentioned region of interest can be a region outlined by a square, a circle, an ellipse, an irregular polygon, etc. in the to-be-annotated image in a machine vision task. The above-mentioned sliding window can be when there are multiple different to-be-detected targets inside the region of interest, dividing the region of interest into multiple regions arranged in a grid. Specifically, the region of interest can be evenly divided into multiple regions arranged in a grid with the same size.

[0140] The above-mentioned preset number can be set according to actual needs. For example, it can be 4, 6, 9, etc., and no specific limitation is made here. For example, assume that the to-be-annotated image is displayed according to the default display mode, and the preset number is 9. Then the region of interest of the to-be-annotated image displayed can include 9 sliding windows, arranged in the form of a nine-square grid.

[0141] Users can perform various interactive operations through the image annotation interface of the machine vision task to adjust the attributes of the region of interest and the sliding window. When the user issues an attribute adjustment operation for the sliding window in the image annotation interface of the machine vision task, the electronic device can adjust the attributes of the sliding window based on the attribute adjustment operation, that is, execute step S102.

[0142] Among them, the attributes of the above-mentioned sliding window can include size, position, and quantity. For example, the user can issue a drag operation on the inside of the sliding window to adjust the position of the sliding window. Another example is that the user can issue a drag operation on the edge of the sliding window to adjust the size of the sliding window.

[0143] During the process of the user adjusting the attributes of the sliding window, the image annotation interface of the machine vision task will display the adjusted sliding window in real time as the attributes of the sliding window are adjusted, so that the user can intuitively view whether the sliding window after attribute adjustment meets the image annotation requirements. When the sliding window after attribute adjustment meets the image annotation requirements, the user can issue a sliding window confirmation operation, and the electronic device can use the regions included in each sliding window in the current image annotation interface as the detection regions of the image to be annotated, that is, execute step S103.

[0144] Among them, the above-mentioned sliding window confirmation operation can be issued by the user through the sliding window confirmation button in the image annotation interface of the machine vision task. The sliding window confirmation button can be located at the bottom, top, etc. of the image annotation interface of the machine vision task, and no specific limitation is made here.

[0145] It can be seen that in the embodiment of the present application, when performing image annotation, the region of interest of the image to be annotated displayed in the image annotation interface of the machine vision task includes a preset number of sliding windows. If it is necessary to adjust the attributes of the sliding window, the user can issue an attribute adjustment operation for the sliding window through the image annotation interface of the machine vision task. In this way, the user can adjust the attributes of the sliding window on the basis of the existing preset number of sliding windows, without manually annotating the detection regions where each target to be detected in the image to be annotated is located. Therefore, the efficiency of image annotation in the machine vision task can be improved, and the labor cost required for image annotation can be reduced.

[0146] As an implementation manner of the embodiment of the present application, the step of adjusting the attributes of the sliding window in response to the attribute adjustment operation issued by the user for the sliding window may include:

[0147] In response to a dragging operation issued by a user for the sliding window, determine the position targeted by the dragging operation; based on the position targeted by the dragging operation, adjust the attributes of the sliding window; and / or, in response to an adjustment operation issued by the user for an attribute adjustment control included in the image annotation interface, based on the sliding window attribute value indicated by the adjusted adjustment control, adjust the attributes of the sliding window.

[0148] In the first implementation manner, since when the position targeted by the dragging operation is the edge of the sliding window, it is used to change the size of the sliding window, and when the position targeted by the dragging operation is inside the sliding window, it is used to change the position of the sliding window, therefore, in order to determine what attribute of the sliding window the dragging operation is specifically used to change, in response to the dragging operation issued by the user for the sliding window, the electronic device can determine the position targeted by the dragging operation. Next, based on the position targeted by the dragging operation, adjust the attributes of the sliding window.

[0149] In the second implementation manner, the image annotation interface may include an attribute adjustment control, and the user can adjust the attributes of the sliding window through the attribute adjustment control. For example, the attribute adjustment control may be an input box, increment and decrement buttons, a drag bar, and so on. In response to the adjustment operation issued by the user for the attribute adjustment control included in the image annotation interface, the electronic device can then adjust the attributes of the sliding window based on the sliding window attribute value indicated by the adjusted adjustment control.

[0150] For example, assume that the attribute adjustment control includes a first sliding window quantity input box and a second sliding window quantity input box. The first sliding window quantity input box is used to input the number of horizontal sliding windows, and the second sliding window quantity input box is used to input the number of vertical sliding windows. The user inputs 3 and 4 respectively in the first sliding window quantity input box and the second sliding window quantity input box. Then the electronic device can adjust the sliding window quantity based on the adjusted sliding window quantity. The adjusted number of horizontal sliding windows is 3, and the adjusted number of vertical sliding windows is 4.

[0151] In the third implementation manner, the user can issue a dragging operation for the sliding window and an adjustment operation for the attribute adjustment control, that is, adjust the attributes of the sliding window through the first implementation manner and the second implementation manner simultaneously.

[0152] It can be seen that in the embodiments of the present application, the electronic device can determine the position targeted by the drag operation in response to the user's drag operation on the sliding window; adjust the attributes of the sliding window based on the position targeted by the drag operation; and / or, in response to the user's adjustment operation on the attribute adjustment control included in the image annotation interface, adjust the attributes of the sliding window based on the value of the sliding window attribute indicated by the adjusted adjustment control. In this way, the user can adjust the attributes of the sliding window by performing a drag operation on the sliding window, or can also adjust the attributes of the sliding window by performing an adjustment operation on the attribute adjustment control. The user can choose a preferred way to adjust the attributes of the sliding window, which can provide a high degree of freedom for the user's operation.

[0153] As an implementation manner of the embodiments of the present application, the steps of determining the position targeted by the drag operation in response to the user's drag operation on the sliding window; and adjusting the attributes of the sliding window based on the position targeted by the drag operation may include:

[0154] In response to the user's drag operation on the edge of the selected target sliding window, following the drag operation, adjust the size of the target sliding window based on the direction of the drag operation until the position where the drag operation stops is within the preset drag limit range, or the position indicated by the drag operation exceeds the preset drag limit range;

[0155] and / or,

[0156] In response to the user's drag operation on the inside of the selected target sliding window, following the drag operation, adjust the position of the target sliding window based on the direction of the drag operation.

[0157] In the first implementation manner, when the position targeted by the drag operation is the edge of the sliding window, it indicates that the user wants to adjust the size of the sliding window by dragging the edge of the sliding window. Therefore, in response to the user's drag operation on the edge of the selected target sliding window, the electronic device can follow the drag operation and adjust the size of the target sliding window based on the direction of the drag operation.

[0158] That is to say, the electronic device can adjust the size of the target sliding window by moving the edge of the sliding window targeted by the drag operation in the direction of the drag operation. For example, assuming that the edge of the sliding window targeted by the drag operation is the right edge of the target sliding window and the drag operation is to the right, then the electronic device can follow the drag operation and move the right edge of the target sliding window to the right, thereby increasing the size of the target sliding window.

[0159] In the following two cases, the electronic device can stop adjusting the size of the target sliding window:

[0160] The first case is that the position where the dragging operation stops is within the preset dragging limit range. That is to say, the user actively stops the dragging operation, and the position where the dragging operation stops is within the preset dragging limit range. Among them, the preset dragging limit range is used to limit the dragging range of the dragging operation, that is, the dragging operation cannot make the size of the target sliding window too large.

[0161] The second case is that the position indicated by the dragging operation exceeds the preset dragging limit range. In this case, the dragging operation will be restricted and stop at the maximum dragging position corresponding to the preset dragging limit range.

[0162] In the second implementation manner, when the position targeted by the dragging operation is inside the sliding window, it means that the user wants to adjust the position of the sliding window by dragging the inside of the sliding window. Therefore, in response to the dragging operation issued by the user on the inside of the selected target sliding window, the electronic device can follow the dragging operation and adjust the position of the target sliding window based on the direction of the dragging operation. In this case, the position attributes between each fluidized bed are independent of each other, and when changing the position of a certain sliding window, it will not affect the positions of other sliding windows.

[0163] For example, assume that the position targeted by the dragging operation is inside the target sliding window, and the dragging operation is to the right. Then the electronic device can follow the dragging operation and move the position of the target sliding window to the right.

[0164] In the third implementation manner, the user can adjust the size of the target sliding window by dragging the edge of the target sliding window, and adjust the position of the target sliding window by dragging the inside of the target sliding window, that is, simultaneously adjust the size and position of the target sliding window through the first implementation manner and the second implementation manner.

[0165] It can be seen that in the embodiments of the present application, in response to the dragging operation issued by the user on the edge of the selected target sliding window, the electronic device can follow the dragging operation and adjust the size of the target sliding window based on the direction of the dragging operation until the position where the dragging operation stops is within the preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range; and / or, in response to the dragging operation issued by the user on the inside of the selected target sliding window, the electronic device can follow the dragging operation and adjust the position of the target sliding window based on the direction of the dragging operation. In this way, the user can adjust the size of the target sliding window by dragging the edge of the target sliding window, and adjust the position of the target sliding window by dragging the inside of the target sliding window, which can enable the user to simply adjust the size and position of the target sliding window.

[0166] As an implementation manner of an embodiment of the present application, before the step of adjusting the size of the target sliding window according to the dragging operation in response to the user's dragging operation on the edge of the selected target sliding window, the above method may further include:

[0167] When the cursor hovers over the hot zone of the sliding window edge corresponding to the selected target sliding window, adjust the cursor to a telescopic state.

[0168] When the user controls the cursor to hover over the hot zone of the sliding window edge corresponding to the target sliding window, in order to prompt the user that the edge corresponding to the cursor can be dragged, the electronic device can adjust the cursor to a telescopic state. Among them, the telescopic state can be a pre-set cursor. For example, it can be a double-headed arrow. The above hovering operation can be that the cursor stays at a certain position without moving for a preset duration. For example, the preset duration can be 1 second, 2 seconds, etc., and no specific limitation is made here.

[0169] The above hot zone of the sliding window edge can be the area where the edge of the target sliding window that does not coincide with the border of the region of interest is located. In this way, when the edge of the target sliding window coincides with the border of the region of interest, it can be clearly distinguished whether the user wants to drag the edge of the target sliding window to adjust the size of the target sliding window or drag the border of the region of interest to adjust the size of the region of interest.

[0170] For example, the first schematic diagram of the image annotation interface can be as Figure 2 shown. The region of interest of the image to be annotated includes 9 sliding windows arranged in a nine-grid form. Suppose the user hovers the cursor over the hot zone 201 of the sliding window edge of the bottom-right sliding window. Then the electronic device can adjust the cursor to the telescopic state 202 in the form of a double-headed arrow. The currently selected sliding window is the bottom-right sliding window, so the edge of the bottom-right sliding window is highlighted, and among the four edges of the bottom-right sliding window, in addition to the edge that coincides with the border of the region of interest, a dragable identifier 203 is also displayed.

[0171] Another example, the second schematic diagram of the image annotation interface can be shown in Fig. 3(a). The region of interest 302 of the image 301 to be annotated includes 6 sliding windows, and the cursor 303 is currently inside the sliding window in the second column of the first row. After the user clicks on this sliding window through the cursor 303, this sliding window will be selected and highlighted (not shown in the figure). In addition, among the four edges of this sliding window, in addition to the edge that coincides with the border of the region of interest, a dragable identifier 304 is also displayed.

[0172] Assume that the user adjusts the size of the sliding window. Then, the image annotation interface can be as shown in Fig. 3(b), and Fig. 3(b) is the third schematic diagram of the image annotation interface. In Fig. 3(b), assume that the user controls the cursor to hover over the sliding window edge hot zone 305 of the sliding window. Then, the electronic device can adjust the cursor to the telescopic state 306 in the form of a double arrow.

[0173] It can be seen that in the embodiment of the present application, in response to the cursor hovering over the sliding window edge hot zone corresponding to the selected target sliding window, the electronic device can adjust the cursor to the telescopic state, where the sliding window edge hot zone is the area of the edge of the target sliding window that does not coincide with the border of the region of interest, and the telescopic state is used to prompt the user that the edge corresponding to the cursor can be dragged. In this way, it can intuitively prompt the user to adjust the size of the sliding window by dragging the edge corresponding to the cursor, which can improve the user experience.

[0174] As an implementation manner of the embodiment of the present application, as Figure 4 shown, the above step of, in response to the dragging operation issued by the user for the edge of the selected target sliding window, following the dragging operation, adjusting the size of the target sliding window based on the direction of the dragging operation until the position where the dragging operation stops is within the preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range, may include:

[0175] S401, in response to the dragging operation issued by the user for the edge of the selected target sliding window, following the dragging operation, adjusting the size of the target sliding window based on the direction of the dragging operation, and calculating the sliding window overlap rate in real time; in the case where the sliding window overlap rate of the target sliding window at the end of the dragging operation is within the preset overlap rate range, execute step S402; in the case where the sliding window overlap rate of the target sliding window exceeds the preset overlap rate range, execute step S403;

[0176] During the dragging operation issued by the user for the edge of the selected target sliding window, the electronic device can follow the dragging operation, adjust the size of the target sliding window based on the direction of the dragging operation, and calculate the sliding window overlap rate. Among them, the sliding window overlap rate can be used to characterize the overlapping area between the target sliding window and the adjacent sliding window. In one implementation manner, the sliding window overlap rate can be the ratio between the overlapping area of the target sliding window and the recognition area, the overlapping area is the overlapping area generated between the target sliding window and the adjacent sliding window, and the recognition area is the actual detection area.

[0177] S402, complete the size adjustment of the target sliding window;

[0178] In the case where the sliding window overlap rate of the target sliding window at the end of the dragging operation is within the preset overlap rate range, it indicates that the dragging operation does not exceed the preset dragging limit range. Then, the size adjustment of the target sliding window can be completed.

[0179] Among them, the preset overlap rate range can be set according to actual needs. When there is a limit on the preset overlap rate range, if the calculated window overlap rate reaches the upper or lower limit of the preset overlap rate range during the process of adjusting the size of the target sliding window, the size of the sliding window cannot be further enlarged or reduced. For example, the preset overlap rate range can specifically be from 0 to 1, indicating that there can be at least no overlapping area between adjacent sliding windows, and at most, the recognition area overlap can reach 100%.

[0180] S403, adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range, and complete the adjustment of the size of the target sliding window.

[0181] When the window overlap rate of the target sliding window exceeds the preset overlap rate range, it indicates that the drag operation exceeds the preset drag limit range. Then, the electronic device cannot continue to adjust the size of the target sliding window. In this case, the electronic device can adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range to complete the adjustment of the size of the target sliding window.

[0182] Among them, when the drag operation makes the size of the target sliding window larger, the extreme value of the preset overlap rate range is the maximum value. When the drag operation makes the size of the target sliding window smaller, the extreme value of the preset overlap rate range is the minimum value.

[0183] It can be seen that in the embodiment of the present application, in response to a drag operation issued by the user on the edge of the selected target sliding window, following the drag operation, the electronic device can adjust the size of the target sliding window based on the direction of the drag operation and calculate the window overlap rate, where the window overlap rate is used to characterize the overlapping area between the target sliding window and adjacent sliding windows; when the window overlap rate of the target sliding window is within the preset overlap rate range when the drag operation stops, complete the adjustment of the size of the target sliding window; when the window overlap rate of the target sliding window exceeds the preset overlap rate range, adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range to complete the adjustment of the size of the target sliding window, where when the drag operation makes the size of the target sliding window larger, the extreme value of the preset overlap rate range is the maximum value, and when the drag operation makes the size of the target sliding window smaller, the extreme value of the preset overlap rate range is the minimum value. In the above process, by adjusting the size of the target sliding window while following the drag operation and calculating the window overlap rate at the same time, it can be ensured that the size of the target sliding window does not exceed the limit of the preset drag limit range.

[0184] As an implementation manner of the embodiment of the present application, the above method may further include:

[0185] When adjusting the size of the target sliding window based on the direction of the drag operation, adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window.

[0186] To reduce the amount of user operation, when adjusting the size of the target sliding window, the electronic device can adjust the sizes of other sliding windows synchronously in the same adjustment manner as the target sliding window. For example, assume that the user drags the left edge of the target sliding window to the left, making the size of the target sliding window increase by 10%. Then, the electronic device can follow the user's drag operation and synchronously move the left edges of other sliding windows to the left and increase their sizes by 10%.

[0187] It can be seen that in the embodiments of the present application, when the electronic device adjusts the size of the target sliding window based on the direction of the drag operation, it can adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window. In this way, when the user issues a drag operation on the target sliding window to adjust its size, the sizes of other sliding windows can be adjusted synchronously, which can further reduce the amount of user operation and improve the efficiency of image annotation.

[0188] As an implementation manner of the embodiments of the present application, the step of adjusting the attributes of the sliding window based on the sliding window attribute value indicated by the adjusted adjustment control in response to the adjustment operation issued by the user for the attribute adjustment control included in the image annotation interface may include:

[0189] In response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface, adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control; and / or,

[0190] In response to the overlap rate adjustment instruction issued by the user for the sliding window overlap rate adjustment control included in the image annotation interface, adjust the size of the sliding windows based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control to complete the adjustment of the size of the sliding windows.

[0191] In the first implementation manner, the image annotation interface may include a sliding window quantity adjustment control. For example, the sliding window quantity adjustment control may be an input box, up / down buttons, a drag bar, etc., which are not specifically limited herein. In this case, the user can issue a quantity adjustment instruction for the sliding window quantity adjustment control, and the electronic device can adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control.

[0192] In the second embodiment, the image annotation interface may include a sliding window overlap rate adjustment control. For example, the sliding window overlap rate adjustment control may be an input box, an increase / decrease button, a drag bar, etc., which are not specifically limited herein. In this case, the user may issue an overlap rate adjustment instruction for the sliding window overlap rate adjustment control, and the electronic device may adjust the size of the sliding window based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control to complete the adjustment of the size of the sliding window.

[0193] In the third embodiment, the image annotation interface may include a sliding window quantity adjustment control and a sliding window overlap rate adjustment control. In this case, the user may issue a quantity adjustment instruction for the sliding window quantity adjustment control or an overlap rate adjustment instruction for the sliding window overlap rate adjustment control, that is, simultaneously adjust the quantity of the sliding windows and the sliding window overlap rate through the first embodiment and the second embodiment.

[0194] It can be seen that in the embodiments of the present application, in response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface, the electronic device may adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control; and / or, in response to the overlap rate adjustment instruction issued by the user for the sliding window overlap rate adjustment control included in the image annotation interface, the electronic device may adjust the size of the sliding window based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control to complete the adjustment of the size of the sliding window. In the above manner, the user may adjust the quantity of the sliding windows and the sliding window overlap rate through the sliding window quantity adjustment control and the sliding window overlap rate adjustment control, without manually annotating the detection areas where each target to be detected in the image to be annotated is located. Therefore, the efficiency of image annotation can be improved, and the labor cost required for image annotation can be reduced.

[0195] As an implementation manner of the embodiments of the present application, the above-mentioned sliding window overlap rate adjustment control may include a range adjustment component. In this case, the step of adjusting the size of the sliding window based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control in response to the overlap rate adjustment instruction issued by the user for the sliding window overlap rate adjustment control included in the image annotation interface may include:

[0196] In response to the dragging operation issued by the user for the range adjustment component, following the dragging operation, adjust the size of the sliding window so that the sliding window overlap rate of each sliding window is the same as the sliding window overlap rate corresponding to the dragging operation in the range adjustment component.

[0197] The sliding window overlap rate adjustment control may include a range adjustment component, and different positions of the range adjustment component correspond to different sliding window overlap rates. For example, the range adjustment component may consist of a drag bar and a slider. The slider being at different positions on the drag bar corresponds to different sliding window overlap rates. The two ends of the drag bar may respectively correspond to the minimum and maximum values of the adjustment range of the sliding window overlap rate.

[0198] In this case, the user can issue a drag operation on the range adjustment component, and the electronic device can follow the drag operation to adjust the size of the sliding window so that the sliding window overlap rate of each sliding window is the same as the sliding window overlap rate corresponding to the drag operation on the range adjustment component.

[0199] For example, the fourth schematic diagram of the image annotation interface may be as Figure 5 shown. The user can drag the range adjustment component 501 to adjust the size of the sliding window. The sliding window overlap rate corresponding to the current slider position is 0.2.

[0200] It can be seen that in the embodiments of the present application, in response to a drag operation issued by the user on the range adjustment component, the electronic device can follow the drag operation to adjust the size of the sliding window so that the sliding window overlap rate of each sliding window is the same as the sliding window overlap rate corresponding to the drag operation on the range adjustment component. Since the sliding window overlap rate can be adjusted within a certain range, a range adjustment component can be set. In this way, the user can adjust the size of the sliding window by dragging the range adjustment component, thereby changing the sliding window overlap rate. Moreover, during the process of the user dragging the range adjustment component, the displayed sliding window size can change in real time according to the sliding window overlap rate corresponding to the dragged range adjustment component. In this way, it is convenient for the user to intuitively determine a suitable sliding window overlap rate during the dragging process.

[0201] As an implementation manner of the embodiments of the present application, the above-mentioned sliding window quantity adjustment control may include a first sliding window quantity adjustment control and a second sliding window quantity adjustment control. In this case, as Figure 6 shown, the above step of adjusting the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control in response to a quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface may include:

[0202] S601, in response to the horizontal sliding window quantity set by the user based on the first sliding window quantity adjustment control and the vertical sliding window quantity set by the user based on the second sliding window quantity adjustment control, display all the selected sliding windows as unselected states;

[0203] The sliding window quantity adjustment control may include a first sliding window quantity adjustment control and a second sliding window quantity adjustment control. The first sliding window quantity adjustment control can be used to adjust the number of horizontal sliding windows, and the second sliding window quantity adjustment control can be used to adjust the number of vertical sliding windows. For example, the first sliding window quantity adjustment control and the second sliding window quantity adjustment control can be input boxes, increment and decrement buttons, sliders, etc., which are not specifically limited herein.

[0204] Continue as Figure 5 shown, the user can set the number of horizontal sliding windows through the first sliding window quantity adjustment control 502, and set the number of vertical sliding windows through the second sliding window quantity adjustment control 503. Specifically, the quantity can be directly input in the first sliding window quantity adjustment control 502 and the second sliding window quantity adjustment control 503, or the quantity can be adjusted through the increment and decrement buttons in the first sliding window quantity adjustment control 502 and the second sliding window quantity adjustment control 503. The increment and decrement buttons are an equilateral triangle and an inverted triangle. The current number of horizontal sliding windows is 3, and the number of vertical sliding windows is 2.

[0205] After both the number of horizontal sliding windows and the number of vertical sliding windows are set, the electronic device can display all the selected sliding windows as unselected. For example, the selected sliding windows can be highlighted, and the unselected sliding windows can be non-highlighted.

[0206] S602, in the image annotation interface, display the unselected sliding windows in the default arrangement;

[0207] Next, the electronic device can display the above unselected sliding windows in the image annotation interface in the default arrangement. Among them, the default arrangement can be preset according to the actual situation. For example, the default arrangement can be 2×3, or 3×3, etc., which are not specifically limited herein.

[0208] S603, adjust the number of sliding windows included in the image to be annotated in the image annotation interface according to the number of horizontal sliding windows and the number of vertical sliding windows.

[0209] The electronic device can adjust the number of sliding windows included in the image to be annotated in the image annotation interface according to the number of horizontal sliding windows and the number of vertical sliding windows.

[0210] For example, assuming that the sliding window arrangement is recorded as the number of horizontal sliding windows × the number of vertical sliding windows, the default arrangement is 3×3, and the current arrangement is 4×2. At this time, the user sets the number of horizontal sliding windows and the number of vertical sliding windows to 3 and 4. Then the electronic device can first display all the selected sliding windows as unselected, and then adjust the current arrangement to 3×3, and then display the sliding windows in the 3×4 arrangement.

[0211] It can be seen that in the embodiments of the present application, in response to the number of horizontal sliding windows set by the user based on the first sliding window number adjustment control and the number of vertical sliding windows set by the user based on the second sliding window number adjustment control, the electronic device can display all the selected sliding windows as unselected; in the image annotation interface, display the unselected sliding windows in the default arrangement; and adjust the number of sliding windows included in the image to be annotated in the image annotation interface according to the number of horizontal sliding windows and the number of vertical sliding windows. In this way, the user can conveniently adjust the number of horizontal sliding windows and the number of vertical sliding windows through the first sliding window number adjustment control and the second sliding window number adjustment control.

[0212] As an implementation manner of the embodiments of the present application, as Figure 7 shown, after the step of adjusting the number of the sliding windows based on the number of the sliding windows indicated by the adjusted sliding window number adjustment control in response to the number adjustment instruction issued by the user for the sliding window number adjustment control included in the image annotation interface, the above method may further include:

[0213] S701, based on the number of horizontal sliding windows and the number of vertical sliding windows, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of the sliding windows, the sliding window located at the central position of the region of interest;

[0214] After the number of the sliding windows is adjusted, the arrangement manner of the sliding windows in the image annotation interface will change. At this time, the sliding window located at the central position of the region of interest can be determined from each of the sliding windows included in the image to be annotated after adjusting the number of the sliding windows.

[0215] S702, display the determined sliding window as a selected state.

[0216] Next, the electronic device can display the determined sliding window as a selected state, that is, by default, the sliding window at the central position is selected. Among them, the sliding window in the selected state can be highlighted, specifically, it can be a highlighted display of the sliding window in the selected state, displaying a preset identifier near the sliding window in the selected state, etc., which are not specifically limited herein.

[0217] It can be seen that in the embodiments of the present application, the electronic device can determine, from each of the sliding windows included in the image to be annotated after adjusting the number of the sliding windows, the sliding window located at the central position of the region of interest based on the number of horizontal sliding windows and the number of vertical sliding windows; and display the determined sliding window as a selected state. In this way, after the number of the sliding windows is adjusted, the sliding window at the central position can be selected by default, which is convenient for the user to perform subsequent adjustment operations.

[0218] As an implementation manner of an embodiment of the present application, the step of determining, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest based on the number of horizontal sliding windows and the number of vertical sliding windows may include:

[0219] In response to both the number of horizontal sliding windows and the number of vertical sliding windows being odd, determine, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest;

[0220] In response to both the number of horizontal sliding windows and the number of vertical sliding windows being even, determine, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the first direction;

[0221] In response to the number of horizontal sliding windows being odd and the number of vertical sliding windows being even, determine, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the second direction;

[0222] In response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, determine, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the third direction.

[0223] In the first implementation manner, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being odd, the electronic device may determine, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest. For example, assuming that the adjusted sliding window arrangement is 5×5, then the sliding window located in the 3rd row and 3rd column can be determined.

[0224] In the second implementation manner, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being even, the electronic device may determine, from each sliding window included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the first direction. The first direction can be set according to actual needs. For example, it can be the upper left, lower left, upper right, lower right, etc., and no specific limitation is made here. For example, assuming that the adjusted sliding window arrangement is 6×6 and the first direction is the upper left, then the sliding window located in the 3rd row and 3rd column can be determined.

[0225] In the third implementation manner, in response to the number of horizontal sliding windows being odd and the number of vertical sliding windows being even, the electronic device may determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window that is closest to the center position and is in the second direction. The second direction may be set according to actual needs. For example, it may be the upper side, the lower side, etc., and no specific limitation is made here. For example, assuming that the arranged manner of the adjusted sliding windows is 3×4 and the second direction is the upper side, then the sliding window at the second row and the second column may be determined.

[0226] In the fourth implementation manner, in response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, the electronic device may determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window that is closest to the center position and is in the third direction. The third direction may be set according to actual needs. For example, it may be the left side, the right side, etc., and no specific limitation is made here. For example, assuming that the arranged manner of the adjusted sliding windows is 4×3 and the third direction is the left side, then the sliding window at the second row and the second column may be determined.

[0227] It can be seen that in the embodiments of the present application, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being odd, the sliding window at the center position of the region of interest is determined from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows; in response to both the number of horizontal sliding windows and the number of vertical sliding windows being even, the sliding window that is closest to the center position and is in the first direction is determined from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows; in response to the number of horizontal sliding windows being odd and the number of vertical sliding windows being even, the sliding window that is closest to the center position and is in the second direction is determined from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows; in response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, the sliding window that is closest to the center position and is in the third direction is determined from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows. Through the above implementation manners, in various cases where the adjusted number of horizontal sliding windows and the number of vertical sliding windows are different, the sliding window to be default selected can be quickly and accurately determined.

[0228] As an implementation manner of the embodiments of the present application, after the step of displaying the image to be annotated in the image annotation interface of the machine vision task, the above method may further include:

[0229] In response to an attribute adjustment operation issued by the user for the region of interest, the attributes of the region of interest are adjusted.

[0230] When the user wants to adjust the attributes of the region of interest, an attribute adjustment operation can be issued for the region of interest in the image annotation interface. In this way, the electronic device can adjust the attributes of the region of interest based on the attribute adjustment operation. For example, the user can drag the edge of the region of interest to adjust the size of the region of interest. For another example, the user can drag the inside of the region of interest to adjust the position of the region of interest.

[0231] It can be seen that in the embodiments of the present application, in response to the attribute adjustment operation issued by the user for the region of interest, the electronic device can adjust the attributes of the region of interest. In this way, the user can quickly and conveniently adjust the attributes of the region of interest based on the image annotation interface.

[0232] As an implementation manner of the embodiments of the present application, the step of adjusting the attributes of the region of interest in response to the attribute adjustment operation issued by the user for the region of interest may include at least one of the following:

[0233] In response to a drag operation issued by the user for the vertex or edge of the region of interest, following the drag operation, adjust the size of the region of interest based on the direction of the drag operation;

[0234] In response to a drag operation issued by the user for the inside of the region of interest, following the drag operation, adjust the position of the region of interest;

[0235] In response to a drag operation issued by the user for the rotation hot zone displayed at a preset position of the region of interest, following the drag operation, adjust the angle of the region of interest.

[0236] In the first implementation manner, the user can issue a drag operation for the vertex or edge of the region of interest, and the electronic device can follow the drag operation and adjust the size of the region of interest based on the direction of the drag operation. Specifically, the electronic device can move the dragged vertex or edge of the user in the direction of the drag operation, so as to adjust the size of the region of interest.

[0237] In the second implementation manner, the user can issue a drag operation for the inside of the region of interest, and the electronic device can follow the drag operation and adjust the position of the region of interest.

[0238] In the third implementation manner, the user can issue a drag operation for the rotation hot zone displayed at a preset position of the region of interest, and the electronic device can follow the drag operation and adjust the angle of the region of interest. Among them, the preset position can be set according to actual needs, and specifically can be near the vertex of the region of interest, below the region of interest, etc., and no specific limitation is made here.

[0239] Continue asFigure 2 As shown, the user can drag the rotation hot zone 204 downward, and the electronic device can follow the drag operation to control the clockwise rotation of the region of interest.

[0240] It can be seen that in the embodiments of the present application, in response to a drag operation issued by the user for the vertex or edge of the region of interest, following the drag operation, based on the direction of the drag operation, the size of the region of interest is adjusted; in response to a drag operation issued by the user for the interior of the region of interest, following the drag operation, the position of the region of interest is adjusted; in response to a drag operation issued by the user for the rotation hot zone displayed at a preset position of the region of interest, following the drag operation, the angle of the region of interest is adjusted. Through the above three implementation manners, the user can conveniently adjust the size, position, and angle of the region of interest.

[0241] As an implementation manner of the embodiments of the present application, as Figure 8 shown, the above method may further include:

[0242] S801, during the process of adjusting the size of the sliding window, highlighting the overlapping regions between the sliding windows;

[0243] To facilitate the user to view the overlapping regions of the sliding windows in real time when adjusting the size of the sliding windows, the electronic device can highlight the overlapping regions between the sliding windows during the process of adjusting the size of the sliding windows. Among them, the specific manner of highlighting may be to thicken the border of the overlapping region, highlight the overlapping region, etc., which is not specifically limited herein.

[0244] For example, continuing as Figure 2 shown, Figure 2 in which the highlighting is represented by shading. The overlapping regions generated longitudinally between adjacent sliding windows are identified by " / " - shaped shading, and the overlapping regions generated transversely between adjacent sliding windows are identified by "\" - shaped shading. The shading in the cross - region is also cross - shaped, indicating that the highlighting color in the cross - region is deeper.

[0245] S802, after the adjustment of the sliding window size is completed, displaying the overlapping regions between the sliding windows in a non - highlighted state.

[0246] After the adjustment of the sliding window size is completed, the electronic device can display the overlapping regions between the sliding windows in a non - highlighted state.

[0247] It can be seen that in the embodiments of the present application, during the process of adjusting the size of the sliding window, the electronic device can prominently display the overlapping area between each sliding window; after the size of the sliding window is adjusted, the overlapping area between each sliding window is displayed in a non-prominent display state. In the current related technologies, the method of adjusting the attributes of the region of interest and the sliding window cannot intuitively let the user feel the difference between the recognition area and the overlapping area of the sliding window, resulting in low adjustment efficiency and poor adjustment effect. However, in the solution provided by the embodiments of the present application, the user can intuitively view the overlapping area between the current sliding windows while adjusting the size of the sliding window, which is convenient for the user to determine the size of the sliding window to be adjusted.

[0248] As an implementation manner of the embodiments of the present application, a marking point may be displayed at the center of the above-mentioned preset number of sliding windows. In this case, the above method may further include:

[0249] When adjusting the position or size of the sliding window, based on the position and size of each current sliding window, display the center point of each sliding window.

[0250] To facilitate the user to determine the positions of the sliding windows, the electronic device may display marking points at the center of each sliding window. Among them, the marking points may be solid circles, triangles, pentagrams, etc., and no specific limitation is made here. In this case, when adjusting the position or size of the sliding window, the electronic device can display the center point of each sliding window based on the position and size of each current sliding window, so that when the position or size of the sliding window is adjusted, the center point is always at the center of the sliding window.

[0251] For example, the fifth schematic diagram of the image annotation interface may be as Figure 9 shown, and a marking point 901 in the form of a solid circle is displayed at the center of each sliding window. In addition, in Figure 9 , the sliding window at the central position is selected, so the edge of the sliding window is prominently displayed, and draggable marks are displayed on each edge of the sliding window.

[0252] As an implementation manner of the embodiments of the present application, the step of adjusting the attributes of the sliding window in response to an attribute adjustment operation issued by the user for the sliding window may include:

[0253] In response to an attribute adjustment operation issued by the user for the sliding window, and the trigger position of the attribute adjustment operation is in the overlapping area of multiple sliding windows, adjust the attributes of the sliding window with the highest corresponding priority among the multiple sliding windows.

[0254] There can be a priority relationship between each sliding window, and the priority relationship can be set according to the importance of the sliding window. When there is an overlapping area among multiple sliding windows, assuming that the user issues an attribute adjustment operation for the overlapping area, then the attribute adjustment operation can be preferentially performed on the sliding window with the highest priority in the overlapping area, that is, the attributes of the sliding window with the highest priority are adjusted.

[0255] For example, assuming that sliding windows 1-4 have an overlapping area and sliding window 1 has the highest priority, and the user issues an attribute adjustment operation for the overlapping area, then the attribute adjustment operation will act on sliding window 1, and then the attributes of sliding window 1 are adjusted.

[0256] It can be seen that in the embodiments of the present application, in response to the attribute adjustment operation issued by the user for the sliding window, and the trigger position of the attribute adjustment operation is in the overlapping area of multiple sliding windows, the electronic device can adjust the attributes of the sliding window with the highest priority among the multiple sliding windows. In this way, according to the priority of the sliding window, when the user issues an attribute adjustment operation for the overlapping area of multiple sliding windows, the sliding window that interacts with the attribute adjustment operation can be determined.

[0257] As an implementation manner of the embodiments of the present application, a flowchart of an image annotation method can be as Figure 10 shown, and specifically may include the following steps:

[0258] S1001, preliminarily determine the region of interest;

[0259] The electronic device can preliminarily determine the position and size of the region of interest of the image to be annotated through the region of interest determination algorithm.

[0260] S1002, display the region of interest;

[0261] Next, the electronic device can display the region of interest in the image annotation interface. When the region of interest is generated, multiple sliding windows can be displayed in the region of interest according to the default arrangement method. For example, the sliding windows can be displayed in the form of 3×3. At the same time, the sliding window in the central position can be default selected. In addition, the user can perform operations such as floating and selecting the sliding window. When a floating operation is issued for the sliding window, the recognition area of the sliding window can be highlighted.

[0262] S1003, adjust the region of interest;

[0263] The user can adjust the attributes of the region of interest. Specifically, the size, position, and angle of the region of interest can be adjusted.

[0264] S1004, adjust by dragging operation;

[0265] The user can perform a drag operation on the image annotation interface to adjust the attributes of the sliding window.

[0266] S1005, adjust through the attribute adjustment control;

[0267] The user can also adjust the attribute parameters of the sliding window through the attribute adjustment control included in the image annotation interface, so as to adjust the attributes of the sliding window.

[0268] S1006, the image annotation is completed.

[0269] When the user issues a sliding window confirmation operation, the electronic device can use the areas included in each sliding window in the current image annotation interface as the detection areas of the image to be annotated.

[0270] As an implementation manner of the embodiment of the present application, as Figure 11 shown, the above step S1004 may specifically include the following steps:

[0271] S1101, the cursor hovers over the hot zone of the sliding window edge of the selected target sliding window;

[0272] After starting the adjustment, the user can control the cursor to hover over the hot zone of the sliding window edge of the selected target sliding window.

[0273] S1102, adjust the cursor to a telescopic state;

[0274] At this time, the cursor can be adjusted to a telescopic state to prompt the user that the edge of the target sliding window can be dragged.

[0275] S1103, long-press and drag the edge of the target sliding window;

[0276] The user can long-press the mouse and drag the edge of the target sliding window to adjust the size of the target sliding window.

[0277] S1104, determine in real time whether the drag limit range is reached; if so, execute step S1105; if not, execute step S1106;

[0278] When the user drags the edge of the target sliding window, the electronic device can determine in real time whether the position indicated by the drag operation exceeds the drag limit range.

[0279] S1105, the edge of the target sliding window is at the limit position and does not move;

[0280] If so, it means that the edge of the target sliding window is at the limit position, and the edge of the target sliding window will not be able to continue to move following the drag operation. Next, the electronic device can return to step S1103.

[0281] S1106. Adjust the size of the target sliding window following the drag operation, synchronously adjust other sliding windows, and highlight the overlapping area;

[0282] If not, then the electronic device can adjust the size of the target sliding window following the drag operation. At the same time, the electronic device can also adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window, and highlight the overlapping area.

[0283] S1107. Release the mouse to stop dragging;

[0284] After the user releases the mouse, the edge of the target sliding window will no longer move following the position of the cursor.

[0285] S1108. Cancel the highlighting of the overlapping area.

[0286] After the user releases the mouse, the electronic device can cancel the highlighting of the overlapping area, that is, display the overlapping area in a non-highlighted state, thereby ending the adjustment.

[0287] As an implementation manner of the embodiment of the present application, as Figure 12 shown, the above step S1005 may specifically include the following steps:

[0288] S1201. Adjust the number of horizontal sliding windows and the number of vertical sliding windows;

[0289] After starting the adjustment, the user can adjust the number of horizontal sliding windows and the number of vertical sliding windows through the sliding window number adjustment control included in the image annotation interface.

[0290] S1202. Deselect all sliding windows, and the number of sliding windows in the interface changes in real time;

[0291] The electronic device can deselect all the selected sliding windows, that is, display all the selected sliding windows as unselected states. Next, the positions of all sliding windows can be reset to the default grid lattice point positions, that is, display the unselected sliding windows in the default arrangement manner. Furthermore, the electronic device can adjust the number of sliding windows in the image annotation interface based on the adjusted number of horizontal sliding windows and the number of vertical sliding windows.

[0292] S1203. Determine whether the number of horizontal sliding windows is odd; if so, execute step S1204; if not, execute step S1205;

[0293] The electronic device can determine whether the number of horizontal sliding windows is odd.

[0294] S1204. Determine whether the number of vertical sliding windows is odd; if so, execute step S1206; if not, execute step S1207;

[0295] When the number of horizontal sliding windows is odd, the electronic device can continue to determine whether the number of vertical sliding windows is odd.

[0296] S1205, Determine whether the number of vertical sliding windows is odd; if so, execute step S1208; if not, execute step S1209;

[0297] When the number of horizontal sliding windows is even, the electronic device can continue to determine whether the number of vertical sliding windows is odd.

[0298] S1206, Automatically select the sliding window at the center position;

[0299] When both the number of horizontal sliding windows and the number of vertical sliding windows are odd, the electronic device can automatically select the sliding window at the center position.

[0300] S1207, Automatically select the sliding window above the central position;

[0301] When the number of horizontal sliding windows is odd and the number of vertical sliding windows is even, the electronic device can automatically select the sliding window above the central position.

[0302] S1208, Automatically select the sliding window to the left of the central position;

[0303] When the number of horizontal sliding windows is even and the number of vertical sliding windows is odd, the electronic device can automatically select the sliding window to the left of the central position.

[0304] S1209, Automatically select the sliding window at the upper left of the central position.

[0305] When both the number of horizontal sliding windows and the number of vertical sliding windows are even, the electronic device can automatically select the sliding window at the upper left of the central position. Then, the adjustment can be ended.

[0306] As an implementation manner of the embodiment of the present application, as Figure 13 shown, the above step S1005 may specifically further include the following steps:

[0307] S1301, Adjust the sliding window overlap rate by inputting a value;

[0308] After starting to adjust the sliding window overlap rate, the user can adjust the sliding window overlap rate by inputting a value. Among them, the default value of the sliding window overlap rate can be 0.

[0309] S1302, The size of the sliding window in the image annotation interface is adjusted;

[0310] While adjusting the sliding window overlap rate, the size of each sliding window in the image annotation interface will also be adjusted.

[0311] S1303, adjust the overlapping rate of the sliding window through a range adjustment component;

[0312] The electronic device can adjust the overlapping rate of the sliding window by dragging the range adjustment component.

[0313] S1304, when holding the range adjustment component, highlight the overlapping area;

[0314] When the user holds the range adjustment component with the mouse, the electronic device can highlight the overlapping area.

[0315] S1305, the size of the sliding window in the image annotation interface is adjusted;

[0316] While adjusting the overlapping rate of the sliding window, the size of each sliding window in the image annotation interface will also be adjusted.

[0317] S1306, when releasing the range adjustment component, the highlighting of the overlapping area is cancelled.

[0318] When the user releases the mouse, the electronic device can cancel the highlighting of the overlapping area. Furthermore, the adjustment ends.

[0319] In the technical solution of this application, operations such as the acquisition, storage, use, processing, transmission, provision, and disclosure of the user's personal information involved are all carried out with the user's authorization.

[0320] Corresponding to the above-mentioned image annotation method, an embodiment of this application also provides an image annotation device. The following introduces an image annotation device provided by an embodiment of this application.

[0321] As Figure 14 shown, an image annotation device, the device includes:

[0322] An image display module 1401, configured to display an image to be annotated in an image annotation interface of a machine vision task, where the region of interest of the image to be annotated includes a preset number of sliding windows;

[0323] A sliding window attribute adjustment module 1402, configured to adjust the attributes of the sliding window in response to an attribute adjustment operation issued by the user for the sliding window;

[0324] A detection area confirmation module 1403, configured to, in response to a sliding window confirmation operation issued by the user, use the areas included in each sliding window in the current image annotation interface as the detection area of the image to be annotated.

[0325] It can be seen that in the solution provided by the embodiments of the present application, the electronic device can display the image to be annotated in the image annotation interface of the machine vision task. Among them, the region of interest of the image to be annotated includes a preset number of sliding windows; in response to the attribute adjustment operation issued by the user for the sliding window, the attributes of the sliding window are adjusted; in response to the sliding window confirmation operation issued by the user, the regions included in each sliding window in the current image annotation interface are used as the detection regions of the image to be annotated. In the above process, when performing image annotation, the region of interest of the image to be annotated displayed in the image annotation interface includes a preset number of sliding windows. If it is necessary to adjust the sliding window attributes, the user can issue an attribute adjustment operation for the sliding window through the image annotation interface. In this way, the user can adjust the sliding window attributes on the basis of the existing preset number of sliding windows, without manually annotating the detection regions where each target to be detected in the image to be annotated is located. Therefore, the efficiency of image annotation in the machine vision task can be improved, and the labor cost required for image annotation can be reduced.

[0326] As an implementation manner of the embodiments of the present application, the above-mentioned sliding window attribute adjustment module 1402 may include:

[0327] The first sliding window attribute adjustment sub-module is used to determine the position targeted by the dragging operation in response to the dragging operation issued by the user for the sliding window; based on the position targeted by the dragging operation, adjust the attributes of the sliding window;

[0328] The second sliding window attribute adjustment sub-module is used to adjust the attributes of the sliding window based on the sliding window attribute value indicated by the adjusted adjustment control in response to the adjustment operation issued by the user for the attribute adjustment control included in the image annotation interface.

[0329] As an implementation manner of the embodiments of the present application, the above-mentioned first sliding window attribute adjustment sub-module may include:

[0330] The sliding window size adjustment unit is used to adjust the size of the target sliding window following the dragging operation in response to the dragging operation issued by the user for the edge of the selected target sliding window, based on the direction of the dragging operation, until the position where the dragging operation stops is within the preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range;

[0331] The sliding window position adjustment unit is used to adjust the position of the target sliding window following the dragging operation in response to the dragging operation issued by the user for the inside of the selected target sliding window, based on the direction of the dragging operation.

[0332] As an implementation manner of the embodiments of the present application, the above-mentioned device may further include:

[0333] A cursor display module, configured to respond to the cursor hovering over a hot zone at the edge of a selected target sliding window, and adjust the cursor to a telescopic state, where the hot zone at the edge of the sliding window is the area of the edge of the target sliding window that does not coincide with the border of the region of interest, and the telescopic state is used to prompt the user that the edge corresponding to the cursor is draggable.

[0334] As an implementation manner of an embodiment of the present application, the above sliding window size adjustment unit may include:

[0335] An overlap rate calculation sub-unit, configured to respond to a dragging operation issued by the user on the edge of a selected target sliding window, follow the dragging operation, adjust the size of the target sliding window based on the direction of the dragging operation, and calculate the sliding window overlap rate, where the sliding window overlap rate is used to characterize the overlapping area between the target sliding window and an adjacent sliding window;

[0336] A first size adjustment sub-unit, configured to complete the size adjustment of the target sliding window when the sliding window overlap rate of the target sliding window is within a preset overlap rate range when the dragging operation stops;

[0337] A second size adjustment sub-unit, configured to, when the sliding window overlap rate of the target sliding window exceeds the preset overlap rate range, adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range, and complete the size adjustment of the target sliding window, where, when the dragging operation makes the size of the target sliding window larger, the extreme value of the preset overlap rate range is the maximum value, and when the dragging operation makes the size of the target sliding window smaller, the extreme value of the preset overlap rate range is the minimum value.

[0338] As an implementation manner of an embodiment of the present application, the above device may further include:

[0339] A synchronous adjustment module, configured to, when adjusting the size of the target sliding window based on the direction of the dragging operation, adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window.

[0340] As an implementation manner of an embodiment of the present application, the above second sliding window attribute adjustment sub-module may include:

[0341] A quantity adjustment unit, configured to respond to a quantity adjustment instruction issued by the user on a sliding window quantity adjustment control included in the image annotation interface, and adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control;

[0342] An overlap rate adjustment unit, configured to, in response to an overlap rate adjustment instruction issued by a user for a sliding window overlap rate adjustment control included in the image annotation interface, adjust the size of the sliding window based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control, so as to complete the adjustment of the size of the sliding window.

[0343] As an implementation manner of an embodiment of the present application, the above-mentioned sliding window overlap rate adjustment control includes a range adjustment component. In this case, the above-mentioned overlap rate adjustment unit may include:

[0344] An overlap rate adjustment subunit, configured to, in response to a dragging operation issued by a user for the range adjustment component, follow the dragging operation and adjust the size of the sliding window, so that the sliding window overlap rate of each sliding window is the same as the sliding window overlap rate corresponding to the dragging operation on the range adjustment component.

[0345] As an implementation manner of an embodiment of the present application, the above-mentioned sliding window quantity adjustment control may include a first sliding window quantity adjustment control and a second sliding window quantity adjustment control. In this case, the above-mentioned quantity adjustment unit may include:

[0346] An uncheck subunit, configured to, in response to the horizontal sliding window quantity set by the user based on the first sliding window quantity adjustment control and the vertical sliding window quantity set by the user based on the second sliding window quantity adjustment control, display all the selected sliding windows as unselected states;

[0347] A sliding window display subunit, configured to display the unselected sliding windows in the image annotation interface according to a default arrangement manner;

[0348] A quantity adjustment subunit, configured to adjust the quantity of the sliding windows included in the image to be annotated in the image annotation interface according to the horizontal sliding window quantity and the vertical sliding window quantity.

[0349] As an implementation manner of an embodiment of the present application, the above-mentioned device may further include:

[0350] A sliding window determination module, configured to determine, based on the horizontal sliding window quantity and the vertical sliding window quantity, a sliding window located at the central position of the region of interest from among the sliding windows included in the image to be annotated after the quantity of the sliding windows is adjusted;

[0351] A sliding window selection module, configured to display the determined sliding window as a selected state.

[0352] As an implementation manner of an embodiment of the present application, the above-mentioned sliding window determination module may include:

[0353] The first sliding window determination sub-module is configured to, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being odd, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest;

[0354] The second sliding window determination sub-module is configured to, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being even, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window closest to the central position and in the first direction;

[0355] The third sliding window determination sub-module is configured to, in response to the number of horizontal sliding windows being odd and the number of vertical sliding windows being even, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window closest to the central position and in the second direction;

[0356] The fourth sliding window determination sub-module is configured to, in response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window closest to the central position and in the third direction.

[0357] As an implementation manner of an embodiment of the present application, the above device may further include:

[0358] The region of interest adjustment module is configured to, in response to an attribute adjustment operation issued by a user for the region of interest, adjust the attributes of the region of interest.

[0359] As an implementation manner of an embodiment of the present application, the above region of interest adjustment module may include:

[0360] The first region of interest adjustment sub-module is configured to, in response to a dragging operation issued by a user for a vertex or an edge of the region of interest, follow the dragging operation and adjust the size of the region of interest based on the direction of the dragging operation;

[0361] The second region of interest adjustment sub-module is configured to, in response to a dragging operation issued by a user for the interior of the region of interest, follow the dragging operation and adjust the position of the region of interest;

[0362] The third region of interest adjustment sub-module is configured to, in response to a dragging operation issued by a user for a rotation hot zone displayed at a preset position of the region of interest, follow the dragging operation and adjust the angle of the region of interest.

[0363] As an implementation manner of an embodiment of the present application, the above device may further include:

[0364] A highlighting module, configured to highlight the overlapping regions between the respective sliding windows during the process of adjusting the size of the sliding windows;

[0365] A non-highlighting module, configured to display the overlapping regions between the respective sliding windows in a non-highlighted state after the adjustment of the sliding window size is completed.

[0366] As an implementation manner of an embodiment of the present application, identification points may be displayed at the centers of the above-mentioned preset number of sliding windows. In this case, the above-mentioned apparatus may further include:

[0367] A center point display module, configured to display the center point of each sliding window based on the current position and size of each sliding window when adjusting the position or size of the sliding window.

[0368] As an implementation manner of an embodiment of the present application, the above-mentioned sliding window attribute adjustment module 1402 may include:

[0369] A sliding window attribute adjustment sub-module, configured to, in response to an attribute adjustment operation issued by a user for the sliding window, and when the trigger position of the attribute adjustment operation is in the overlapping region of multiple sliding windows, adjust the attributes of the sliding window with the highest corresponding priority among the multiple sliding windows.

[0370] An embodiment of the present application further provides an electronic device, as Figure 15 shown, including:

[0371] A memory 1501, configured to store a computer program;

[0372] A processor 1502, configured to implement the image annotation method described in any of the above embodiments when executing the program stored in the memory 1501.

[0373] And the above-mentioned electronic device may further include a communication bus and / or a communication interface, and the processor 1502, the communication interface, and the memory 1501 complete communication with each other through the communication bus.

[0374] It can be seen that in the solution provided by the embodiments of the present application, the electronic device can display the image to be annotated in the image annotation interface of the machine vision task, where the region of interest of the image to be annotated includes a preset number of sliding windows; in response to the attribute adjustment operation issued by the user for the sliding window, the attributes of the sliding window are adjusted; in response to the sliding window confirmation operation issued by the user, the regions included in each sliding window in the current image annotation interface are used as the detection regions of the image to be annotated. In the above process, when performing image annotation, the region of interest of the image to be annotated displayed in the image annotation interface includes a preset number of sliding windows. If it is necessary to adjust the sliding window attributes, the user can issue an attribute adjustment operation for the sliding window through the image annotation interface. In this way, the user can adjust the sliding window attributes based on the existing preset number of sliding windows, without manually annotating the detection regions where each target to be detected in the image to be annotated is located. Therefore, the efficiency of image annotation in the machine vision task can be improved, and the labor cost required for image annotation can be reduced.

[0375] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0376] The communication interface is used for communication between the above electronic device and other devices.

[0377] The memory can include a Random Access Memory (RAM), and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located far from the aforementioned processor.

[0378] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0379] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above image annotation methods are implemented.

[0380] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the image annotation methods in the above embodiments.

[0381] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server, data center, etc. that includes one or more integrated available media. The available medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a Solid State Disk (SSD), etc.

[0382] It should be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.

[0383] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the apparatus, electronic device, computer-readable storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiments.

[0384] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.

Claims

1. An image annotation method, characterized in that, The method includes: In an image annotation interface for a machine vision task, display an image to be annotated, where the region of interest of the image to be annotated includes a preset number of sliding windows; In response to an attribute adjustment operation issued by the user for the sliding window, adjust the attributes of the sliding window; In response to a sliding window confirmation operation issued by the user, use the regions included in each sliding window in the current image annotation interface as the detection regions of the image to be annotated.

2. The method according to claim 1, wherein The step of, in response to an attribute adjustment operation issued by the user for the sliding window, adjusting the attributes of the sliding window includes: In response to a dragging operation issued by the user for the sliding window, determine the position targeted by the dragging operation; based on the position targeted by the dragging operation, adjust the attributes of the sliding window; and / or, In response to an adjustment operation issued by the user for an attribute adjustment control included in the image annotation interface, based on the sliding window attribute value indicated by the adjusted adjustment control, adjust the attributes of the sliding window.

3. The method according to claim 2, wherein The step of, in response to a dragging operation issued by the user for the sliding window, determining the position targeted by the dragging operation; The step of, based on the position targeted by the dragging operation, adjusting the attributes of the sliding window includes: In response to a dragging operation issued by the user for the edge of a selected target sliding window, follow the dragging operation and adjust the size of the target sliding window based on the direction of the dragging operation until the position where the dragging operation stops is within a preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range; and / or, In response to a dragging operation issued by the user for the interior of a selected target sliding window, follow the dragging operation and adjust the position of the target sliding window based on the direction of the dragging operation.

4. The method according to claim 3, wherein Before the step of, in response to a dragging operation issued by the user for the edge of a selected target sliding window, following the dragging operation and adjusting the size of the target sliding window based on the direction of the dragging operation, the method further includes: In response to the cursor hovering over a sliding window edge hot zone corresponding to a selected target sliding window, adjust the cursor to a telescopic state, where the sliding window edge hot zone is the region of the edge of the target sliding window that does not coincide with the border of the region of interest, and the telescopic state is used to prompt the user that the edge corresponding to the cursor is draggable.

5. The method according to claim 3, characterized in that The step of, in response to a dragging operation issued by the user for the edge of a selected target sliding window, following the dragging operation and adjusting the size of the target sliding window based on the direction of the dragging operation until the position where the dragging operation stops is within a preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range includes: In response to a dragging operation issued by the user for the edge of a selected target sliding window, follow the dragging operation and adjust the size of the target sliding window based on the direction of the dragging operation, and calculate a sliding window overlap rate, where the sliding window overlap rate is used to characterize the overlapping area between the target sliding window and adjacent sliding windows; When the window overlapping rate of the target sliding window is within a preset overlapping rate range when the dragging operation stops, the size adjustment of the target sliding window is completed; When the window overlapping rate of the target sliding window exceeds the preset overlapping rate range, the size of the target sliding window is adjusted to the size corresponding to the maximum or minimum value of the preset overlapping rate range, and the size adjustment of the target sliding window is completed. Among them, when the dragging operation makes the size of the target sliding window larger, the maximum or minimum value of the preset overlapping rate range is the maximum value; when the dragging operation makes the size of the target sliding window smaller, the maximum or minimum value of the preset overlapping rate range is the minimum value.

6. The method according to claim 3, wherein The method further includes: When adjusting the size of the target sliding window based on the direction of the dragging operation, adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window.

7. The method according to claim 2, characterized in that, The step of adjusting the attributes of the sliding window based on the adjusted sliding window attribute value indicated by the adjusted adjustment control in response to the adjustment operation issued by the user for the attribute adjustment control included in the image annotation interface includes: In response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface, adjust the quantity of the sliding window based on the quantity of the sliding window indicated by the adjusted sliding window quantity adjustment control; and / or, In response to the overlapping rate adjustment instruction issued by the user for the sliding window overlapping rate adjustment control included in the image annotation interface, adjust the size of the sliding window based on the overlapping rate of the sliding window indicated by the adjusted sliding window overlapping rate adjustment control to complete the size adjustment of the sliding window.

8. The method according to claim 7, wherein The sliding window overlapping rate adjustment control includes a range adjustment component; The step of adjusting the size of the sliding window based on the overlapping rate of the sliding window indicated by the adjusted sliding window overlapping rate adjustment control in response to the overlapping rate adjustment instruction issued by the user for the sliding window overlapping rate adjustment control included in the image annotation interface includes: In response to the dragging operation issued by the user for the range adjustment component, follow the dragging operation to adjust the size of the sliding window so that the window overlapping rate of each sliding window is the same as the window overlapping rate corresponding to the dragging operation in the range adjustment component.

9. The method according to claim 7, wherein The sliding window quantity adjustment control includes a first sliding window quantity adjustment control and a second sliding window quantity adjustment control; The step of adjusting the quantity of the sliding window based on the quantity of the sliding window indicated by the adjusted sliding window quantity adjustment control in response to the quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface includes: In response to the horizontal sliding window quantity set by the user based on the first sliding window quantity adjustment control and the vertical sliding window quantity set by the user based on the second sliding window quantity adjustment control, display all the selected sliding windows as unselected; In the image annotation interface, display the unselected sliding windows in the default arrangement manner; Adjust the quantity of the sliding windows included in the image to be annotated in the image annotation interface according to the horizontal sliding window quantity and the vertical sliding window quantity.

10. The method according to claim 9, characterized in that, After the step of adjusting the number of sliding windows based on the number of sliding windows indicated by the adjusted sliding window quantity adjustment control in response to a quantity adjustment instruction issued by the user for the sliding window quantity adjustment control included in the image annotation interface, the method further includes: Based on the horizontal sliding window quantity and the vertical sliding window quantity, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest; Display the determined sliding window as a selected state.

11. The method according to claim 10, characterized in that, The step of determining, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest based on the horizontal sliding window quantity and the vertical sliding window quantity includes: In response to both the horizontal sliding window quantity and the vertical sliding window quantity being odd numbers, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window located at the center position of the region of interest; In response to both the horizontal sliding window quantity and the vertical sliding window quantity being even numbers, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window closest to the center position and in the first direction; In response to the horizontal sliding window quantity being an odd number and the vertical sliding window quantity being an even number, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window closest to the center position and in the second direction; In response to the horizontal sliding window quantity being an even number and the vertical sliding window quantity being an odd number, determine, from each of the sliding windows included in the image to be annotated after adjusting the number of sliding windows, the sliding window closest to the center position and in the third direction.

12. The method according to any one of claims 1-11, characterized in that, After the step of displaying the image to be annotated in the image annotation interface of the machine vision task, the method further includes: In response to an attribute adjustment operation issued by the user for the region of interest, adjust the attributes of the region of interest.

13. The method according to claim 12, wherein The step of adjusting the attributes of the region of interest in response to an attribute adjustment operation issued by the user for the region of interest includes at least one of the following: In response to a dragging operation issued by the user for a vertex or an edge of the region of interest, follow the dragging operation and adjust the size of the region of interest based on the direction of the dragging operation; In response to a dragging operation issued by the user for the interior of the region of interest, follow the dragging operation and adjust the position of the region of interest; In response to a dragging operation issued by the user for a rotation hot zone displayed at a preset position of the region of interest, follow the dragging operation and adjust the angle of the region of interest.

14. The method according to claim 5 or 7, characterized in that The method further includes: During the process of adjusting the size of the sliding windows, highlight the overlapping regions between the sliding windows; After the size adjustment of the sliding windows is completed, display the overlapping regions between the sliding windows in a non-highlighted state.

15. The method according to any one of claims 3-11, characterized in that, Identification points are displayed at the centers of the preset number of sliding windows, and the method further includes: When adjusting the position or size of the sliding windows, display the center points of each sliding window based on the current position and size of each sliding window.

16. The method according to claim 1, wherein The step of adjusting the attributes of the sliding window in response to an attribute adjustment operation issued by the user for the sliding window includes: In response to an attribute adjustment operation issued by the user for the sliding window, and when the trigger position of the attribute adjustment operation is in the overlapping area of multiple sliding windows, adjust the attributes of the sliding window with the highest corresponding priority among the multiple sliding windows.

17. An image annotation device, characterized in that, The device includes: An image display module, configured to display an image to be annotated in an image annotation interface of a machine vision task, where the region of interest of the image to be annotated includes a preset number of sliding windows; A sliding window attribute adjustment module, configured to adjust the attributes of the sliding window in response to an attribute adjustment operation issued by the user for the sliding window; A detection region confirmation module, configured to, in response to a sliding window confirmation operation issued by the user, use the regions included in each sliding window in the current image annotation interface as the detection regions of the image to be annotated.

18. The device according to claim 17, characterized in that, The sliding window attribute adjustment module includes: A first sliding window attribute adjustment sub-module, configured to, in response to a dragging operation issued by the user for the sliding window, determine the position targeted by the dragging operation; and based on the position targeted by the dragging operation, adjust the attributes of the sliding window; A second sliding window attribute adjustment sub-module, configured to, in response to an adjustment operation issued by the user for an attribute adjustment control included in the image annotation interface, adjust the attributes of the sliding window based on the sliding window attribute value indicated by the adjusted adjustment control; and / or The first sliding window attribute adjustment sub-module includes: A sliding window size adjustment unit, configured to, in response to a dragging operation issued by the user for the edge of a selected target sliding window, follow the dragging operation and adjust the size of the target sliding window based on the direction of the dragging operation until the position where the dragging operation stops is within a preset dragging limit range, or the position indicated by the dragging operation exceeds the preset dragging limit range; A sliding window position adjustment unit, configured to, in response to a dragging operation issued by the user for the interior of a selected target sliding window, follow the dragging operation and adjust the position of the target sliding window based on the direction of the dragging operation; and / or The device further includes: A cursor display module, configured to, in response to the cursor hovering over a sliding window edge hot zone corresponding to a selected target sliding window, adjust the cursor to a telescopic state, where the sliding window edge hot zone is the region where the edge of the target sliding window that does not coincide with the border of the region of interest is located, and the telescopic state is used to prompt the user that the edge corresponding to the cursor is draggable; and / or The sliding window size adjustment unit includes: An overlap rate calculation sub-unit, configured to, in response to a dragging operation issued by the user for the edge of a selected target sliding window, follow the dragging operation and adjust the size of the target sliding window based on the direction of the dragging operation, and calculate a sliding window overlap rate, where the sliding window overlap rate is used to characterize the overlapping area between the target sliding window and adjacent sliding windows; A first size adjustment sub-unit, configured to complete the size adjustment of the target sliding window when the sliding window overlap rate of the target sliding window is within a preset overlap rate range when the dragging operation stops; A second size adjustment subunit, configured to adjust the size of the target sliding window to the size corresponding to the extreme value of the preset overlap rate range when the sliding window overlap rate of the target sliding window exceeds the preset overlap rate range, thereby completing the size adjustment of the target sliding window. Wherein, when the dragging operation makes the size of the target sliding window larger, the extreme value of the preset overlap rate range is the maximum value; when the dragging operation makes the size of the target sliding window smaller, the extreme value of the preset overlap rate range is the minimum value; and / or, The device further includes: A synchronization adjustment module, configured to adjust the sizes of other sliding windows in the same adjustment manner as the target sliding window when adjusting the size of the target sliding window based on the direction of the dragging operation; and / or, The second sliding window attribute adjustment sub-module includes: A quantity adjustment unit, configured to respond to a quantity adjustment instruction issued by the user for a sliding window quantity adjustment control included in the image annotation interface, and adjust the quantity of the sliding windows based on the quantity of the sliding windows indicated by the adjusted sliding window quantity adjustment control; An overlap rate adjustment unit, configured to respond to an overlap rate adjustment instruction issued by the user for a sliding window overlap rate adjustment control included in the image annotation interface, and adjust the size of the sliding windows based on the sliding window overlap rate indicated by the adjusted sliding window overlap rate adjustment control, so as to complete the size adjustment of the sliding windows; and / or, The sliding window overlap rate adjustment control includes a range adjustment component; The overlap rate adjustment unit includes: An overlap rate adjustment subunit, configured to respond to a dragging operation issued by the user for the range adjustment component, and follow the dragging operation to adjust the size of the sliding windows, so that the sliding window overlap rate of each sliding window is the same as the sliding window overlap rate corresponding to the dragging operation on the range adjustment component; and / or, The sliding window quantity adjustment control includes a first sliding window quantity adjustment control and a second sliding window quantity adjustment control; The quantity adjustment unit includes: An unchecking subunit, configured to respond to the horizontal sliding window quantity set by the user based on the first sliding window quantity adjustment control and the vertical sliding window quantity set by the user based on the second sliding window quantity adjustment control, and display all the selected sliding windows as unselected; A sliding window display subunit, configured to display the unselected sliding windows in the image annotation interface in a default arrangement manner; A quantity adjustment subunit, configured to adjust the quantity of the sliding windows included in the image to be annotated in the image annotation interface according to the horizontal sliding window quantity and the vertical sliding window quantity; and / or, The device further includes: A sliding window determination module, configured to determine, based on the horizontal sliding window quantity and the vertical sliding window quantity, a sliding window located at the central position of the region of interest from among the sliding windows included in the image to be annotated after the quantity of the sliding windows is adjusted; A sliding window selection module, configured to display the determined sliding window as a selected state; and / or, The sliding window determination module includes: The first sliding window determination sub-module is configured to, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being odd, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window located at the central position of the region of interest; The second sliding window determination sub-module is configured to, in response to both the number of horizontal sliding windows and the number of vertical sliding windows being even, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the first direction; The third sliding window determination sub-module is configured to, in response to the number of horizontal sliding windows being odd and the number of vertical sliding windows being even, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the second direction; The fourth sliding window determination sub-module is configured to, in response to the number of horizontal sliding windows being even and the number of vertical sliding windows being odd, determine, from each of the sliding windows included in the to-be-annotated image after adjusting the number of sliding windows, the sliding window closest to the central position and in the third direction; and / or, The apparatus further includes: The region of interest adjustment module is configured to, in response to an attribute adjustment operation issued by a user for the region of interest, adjust the attributes of the region of interest; and / or, The region of interest adjustment module includes: The first region of interest adjustment sub-module is configured to, in response to a dragging operation issued by a user for a vertex or an edge of the region of interest, follow the dragging operation and adjust the size of the region of interest based on the direction of the dragging operation; The second region of interest adjustment sub-module is configured to, in response to a dragging operation issued by a user for the interior of the region of interest, follow the dragging operation and adjust the position of the region of interest; The third region of interest adjustment sub-module is configured to, in response to a dragging operation issued by a user for a rotation hot zone displayed at a preset position of the region of interest, follow the dragging operation and adjust the angle of the region of interest; and / or, The apparatus further includes: The highlighting module is configured to highlight the overlapping regions between the sliding windows during the process of adjusting the size of the sliding windows; The non-highlighting module is configured to display the overlapping regions between the sliding windows in a non-highlighted state after the adjustment of the sliding window size is completed; and / or, Identification points are displayed at the centers of the preset number of sliding windows, and the apparatus further includes: The center point display module is configured to display the center point of each sliding window based on the current position and size of each sliding window when adjusting the position or size of the sliding window; and / or, The sliding window attribute adjustment module includes: The sliding window attribute adjustment sub-module is configured to, in response to an attribute adjustment operation issued by a user for the sliding window, and the trigger position of the attribute adjustment operation is in the overlapping region of multiple sliding windows, adjust the attributes of the sliding window with the highest corresponding priority among the multiple sliding windows.

19. An electronic device, characterized in that, Includes: A memory for storing a computer program; A processor for implementing the method according to any one of claims 1-16 when executing the program stored on the memory.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-16 is implemented.

Citation Information

Patent Citations

  • Dynamic region of interest adaptation and image capture device providing same

    CN103581544A

  • Method and device for performing target sampling on pictures

    CN110569699A

  • Image annotation method, apparatus, device and medium

    CN113939791A

  • Target detection method and related device

    CN119863474A

  • Image region-of-interest labeling method, electronic device and storage medium

    CN119919709A