WO2022134390A1 - Labeling method and apparatus, electronic device, and storage medium - Google Patents

Labeling method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2022134390A1
WO2022134390A1 PCT/CN2021/087285 CN2021087285W WO2022134390A1 WO 2022134390 A1 WO2022134390 A1 WO 2022134390A1 CN 2021087285 W CN2021087285 W CN 2021087285W WO 2022134390 A1 WO2022134390 A1 WO 2022134390A1
Authority
WO
WIPO (PCT)
Prior art keywords
graph
labeling
target image
graphic
graphics
Prior art date
Application number
PCT/CN2021/087285
Other languages
French (fr)
Chinese (zh)
Inventor
罗泽丰
钟华平
何聪辉
Original Assignee
深圳市商汤科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市商汤科技有限公司 filed Critical 深圳市商汤科技有限公司
Priority to KR1020227009804A priority Critical patent/KR20220093091A/en
Priority to JP2022520125A priority patent/JP2023510443A/en
Publication of WO2022134390A1 publication Critical patent/WO2022134390A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a labeling method and apparatus, an electronic device, and a storage medium.
  • neural networks can be trained to automatically identify and understand the information contained in images.
  • labeled images are often used for training.
  • the annotated area is often determined by drawing graphics on the image.
  • the present disclosure proposes an annotation scheme.
  • a labeling method comprising:
  • the first drawing graphic is adjusted to obtain a labeling result corresponding to the first labeling operation.
  • the method before adjusting the first drawing graph, the method further includes:
  • the method before adjusting the first drawing graph, the method further includes:
  • a first user instruction is received, where the first user instruction is used to instruct to adjust the first drawing graphic.
  • the adjusting the first drawing graphic to obtain the labeling result corresponding to the first labeling operation includes:
  • a drawing graph obtained by removing the portion of the first drawing graph overlapping the second drawing graph from the first drawing graph is taken as a labeling result corresponding to the first labeling operation.
  • the adjusting the first drawing graphic to obtain the labeling result corresponding to the first labeling operation includes:
  • first drawing graph and the second drawing graph are border graphs, determine, according to the positions of the first drawing graph and the second drawing graph, that the second drawing graph is located in the first drawing graph. a first line segment element in the drawing figure and a second line segment element in the first drawing figure outside the second drawing figure;
  • the drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
  • the method further includes:
  • the selected first drawing graphic is determined according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
  • the target image is displayed on a web interface.
  • the first labeling operation is used to perform semantic segmentation labeling on the target image.
  • a labeling device comprising:
  • a receiving module configured to receive a first annotation operation on the target image, wherein the first annotation operation is used to draw a first drawing graphic indicating a first image area in the target image;
  • An adjustment module configured to adjust the first drawing graph in the case where the second drawing graph in the target image and the first drawing graph at least partially overlap to obtain the corresponding value of the first labeling operation Label the results.
  • the apparatus further includes:
  • a detection module configured to detect whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image.
  • the apparatus further includes:
  • a first user instruction receiving module configured to receive a first user instruction, where the first user instruction is used to instruct to adjust the first drawing graphic.
  • the adjustment module is configured to remove the drawn graphic obtained by removing the portion of the first drawn graphic that overlaps with the second drawn graphic from the first drawn graphic, as The labeling result corresponding to the first labeling operation.
  • the adjustment module is configured to, in the case that the first drawing graph and the second drawing graph are border graphs, according to the first drawing graph and the second drawing graph the position of the graphic, determining the first line segment element in the second drawing graphic that is located in the first drawing graphic and the second line segment element in the first drawing graphic that is located outside the second drawing graphic; The drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
  • the apparatus further includes:
  • a display module configured to display the target image and a plurality of drawing graphics including the first drawing graphics of the target image on a display interface
  • a second user instruction receiving module configured to receive a second user instruction, where the second user instruction is used to select the first drawing graphic from the plurality of drawing graphics;
  • a determining module configured to determine the selected first drawing graphics according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
  • the target image is displayed on a web interface.
  • the first labeling operation is used to perform semantic segmentation labeling on the target image.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
  • the present disclosure provides a computer program comprising computer-readable code, when the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.
  • the second drawing graphics and the first drawing graphics in the target image can exist.
  • the first drawing graphic is automatically adjusted to obtain the labeling result corresponding to the first labeling operation.
  • the efficiency of labeling the target image is improved, and the labeling time is saved.
  • the user does not need to perform additional manual adjustment for the same contour portion, which reduces the resource consumption caused by the user repeating the partial labeling process.
  • FIG. 1 shows a flowchart of a labeling method according to an embodiment of the present disclosure.
  • FIG. 2 shows a schematic diagram of drawing a graph according to an embodiment of the present disclosure.
  • FIG. 3 shows a schematic diagram of an annotation result according to an embodiment of the present disclosure.
  • FIG. 4 shows a schematic diagram of drawing a graph according to an embodiment of the present disclosure.
  • FIG. 5 shows a schematic diagram of an annotation result according to an embodiment of the present disclosure.
  • FIG. 6 shows a flowchart of an annotation method according to an embodiment of the present disclosure.
  • FIG. 7 shows a block diagram of an annotation apparatus according to an embodiment of the present disclosure.
  • FIG. 8 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 9 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 1 shows a flowchart of a labeling method according to an embodiment of the present disclosure. As shown in FIG. 1 , the labeling method includes:
  • step S11 a first labeling operation on the target image is received, wherein the first labeling operation is used to draw a first drawing graphic indicating a first image area in the target image.
  • the target image may be an image to be marked, and the image may be an image in any format, which is not limited in this embodiment of the present disclosure.
  • the target image can be a sample image used for machine learning, and the sample image can be used for supervised learning in machine learning after labeling.
  • a user such as an annotator can annotate the first image area in the target image through the first annotation operation.
  • the user can determine the first image area to be marked by drawing a graph.
  • the graph drawn by the user can be a polygon or a circle, and the drawn graph can be regular or irregular.
  • a regular graph which is not limited in this embodiment of the present disclosure.
  • the user may add meanings at the semantic level to the image information in the determined first image area by adding annotation information to the first image area.
  • the content in the target image is a person standing on the lawn.
  • the user can draw a drawing that matches the shape of the image area where the lawn is located, and then add annotation information to the drawn drawing. "Lawn" to give the selected image area "Lawn” semantics.
  • step S12 in the case that the second drawing graphic in the target image and the first drawing graphic at least partially overlap, adjust the first drawing graphic to obtain the corresponding image of the first labeling operation. Label the results.
  • the second drawing graph can also be a graph drawn by the user, or can also be a graph obtained in other ways, for example, can be a graph drawn after performing image recognition on the target image through a neural network.
  • the second drawing graph may be a drawing graph specified by a user, that is, when the first drawing graph and the second drawing graph specified by the user at least partially overlap, the first drawing graph is automatically Adjustment.
  • the user can specify the second drawing graph by selecting the drawing graph in the target image, or the user can also specify the second drawing graph by selecting the information such as the logo of the drawing graph. manner, which is not limited in the embodiments of the present disclosure.
  • the second drawing graphics may also be one or more drawing graphics among the drawing graphics included in the target image.
  • the second drawing graphics may be the same as the first drawing graphics included in the target image.
  • the first drawing graphic and the second drawing graphic at least partially overlap, and it may be that the second drawing graphic and the image area indicated by the first drawing graphic exist at least partially the same area.
  • the screen content of the target image is a person standing in the lawn
  • the area selected by the polygon (the first drawing figure) below is the lawn area
  • the area selected by the leftmost polygon (the second drawing figure) is
  • the first drawing includes the image area where the lawn is located, and also includes the image area where the legs that block part of the lawn are located.
  • the second drawing includes the image area where the portrait is located. Obviously, the first drawing and the second drawing are in the image area. There is some overlap.
  • the first drawing graph can be adjusted automatically, and the specific adjustment methods can be various, for example, the overlapping part can be removed from the first drawing graph , to obtain the first drawing figure with the overlapping part removed, or the overlapping part in the first drawing figure can be reduced.
  • the adjusted first drawing graph obtained is shown in FIG. 3 , the first drawing graph no longer includes the occlusion in the second drawing graph Lawn Legs.
  • the image area marked by the adjusted first drawing graphic may be used as the image area marked by the first marking operation, and the marking result corresponding to the first marking operation is obtained.
  • the annotated target image can be used for supervised learning in machine learning.
  • the interference information in the first drawing graph is removed or reduced, which can Improve the accuracy of neural networks derived from machine learning.
  • the second drawing graphics and the first drawing graphics in the target image can exist.
  • the first drawing graphic is automatically adjusted to obtain the labeling result corresponding to the first labeling operation.
  • the efficiency of labeling the target image is improved, and the labeling time is saved.
  • the method before adjusting the first drawing graphics, the method further includes: detecting that at least one of the target images is in Whether there is a drawing graphic that overlaps with the first drawing graphic in the first drawing graphic.
  • the previously drawn graphic may be a graphic drawn before the first drawn graphic, and the previously drawn graphic may be a graphic drawn by a user, or may be a graphic obtained by other methods, for example, a neural network may be used to perform a neural network on the target image.
  • Graphics drawn after image recognition is a graphic drawn before the first drawn graphic, and the previously drawn graphic may be a graphic drawn by a user, or may be a graphic obtained by other methods, for example, a neural network may be used to perform a neural network on the target image.
  • Graphics drawn after image recognition taking the previously drawn graphic as an example of a graphic drawn by the user, after the user has finished drawing the previously drawn graphic and then the first drawn graphic, it can be detected whether the previously drawn graphic overlaps with the first drawn graphic.
  • the detection step in this implementation manner may be performed after it is determined that the drawing of the first drawing graph is completed, that is, the execution of the detecting step may be triggered after the drawing of the first drawing graph is completed, without the need for After receiving the user's instruction, no other operation of the user is required, so that the user has fewer operations and higher convenience.
  • At least one previously drawn graphic in the target image may be detected based on at least one previously drawn graphic and the position coordinates of the first drawn graphic in the target image. Whether there is a drawing graph that overlaps with the first drawing graph in the graph.
  • the graphics drawn in the embodiments of the present disclosure may be border graphics or filled graphics.
  • the border graphic may be a graphic including only the lines of the border
  • the filled graphic may be a graphic including the border and the content filled in the border.
  • both the previously drawn graph and the first drawn graph are border graphs
  • Part of the frame when it is determined that at least part of the frame of the previously drawn figure exists in the frame of the first drawn figure, it is determined that there is a drawing figure that overlaps with the first drawn figure in the previously drawn figure.
  • the set it is determined that there is a drawing pattern that overlaps with the first drawing pattern in the preceding drawing pattern.
  • both the previously drawn graph and the first drawn graph are filled graphs, it can be determined whether there are pixels with the same coordinates in the previously drawn graph and the first drawn graph. When there are pixels with the same coordinates, it is determined that there is a drawing pattern that overlaps with the first drawing pattern in the previously drawn pattern.
  • the method before adjusting the first drawing graph, the method further includes: receiving a first user instruction, where the first user instruction is used to instruct the first drawing graph to be adjusted Adjustment.
  • the user instructs the terminal device or the server to adjust the first drawing graphic by issuing the first user instruction.
  • the user may issue the first user instruction by operating a specific control in an application program of the terminal device. For example, after drawing the first drawing graphic, the user can perform a specified operation on a specific control of the application operation interface to issue the first user instruction, the control can be displayed on the interface in the form of a touch button, and the specified operation can be It is a click operation or other operation. After the specified operation is detected, the application will be triggered to automatically adjust the first drawn graphic.
  • the user may also send the first user instruction through a network connection (eg, connecting to a server through a specific URL link), or send the first user instruction through other means, which is not limited in this embodiment of the present disclosure.
  • the first drawing pattern after receiving the first user instruction, it may be detected whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image, and when it is detected that there is a drawing figure that overlaps with the first drawing figure in the target image In the case that there is a partially overlapped drawing pattern in the first drawing pattern, the first drawing pattern is automatically adjusted.
  • a prompt is sent to the user in the user interface of the terminal device, prompting the user that there is a second drawing graphics overlapping with the first drawing graphics, and the user can choose whether to automatically adjust the first drawing graphics.
  • the user can issue a first user instruction to instruct to automatically adjust the first drawing graphic.
  • the first drawing graph and the second drawing graph having the overlapping portion can be displayed in a display style different from other drawing graphs, for the convenience of users.
  • the first drawing graph and the second drawing graph with overlapping parts may be displayed with a red border
  • the other drawn graphs may be displayed with a gray border.
  • the adjusting the first drawing graph to obtain the labeling result corresponding to the first labeling operation includes: comparing the first drawing graph with the second drawing graph
  • the overlapping part is a drawing graph obtained by removing the first drawing graph as a labeling result corresponding to the first labeling operation.
  • the semantics of the image area indicated by the overlapping portion of the first drawing graph and the second drawing graph may be the same as the semantics of the image area indicated by the second drawing graph, but overlapped with the first image area.
  • the semantics of image regions other than parts are not the same.
  • the drawing graph obtained by removing the portion of the first drawing graph overlapping with the second drawing graph from the first drawing graph may be used as the labeling result corresponding to the first labeling operation.
  • the annotation result obtained in this way removes the image area in the first image area with the same semantics as the second image area, and the obtained first image area indicated by the first drawing graph has more accurate semantics, which can improve the neural network obtained by machine learning. Accuracy.
  • the user does not need to manually adjust the first image area, the user operates less, and the convenience is high, the efficiency of labeling the target image is improved, and the labeling time is saved.
  • the adjusting the first drawing graph to obtain the labeling result corresponding to the first labeling operation includes: the first drawing graph and the second drawing graph being: In the case of a border graphic, according to the positions of the first drawn graphic and the second drawn graphic, determine the first line segment element located in the first drawn graphic and the first Drawing a second line segment element outside the second drawing figure in the drawing; using the drawing figure formed by the first line segment element and the second line segment element as the labeling result corresponding to the first labeling operation.
  • the position of drawing the figure may be represented by the coordinates of the line segment elements that constitute the drawing figure, or it may also be represented by the coordinates of the point that constitutes the drawing figure.
  • the drawing graph can be a polygon, and the polygon can be regarded as a graph composed of line segment elements, and the position of the line segment element can be represented by the coordinates of the line segment endpoints.
  • the line segment element can be represented as (x 1 , y 1 , x 2 , y 2 ), (x 1 , y 1 ) and (x 2 , y 2 ) represent the coordinates of the two vertices of the line element, respectively. Then the coordinates of the multiple line segment elements constituting the drawing graph can represent the position of drawing the graph.
  • the frame of the drawing graph is composed of a series of point sets.
  • the drawing graph can be regarded as a set composed of pixel points, and the coordinates of the pixel points constituting the drawing graph can represent the position of drawing the graph. .
  • the user can detect the coordinates of the drawing tool used for drawing graphics in the target image in the process of drawing, and then obtain the coordinates of pixel points and/or the coordinates of endpoints of line segment elements constituting the drawn graphics.
  • the drawing tools here can be tools such as brushes and paint brushes, whose coordinates in the target image can be changed by moving the mouse, or can also be changed by touching the display screen/touchpad or the like.
  • the first line segment element in the second drawing graph and the first line segment element located outside the second drawing graph in the first drawing graph can be determined.
  • Two line segment elements it is also possible to determine, according to the second drawing graph and the coordinates of the end points of the line segment elements of the first drawing graph, the first line segment element located in the first drawing graph in the second drawing graph and the first line segment element in the first drawing graph and the 2. Draw the second line segment element outside the graphics.
  • the coordinate range of the first pixel that constitutes the first drawing graph can be recorded as (x min ⁇ x max , y min ⁇ y max ), if the x value of the coordinates of a certain pixel of the second drawing graph and the If the y value falls within the coordinate range, it can be determined that the pixel point is located in the first drawing figure, otherwise, it can be determined that the pixel point is outside the first drawing figure. In this way, the first line segment element in the second drawing graph which is located in the first drawing graph and the second line segment element in the first drawing graph which is outside the second drawing graph can be determined.
  • both the x-value and y-value of the coordinates of the end point of the line segment element of the second drawing graph fall within the above coordinate range, it can be determined that the end point is located in the first drawing graph; otherwise, it can be determined that the end point is located in the first drawing graph.
  • the intersection of the line segment elements of the first graphics and the second graphics can also be determined.
  • the endpoints of the line segment elements of the second drawing graph can determine the first line segment element in the second drawing graph that is located in the first drawing graph and the second line segment that is outside the second drawing graph in the first drawing graph. element.
  • the drawing figure formed by the first line segment element and the second line segment element can be used as the labeling result corresponding to the first labeling operation.
  • the set of line segment elements of P1 can be expressed as ⁇ a 1 a 2 , a 2 b 3 , b 3 a 4 , a 4 a 3 , a 3 b 2 , b 2 a 1 ⁇
  • the set of line segment elements of P2 can be expressed as ⁇ b 1 b 2 , b 2 b 3 , b 3 b 4 , b 4 b 5 , b 5 b 6 , b 6 b 7 ,b 7 b 1 ⁇ , where a 1 -a 4 and b 1 -b 7 are the endpoints of the line segment.
  • the line segment elements ⁇ b 3 a 4 , a 4 a 3 , a 3 b 2 ⁇ of P1 are located in P2, ⁇ b 1 b 2 , b 3 b 4 , b 4 b 5 , b 5 b 6 , b 6 b 7 ,b 7 b 1 ⁇ is located outside P2.
  • the segment elements ⁇ b 3 a 4 , a 4 a 3 , a 3 b 2 ⁇ and ⁇ b 1 b 2 , b 3 b 4 , b 4 b 5 , b 5 b 6 , b 6 can be combined
  • the drawing graph formed by b 7 , b 7 b 1 ⁇ is used as the labeling result corresponding to the first labeling operation, and the set of line segment elements of the second drawing graph can remain unchanged.
  • the drawing graph composed of the first line segment element and the second line segment element can be used as the first label
  • the labeling result corresponding to the operation can quickly obtain the labeling result of the first labeling operation, which improves the efficiency of the labeling operation and provides a better user experience.
  • the method further includes: displaying the target image and the first drawing graphics of the target image on a display interface multiple drawing graphics including the drawing; receiving a second user instruction, the second user instruction is used to select the first drawing graphic from the multiple drawing graphics; according to the second user instruction on the display interface The position indicated in the display interface and the positions of the plurality of drawing graphics in the display interface determine the selected first drawing graphics.
  • the user selects the first drawing figure from the plurality of drawing figures by issuing a second user instruction.
  • the user may select the first drawing graphic by performing a selection operation on the drawing graphic in the target image.
  • the user can determine the position indicated by the mouse or the touch point in the display interface when the second instruction is triggered, and the positions of multiple drawing graphics in the display interface can also be drawn after the graphics are drawn. Determine, when it is determined that the position indicated by the second user instruction is located inside the first drawing graphic, the selected first drawing graphic can be determined.
  • the first drawing graphic selected by the second user instruction can be determined.
  • the user may also select the first drawing graphic by selecting information such as the identifier of the drawing graphic, which will not be described in detail in this disclosure.
  • the user implements the designation operation on the first drawing graph by issuing a second user instruction, and the user can independently specify the first drawing graph to be adjusted, which is convenient for the user to adjust the drawing graph that needs to be adjusted. It can improve the accuracy of the neural network obtained by machine learning, and can meet the needs of diverse users, and the user experience is better.
  • semantic segmentation is an important research content in the field of computer vision.
  • Image semantic segmentation can be applied to many application scenarios, such as target recognition, target detection and other fields.
  • semantic segmentation an image can be divided into regions with different semantic information. For example, after semantic segmentation of an image, semantic labels can be added to objects in the image (such as sky, lawn, people, trees, small animals, etc.) .
  • the present disclosure provides a possible implementation manner, in which the first labeling operation is used to perform semantic segmentation labeling on the target image.
  • the semantics of the image area indicated by the overlapping portion of the first drawing graph and the second drawing graph may be the same as the semantics of the image area indicated by the second drawing graph, and the semantics of the image area other than the overlapping portion of the first image area.
  • the first image area is the area where the lawn is located, but includes the legs that block the lawn
  • the second image area is the area where the person in the image is located.
  • removing the overlapped part from the first drawing graph can obtain more accurate semantics of the first image region indicated by the first drawing graph, which can improve the accuracy of the neural network obtained by machine learning.
  • the user draws the second drawing graph, if the user has marked the boundary line between the two semantic units by drawing the second drawing graph, in the process of drawing the first drawing graph, the user does not need to draw the two semantic units again.
  • the boundary line between the two semantic units does not require the user to manually adjust the first drawn graphic, the user operation is less, the convenience is high, the efficiency of labeling the target image is improved, and the labeling time is saved.
  • the target image is displayed on a web interface
  • the web interface may be, for example, a web interface encoded in HTML5 language.
  • the graphics can be drawn through the canvas (Canvas) in HTML5, so as to realize the annotation of the target image.
  • the first labeling operation is used to perform semantic segmentation and labeling on the target image as a specific application scenario of the present disclosure, and the labeling method provided by the present disclosure will be exemplified.
  • the labeling method provided by the present disclosure will be exemplified.
  • the labeling method provided by the present disclosure includes:
  • Step 201 displaying the target image through a web page.
  • Step 202 drawing graphics on the target image through a canvas (Canvas) in HTML5, to obtain a plurality of drawing graphics.
  • Drawing graphics can be polygons, and the process of drawing graphics is as follows:
  • the creation of polygon points is realized through the mouse button release event (mouseup) in JavaScript language. Specifically, after the user clicks the left button (presses the left button and then releases it), the user responds operation, the canvas can create the starting point of a new graph, or add new polygon vertices to the newly created graph. After the user clicks the right button (presses the right button and then releases it), in response to the user operation that the right button is released, the canvas can The start and end points of the graph are connected to achieve the closure of the created polygon.
  • the position of the mouse in the browser is captured to determine the position of the user's operation on the target image, so as to determine the drawn graphics drawn by the user in the target image. on the location.
  • the drawing graph includes a plurality of drawing graphs, and the drawing graph is a graph drawn by the user for the region in the target image to be marked.
  • Step 203 Receive a selection operation instruction, and determine the first drawing graphic according to the selection operation instruction.
  • the selection operation instruction is used to select a graphic to be adjusted and processed from a plurality of drawing graphics, and the selection operation instruction is the second user instruction described above, and the graphic to be adjusted is referred to as the first drawing graphic here.
  • the selection operation instruction on the webpage when it is determined that the position indicated by the selection operation instruction on the webpage is inside the first drawing graphic, the selection can be determined.
  • the first drawn graph when it is determined that the position indicated by the selection operation instruction on the webpage is inside the first drawing graphic, the selection can be determined.
  • Step 204 receiving an adjustment operation instruction.
  • the adjustment operation instruction is used to instruct to perform adjustment processing on the first drawing graphic in the web page, and the division operation instruction is the first user instruction described above.
  • Step 205 in response to the adjustment operation instruction, detect whether there is a second drawing graphic that overlaps with the first drawing graphic among the plurality of drawing graphics in the target image.
  • the first drawing graphics and the second drawing graphics have overlapping parts.
  • the content of the image is a person standing on the lawn, and the legs of the person in the image cover part of the lawn.
  • the first drawing graphics drawn by the user can be the area where the lawn is located.
  • the edge of the lawn is usually relatively straight, rather than an irregular shape, in order to facilitate the user to quickly draw the first drawing, the first drawing includes the area of the person's legs in the lawn, and the second drawing can be the area where people are located.
  • Step 206 Remove the overlapping portion of the first drawing graph and the second drawing graph from the first drawing graph to obtain an adjustment result.
  • the first drawing figure is a border figure
  • the positions of the first drawing figure and the second drawing figure it can be determined that the first line segment element in the first drawing figure and the first drawing figure in the second drawing figure are located in the first drawing figure.
  • the area in the second drawing graph is removed from the adjustment result of the first drawing graph, which is used to mark the semantic units in the target image.
  • the boundary line between two semantic units is drawn, in the process of drawing another semantic unit, there is no need for the user to draw the boundary line between the two semantic units, which improves the efficiency of labeling and saves time for labeling.
  • the labeling method may be performed by an electronic device such as a terminal device or a server
  • the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone , Personal Digital Assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc.
  • the method can be implemented by the processor calling the computer-readable instructions stored in the memory.
  • the method may be performed by a server.
  • present disclosure also provides labeling devices, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any labeling method provided by the present disclosure. Repeat.
  • FIG. 7 shows a block diagram of an annotation apparatus according to an embodiment of the present disclosure. As shown in FIG. 7 , the apparatus includes:
  • a receiving module 301 configured to receive a first annotation operation on a target image, wherein the first annotation operation is used to draw a first drawing graphic indicating a first image area in the target image;
  • the adjustment module 302 is configured to adjust the first drawn graphic under the condition that the second drawn graphic in the target image and the first drawn graphic at least partially overlap, so as to obtain the corresponding first annotation operation labeling results.
  • the apparatus further includes:
  • a detection module configured to detect whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image.
  • the apparatus further includes:
  • a first user instruction receiving module configured to receive a first user instruction, where the first user instruction is used to instruct to adjust the first drawing graphic.
  • the adjustment module 302 is configured to remove the drawn graphic obtained by removing the portion of the first drawn graphic that overlaps with the second drawn graphic from the first drawn graphic, as the labeling result corresponding to the first labeling operation.
  • the adjustment module 302 is configured to, in the case that the first drawing graph and the second drawing graph are border graphs, according to the first drawing graph and the second drawing graph The position of the drawing figure, determining the first line segment element located in the first drawing figure in the second drawing figure and the second line segment element outside the second drawing figure in the first drawing figure; The drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
  • the apparatus further includes:
  • a display module configured to display the target image and a plurality of drawing graphics including the first drawing graphics of the target image on a display interface
  • a second user instruction receiving module configured to receive a second user instruction, where the second user instruction is used to select the first drawing graphic from the plurality of drawing graphics;
  • a determining module configured to determine the selected first drawing graphics according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
  • the target image is displayed on a web interface.
  • the first labeling operation is used to perform semantic segmentation labeling on the target image.
  • the functions or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments, and the specific implementation and technical effects may refer to the above method embodiments. It is concise and will not be repeated here.
  • Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
  • Embodiments of the present disclosure also provide a computer program product, including computer-readable codes.
  • a processor in the device executes instructions for implementing the labeling method provided in any of the above embodiments. .
  • An embodiment of the present disclosure further provides another computer program product for storing computer-readable instructions, which, when executed, cause the computer to perform the operations of the labeling method provided in any of the foregoing embodiments.
  • the electronic device may be provided as a terminal, server or other form of device.
  • FIG. 8 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure.
  • electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
  • an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
  • the processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above.
  • processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components.
  • processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
  • Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic or Optical Disk Magnetic Disk
  • Power supply assembly 806 provides power to various components of electronic device 800 .
  • Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
  • Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action.
  • the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
  • Audio component 810 is configured to output and/or input audio signals.
  • audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode.
  • the received audio signal may be further stored in memory 804 or transmitted via communication component 816.
  • audio component 810 also includes a speaker for outputting audio signals.
  • the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
  • Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 .
  • the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 .
  • Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
  • Sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications.
  • CMOS complementary metal oxide semiconductor
  • CCD charge coupled device
  • the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices.
  • the electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof.
  • the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A programmed gate array
  • controller microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
  • a non-volatile computer-readable storage medium such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
  • FIG. 9 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure.
  • the electronic device 1900 may be provided as a server.
  • electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications.
  • An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions.
  • the processing component 1922 is configured to execute instructions to perform the above-described methods.
  • the electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 .
  • the electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server TM ), a graphical user interface based operating system (Mac OS X TM ) introduced by Apple, a multi-user multi-process computer operating system (Unix TM ), Free and Open Source Unix-like Operating System (Linux TM ), Open Source Unix-like Operating System (FreeBSD TM ) or the like.
  • Microsoft server operating system Windows Server TM
  • Mac OS X TM graphical user interface based operating system
  • Uniix TM multi-user multi-process computer operating system
  • Free and Open Source Unix-like Operating System Linux TM
  • FreeBSD TM Open Source Unix-like Operating System
  • a non-volatile computer-readable storage medium such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
  • the present disclosure may be a system, method and/or computer program product.
  • the computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • flash memory static random access memory
  • SRAM static random access memory
  • CD-ROM compact disk read only memory
  • DVD digital versatile disk
  • memory sticks floppy disks
  • mechanically coded devices such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above.
  • Computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
  • the computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages.
  • Source or object code written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect).
  • LAN local area network
  • WAN wide area network
  • custom electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs) can be personalized by utilizing state information of computer readable program instructions.
  • Computer readable program instructions are executed to implement various aspects of the present disclosure.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the computer program product can be specifically implemented by hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
  • a software development kit Software Development Kit, SDK

