A method for generating target sample annotations
By cutting and annotating large image remote sensing images, the label data containing absolute coordinates is solved, and the problem of multiplexing label data in multiple neural networks with different image sizes is improved, and the efficiency of neural network training and the convenience of data management is improved.
Patent Information
- Application Number
- CN202111186916.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-12
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-10-12
AI Technical Summary
It is difficult for the prior art to multiplex the target sample labeling data of large-image remote sensing images in multiple neural networks requiring different image sizes.
By cutting the large image based on the preset overlap ratio, the pre-cut small image size and the preset out-expanding scale, marking the target samples in the small image, and calculating the absolute coordinates of the annotation point on the large image based on the relative coordinates, thereby generating reusable target sample annotation data.
The multiplexing of marked target samples in different neural networks is achieved, which improves the efficiency of training neural networks and reduces the management complexity of the number of pictures.
Smart Images

Figure CN114066979B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a method for generating target sample annotations. Background Art
[0002] Artificial intelligence is the science of studying how to simulate human cognitive abilities through machines, and machine learning is the main means of realizing artificial intelligence at this stage. Machine learning methods usually learn regularities or judgment rules from known data and establish prediction models. Among them, deep learning can form more abstract high-level attribute categories by combining low-level features, automatically learn effective features from information and classify them without manually selecting features. With the advantages of automatic feature extraction, neural network structure, and end-to-end learning, deep learning has the best learning effect in the fields of image and speech, and is the most popular algorithm architecture today.
[0003] In practical applications, deep learning algorithms mostly use supervised learning models, which requires labeled data to provide feedback on learning results. With a large amount of data training, the algorithm error rate can be greatly reduced. Current applications such as face recognition, autonomous driving, and voice interaction all use this type of training method, which has a huge demand for various types of labeled data. It can be said that data resources determine the level of today's artificial intelligence. How to quickly generate a large amount of labeled sample data that can be used by deep learning algorithms has become a problem that needs to be solved urgently.
[0004] When processing large remote sensing images of 10000*10000 pixels, the traditional mode is generally to crop the large remote sensing images into small images of 300*300 pixels, and set a certain overlap threshold between each small image to avoid the target in the large image being divided into two different small images. Then, the targets in each small image are labeled in turn, and the labeled data samples are input into the neural network for training.
[0005] Since different neural networks have different requirements for the image size in the input network, the target samples that are labeled after cutting large remote sensing images into small images can only be used in one neural network and cannot be reused in multiple networks that require target samples of different image sizes. Summary of the invention
[0006] In view of the above analysis, an embodiment of the present invention aims to provide a target sample annotation generation method to solve the problem of multiplexing in a neural network of target samples requiring different image sizes.
[0007] The present invention discloses a target sample annotation generation method, comprising:
[0008] Cut the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio;
[0009] Mark the target samples in the cut small images to obtain the relative coordinates of the marked points on each small image;
[0010] According to the cutting position of the small image corresponding to the relative coordinates relative to the large image, the relative coordinates on each small image, the preset overlapping ratio, the pre-cut small image size and the preset external expansion ratio, the absolute coordinates of each annotation point on the large image are determined to obtain the large image containing the absolute coordinates of the annotation points.
[0011] Further, the absolute coordinates of each annotation point on the large image are determined according to the cutting position of the small image corresponding to the relative coordinates relative to the large image, the relative coordinates on each small image, the preset overlap ratio, the pre-cut small image size and the preset expansion ratio, including:
[0012] The absolute coordinates of each marked point on the large image are calculated according to the following formula:
[0013] (x _new ,y _new )=(x+(n x -λ-(n x -1)δ)width,y+(n y -λ-(n y -1)δ)height)
[0014] Among them, x _new Indicates the absolute coordinates of the annotation point in the x direction and y direction in the large image _new represents the absolute coordinate of the label point in the y direction of the large image, x represents the label point in the x direction of the large image, and the nth x The relative coordinates on the small graph, y represents the y direction of the annotation point in the large graph, and the nth y The relative coordinates on the small pictures, λ is the preset expansion ratio, δ is the preset overlap ratio, width is the width of the small picture including overlap and expansion, and height is the height of the small picture including overlap and expansion.
[0015] Furthermore, in the process of labeling the target samples in the cut small images, the method further includes:
[0016] If a complete target annotation box or a partial target annotation box is displayed in the current thumbnail, there is no need to annotate the target samples in the current thumbnail.
[0017] Further, displaying a complete target marking frame or a partial target marking frame in the current thumbnail includes:
[0018] If there are already labeled target samples in the current thumbnail, the complete target labeling box will be displayed;
[0019] If a partial target marking frame of a target sample that has been marked is displayed in the current thumbnail, the partial target marking frame continues to be displayed.
[0020] Furthermore, the step of labeling the target samples in the cut small images includes:
[0021] In the process of marking the target samples in the cut small images, a small image including a circle of expansion is enlarged each time and displayed in full screen;
[0022] Label the target samples in a small image that is displayed in full screen and includes a circle of expansion.
[0023] Furthermore, the method further comprises:
[0024] In the process of cutting the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio, a portion of the small image expanded out of the large image is expanded using a black border;
[0025] If the cut thumbnail does not meet the pre-cut thumbnail size, a black border is used to fill in the missing thumbnail.
[0026] Furthermore, the cutting of the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio includes:
[0027] Determine an initial position for cutting the large image, the initial position being a position where two adjacent sides of the pre-cut small image size overlap with two adjacent sides of the large image;
[0028] Expanding the size of the pre-cut small image according to the preset expansion ratio to obtain an expanded small image;
[0029] According to the preset overlapping ratio, the expanded small image is used to cut the large image one by one in a preset direction sequence starting from the initial position.
[0030] Furthermore, the method of using the expanded small image according to the preset overlap ratio and cutting the large image one by one in a preset direction sequence starting from the initial position includes:
[0031] According to the preset overlap ratio, the expanded small image is used to cut the large image one by one along the first preset direction starting from the initial position;
[0032] When cutting to the tail corresponding to the first preset direction, adjust the initial position of the second cutting according to the second preset direction, and take the initial position of the second cutting as the starting point, continue to cut the large image one by one according to the first preset direction, and repeat the execution until all the large images are traversed; wherein, the first preset direction is perpendicular to the second preset direction.
[0033] Furthermore, the preset overlap ratio is the ratio of the pixel value of the overlapped portion to the pixel value of the area of the small image;
[0034] The preset expansion ratio is the ratio of the pixel value of the expanded part to the pixel value of the small image area.
[0035] Furthermore, after the step of obtaining the large image including the absolute coordinates of the marked points, the method further comprises:
[0036] Pre-store a large image containing the absolute coordinates of the marked points;
[0037] When training the neural network, determining the size of the cutout image according to the input parameter requirements for training the neural network, and determining the cutout overlap ratio according to the size of the target to be detected;
[0038] According to the cutting expansion ratio, the cutting position of the cut small image relative to the large image, the absolute coordinates of the marking points, the size of the cut small image and the cutting overlap ratio, the relative coordinates of each marking point on the cut small image are determined to obtain a small image containing the relative coordinates of the marking points.
[0039] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0040] The target sample annotation generation method provided by the present invention annotates the target samples in the small images obtained by cutting to obtain the relative coordinates of the annotation points on each small image; according to the cutting position of the small image relative to the large image, the relative coordinates on each small image, the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio, the absolute coordinates of each annotation point on the large image are determined to obtain a large image containing the absolute coordinates of the annotation points. Through the large image, the labeled target samples can be reused in different neural networks, thereby improving the efficiency of training the neural network.
[0041] Since the reuse rate of target samples is improved, the number of images is greatly reduced, making management easier.
[0042] This method can also reasonably determine the cutting overlap ratio based on the sizes of all targets to be detected in the large image, so that the target samples can be fully displayed in a small image, thereby improving the effect of training the neural network.
[0043] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0045] Figure 1 This is a flow chart of a target sample annotation generation method in an embodiment of the present invention;
[0046] Figure 2 A schematic diagram for explaining target sample labeling in an embodiment of the present invention;
[0047] Figure 3 A schematic diagram for explaining target sample labeling in another embodiment of the present invention;
[0048] Figure 4 A schematic diagram for explaining target sample labeling in another embodiment of the present invention;
[0049] Figure 5 A schematic diagram for explaining target sample labeling in another embodiment of the present invention;
[0050] Figure 6 This is a flow chart of a target sample annotation generation method in another embodiment of the present invention. DETAILED DESCRIPTION
[0051] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0052] A specific embodiment of the present invention discloses a method for generating target sample annotations, the flow chart of which is as follows: Figure 1 As shown, the following steps are included:
[0053] Step S1: cutting the large image according to a preset overlap ratio, a pre-cut small image size and a preset external expansion ratio.
[0054] Step S2: Mark the target samples in the cut small images to obtain the relative coordinates of the marked points on each small image.
[0055] Step S3: Determine the absolute coordinates of each annotation point on the large image according to the cutting position of the small image corresponding to the relative coordinates relative to the large image, the relative coordinates on each small image, the preset overlap ratio, the pre-cut small image size and the preset expansion ratio, and obtain the large image containing the absolute coordinates of the annotation points.
[0056] Compared with the prior art, the target sample annotation generation method provided in the embodiment of the present invention can directly annotate on the remote sensing image map, generate the absolute coordinates of the annotation points of the target sample in the remote sensing image, and thus obtain a large map containing the absolute coordinates of the annotation points. Then, the large map can be used to cut the image size according to the input parameter requirements of the neural network, solving the problem of multiple images with different sizes being reused in the neural network.
[0057] In addition, since all target samples can be displayed in the large image, users can conveniently determine the cutting overlap ratio according to the size of all target samples, thereby avoiding the inability to fully display the target samples in a small image due to inappropriate overlap ratios between small images, which affects the neural network training effect.
[0058] In step S1, the large image may be a remote sensing image, such as Figure 2 As shown, the large square represents the large image, and the two overlapping small images are represented by two overlapping small squares. Each time the large image is cut, a small image is obtained.
[0059] The preset overlap ratio is the ratio of the pixel value of the overlapped part to the pixel value of the area of the small image; the overlapped part is between the two small images, that is, the grid filling part.
[0060] The preset expansion ratio is the ratio of the pixel value of the expanded part to the pixel value of the area of the small picture; for one of the small pictures, the expanded part is the part between the small picture and the dotted line.
[0061] The size of the pre-cut thumbnail is the thumbnail size, including the width and height of the thumbnail. For the embodiment of the present invention, the thumbnail is a small square, so the width and height of the thumbnail are equal.
[0062] Furthermore, in the process of cutting the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio, a portion of the small image in the expanded large image is expanded using a black border; Figure 3 As shown, the positions expanded using black edges may include the positions corresponding to the four edges of the large image. When expanding using black edges, it is not necessary to consider the impact of the black edge portion on the target sample annotation.
[0063] If the cut thumbnail does not meet the pre-cut thumbnail size, a black border is used to fill in the missing thumbnail size. Figure 4 As shown in the figure, this situation usually occurs at the end of each row or column. The missing small image is completed with a black border so that the size of a small image can be fully displayed, which is convenient for training the neural network without considering the impact of the black border on the target sample annotation.
[0064] Furthermore, the cutting of the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio includes:
[0065] Determine the initial position for cutting the large image, the initial position being the position where two adjacent sides of the pre-cut small image size overlap with two adjacent sides of the large image; Figure 2 As shown, for example, the preset direction sequence is to start cutting from the first row, and after the first row is cut, start cutting from the second row until the large image is cut. The initial position at this time is the upper left position of the large image.
[0066] The size of the pre-cut small image is expanded according to the preset expansion ratio to obtain an expanded small image; Figure 2 As shown, the small image after expansion is a small image including a circle of expansion.
[0067] According to the preset overlap ratio, the expanded small image is used to cut the large image one by one in a preset direction sequence starting from the initial position. The preset direction sequence can be the above-mentioned sequence of cutting from the first row and then from the second row. It can also be the sequence of cutting from the first column and then from the second column, such as Figure 5 shown.
[0068] Furthermore, the method of using the expanded small image according to the preset overlap ratio and cutting the large image one by one in a preset direction sequence starting from the initial position includes:
[0069] According to the preset overlapping ratio, the expanded small image is used, and the large image is cut one by one according to the first preset direction with the initial position as the starting point; the first preset direction can be selected to cut the large image one by one according to the order of rows, and the second preset direction is to adjust the initial position for cutting again according to the vertical direction.
[0070] The first preset direction may be selected to cut the large image one by one in the order of columns, and the second preset direction may be to adjust the initial position of the re-cutting in the horizontal direction.
[0071] When the cutting reaches the tail corresponding to the first preset direction, the initial position of the second cutting is adjusted according to the second preset direction, and the initial position of the second cutting is used as the starting point to continue cutting the large image one by one according to the first preset direction, and repeat the process until all large images are traversed; wherein the first preset direction is perpendicular to the second preset direction. Figure 2 As shown, the tail portion to be cut corresponding to the first preset direction is the tail portion corresponding to the first row, such as Figure 5As shown, the initial position of the second cutting is adjusted according to the second preset direction, and when the tail corresponding to the first preset direction is cut to be the tail corresponding to the second row, the initial position of the second cutting is adjusted according to the second preset direction, and so on.
[0072] In step S2, since the large image may be a remote sensing image, the relative coordinates of the marked points on each small image are the coordinates on the horizontal plane, including the x-coordinate and the y-coordinate.
[0073] Furthermore, in the process of labeling the target samples in the cut small images, the method further includes:
[0074] If a complete target annotation box or a partial target annotation box is displayed in the current small image, there is no need to annotate the target samples in the current small image. Figure 2 As shown, the current thumbnail is the second thumbnail. If the second thumbnail displays a complete target annotation box, it means that the sample target is displayed in the second thumbnail and has been marked in the first thumbnail.
[0075] If the second small image shows a partial target annotation box, it means that the sample target has been marked in the first small image but is not fully displayed in the second small image.
[0076] The above two situations indicate that the sample target has been marked in the first small image, so there is no need to mark the target sample in the current small image to avoid repeated marking.
[0077] Further, displaying a complete target marking frame or a partial target marking frame in the current thumbnail includes:
[0078] If the current thumbnail shows a target sample that has been marked, the complete target marking frame is displayed; the complete target marking frame in a thumbnail before the current thumbnail can be obtained and displayed.
[0079] If a partial target marking frame of a target sample that has been marked is displayed in the current small image, the partial target marking frame will continue to be displayed. This means that the target sample has been marked in a small image before the current small image, and although it is not fully displayed in the current small image, the partial target marking frame needs to be continued to be displayed.
[0080] Furthermore, the step of labeling the target samples in the cut small images includes:
[0081] In the process of labeling the target samples in the cut small images, a small image containing a circle of expansion is enlarged each time and displayed in full screen; since the remote sensing image is large, in order to clearly reflect the details in the image and facilitate labeling, a small image containing a circle of expansion is displayed in full screen.
[0082] Label the target samples in a small image that is displayed in full screen and includes a circle of expansion.
[0083] In step S3, the relative coordinate corresponding to the cutting position of the small image relative to the large image can be understood as the image number of the small image where the marked point is located in the x direction or the y direction in the large image.
[0084] Furthermore, the absolute coordinates of each marked point on the large image are calculated according to the following formula:
[0085] (x _new ,y _new )=(x+(n x -λ-(n x -1)δ)width,y+(n y -λ-(n y -1)δ)height)
[0086] Among them, x _new Indicates the absolute coordinates of the annotation point in the x direction and y direction in the large image _new represents the absolute coordinate of the label point in the y direction of the large image, x represents the label point in the x direction of the large image, and the nth x The relative coordinates on the small graph, y represents the y direction of the annotation point in the large graph, and the nth y The relative coordinates on the small pictures, λ is the preset expansion ratio, δ is the preset overlap ratio, width is the width of the small picture including overlap and expansion, and height is the height of the small picture including overlap and expansion.
[0087] It should be noted that each small image will overlap, but the expansion is only in the small image being annotated, and it only expands and affects the absolute coordinates when saving the coordinates of the small image. Therefore, in the absolute coordinate calculation formula, only one preset expansion ratio is subtracted, but n-1 preset overlap ratios of small images are subtracted.
[0088] The absolute coordinate calculation formula is to convert the pixel coordinates on the small image including overlap and expansion into the pixel coordinates on the large image.
[0089] like Figure 6 As shown, the large image is first cut, and the preset overlap ratio and preset cut small image size can be customized during cutting; considering the problem of truncation of target samples in adjacent images in the small image, the small image is expanded, and the preset expansion ratio can be customized. The expansion ratio should be as large as possible to avoid incomplete display of the target; during actual annotation, annotation is performed in the expanded small image. If the same target sample in the adjacent image has been labeled, the annotation is directly displayed in the current image to avoid repeated annotation; after the displayed small image is annotated, the annotation coordinates are converted to absolute coordinates in the large image, and the corresponding annotation is displayed in the large image.
[0090] Furthermore, after the step of obtaining the large image including the absolute coordinates of the marked points, the method further comprises:
[0091] A large image containing the absolute coordinates of the marked points is stored in advance; after being stored, it can be downloaded and used by the user.
[0092] When training a neural network, the size of the cut image is determined according to the input parameter requirements for training the neural network, and the cutting overlap ratio is determined according to the size of the target to be detected; some neural network structures are defined in advance. When the neural network includes a fully connected layer, since the fully connected layer is set to have an input and output of fixed size, the input of the fully connected layer is closely related to the size of the cut image. Therefore, after the neural network structure is defined, the size of the cut image is also determined.
[0093] The basic principle for determining the cutting overlap ratio is to avoid the target sample being unable to be fully displayed in a small image based on the size of the target to be detected.
[0094] According to the cutting expansion ratio, the cutting position of the cut small image relative to the large image, the absolute coordinates of the marking points, the size of the cut small image and the cutting overlap ratio, the relative coordinates of each marking point on the cut small image are determined to obtain a small image containing the relative coordinates of the marking points.
[0095] The relative coordinates of each marked point on the cut image are calculated according to the following formula:
[0096] (x′,y′)=(x′ _new -(n′ x -λ-(n′ x -1)δ)width,y′ _new -(n′ y -λ-(n′ y -1)δ)height)
[0097] Among them, x′ represents the annotation point in the x direction of the large image, and the n′ x The relative coordinates of the cut graph, y′ represents the y direction of the annotation point in the large graph, and the n′ y The relative coordinates on the cut graph, x′ _new Indicates the absolute coordinates of the annotation point in the x direction and y′ in the large image _new represents the absolute coordinate of the marked point in the y direction in the large image, λ′ is the cutting and expansion ratio, δ is the cutting overlap ratio, width′ is the width of the cutting small image including overlap and expansion, and height′ is the height of the cutting small image including overlap and expansion.
[0098] The present invention directly marks the remote sensing image, and after the marking is completed, overlapping thresholds are selected and large images are cut according to the target size and the neural network input image size requirements.
[0099] Its beneficial effects are:
[0100] The samples generated by the annotation can be reused for multiple different neural network training tasks at the same time, saving manpower and material resources. When storing, only one large image and the absolute coordinates of the corresponding annotations need to be stored, saving the repeated storage of small images and small image annotations, which is easy to manage. At the beginning of the annotation task, the target is annotated first and then the large image is cut. When cutting, the size of the annotation box of all targets can be counted to avoid the overlap between small images. When the threshold value is not appropriate, the target cannot be fully displayed in a small image, affecting the training effect of the neural network algorithm.
[0101] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0102] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for generating target sample annotations, characterized in that: include: Cut the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio; Mark the target samples in the cut small images to obtain the relative coordinates of the marked points on each small image; the relative coordinates on each small image are the coordinates on the horizontal plane, including x-coordinates and y-coordinates; According to the cutting position of the small image relative to the large image, the relative coordinates of the marking points on each small image, the preset overlapping ratio, the pre-cut small image size and the preset external expansion ratio, the absolute coordinates of each marking point on the large image are determined to obtain the large image containing the absolute coordinates of the marking points.
2. The target sample annotation generation method according to claim 1, characterized in that: The determining of the absolute coordinates of each annotation point on the large image according to the cutting position of the small image corresponding to the relative coordinates relative to the large image, the relative coordinates on each small image, the preset overlap ratio, the pre-cut small image size and the preset expansion ratio includes: The absolute coordinates of each marked point on the large image are calculated according to the following formula: (x _new ,y _new )=(x+(n x -λ-(n x -1)δ)width,y+(n y -λ-(n y -1)d)height) Among them, x _new Indicates the absolute coordinates of the annotation point in the x direction and y direction in the large image _new represents the absolute coordinate of the label point in the y direction of the large image, x represents the label point in the x direction of the large image, and the nth x The relative coordinates on the small graph, y represents the y direction of the annotation point in the large graph, and the nth y The relative coordinates on the small pictures, λ is the preset expansion ratio, δ is the preset overlap ratio, width is the width of the small picture including overlap and expansion, and height is the height of the small picture including overlap and expansion.
3. The target sample annotation generation method according to claim 1, characterized in that: In the process of marking the target samples in the cut small image, the method further includes: If a complete target annotation box or a partial target annotation box is displayed in the current thumbnail, there is no need to annotate the target samples in the current thumbnail.
4. The target sample annotation generation method according to claim 3, characterized in that: The displaying of a complete target marking frame or a partial target marking frame in the current small image includes: If there are already labeled target samples in the current thumbnail, the complete target labeling box will be displayed; If a partial target marking frame of a target sample that has been marked is displayed in the current thumbnail, the partial target marking frame continues to be displayed.
5. The target sample annotation generation method according to claim 1, characterized in that: The labeling of the target samples in the cut small image includes: In the process of marking the target samples in the cut small images, a small image including a circle of expansion is enlarged each time and displayed in full screen; Label the target samples in a small image that is displayed in full screen and includes a circle of expansion.
6. The target sample annotation generation method according to claim 1, characterized in that: The method further comprises: In the process of cutting the large image according to the preset overlap ratio, the pre-cut small image size and the preset external expansion ratio, a portion of the small image expanded out of the large image is expanded using a black border; If the cut thumbnail does not meet the pre-cut thumbnail size, a black border is used to fill in the missing thumbnail.
7. The target sample annotation generation method according to claim 1, characterized in that: The cutting of the large image according to the preset overlapping ratio, the pre-cut small image size and the preset external expansion ratio includes: Determine an initial position for cutting the large image, the initial position being a position where two adjacent sides of the pre-cut small image size overlap with two adjacent sides of the large image; Expanding the size of the pre-cut small image according to the preset expansion ratio to obtain an expanded small image; According to the preset overlapping ratio, the expanded small image is used to cut the large image one by one in a preset direction sequence starting from the initial position.
8. The target sample annotation generation method according to claim 7, characterized in that: The method of cutting the large image one by one in a preset direction sequence with the small image expanded outwards according to the preset overlapping ratio includes: According to the preset overlap ratio, the expanded small image is used to cut the large image one by one along the first preset direction starting from the initial position; When cutting to the tail corresponding to the first preset direction, adjust the initial position of the second cutting according to the second preset direction, and take the initial position of the second cutting as the starting point, continue to cut the large image one by one according to the first preset direction, and repeat the execution until all the large images are traversed; wherein, the first preset direction is perpendicular to the second preset direction.
9. The target sample annotation generation method according to claim 1, characterized in that: The preset overlap ratio is the ratio of the pixel value of the overlapped part to the pixel value of the small image area; The preset expansion ratio is the ratio of the pixel value of the expanded part to the pixel value of the small image area.
10. The target sample annotation generation method according to any one of claims 1 to 9, characterized in that: After the step of obtaining the large image containing the absolute coordinates of the marked points, the method further comprises: Pre-store a large image containing the absolute coordinates of the marked points; When training the neural network, determining the size of the cutout image according to the input parameter requirements for training the neural network, and determining the cutout overlap ratio according to the size of the target to be detected; According to the cutting expansion ratio, the cutting position of the cut small image relative to the large image, the absolute coordinates of the marking points, the size of the cut small image and the cutting overlap ratio, the relative coordinates of each marking point on the cut small image are determined to obtain a small image containing the relative coordinates of the marking points.
Citation Information
Patent Citations
Interactive method and system for semi-automatic image annotation
CN109446369A
Picture labeling method and device
CN112612915A