Abstract

Provided are a labeling method and apparatus, electronic device, and storage medium, said method comprising: receiving a first operation to label a target image (S11), said first label operation being used for drawing a first drawn graphic indicating a first image region in said target image; if a second drawn graphic in said target image overlaps at least partially with said first drawn graphic, then adjusting the first drawn graphic to obtain a labeling result corresponding to the first label operation (S12).

Description

标注方法及装置、电子设备和存储介质Labeling method and device, electronic device and storage medium 技术领域technical field
本公开涉及计算机技术领域,尤其涉及一种标注方法及装置、电子设备和存储介质。The present disclosure relates to the field of computer technologies, and in particular, to a labeling method and apparatus, an electronic device, and a storage medium.
背景技术Background technique
在人工智能领域中,可以通过训练神经网络来自动识别和理解图像中包含的信息,在对神经网络进行训练的过程中,往往会通过标注好的图像进行训练。In the field of artificial intelligence, neural networks can be trained to automatically identify and understand the information contained in images. In the process of training neural networks, labeled images are often used for training.
在对图像进行标注的过程中,往往会通过在图像上绘制图形来确定标注的区域。In the process of annotating an image, the annotated area is often determined by drawing graphics on the image.
发明内容SUMMARY OF THE INVENTION
本公开提出了一种标注方案。The present disclosure proposes an annotation scheme.
根据本公开的一方面,提供了一种标注方法,包括:According to an aspect of the present disclosure, a labeling method is provided, comprising:
接收对目标图像的第一标注操作,其中,所述第一标注操作用于在所述目标图像中绘制指示第一图像区域的第一绘制图形;receiving a first annotation operation on the target image, wherein the first annotation operation is used to draw a first drawing graphic indicating a first image area in the target image;
在所述目标图像中的第二绘制图形与所述第一绘制图形存在至少部分重叠的情况下,对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果。In the case that the second drawing graphic in the target image and the first drawing graphic at least partially overlap, the first drawing graphic is adjusted to obtain a labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,在对所述第一绘制图形进行调整之前,所述方法还包括:In a possible implementation manner, before adjusting the first drawing graph, the method further includes:
检测所述目标图像中的至少一个在先绘制图形中是否存在与所述第一绘制图形存在重叠部分的绘制图形。Detecting whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image.
在一种可能的实现方式中,在对所述第一绘制图形进行调整之前,所述方法还包括:In a possible implementation manner, before adjusting the first drawing graph, the method further includes:
接收第一用户指令,所述第一用户指令用于指示对所述第一绘制图形进行调整。A first user instruction is received, where the first user instruction is used to instruct to adjust the first drawing graphic.
在一种可能的实现方式中,所述对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果,包括:In a possible implementation manner, the adjusting the first drawing graphic to obtain the labeling result corresponding to the first labeling operation includes:
将所述第一绘制图形中与所述第二绘制图形重叠的部分从所述第一绘制图形中去除所得到的绘制图形,作为所述第一标注操作对应的标注结果。A drawing graph obtained by removing the portion of the first drawing graph overlapping the second drawing graph from the first drawing graph is taken as a labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,所述对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果,包括:In a possible implementation manner, the adjusting the first drawing graphic to obtain the labeling result corresponding to the first labeling operation includes:
在所述第一绘制图形和所述第二绘制图形为边框图形的情况下,根据所述第一绘制图形与所述第二绘制图形的位置,确定所述第二绘制图形中位于所述第一绘制图形内的第一线段元素以及所述第一绘制图形中位于所述第二绘制图形之外的第二线段元素;In the case where the first drawing graph and the second drawing graph are border graphs, determine, according to the positions of the first drawing graph and the second drawing graph, that the second drawing graph is located in the first drawing graph. a first line segment element in the drawing figure and a second line segment element in the first drawing figure outside the second drawing figure;
将所述第一线段元素以及所述第二线段元素构成的绘制图形作为所述第一标注操作对应的标注结果。The drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,在所述接收对目标图像的第一标注操作后,所述方法还包括:In a possible implementation manner, after the receiving the first labeling operation on the target image, the method further includes:
在显示界面显示所述目标图像以及所述目标图像的包括所述第一绘制图形在内的多 个绘制图形;Displaying the target image and a plurality of drawing graphics including the first drawing graphics of the target image on the display interface;
接收第二用户指令,所述第二用户指令用于从所述多个绘制图形中选取所述第一绘制图形;receiving a second user instruction, where the second user instruction is used to select the first drawing graphic from the plurality of drawing graphics;
根据所述第二用户指令在所述显示界面中指示的位置以及所述显示界面中的所述多个绘制图形的位置,确定选取的所述第一绘制图形。The selected first drawing graphic is determined according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
在一种可能的实现方式中,所述目标图像显示于网页界面。In a possible implementation manner, the target image is displayed on a web interface.
在一种可能的实现方式中,所述第一标注操作用于对所述目标图像进行语义分割标注。In a possible implementation manner, the first labeling operation is used to perform semantic segmentation labeling on the target image.
根据本公开的一方面,提供了一种标注装置,包括:According to an aspect of the present disclosure, there is provided a labeling device, comprising:
接收模块,用于接收对目标图像的第一标注操作,其中,所述第一标注操作用于在所述目标图像中绘制指示第一图像区域的第一绘制图形;a receiving module, configured to receive a first annotation operation on the target image, wherein the first annotation operation is used to draw a first drawing graphic indicating a first image area in the target image;
调整模块,用于在所述目标图像中的第二绘制图形与所述第一绘制图形存在至少部分重叠的情况下,对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果。An adjustment module, configured to adjust the first drawing graph in the case where the second drawing graph in the target image and the first drawing graph at least partially overlap to obtain the corresponding value of the first labeling operation Label the results.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
检测模块,用于检测所述目标图像中的至少一个在先绘制图形中是否存在与所述第一绘制图形存在重叠部分的绘制图形。A detection module, configured to detect whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
第一用户指令接收模块,用于接收第一用户指令,所述第一用户指令用于指示对所述第一绘制图形进行调整。A first user instruction receiving module, configured to receive a first user instruction, where the first user instruction is used to instruct to adjust the first drawing graphic.
在一种可能的实现方式中,所述调整模块,用于将所述第一绘制图形中与所述第二绘制图形重叠的部分从所述第一绘制图形中去除所得到的绘制图形,作为所述第一标注操作对应的标注结果。In a possible implementation manner, the adjustment module is configured to remove the drawn graphic obtained by removing the portion of the first drawn graphic that overlaps with the second drawn graphic from the first drawn graphic, as The labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,所述调整模块,用于在所述第一绘制图形和所述第二绘制图形为边框图形的情况下,根据所述第一绘制图形与所述第二绘制图形的位置,确定所述第二绘制图形中位于所述第一绘制图形内的第一线段元素以及所述第一绘制图形中位于所述第二绘制图形之外的第二线段元素;将所述第一线段元素以及所述第二线段元素构成的绘制图形作为所述第一标注操作对应的标注结果。In a possible implementation manner, the adjustment module is configured to, in the case that the first drawing graph and the second drawing graph are border graphs, according to the first drawing graph and the second drawing graph the position of the graphic, determining the first line segment element in the second drawing graphic that is located in the first drawing graphic and the second line segment element in the first drawing graphic that is located outside the second drawing graphic; The drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the apparatus further includes:
显示模块,用于在显示界面显示所述目标图像以及所述目标图像的包括所述第一绘制图形在内的多个绘制图形;a display module, configured to display the target image and a plurality of drawing graphics including the first drawing graphics of the target image on a display interface;
第二用户指令接收模块,用于接收第二用户指令,所述第二用户指令用于从所述多个绘制图形中选取所述第一绘制图形;a second user instruction receiving module, configured to receive a second user instruction, where the second user instruction is used to select the first drawing graphic from the plurality of drawing graphics;
确定模块,用于根据所述第二用户指令在所述显示界面中指示的位置以及所述显示界面中的所述多个绘制图形的位置,确定选取的所述第一绘制图形。A determining module, configured to determine the selected first drawing graphics according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
在一种可能的实现方式中,所述目标图像显示于网页界面。In a possible implementation manner, the target image is displayed on a web interface.
在一种可能的实现方式中,所述第一标注操作用于对所述目标图像进行语义分割标注。In a possible implementation manner, the first labeling operation is used to perform semantic segmentation labeling on the target image.
根据本公开的一方面,提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。According to an aspect of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
根据本公开的一方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。According to an aspect of the present disclosure, there is provided a computer-readable storage medium having computer program instructions stored thereon, the computer program instructions implementing the above method when executed by a processor.
根据本公开的一方面,本公开提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行上述方法。According to an aspect of the present disclosure, the present disclosure provides a computer program comprising computer-readable code, when the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.
在本公开实施例中,在对目标图像进行标注的过程中,针对用户对目标图像的第一标注操作绘制的第一绘制图形,能够在目标图像中的第二绘制图形与第一绘制图形存在至少部分重叠的情况下,对第一绘制图形自动进行调整,得到第一标注操作对应的标注结果。相对于人工手动调整第一绘制图形而言,提高了对目标图像进行标注的效率,节省了标注的时间。尤其是对于第二绘制图形的外部轮廓相对复杂的情况而言,用户无需针对相同的轮廓部分进行额外手动调整,减少了用户重复部分标注过程所带来的资源消耗。In the embodiment of the present disclosure, in the process of labeling the target image, for the first drawing graphics drawn by the user's first labeling operation on the target image, the second drawing graphics and the first drawing graphics in the target image can exist. In the case of at least partial overlap, the first drawing graphic is automatically adjusted to obtain the labeling result corresponding to the first labeling operation. Compared with manually adjusting the first drawing graph manually, the efficiency of labeling the target image is improved, and the labeling time is saved. Especially in the case where the outer contour of the second drawing graph is relatively complex, the user does not need to perform additional manual adjustment for the same contour portion, which reduces the resource consumption caused by the user repeating the partial labeling process.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings, which are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present disclosure, and together with the description, serve to explain the technical solutions of the present disclosure.
图1示出根据本公开实施例的标注方法的流程图。FIG. 1 shows a flowchart of a labeling method according to an embodiment of the present disclosure.
图2示出根据本公开实施例的绘制图形的示意图。FIG. 2 shows a schematic diagram of drawing a graph according to an embodiment of the present disclosure.
图3示出根据本公开实施例的标注结果的示意图。FIG. 3 shows a schematic diagram of an annotation result according to an embodiment of the present disclosure.
图4示出根据本公开实施例的绘制图形的示意图。FIG. 4 shows a schematic diagram of drawing a graph according to an embodiment of the present disclosure.
图5示出根据本公开实施例的标注结果的示意图。FIG. 5 shows a schematic diagram of an annotation result according to an embodiment of the present disclosure.
图6示出根据本公开实施例的标注方法的流程图。FIG. 6 shows a flowchart of an annotation method according to an embodiment of the present disclosure.
图7示出根据本公开实施例的标注装置的框图。FIG. 7 shows a block diagram of an annotation apparatus according to an embodiment of the present disclosure.
图8示出根据本公开实施例的一种电子设备的框图。FIG. 8 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
图9示出根据本公开实施例的一种电子设备的框图。FIG. 9 shows a block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式Detailed ways
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的 附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements with the same or similar function. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article is only an association relationship to describe the associated objects, indicating that there can be three kinds of relationships, for example, A and/or B, it can mean that A exists alone, A and B exist at the same time, and A and B exist independently B these three cases. In addition, the term "at least one" herein refers to any combination of any one of the plurality or at least two of the plurality, for example, including at least one of A, B, and C, and may mean including from A, B, and C. Any one or more elements selected from the set of B and C.
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本公开同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。In addition, in order to better illustrate the present disclosure, numerous specific details are set forth in the following detailed description. It will be understood by those skilled in the art that the present disclosure may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present disclosure.
图1示出根据本公开实施例的标注方法的流程图,如图1所示,所述标注方法包括:FIG. 1 shows a flowchart of a labeling method according to an embodiment of the present disclosure. As shown in FIG. 1 , the labeling method includes:
在步骤S11中,接收对目标图像的第一标注操作,其中,所述第一标注操作用于在所述目标图像中绘制指示第一图像区域的第一绘制图形。In step S11, a first labeling operation on the target image is received, wherein the first labeling operation is used to draw a first drawing graphic indicating a first image area in the target image.
目标图像可以是要进行标注的图像,该图像可以是任意格式的图像,本公开实施例对此不作限定。可选地,目标图像可以是用来进行机器学习的样本图像,样本图像可以在标注后用于机器学习中的有监督学习。The target image may be an image to be marked, and the image may be an image in any format, which is not limited in this embodiment of the present disclosure. Optionally, the target image can be a sample image used for machine learning, and the sample image can be used for supervised learning in machine learning after labeling.
诸如标注员等用户可以通过第一标注操作对目标图像中的第一图像区域进行标注。在一些实施例中,用户可以通过绘制图形来确定要进行标注的第一图像区域,可选的,用户绘制的图形可以是多边形,也可以是圆形,所绘制的图形可以是规则或是不规则图形,本公开实施例对此不作限定。用户可以通过对第一图像区域添加标注信息,来赋予确定的第一图像区域中的图像信息以语义层面的含义。A user such as an annotator can annotate the first image area in the target image through the first annotation operation. In some embodiments, the user can determine the first image area to be marked by drawing a graph. Optionally, the graph drawn by the user can be a polygon or a circle, and the drawn graph can be regular or irregular. A regular graph, which is not limited in this embodiment of the present disclosure. The user may add meanings at the semantic level to the image information in the determined first image area by adding annotation information to the first image area.
例如,目标图像中的内容为人站在草坪中,用户在对草坪进行标注的过程中,可以绘制出与草坪所在的图像区域的形状匹配的绘制图形,然后对绘制出的该绘制图形添加标注信息“草坪”,来赋予被选中的图像区域“草坪”的语义。For example, the content in the target image is a person standing on the lawn. During the process of labeling the lawn, the user can draw a drawing that matches the shape of the image area where the lawn is located, and then add annotation information to the drawn drawing. "Lawn" to give the selected image area "Lawn" semantics.
在步骤S12中,在所述目标图像中的第二绘制图形与所述第一绘制图形存在至少部分重叠的情况下,对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果。In step S12, in the case that the second drawing graphic in the target image and the first drawing graphic at least partially overlap, adjust the first drawing graphic to obtain the corresponding image of the first labeling operation. Label the results.
第二绘制图形也可以是用户绘制的图形,或者也可以是由其它方式得到的图形,例如,可以是通过神经网络对目标图像进行图像识别后绘制的图形。The second drawing graph can also be a graph drawn by the user, or can also be a graph obtained in other ways, for example, can be a graph drawn after performing image recognition on the target image through a neural network.
在一种可能的实现方式中,第二绘制图形可以是用户指定的绘制图形,即在第一绘制图形与用户指定的第二绘制图形存在至少部分重叠的情况下,对第一绘制图形进行自动调整。用户可以通过对目标图像中的绘制图形进行选中操作,来指定第二绘制图形,或者,用户也可以通过选中绘制图形的标识等信息来指定第二绘制图形,对于指定第二绘制图形的具体实现方式,本公开实施例不作限定。In a possible implementation manner, the second drawing graph may be a drawing graph specified by a user, that is, when the first drawing graph and the second drawing graph specified by the user at least partially overlap, the first drawing graph is automatically Adjustment. The user can specify the second drawing graph by selecting the drawing graph in the target image, or the user can also specify the second drawing graph by selecting the information such as the logo of the drawing graph. manner, which is not limited in the embodiments of the present disclosure.
在一种可能的实现方式中,第二绘制图形也可以是目标图像中包含的绘制图形中的一个或多个绘制图形,例如,第二绘制图形可以是目标图像包含的绘制图形中与第一绘制图形存在至少部分重叠的绘制图形,这样,当目标图像中存在与第一绘制图形存在至少部分重叠的绘制图形的情况下,即对第一绘制图形进行自动调整,无需用户指定,提高了用户使用的便利性。In a possible implementation manner, the second drawing graphics may also be one or more drawing graphics among the drawing graphics included in the target image. For example, the second drawing graphics may be the same as the first drawing graphics included in the target image. There are at least partially overlapping drawing graphics in the drawing graphics. In this way, when there is a drawing graphics which at least partially overlap with the first drawing graphics in the target image, the first drawing graphics is automatically adjusted without user specification, which improves the user experience. Ease of use.
第一绘制图形与第二绘制图形存在至少部分重叠,可以是第二绘制图形和第一绘制图形所指示的图像区域存在至少部分相同的区域。例如,请参考图2,目标图像的画面内容为人站在草坪中,下方多边形(第一绘制图形)框选的区域为草坪区域,最左侧的多边形(第二绘制图形)框选的区域为人像,人像的腿部遮挡了部分草坪,腿部以外的人像未遮挡草坪。第一绘制图形包含了草坪所在的图像区域,也包含了遮挡部分草坪的腿部所在的图像区域,第二绘制图形包含了人像所在的图像区域,显然,第一绘制图形与第二绘制图形中存在部分重叠。The first drawing graphic and the second drawing graphic at least partially overlap, and it may be that the second drawing graphic and the image area indicated by the first drawing graphic exist at least partially the same area. For example, please refer to Figure 2, the screen content of the target image is a person standing in the lawn, the area selected by the polygon (the first drawing figure) below is the lawn area, and the area selected by the leftmost polygon (the second drawing figure) is For portraits, the legs of the portraits cover part of the lawn, and the portraits other than the legs do not cover the lawn. The first drawing includes the image area where the lawn is located, and also includes the image area where the legs that block part of the lawn are located. The second drawing includes the image area where the portrait is located. Obviously, the first drawing and the second drawing are in the image area. There is some overlap.
在第一绘制图形与第二绘制图形存在部分重叠的情况下,可以对第一绘制图形进行自动调整,具体调整的方式可以有多种,例如,可以将重叠的部分从第一绘制图形中去除,得到去除重叠部分的第一绘制图形,或者,可以减少第一绘制图形中的重叠部分。例如,请参考图3,在将第一绘制图形中的重叠部分去除后,得到的调整后的第一绘制图形如图3所示,第一绘制图形中已经不再包含第二绘制图形中遮挡草坪的腿部。In the case that the first drawing graph and the second drawing graph partially overlap, the first drawing graph can be adjusted automatically, and the specific adjustment methods can be various, for example, the overlapping part can be removed from the first drawing graph , to obtain the first drawing figure with the overlapping part removed, or the overlapping part in the first drawing figure can be reduced. For example, please refer to FIG. 3 , after removing the overlapping part in the first drawing graph, the adjusted first drawing graph obtained is shown in FIG. 3 , the first drawing graph no longer includes the occlusion in the second drawing graph Lawn Legs.
在对第一绘制图形调整完成后,可以将调整后的第一绘制图形所标注的图像区域作为第一标注操作标注的图像区域,得到所述第一标注操作对应的标注结果。标注后的目标图像即可用于机器学习中的有监督学习,在本公开实施例中,通过去除或减少第一绘制图形中的重叠部分,去除或减少了第一绘制图形中的干扰信息,能够提高机器学习得到的神经网络的准确度。After the adjustment of the first drawing graphic is completed, the image area marked by the adjusted first drawing graphic may be used as the image area marked by the first marking operation, and the marking result corresponding to the first marking operation is obtained. The annotated target image can be used for supervised learning in machine learning. In the embodiment of the present disclosure, by removing or reducing the overlapping part in the first drawing graph, the interference information in the first drawing graph is removed or reduced, which can Improve the accuracy of neural networks derived from machine learning.
在本公开实施例中,在对目标图像进行标注的过程中,针对用户对目标图像的第一标注操作绘制的第一绘制图形,能够在目标图像中的第二绘制图形与第一绘制图形存在至少部分重叠的情况下,对第一绘制图形进行自动调整,得到第一标注操作对应的标注结果。相对于人工手动调整第一绘制图形而言,提高了对目标图像进行标注的效率,节省了标注的时间。In the embodiment of the present disclosure, in the process of labeling the target image, for the first drawing graphics drawn by the user's first labeling operation on the target image, the second drawing graphics and the first drawing graphics in the target image can exist. In the case of at least partial overlap, the first drawing graphic is automatically adjusted to obtain the labeling result corresponding to the first labeling operation. Compared with manually adjusting the first drawing graph manually, the efficiency of labeling the target image is improved, and the labeling time is saved.
本公开提供的视频处理方法还可以有多种,在一种可能的实现方式中,在对所述第一绘制图形进行调整之前,所述方法还包括:检测所述目标图像中的至少一个在先绘制图形中是否存在与所述第一绘制图形存在重叠部分的绘制图形。There may also be a variety of video processing methods provided by the present disclosure. In a possible implementation manner, before adjusting the first drawing graphics, the method further includes: detecting that at least one of the target images is in Whether there is a drawing graphic that overlaps with the first drawing graphic in the first drawing graphic.
在先绘制图形可以是在第一绘制图形之前绘制的图形,该在先绘制图形可以是用户绘制的图形,或者也可以是由其它方式得到的图形,例如,可以是通过神经网络对目标图像进行图像识别后绘制的图形。这里以在先绘制图形为用户绘制的图形为例,用户绘制完在先绘制图形,然后再绘制完第一绘制图形后,即可检测该在先绘制图形是否与第一绘制图形存在重叠部分。The previously drawn graphic may be a graphic drawn before the first drawn graphic, and the previously drawn graphic may be a graphic drawn by a user, or may be a graphic obtained by other methods, for example, a neural network may be used to perform a neural network on the target image. Graphics drawn after image recognition. Here, taking the previously drawn graphic as an example of a graphic drawn by the user, after the user has finished drawing the previously drawn graphic and then the first drawn graphic, it can be detected whether the previously drawn graphic overlaps with the first drawn graphic.
在一些实施例中,本实现方式中的检测步骤可以是在确定第一绘制图形绘制完毕后进行的,也就是说,可以在第一绘制图形绘制完毕后,触发该检测步骤的执行,而无需接收到用户指令,也无需用户的其它操作,这样用户操作较少,便利性较高。In some embodiments, the detection step in this implementation manner may be performed after it is determined that the drawing of the first drawing graph is completed, that is, the execution of the detecting step may be triggered after the drawing of the first drawing graph is completed, without the need for After receiving the user's instruction, no other operation of the user is required, so that the user has fewer operations and higher convenience.
本实现方式中,具体的检测过程可以有多种,可选的,可以基于至少一个在先绘制图形和第一绘制图形在目标图像中的位置坐标,来检测目标图像中的至少一个在先绘制图形中是否存在与第一绘制图形存在重叠部分的绘制图形。In this implementation manner, there may be various specific detection processes. Optionally, at least one previously drawn graphic in the target image may be detected based on at least one previously drawn graphic and the position coordinates of the first drawn graphic in the target image. Whether there is a drawing graph that overlaps with the first drawing graph in the graph.
本公开实施例中绘制的图形可以是边框图形,也可以是填充图形。其中,边框图形可以是仅包括边框的线条的图形,而填充图形可以是包括边框及边框内填充的内容的图形。The graphics drawn in the embodiments of the present disclosure may be border graphics or filled graphics. Wherein, the border graphic may be a graphic including only the lines of the border, and the filled graphic may be a graphic including the border and the content filled in the border.
在在先绘制图形和第一绘制图形均为边框图形的情况下,可以根据在先绘制图形的坐标和第一绘制图形的坐标,判断第一绘制图形的边框内是否存在在先绘制图形的至少部分边框,在确定第一绘制图形的边框内存在在先绘制图形的至少部分边框的情况下,确定在先绘制图形中存在与第一绘制图形存在重叠部分的绘制图形。另外,也可以判断第一绘制图形的边框内是否存在构成在先绘制图形的点集中的至少部分点集,在确定第一绘制图形的边框内存在构成在先绘制图形的点集中的至少部分点集的情况下,确定在先绘制图形中存在与第一绘制图形存在重叠部分的绘制图形。In the case where both the previously drawn graph and the first drawn graph are border graphs, it can be determined whether there is at least one of the previously drawn graphs in the frame of the first drawn graph according to the coordinates of the previously drawn graph and the coordinates of the first drawn graph. Part of the frame, when it is determined that at least part of the frame of the previously drawn figure exists in the frame of the first drawn figure, it is determined that there is a drawing figure that overlaps with the first drawn figure in the previously drawn figure. In addition, it is also possible to determine whether there is at least a part of the point set that constitutes the point set of the previously drawn figure in the frame of the first drawing figure, and at least part of the point set that constitutes the previously drawn figure exists in the frame of the first drawing figure. In the case of the set, it is determined that there is a drawing pattern that overlaps with the first drawing pattern in the preceding drawing pattern.
在在先绘制图形和第一绘制图形均为填充图形的情况下,可以判断在先绘制图形和第一绘制图形中是否存在坐标相同的像素点,在确定在先绘制图形和第一绘制图形中存在坐标相同的像素点的情况下,确定在先绘制图形中存在与第一绘制图形存在重叠部分的绘制图形。In the case where both the previously drawn graph and the first drawn graph are filled graphs, it can be determined whether there are pixels with the same coordinates in the previously drawn graph and the first drawn graph. When there are pixels with the same coordinates, it is determined that there is a drawing pattern that overlaps with the first drawing pattern in the previously drawn pattern.
在一种可能的实现方式中,在对所述第一绘制图形进行调整之前,所述方法还包括:接收第一用户指令,所述第一用户指令用于指示对所述第一绘制图形进行调整。In a possible implementation manner, before adjusting the first drawing graph, the method further includes: receiving a first user instruction, where the first user instruction is used to instruct the first drawing graph to be adjusted Adjustment.
用户通过发出第一用户指令,以指示终端设备或者服务器对第一绘制图形进行调整。其中,可选地,用户可以通过操作终端设备的应用程序中的特定控件来发出该第一用户指令。例如,在绘制完第一绘制图形后,用户可以对应用程序操作界面的特定控件执行指定操作,来发出第一用户指令,该控件可以以触控按钮的形式显示于界面上,该指定操作可以是点击操作或其他操作,在检测到指定操作后,即会触发应用程序对第一绘制图形进行自动调整。在一些实施例中,用户也可以通过网络连接(如通过特定URL链接连接到服务器)来发出第一用户指令,或者通过其他方式发出第一用户指令,本公开实施例对此不做限定。The user instructs the terminal device or the server to adjust the first drawing graphic by issuing the first user instruction. Wherein, optionally, the user may issue the first user instruction by operating a specific control in an application program of the terminal device. For example, after drawing the first drawing graphic, the user can perform a specified operation on a specific control of the application operation interface to issue the first user instruction, the control can be displayed on the interface in the form of a touch button, and the specified operation can be It is a click operation or other operation. After the specified operation is detected, the application will be triggered to automatically adjust the first drawn graphic. In some embodiments, the user may also send the first user instruction through a network connection (eg, connecting to a server through a specific URL link), or send the first user instruction through other means, which is not limited in this embodiment of the present disclosure.
在一些实施例中,在接收到第一用户指令后,可以检测目标图像中的至少一个在先绘制图形中是否存在与第一绘制图形存在重叠部分的绘制图形,在检测到目标图像中存在与第一绘制图形存在部分重叠的绘制图形的情况下,对第一绘制图形进行自动调整。In some embodiments, after receiving the first user instruction, it may be detected whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image, and when it is detected that there is a drawing figure that overlaps with the first drawing figure in the target image In the case that there is a partially overlapped drawing pattern in the first drawing pattern, the first drawing pattern is automatically adjusted.
或者,在一些实施例中,也可以先检测目标图像中的至少一个在先绘制图形中是否存在与第一绘制图形存在重叠部分的绘制图形,在检测到目标图像中存在与第一绘制图 形存在部分重叠的绘制图形的情况下,在终端设备的用户界面中向用户发出提示,提示用户存在与第一绘制图形重叠的第二绘制图形,由用户选择是否对第一绘制图形进行自动调整,此时,用户即可发出第一用户指令,以指示对第一绘制图形进行自动调整。Alternatively, in some embodiments, it is also possible to first detect whether there is a drawing pattern that overlaps with the first drawing pattern in at least one previously drawn pattern in the target image. In the case of partially overlapping drawing graphics, a prompt is sent to the user in the user interface of the terminal device, prompting the user that there is a second drawing graphics overlapping with the first drawing graphics, and the user can choose whether to automatically adjust the first drawing graphics. , the user can issue a first user instruction to instruct to automatically adjust the first drawing graphic.
在检测到目标图像中存在与第一绘制图形存在部分重叠的绘制图形的情况下,针对存在重叠部分的第一绘制图形和第二绘制图形,可以以区别于其他绘制图形的显示样式进行显示,以方便用户查看。例如,可以以红色边框显示存在重叠部分的第一绘制图形和第二绘制图形,以灰色边框显示其他绘制图形。In the case where it is detected that there is a drawing graph partially overlapping with the first drawing graph in the target image, the first drawing graph and the second drawing graph having the overlapping portion can be displayed in a display style different from other drawing graphs, for the convenience of users. For example, the first drawing graph and the second drawing graph with overlapping parts may be displayed with a red border, and the other drawn graphs may be displayed with a gray border.
在一种可能的实现方式中,所述对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果,包括:将所述第一绘制图形中与所述第二绘制图形重叠的部分从所述第一绘制图形中去除所得到的绘制图形,作为所述第一标注操作对应的标注结果。In a possible implementation manner, the adjusting the first drawing graph to obtain the labeling result corresponding to the first labeling operation includes: comparing the first drawing graph with the second drawing graph The overlapping part is a drawing graph obtained by removing the first drawing graph as a labeling result corresponding to the first labeling operation.
在本公开实施例中,第一绘制图形与第二绘制图形的重叠部分所指示的图像区域的语义,可以与第二绘制图形所指示的图像区域的语义相同,而与第一图像区域中重叠部分以外的图像区域的语义不相同。在这种情况下,可以将第一绘制图形中与第二绘制图形重叠的部分从第一绘制图形中去除所得到的绘制图形,作为第一标注操作对应的标注结果。这样得到的标注结果去除了第一图像区域中语义与第二图像区域相同的图像区域,得到的第一绘制图形所指示的第一图像区域的语义更准确,能够提高机器学习得到的神经网络的准确度。同时,无需用户手动对第一图像区域进行调整,用户操作较少,便利性较高,提高了对目标图像进行标注的效率,节省了标注的时间。In this embodiment of the present disclosure, the semantics of the image area indicated by the overlapping portion of the first drawing graph and the second drawing graph may be the same as the semantics of the image area indicated by the second drawing graph, but overlapped with the first image area. The semantics of image regions other than parts are not the same. In this case, the drawing graph obtained by removing the portion of the first drawing graph overlapping with the second drawing graph from the first drawing graph may be used as the labeling result corresponding to the first labeling operation. The annotation result obtained in this way removes the image area in the first image area with the same semantics as the second image area, and the obtained first image area indicated by the first drawing graph has more accurate semantics, which can improve the neural network obtained by machine learning. Accuracy. At the same time, the user does not need to manually adjust the first image area, the user operates less, and the convenience is high, the efficiency of labeling the target image is improved, and the labeling time is saved.
在一种可能的实现方式中,所述对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果,包括:在所述第一绘制图形和所述第二绘制图形为边框图形的情况下,根据所述第一绘制图形与所述第二绘制图形的位置,确定所述第二绘制图形中位于所述第一绘制图形内的第一线段元素以及所述第一绘制图形中位于所述第二绘制图形之外的第二线段元素;将所述第一线段元素以及所述第二线段元素构成的绘制图形作为所述第一标注操作对应的标注结果。In a possible implementation manner, the adjusting the first drawing graph to obtain the labeling result corresponding to the first labeling operation includes: the first drawing graph and the second drawing graph being: In the case of a border graphic, according to the positions of the first drawn graphic and the second drawn graphic, determine the first line segment element located in the first drawn graphic and the first Drawing a second line segment element outside the second drawing figure in the drawing; using the drawing figure formed by the first line segment element and the second line segment element as the labeling result corresponding to the first labeling operation.
绘制图形的位置可以由构成绘制图形的线段元素的坐标来表示,或者,也可以由构成绘制图形的点的坐标来表示。The position of drawing the figure may be represented by the coordinates of the line segment elements that constitute the drawing figure, or it may also be represented by the coordinates of the point that constitutes the drawing figure.
在一些实施例中,绘制图形可以是多边形,多边形可以视为由线段元素构成的图形,线段元素的位置可以用线段端点的坐标来表示,例如,线段元素可表示为(x 1,y 1,x 2,y 2),(x 1,y 1)和(x 2,y 2)分别表示线段元素的两个顶点的坐标。那么构成绘制图形的多个线段元素的坐标即可表示绘制图形的位置。 In some embodiments, the drawing graph can be a polygon, and the polygon can be regarded as a graph composed of line segment elements, and the position of the line segment element can be represented by the coordinates of the line segment endpoints. For example, the line segment element can be represented as (x 1 , y 1 , x 2 , y 2 ), (x 1 , y 1 ) and (x 2 , y 2 ) represent the coordinates of the two vertices of the line element, respectively. Then the coordinates of the multiple line segment elements constituting the drawing graph can represent the position of drawing the graph.
在一些实施例中,绘制图形的边框是由一系列的点集构成的,例如,可以将绘制图形视为由像素点构成的集合,构成绘制图形的像素点的坐标即可表示绘制图形的位置。In some embodiments, the frame of the drawing graph is composed of a series of point sets. For example, the drawing graph can be regarded as a set composed of pixel points, and the coordinates of the pixel points constituting the drawing graph can represent the position of drawing the graph. .
用户在绘制图形的过程中,可以检测绘制过程中用于绘制图形的绘制工具在目标图像中的坐标,即可得到构成绘制图形的像素点的坐标和/或线段元素端点的坐标。这里的 绘制工具可以是画笔、画刷等工具,其在目标图像中的坐标可以通过移动鼠标来改变,或者也可以通过触摸显示屏/触摸板等方式来改变。In the process of drawing graphics, the user can detect the coordinates of the drawing tool used for drawing graphics in the target image in the process of drawing, and then obtain the coordinates of pixel points and/or the coordinates of endpoints of line segment elements constituting the drawn graphics. The drawing tools here can be tools such as brushes and paint brushes, whose coordinates in the target image can be changed by moving the mouse, or can also be changed by touching the display screen/touchpad or the like.
可以根据第二绘制图形和第一绘制图形的像素点的坐标,确定第二绘制图形中位于第一绘制图形内的第一线段元素以及第一绘制图形中位于第二绘制图形之外的第二线段元素。或者,还可以根据第二绘制图形和第一绘制图形的线段元素的端点的坐标,确定第二绘制图形中位于第一绘制图形内的第一线段元素以及第一绘制图形中位于所述第二绘制图形之外的第二线段元素。According to the coordinates of the pixel points of the second drawing graph and the first drawing graph, the first line segment element in the second drawing graph and the first line segment element located outside the second drawing graph in the first drawing graph can be determined. Two line segment elements. Alternatively, it is also possible to determine, according to the second drawing graph and the coordinates of the end points of the line segment elements of the first drawing graph, the first line segment element located in the first drawing graph in the second drawing graph and the first line segment element in the first drawing graph and the 2. Draw the second line segment element outside the graphics.
具体来说,构成第一绘制图形的第一像素点的坐标范围可以记为(x min~x max,y min~y max),若第二绘制图形的某一像素点的坐标的x值和y值落入该坐标范围内,则可以确定该像素点位于第一绘制图形内,否则,可以确定该像素点位于第一绘制图形外。由此即可确定第二绘制图形中位于第一绘制图形内的第一线段元素以及第一绘制图形中位于所述第二绘制图形之外的第二线段元素。 Specifically, the coordinate range of the first pixel that constitutes the first drawing graph can be recorded as (x min ~x max , y min ~y max ), if the x value of the coordinates of a certain pixel of the second drawing graph and the If the y value falls within the coordinate range, it can be determined that the pixel point is located in the first drawing figure, otherwise, it can be determined that the pixel point is outside the first drawing figure. In this way, the first line segment element in the second drawing graph which is located in the first drawing graph and the second line segment element in the first drawing graph which is outside the second drawing graph can be determined.
或者,若第二绘制图形的线段元素的端点的坐标的x值和y值均落入上述坐标范围内,则可以确定该端点位于第一绘制图形内,否则,可以确定该端点位于第一绘制图形外,另外,还可以确定第一绘制图形和第二绘制图形的线段元素的交点,根据该交点以及位于第一绘制图形内的第二绘制图形的线段元素的端点和位于第一绘制图形外的第二绘制图形的线段元素的端点,即可确定第二绘制图形中位于第一绘制图形内的第一线段元素以及第一绘制图形中位于所述第二绘制图形之外的第二线段元素。Or, if both the x-value and y-value of the coordinates of the end point of the line segment element of the second drawing graph fall within the above coordinate range, it can be determined that the end point is located in the first drawing graph; otherwise, it can be determined that the end point is located in the first drawing graph. In addition to the graphics, in addition, the intersection of the line segment elements of the first graphics and the second graphics can also be determined. The endpoints of the line segment elements of the second drawing graph can determine the first line segment element in the second drawing graph that is located in the first drawing graph and the second line segment that is outside the second drawing graph in the first drawing graph. element.
在确定第一线段元素和第二线段元素后,即可将第一线段元素以及第二线段元素构成的绘制图形作为第一标注操作对应的标注结果。After the first line segment element and the second line segment element are determined, the drawing figure formed by the first line segment element and the second line segment element can be used as the labeling result corresponding to the first labeling operation.
例如,如图4所示的第一绘制图形P1和第二绘制图形P2,P1的线段元素的集合可表示为{a 1a 2,a 2b 3,b 3a 4,a 4a 3,a 3b 2,b 2a 1},P2的线段元素的集合可表示为{b 1b 2,b 2b 3,b 3b 4,b 4b 5,b 5b 6,b 6b 7,b 7b 1},其中a 1-a 4和b 1-b 7均为线段的端点。其中,P1的线段元素{b 3a 4,a 4a 3,a 3b 2}位于P2内,{b 1b 2,b 3b 4,b 4b 5,b 5b 6,b 6b 7,b 7b 1}位于P2外。如图5所示,可以将线段元素{b 3a 4,a 4a 3,a 3b 2}和{b 1b 2,b 3b 4,b 4b 5,b 5b 6,b 6b 7,b 7b 1}构成的绘制图形作为第一标注操作对应的标注结果,而第二绘制图形的线段元素的集合可以保持不变。 For example, in the first drawing graph P1 and the second drawing graph P2 shown in FIG. 4 , the set of line segment elements of P1 can be expressed as {a 1 a 2 , a 2 b 3 , b 3 a 4 , a 4 a 3 , a 3 b 2 , b 2 a 1 }, the set of line segment elements of P2 can be expressed as {b 1 b 2 , b 2 b 3 , b 3 b 4 , b 4 b 5 , b 5 b 6 , b 6 b 7 ,b 7 b 1 }, where a 1 -a 4 and b 1 -b 7 are the endpoints of the line segment. Among them, the line segment elements {b 3 a 4 , a 4 a 3 , a 3 b 2 } of P1 are located in P2, {b 1 b 2 , b 3 b 4 , b 4 b 5 , b 5 b 6 , b 6 b 7 ,b 7 b 1 } is located outside P2. As shown in Figure 5, the segment elements {b 3 a 4 , a 4 a 3 , a 3 b 2 } and {b 1 b 2 , b 3 b 4 , b 4 b 5 , b 5 b 6 , b 6 can be combined The drawing graph formed by b 7 , b 7 b 1 } is used as the labeling result corresponding to the first labeling operation, and the set of line segment elements of the second drawing graph can remain unchanged.
在本公开实施例中,在第一绘制图形和第二绘制图形为边框图形的情况下,通过根据第一绘制图形与第二绘制图形的位置,确定第二绘制图形中位于所述第一绘制图形内的第一线段元素以及第一绘制图形中位于第二绘制图形之外的第二线段元素,由此,可以将第一线段元素以及第二线段元素构成的绘制图形作为第一标注操作对应的标注结果,可以快速得到第一标注操作的标注结果,提高了标注操作的效率,用户体验较好。In this embodiment of the present disclosure, in the case where the first drawing graph and the second drawing graph are border graphs, it is determined that the second drawing graph is located in the first drawing graph according to the positions of the first drawing graph and the second drawing graph. The first line segment element in the graph and the second line segment element in the first drawing graph outside the second drawing graph, thus, the drawing graph composed of the first line segment element and the second line segment element can be used as the first label The labeling result corresponding to the operation can quickly obtain the labeling result of the first labeling operation, which improves the efficiency of the labeling operation and provides a better user experience.
在一种可能的实现方式中,在所述接收对目标图像的第一标注操作后,所述方法还包括:在显示界面显示所述目标图像以及所述目标图像的包括所述第一绘制图形在内的多个绘制图形;接收第二用户指令,所述第二用户指令用于从所述多个绘制图形中选取所述第一绘制图形;根据所述第二用户指令在所述显示界面中指示的位置以及所述显示 界面中的所述多个绘制图形的位置,确定选取的所述第一绘制图形。In a possible implementation manner, after the receiving the first annotation operation on the target image, the method further includes: displaying the target image and the first drawing graphics of the target image on a display interface multiple drawing graphics including the drawing; receiving a second user instruction, the second user instruction is used to select the first drawing graphic from the multiple drawing graphics; according to the second user instruction on the display interface The position indicated in the display interface and the positions of the plurality of drawing graphics in the display interface determine the selected first drawing graphics.
用户通过发出第二用户指令,以从所述多个绘制图形中选取所述第一绘制图形。其中,可选地,用户可以通过对目标图像中的绘制图形进行选中操作,来选取第一绘制图形。具体来说,用户在触发第二指令时,可以确定触发第二指令时鼠标或触控点在显示界面中指示的位置,而显示界面中的多个绘制图形的位置也可在图形绘制完毕后确定,当确定第二用户指令指示的位置位于第一绘制图形内部的情况下,即可确定选取的第一绘制图形。由此,即可确定第二用户指令所选取的第一绘制图形。The user selects the first drawing figure from the plurality of drawing figures by issuing a second user instruction. Wherein, optionally, the user may select the first drawing graphic by performing a selection operation on the drawing graphic in the target image. Specifically, when the user triggers the second instruction, the user can determine the position indicated by the mouse or the touch point in the display interface when the second instruction is triggered, and the positions of multiple drawing graphics in the display interface can also be drawn after the graphics are drawn. Determine, when it is determined that the position indicated by the second user instruction is located inside the first drawing graphic, the selected first drawing graphic can be determined. Thus, the first drawing graphic selected by the second user instruction can be determined.
或者,用户也可以通过选中绘制图形的标识等信息来选取第一绘制图形,本公开对此不做赘述。Alternatively, the user may also select the first drawing graphic by selecting information such as the identifier of the drawing graphic, which will not be described in detail in this disclosure.
在本公开实施例中,用户通过发出第二用户指令来实现对第一绘制图形的指定操作,可以由用户自主指定要进行调整的第一绘制图形,方便用户对需要调整的绘制图形进行调整,能够提高机器学习得到的神经网络的准确度,且能够满足多样化的用户需求,用户体验较好。In the embodiment of the present disclosure, the user implements the designation operation on the first drawing graph by issuing a second user instruction, and the user can independently specify the first drawing graph to be adjusted, which is convenient for the user to adjust the drawing graph that needs to be adjusted. It can improve the accuracy of the neural network obtained by machine learning, and can meet the needs of diverse users, and the user experience is better.
在人工智能领域中,语义分割是计算机视觉领域中的一项重要研究内容,图像语义分割可应用于众多的应用场景中,例如目标识别、目标检测等领域中。通过语义分割,可以将图像分割成具有不同语义信息的区域,例如,通过对一幅图像进行语义分割后可以为图像中的物体添加语义标签(譬如天空、草坪、人、树木、小动物等)。In the field of artificial intelligence, semantic segmentation is an important research content in the field of computer vision. Image semantic segmentation can be applied to many application scenarios, such as target recognition, target detection and other fields. Through semantic segmentation, an image can be divided into regions with different semantic information. For example, after semantic segmentation of an image, semantic labels can be added to objects in the image (such as sky, lawn, people, trees, small animals, etc.) .
在对图像进行标注的过程中,会在图像上绘制图形来指示被标注的区域,通常会用多边形来框选具有相同语义的区域。在待进行语义分割的图像中,多个事物往往会存在互相遮挡的情况,例如,目标图像的内容为人站在草坪中,图像中人的腿部遮挡了部分草坪。遮挡部分的边缘即为语义分割的分界线,分界线两侧的语义不同。在对图像中不同语义的语义单元进行标注的过程中,如果对边界线两侧的区域分别进行标注,可以对边界线处进行两次标注,由于边界线的形状往往是不规则的,因此进行两次标注,会导致图像标注的效率较低。In the process of annotating an image, graphics are drawn on the image to indicate the annotated area, and polygons are usually used to frame areas with the same semantics. In the image to be semantically segmented, multiple things often occlude each other. For example, the content of the target image is a person standing in the lawn, and the person's legs in the image block part of the lawn. The edge of the occluded part is the boundary of semantic segmentation, and the semantics on both sides of the boundary are different. In the process of labeling semantic units with different semantics in the image, if the regions on both sides of the boundary line are labelled separately, the boundary line can be labelled twice. Since the shape of the boundary line is often irregular, the Labeling twice will result in lower efficiency of image labeling.
在语义分割的应用场景下,本公开提供一种可能的实现方式,在该实现方式中,第一标注操作用于对所述目标图像进行语义分割标注。第一绘制图形与第二绘制图形的重叠部分所指示的图像区域的语义,可以与第二绘制图形所指示的图像区域的语义相同,而与第一图像区域中重叠部分以外的图像区域的语义不相同。例如,参照上述例子,第一图像区域为草坪所在的区域,但包含了遮挡了草坪的腿部,而第二图像区域为图像中的人所在的区域。在这种情况下,将重叠部分从第一绘制图形中去除,得到的第一绘制图形所指示的第一图像区域的语义更准确,能够提高机器学习得到的神经网络的准确度。同时,用户绘制完第二绘制图形后,在用户通过绘制第二绘制图形已经标注了两个语义单元之间的边界线的情况下,在绘制第一绘制图形的过程中,无需用户再次绘制两个语义单元之间的边界线,也无需用户手动对第一绘制图形进行调整,用户操作较少,便利性较高,提高了对目标图像进行标注的效率,节省了标注的时间。In the application scenario of semantic segmentation, the present disclosure provides a possible implementation manner, in which the first labeling operation is used to perform semantic segmentation labeling on the target image. The semantics of the image area indicated by the overlapping portion of the first drawing graph and the second drawing graph may be the same as the semantics of the image area indicated by the second drawing graph, and the semantics of the image area other than the overlapping portion of the first image area. Are not the same. For example, referring to the above example, the first image area is the area where the lawn is located, but includes the legs that block the lawn, and the second image area is the area where the person in the image is located. In this case, removing the overlapped part from the first drawing graph can obtain more accurate semantics of the first image region indicated by the first drawing graph, which can improve the accuracy of the neural network obtained by machine learning. At the same time, after the user draws the second drawing graph, if the user has marked the boundary line between the two semantic units by drawing the second drawing graph, in the process of drawing the first drawing graph, the user does not need to draw the two semantic units again. The boundary line between the two semantic units does not require the user to manually adjust the first drawn graphic, the user operation is less, the convenience is high, the efficiency of labeling the target image is improved, and the labeling time is saved.
在一种可能的实现方式中,所述目标图像显示于网页界面,该网页界面例如可以是HTML5语言编码的网页界面。那么,在绘制图形的过程中,可以通过HTML5中的画布(Canvas)来绘制图形,从而实现对目标图像的标注。In a possible implementation manner, the target image is displayed on a web interface, and the web interface may be, for example, a web interface encoded in HTML5 language. Then, in the process of drawing graphics, the graphics can be drawn through the canvas (Canvas) in HTML5, so as to realize the annotation of the target image.
下面以目标图像显示于网页界面中为例,以第一标注操作用于对所述目标图像进行语义分割标注作为本公开具体的应用场景,对本公开提供的标注方法进行示例性说明,该部分未做详细阐述的内容可参考前文相关描述,同样,该部分中的内容也可用于对前文内容进行示例性说明。Taking the target image displayed in the web interface as an example, the first labeling operation is used to perform semantic segmentation and labeling on the target image as a specific application scenario of the present disclosure, and the labeling method provided by the present disclosure will be exemplified. For the content described in detail, reference may be made to the foregoing related descriptions, and similarly, the content in this section can also be used to exemplify the foregoing content.
请参阅图6,在本公开提供的一种可能的应用场景中,本公开提供的标注方法包括:Referring to FIG. 6, in a possible application scenario provided by the present disclosure, the labeling method provided by the present disclosure includes:
步骤201,通过网页页面显示目标图像。Step 201, displaying the target image through a web page.
步骤202,通过HTML5中的画布(Canvas)在目标图像上绘制图形,得到多个绘制图形。Step 202 , drawing graphics on the target image through a canvas (Canvas) in HTML5, to obtain a plurality of drawing graphics.
绘制图形可以是多边形,图形绘制的过程具体如下:Drawing graphics can be polygons, and the process of drawing graphics is as follows:
首先通过JavaScript语言中的鼠标按键松开事件(mouseup)实现对多边形点的创建,具体来说,在用户点击左键(按下左键然后松开)后,响应于左键被松开的用户操作,画布可以创建新的图形的起点,或给新创建的图形添加新的多边形顶点,在用户点击右键(按下右键然后松开)后,响应于右键被松开的用户操作,画布可以将图形的起点和终端连接,实现创建的多边形的闭合。First, the creation of polygon points is realized through the mouse button release event (mouseup) in JavaScript language. Specifically, after the user clicks the left button (presses the left button and then releases it), the user responds operation, the canvas can create the starting point of a new graph, or add new polygon vertices to the newly created graph. After the user clicks the right button (presses the right button and then releases it), in response to the user operation that the right button is released, the canvas can The start and end points of the graph are connected to achieve the closure of the created polygon.
通过JavaScript语言中的鼠标移动事件(mousemove)的回调事件中的e事件属性,捕获鼠标在浏览器的位置,以确定用户的操作在目标图像上的位置,从而确定用户绘制的绘制图形在目标图像上的位置。Through the e event attribute in the callback event of the mouse move event (mousemove) in the JavaScript language, the position of the mouse in the browser is captured to determine the position of the user's operation on the target image, so as to determine the drawn graphics drawn by the user in the target image. on the location.
绘制图形包括多个,绘制图形为用户对要进行标注的目标图像中的区域所绘制的图形。The drawing graph includes a plurality of drawing graphs, and the drawing graph is a graph drawn by the user for the region in the target image to be marked.
步骤203,接收选取操作指令,根据选取操作指令确定第一绘制图形。Step 203: Receive a selection operation instruction, and determine the first drawing graphic according to the selection operation instruction.
选取操作指令用于从多个绘制图形中选取要进行调整处理图形,选取操作指令即为前文所述的第二用户指令,这里将要进行调整的图形称为第一绘制图形。The selection operation instruction is used to select a graphic to be adjusted and processed from a plurality of drawing graphics, and the selection operation instruction is the second user instruction described above, and the graphic to be adjusted is referred to as the first drawing graphic here.
根据选取操作指令在网页页面中指示的位置,以及网页页面中的多个绘制图形的位置,当确定选取操作指令在网页页面中指示的位置位于第一绘制图形内部的情况下,即可确定选取的第一绘制图形。According to the position indicated by the selection operation instruction on the webpage and the positions of multiple drawing graphics in the webpage, when it is determined that the position indicated by the selection operation instruction on the webpage is inside the first drawing graphic, the selection can be determined. The first drawn graph.
步骤204,接收调整操作指令。Step 204, receiving an adjustment operation instruction.
调整操作指令用于指示对网页页面中的第一绘制图形进行调整处理,分割操作指令即为前文所述的第一用户指令。The adjustment operation instruction is used to instruct to perform adjustment processing on the first drawing graphic in the web page, and the division operation instruction is the first user instruction described above.
步骤205,响应于调整操作指令,检测目标图像中的多个绘制图形中是否存在与第一绘制图形存在重叠部分的第二绘制图形。Step 205 , in response to the adjustment operation instruction, detect whether there is a second drawing graphic that overlaps with the first drawing graphic among the plurality of drawing graphics in the target image.
第一绘制图形和第二绘制图形存在着重叠的部分,例如,图像的内容为人站在草坪中,图像中人的腿部遮挡了部分草坪,用户绘制的第一绘制图形可以是草坪所在的区域, 由于草坪的边缘通常比较直,而非不规则形状,因此,为了便于用户快速绘制第一绘制图形,第一绘制图形中包含了草坪中的人的腿部所在区域,第二绘制图形可以是人所在的区域。The first drawing graphics and the second drawing graphics have overlapping parts. For example, the content of the image is a person standing on the lawn, and the legs of the person in the image cover part of the lawn. The first drawing graphics drawn by the user can be the area where the lawn is located. , Since the edge of the lawn is usually relatively straight, rather than an irregular shape, in order to facilitate the user to quickly draw the first drawing, the first drawing includes the area of the person's legs in the lawn, and the second drawing can be the area where people are located.
步骤206,将第一绘制图形与第二绘制图形的重叠部分,从第一绘制图形中去除,得到调整结果。Step 206: Remove the overlapping portion of the first drawing graph and the second drawing graph from the first drawing graph to obtain an adjustment result.
在第一绘制图形为边框图形的情况下,根据第一绘制图形与第二绘制图形的位置,能够确定第二绘制图形中位于第一绘制图形内的第一线段元素和第一绘制图形中位于第二绘制图形外的线段元素;然后将第一线段元素,以及第一绘制图形中位于第二绘制图形外的线段元素构成的图形,作为对第一绘制图形的调整结果,调整后的第一绘制图像用于标注目标图像中第一图像区域的语义信息。In the case where the first drawing figure is a border figure, according to the positions of the first drawing figure and the second drawing figure, it can be determined that the first line segment element in the first drawing figure and the first drawing figure in the second drawing figure are located in the first drawing figure. The line segment element located outside the second drawing graph; then the graph formed by the first line segment element and the line segment element outside the second drawing graph in the first drawing graph is used as the adjustment result of the first drawing graph, and the adjusted The first drawn image is used to mark the semantic information of the first image area in the target image.
另外,根据第一绘制图形与第二绘制图形的位置,确定第一绘制图形中位于第二绘制图形内的第二线段元素,然后去除第二线段元素,这样第二绘制图形内部即没有其它线段元素。In addition, according to the positions of the first drawing graph and the second drawing graph, determine the second line segment element located in the second drawing graph in the first drawing graph, and then remove the second line segment element, so that there is no other line segment inside the second drawing graph element.
相对于第一绘制图形而言,对第一绘制图形的调整结果中去除了第二绘制图形中的区域,用于对目标图像中的语义单元进行标注,在用户通过绘制第二绘制图形已经标注了两个语义单元之间的边界线的情况下,在绘制另一个语义单元的过程中,无需用户再绘制两个语义单元之间的边界线,提高了标注的效率,节省了标注的时间。Compared with the first drawing graph, the area in the second drawing graph is removed from the adjustment result of the first drawing graph, which is used to mark the semantic units in the target image. In the case where the boundary line between two semantic units is drawn, in the process of drawing another semantic unit, there is no need for the user to draw the boundary line between the two semantic units, which improves the efficiency of labeling and saves time for labeling.
在一种可能的实现方式中,所述标注方法可以由终端设备或服务器等电子设备执行,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等,所述方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。或者,可通过服务器执行所述方法。In a possible implementation manner, the labeling method may be performed by an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone , Personal Digital Assistant (Personal Digital Assistant, PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc., the method can be implemented by the processor calling the computer-readable instructions stored in the memory. Alternatively, the method may be performed by a server.
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。It can be understood that the above-mentioned method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle and logic. Those skilled in the art can understand that, in the above method of the specific embodiment, the specific execution order of each step should be determined by its function and possible internal logic.
此外,本公开还提供了标注装置、电子设备、计算机可读存储介质、程序,上述均可用来实现本公开提供的任一种标注方法,相应技术方案和描述和参见方法部分的相应记载,不再赘述。In addition, the present disclosure also provides labeling devices, electronic devices, computer-readable storage media, and programs, all of which can be used to implement any labeling method provided by the present disclosure. Repeat.
图7示出根据本公开实施例的标注装置的框图,如图7所示,所述装置包括:FIG. 7 shows a block diagram of an annotation apparatus according to an embodiment of the present disclosure. As shown in FIG. 7 , the apparatus includes:
接收模块301,用于接收对目标图像的第一标注操作,其中,所述第一标注操作用于在所述目标图像中绘制指示第一图像区域的第一绘制图形;A receiving module 301, configured to receive a first annotation operation on a target image, wherein the first annotation operation is used to draw a first drawing graphic indicating a first image area in the target image;
调整模块302,用于在所述目标图像中的第二绘制图形与所述第一绘制图形存在至少 部分重叠的情况下,对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果。The adjustment module 302 is configured to adjust the first drawn graphic under the condition that the second drawn graphic in the target image and the first drawn graphic at least partially overlap, so as to obtain the corresponding first annotation operation labeling results.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
检测模块,用于检测所述目标图像中的至少一个在先绘制图形中是否存在与所述第一绘制图形存在重叠部分的绘制图形。A detection module, configured to detect whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
第一用户指令接收模块,用于接收第一用户指令,所述第一用户指令用于指示对所述第一绘制图形进行调整。A first user instruction receiving module, configured to receive a first user instruction, where the first user instruction is used to instruct to adjust the first drawing graphic.
在一种可能的实现方式中,所述调整模块302,用于将所述第一绘制图形中与所述第二绘制图形重叠的部分从所述第一绘制图形中去除所得到的绘制图形,作为所述第一标注操作对应的标注结果。In a possible implementation manner, the adjustment module 302 is configured to remove the drawn graphic obtained by removing the portion of the first drawn graphic that overlaps with the second drawn graphic from the first drawn graphic, as the labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,所述调整模块302,用于在所述第一绘制图形和所述第二绘制图形为边框图形的情况下,根据所述第一绘制图形与所述第二绘制图形的位置,确定所述第二绘制图形中位于所述第一绘制图形内的第一线段元素以及所述第一绘制图形中位于所述第二绘制图形之外的第二线段元素;将所述第一线段元素以及所述第二线段元素构成的绘制图形作为所述第一标注操作对应的标注结果。In a possible implementation manner, the adjustment module 302 is configured to, in the case that the first drawing graph and the second drawing graph are border graphs, according to the first drawing graph and the second drawing graph The position of the drawing figure, determining the first line segment element located in the first drawing figure in the second drawing figure and the second line segment element outside the second drawing figure in the first drawing figure; The drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
在一种可能的实现方式中,所述装置还包括:In a possible implementation, the apparatus further includes:
显示模块,用于在显示界面显示所述目标图像以及所述目标图像的包括所述第一绘制图形在内的多个绘制图形;a display module, configured to display the target image and a plurality of drawing graphics including the first drawing graphics of the target image on a display interface;
第二用户指令接收模块,用于接收第二用户指令,所述第二用户指令用于从所述多个绘制图形中选取所述第一绘制图形;a second user instruction receiving module, configured to receive a second user instruction, where the second user instruction is used to select the first drawing graphic from the plurality of drawing graphics;
确定模块,用于根据所述第二用户指令在所述显示界面中指示的位置以及所述显示界面中的所述多个绘制图形的位置,确定选取的所述第一绘制图形。A determining module, configured to determine the selected first drawing graphics according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
在一种可能的实现方式中,所述目标图像显示于网页界面。In a possible implementation manner, the target image is displayed on a web interface.
在一种可能的实现方式中,所述第一标注操作用于对所述目标图像进行语义分割标注。In a possible implementation manner, the first labeling operation is used to perform semantic segmentation labeling on the target image.
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其具体实现和技术效果可以参照上文方法实施例的描述,为了简洁,这里不再赘述。In some embodiments, the functions or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments, and the specific implementation and technical effects may refer to the above method embodiments. It is concise and will not be repeated here.
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是非易失性计算机可读存储介质。Embodiments of the present disclosure further provide a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,当计算机可读 代码在设备上运行时,设备中的处理器执行用于实现如上任一实施例提供的标注方法的指令。Embodiments of the present disclosure also provide a computer program product, including computer-readable codes. When the computer-readable codes are run on a device, a processor in the device executes instructions for implementing the labeling method provided in any of the above embodiments. .
本公开实施例还提供了另一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的标注方法的操作。An embodiment of the present disclosure further provides another computer program product for storing computer-readable instructions, which, when executed, cause the computer to perform the operations of the labeling method provided in any of the foregoing embodiments.
电子设备可以被提供为终端、服务器或其它形态的设备。The electronic device may be provided as a terminal, server or other form of device.
图8示出根据本公开实施例的一种电子设备800的框图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。FIG. 8 shows a block diagram of an electronic device 800 according to an embodiment of the present disclosure. For example, electronic device 800 may be a mobile phone, computer, digital broadcast terminal, messaging device, game console, tablet device, medical device, fitness device, personal digital assistant, etc. terminal.
参照图8,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。8, an electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814 , and the communication component 816 .
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to perform all or some of the steps of the methods described above. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 804 is configured to store various types of data to support operation at electronic device 800 . Examples of such data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, and the like. Memory 804 may be implemented by any type of volatile or nonvolatile storage device or combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理系统,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。 Power supply assembly 806 provides power to various components of electronic device 800 . Power supply components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800 .
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。 Multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or swipe action, but also detect the duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 808 includes a front-facing camera and/or a rear-facing camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each of the front and rear cameras can be a fixed optical lens system or have focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经 由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。 Audio component 810 is configured to output and/or input audio signals. For example, audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when electronic device 800 is in operating modes, such as calling mode, recording mode, and voice recognition mode. The received audio signal may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to: home button, volume buttons, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(CMOS)或电荷耦合装置(CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor assembly 814 includes one or more sensors for providing status assessment of various aspects of electronic device 800 . For example, the sensor assembly 814 can detect the on/off state of the electronic device 800, the relative positioning of the components, such as the display and the keypad of the electronic device 800, the sensor assembly 814 can also detect the electronic device 800 or one of the electronic device 800 Changes in the position of components, presence or absence of user contact with the electronic device 800 , orientation or acceleration/deceleration of the electronic device 800 and changes in the temperature of the electronic device 800 . Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 814 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,如无线网络(WiFi),第二代移动通信技术(2G)或第三代移动通信技术(3G),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as wireless network (WiFi), second generation mobile communication technology (2G) or third generation mobile communication technology (3G), or a combination thereof. In one exemplary embodiment, the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A programmed gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation is used to perform the above method.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium, such as a memory 804 comprising computer program instructions executable by the processor 820 of the electronic device 800 to perform the above method is also provided.
图9示出根据本公开实施例的一种电子设备1900的框图。例如,电子设备1900可以被提供为一服务器。参照图9,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1922被配置为执行指令,以执行上述方法。FIG. 9 shows a block diagram of an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server. 9, electronic device 1900 includes processing component 1922, which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922, such as applications. An application program stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Additionally, the processing component 1922 is configured to execute instructions to perform the above-described methods.
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作系统,例如微 软服务器操作系统(Windows Server TM),苹果公司推出的基于图形用户界面操作系统(Mac OS X TM),多用户多进程的计算机操作系统(Unix TM),自由和开放原代码的类Unix操作系统(Linux TM),开放原代码的类Unix操作系统(FreeBSD TM)或类似。 The electronic device 1900 may also include a power supply assembly 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input output (I/O) interface 1958 . The electronic device 1900 can operate based on an operating system stored in the memory 1932, such as a Microsoft server operating system (Windows Server ), a graphical user interface based operating system (Mac OS X ) introduced by Apple, a multi-user multi-process computer operating system (Unix ), Free and Open Source Unix-like Operating System (Linux ), Open Source Unix-like Operating System (FreeBSD ) or the like.
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as memory 1932 comprising computer program instructions executable by processing component 1922 of electronic device 1900 to perform the above-described method.
本公开可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。The present disclosure may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the present disclosure.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM) or flash memory), static random access memory (SRAM), portable compact disk read only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically coded devices, such as printers with instructions stored thereon Hole cards or raised structures in grooves, and any suitable combination of the above. Computer-readable storage media, as used herein, are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (eg, light pulses through fiber optic cables), or through electrical wires transmitted electrical signals.
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。The computer readable program instructions described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本公开操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开的各个方面。Computer program instructions for carrying out operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or instructions in one or more programming languages. Source or object code, written in any combination, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through the Internet connect). In some embodiments, custom electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be personalized by utilizing state information of computer readable program instructions. Computer readable program instructions are executed to implement various aspects of the present disclosure.
这里参照根据本公开实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本公开的多个实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。The computer program product can be specifically implemented by hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), etc. Wait.
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present disclosure have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.

Claims (12)

  1. 一种标注方法,其特征在于,包括:A labeling method, comprising:
    接收对目标图像的第一标注操作,其中,所述第一标注操作用于在所述目标图像中绘制指示第一图像区域的第一绘制图形;receiving a first annotation operation on the target image, wherein the first annotation operation is used to draw a first drawing graphic indicating a first image area in the target image;
    在所述目标图像中的第二绘制图形与所述第一绘制图形存在至少部分重叠的情况下,对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果。In the case that the second drawing graphic in the target image and the first drawing graphic at least partially overlap, the first drawing graphic is adjusted to obtain a labeling result corresponding to the first labeling operation.
  2. 根据权利要求1所述方法,其特征在于,在对所述第一绘制图形进行调整之前,所述方法还包括:The method according to claim 1, wherein before adjusting the first drawing graph, the method further comprises:
    检测所述目标图像中的至少一个在先绘制图形中是否存在与所述第一绘制图形存在重叠部分的绘制图形。Detecting whether there is a drawing figure that overlaps with the first drawing figure in at least one previously drawn figure in the target image.
  3. 根据权利要求1或2任一所述的方法,其特征在于,在对所述第一绘制图形进行调整之前,所述方法还包括:The method according to any one of claims 1 or 2, wherein before adjusting the first drawing graph, the method further comprises:
    接收第一用户指令,所述第一用户指令用于指示对所述第一绘制图形进行调整。A first user instruction is received, where the first user instruction is used to instruct to adjust the first drawing graphic.
  4. 根据权利要求1-3任一所述的方法,其特征在于,所述对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果,包括:The method according to any one of claims 1-3, wherein the adjusting the first drawing graphic to obtain a labeling result corresponding to the first labeling operation comprises:
    将所述第一绘制图形中与所述第二绘制图形重叠的部分从所述第一绘制图形中去除所得到的绘制图形,作为所述第一标注操作对应的标注结果。A drawing graph obtained by removing the portion of the first drawing graph overlapping the second drawing graph from the first drawing graph is taken as a labeling result corresponding to the first labeling operation.
  5. 根据权利要求1-4任一所述的方法,其特征在于,所述对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果,包括:The method according to any one of claims 1-4, wherein the adjusting the first drawing graph to obtain a labeling result corresponding to the first labeling operation comprises:
    在所述第一绘制图形和所述第二绘制图形为边框图形的情况下,根据所述第一绘制图形与所述第二绘制图形的位置,确定所述第二绘制图形中位于所述第一绘制图形内的第一线段元素以及所述第一绘制图形中位于所述第二绘制图形之外的第二线段元素;In the case where the first drawing graph and the second drawing graph are border graphs, determine, according to the positions of the first drawing graph and the second drawing graph, that the second drawing graph is located in the first drawing graph. a first line segment element in the drawing figure and a second line segment element in the first drawing figure outside the second drawing figure;
    将所述第一线段元素以及所述第二线段元素构成的绘制图形作为所述第一标注操作对应的标注结果。The drawing figure formed by the first line segment element and the second line segment element is used as the labeling result corresponding to the first labeling operation.
  6. 根据权利要求1-5任一所述的方法,其特征在于,在所述接收对目标图像的第一标注操作后,所述方法还包括:The method according to any one of claims 1-5, wherein after the receiving the first labeling operation on the target image, the method further comprises:
    在显示界面显示所述目标图像以及所述目标图像的包括所述第一绘制图形在内的多个绘制图形;Displaying the target image and a plurality of drawing graphics of the target image including the first drawing graphics on a display interface;
    接收第二用户指令,所述第二用户指令用于从所述多个绘制图形中选取所述第一绘制图形;receiving a second user instruction, where the second user instruction is used to select the first drawing graphic from the plurality of drawing graphics;
    根据所述第二用户指令在所述显示界面中指示的位置以及所述显示界面中的所述多个绘制图形的位置,确定选取的所述第一绘制图形。The selected first drawing graphic is determined according to the position indicated in the display interface by the second user instruction and the positions of the plurality of drawing graphics in the display interface.
  7. 根据权利要求1-6任一所述的方法,其特征在于,所述目标图像显示于网页界面。The method according to any one of claims 1-6, wherein the target image is displayed on a web interface.
  8. 根据权利要求1-7任一所述的方法,其特征在于,所述第一标注操作用于对所述目标图像进行语义分割标注。The method according to any one of claims 1-7, wherein the first labeling operation is used to perform semantic segmentation labeling on the target image.
  9. 一种标注装置,其特征在于,包括:A labeling device, characterized in that, comprising:
    接收模块,用于接收对目标图像的第一标注操作,其中,所述第一标注操作用于在 所述目标图像中绘制指示第一图像区域的第一绘制图形;A receiving module, for receiving the first labeling operation to the target image, wherein the first labeling operation is used to draw the first drawing figure indicating the first image area in the target image;
    调整模块,用于在所述目标图像中的第二绘制图形与所述第一绘制图形存在至少部分重叠的情况下,对所述第一绘制图形进行调整,得到所述第一标注操作对应的标注结果。An adjustment module, configured to adjust the first drawing graph in the case where the second drawing graph in the target image and the first drawing graph at least partially overlap to obtain the corresponding value of the first labeling operation Label the results.
  10. 一种电子设备,其特征在于,包括:An electronic device, comprising:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至8中任意一项所述的方法。wherein the processor is configured to invoke the memory-stored instructions to perform the method of any one of claims 1-8.
  11. 一种计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1至8中任意一项所述的方法。A computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are executed by a processor, the method described in any one of claims 1 to 8 is implemented.
  12. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1-8中的任一权利要求所述的方法。A computer program, comprising computer readable code, when the computer readable code is executed in an electronic device, a processor in the electronic device executes the code for implementing any one of claims 1-8. Methods.
PCT/CN2021/087285 2020-12-22 2021-04-14 Labeling method and apparatus, electronic device, and storage medium WO2022134390A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020227009804A KR20220093091A (en) 2020-12-22 2021-04-14 Labeling method and apparatus, electronic device and storage medium
JP2022520125A JP2023510443A (en) 2020-12-22 2021-04-14 Labeling method and device, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011529117.0A CN112508020A (en) 2020-12-22 2020-12-22 Labeling method and device, electronic equipment and storage medium
CN202011529117.0 2020-12-22

Publications (1)

Publication Number Publication Date
WO2022134390A1 true WO2022134390A1 (en) 2022-06-30

Family

ID=74923349

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/087285 WO2022134390A1 (en) 2020-12-22 2021-04-14 Labeling method and apparatus, electronic device, and storage medium

Country Status (4)

Country Link
JP (1) JP2023510443A (en)
KR (1) KR20220093091A (en)
CN (1) CN112508020A (en)
WO (1) WO2022134390A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344937A (en) * 2022-10-20 2022-11-15 三一筑工科技股份有限公司 Reinforcing steel bar marking method and device, electronic equipment and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112508020A (en) * 2020-12-22 2021-03-16 深圳市商汤科技有限公司 Labeling method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110660313A (en) * 2018-06-29 2020-01-07 百度在线网络技术(北京)有限公司 Information presentation method and device
CN110796201A (en) * 2019-10-31 2020-02-14 深圳前海达闼云端智能科技有限公司 Method for correcting label frame, electronic equipment and storage medium
US20200098116A1 (en) * 2018-09-26 2020-03-26 International Business Machines Corporation Image labeling
CN111027543A (en) * 2019-11-25 2020-04-17 北京云测信息技术有限公司 Image annotation method and device
CN111814885A (en) * 2020-07-10 2020-10-23 云从科技集团股份有限公司 Method, system, device and medium for managing image frames
CN112508020A (en) * 2020-12-22 2021-03-16 深圳市商汤科技有限公司 Labeling method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111666936A (en) * 2019-03-08 2020-09-15 北京市商汤科技开发有限公司 Labeling method, labeling device, labeling system, electronic equipment and storage medium
CN110286992A (en) * 2019-07-02 2019-09-27 中国工商银行股份有限公司 The method and device that interface figure is redrawn

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110660313A (en) * 2018-06-29 2020-01-07 百度在线网络技术(北京)有限公司 Information presentation method and device
US20200098116A1 (en) * 2018-09-26 2020-03-26 International Business Machines Corporation Image labeling
CN110796201A (en) * 2019-10-31 2020-02-14 深圳前海达闼云端智能科技有限公司 Method for correcting label frame, electronic equipment and storage medium
CN111027543A (en) * 2019-11-25 2020-04-17 北京云测信息技术有限公司 Image annotation method and device
CN111814885A (en) * 2020-07-10 2020-10-23 云从科技集团股份有限公司 Method, system, device and medium for managing image frames
CN112508020A (en) * 2020-12-22 2021-03-16 深圳市商汤科技有限公司 Labeling method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344937A (en) * 2022-10-20 2022-11-15 三一筑工科技股份有限公司 Reinforcing steel bar marking method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112508020A (en) 2021-03-16
KR20220093091A (en) 2022-07-05
JP2023510443A (en) 2023-03-14

Similar Documents

Publication Publication Date Title
US20230393721A1 (en) Method and Apparatus for Dynamically Displaying Icon Based on Background Image
US9479693B2 (en) Method and mobile terminal apparatus for displaying specialized visual guides for photography
WO2022134382A1 (en) Image segmentation method and apparatus, and electronic device, storage medium and computer program
CN111612009B (en) Text recognition method, device, equipment and storage medium
US20180088784A1 (en) Method and Device for Sharing Content
EP3547218B1 (en) File processing device and method, and graphical user interface
US20200007944A1 (en) Method and apparatus for displaying interactive attributes during multimedia playback
WO2020007241A1 (en) Image processing method and apparatus, electronic device, and computer-readable storage medium
CN112907760B (en) Three-dimensional object labeling method and device, tool, electronic equipment and storage medium
KR20150094480A (en) User terminal device and method for displaying thereof
WO2022188305A1 (en) Information presentation method and apparatus, and electronic device, storage medium and computer program
JP7181375B2 (en) Target object motion recognition method, device and electronic device
EP2921969A1 (en) Method and apparatus for centering and zooming webpage and electronic device
WO2022134390A1 (en) Labeling method and apparatus, electronic device, and storage medium
WO2023284632A1 (en) Image display method and apparatus, and electronic device
US20200402321A1 (en) Method, electronic device and storage medium for image generation
CN110989905A (en) Information processing method and device, electronic equipment and storage medium
WO2022068721A1 (en) Screen capture method and apparatus, and electronic device
WO2022156673A1 (en) Display control method and apparatus, electronic device, and medium
WO2020019683A1 (en) Input method and apparatus, and electronic device
WO2022141969A1 (en) Image segmentation method and apparatus, electronic device, storage medium, and program
WO2023045185A1 (en) Object detection method and apparatus, electronic device and storage medium
WO2019242274A1 (en) Content processing method and device
WO2022110754A1 (en) Resource loading method and apparatus, electronic device, storage medium, and program
WO2022134416A1 (en) Video data processing method and apparatus, electronic device, and storage medium

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022520125

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 16.08.23)