Method, device and storage medium for locating ore in an image of ore
By cropping the ore image into multiple image blocks and combining them with contour information to merge the recognition boxes, the problem of insufficient positioning accuracy in ore images is solved, achieving higher precision ore positioning and segmentation.
Patent Information
- Application Number
- CN202411159326.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-08-22
AI Technical Summary
Existing technologies struggle to achieve high-precision positioning in ore images, especially when faced with complex scenes involving varied shapes, sizes, and close-knit arrangements. Traditional algorithms and neural network methods suffer from positioning errors or omissions, and existing stitching methods ignore ore contour information, resulting in limited accuracy.
By cropping the original ore image into multiple image blocks, combining them with a target recognition model for ore detection, and using the contour information of the ore to merge the predicted recognition boxes, the final recognition boxes are obtained, taking into account the shape, size, position, and image structure information of the ore particles.
It achieves more accurate ore positioning, improves the precision of ore segmentation, and meets the high-standard requirements of ore sorting.
Smart Images

Figure CN119941835B_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of ore image segmentation technology. More specifically, this application relates to a method, apparatus, and computer-readable storage medium for locating ore in an ore image. Background Technology
[0002] In the field of ore sorting, conveyor belt systems are often used to transport ore, and X-ray transmission technology is used to scan the ore transported on the conveyor belt. By converting X-ray information into image information, the quality of the ore is assessed and sorted. In practical applications, ore sorting faces many challenges, especially due to the diversity of ore morphology, size, and close packing. These characteristics require extremely high positioning and segmentation accuracy to ensure sorting accuracy. However, ore images often exhibit adhesion and overlap, which directly affects subsequent positioning and segmentation processing. Therefore, achieving precise ore positioning becomes crucial for improving sorting accuracy.
[0003] Existing methods for ore localization mainly fall into two categories: traditional algorithms and neural networks. Traditional algorithms utilize image color, texture, and shape for target detection, but they struggle to design efficient and accurate algorithms for complex scenes with varying ore shapes, sizes, and close-packed structures. While neural network methods have advantages in handling complex scenes, the relatively small size and low resolution of ore particles result in large overall images, making it easy for them to lose crucial image information during downsampling, leading to localization errors or omissions. Currently, image cropping and stitching methods exist to address the problem of locating small targets in large images, but these methods often only consider bounding boxes, neglecting more contextual information, thus limiting accuracy.
[0004] In view of this, there is an urgent need to provide a solution for locating ores in ore images in order to improve the stitching accuracy of ore recognition boxes and enhance the accuracy of ore positioning. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a scheme for locating ore in ore images in several aspects.
[0006] In a first aspect, this application provides a method for locating ore in an ore image, comprising: acquiring an original ore image and cropping the original ore image into multiple image blocks; performing ore detection using a target recognition model based on the multiple image blocks to obtain predicted recognition boxes for the ore on each of the image blocks; mapping the predicted recognition boxes to the original ore image and extracting contour information of the ore in the original ore image; and merging the predicted recognition boxes located at the cropping points of each of the image blocks in the original ore image according to the contour information to obtain a final recognition box for the ore, thereby locating the ore in the ore image.
[0007] In some embodiments, the original ore image is cropped into multiple image blocks by: obtaining the original height of the original ore image; and cropping the original ore image into multiple image blocks in the horizontal direction with the original height as the cropping width.
[0008] In other embodiments, the process of cropping the original ore image into the plurality of image blocks along the lateral direction further includes: determining the starting point for cropping the next image block as the number of pixels that are pushed forward from the end of the previous image block by a target number of pixels.
[0009] In some other embodiments, the process of cropping the original ore image into the plurality of image blocks along the lateral direction further includes: in response to the cropping width of an image block being less than the original height, stitching the corresponding image block with its adjacent previous image block into a single image block.
[0010] In some other embodiments, the contour information of the ore in the original ore image is extracted by: binarizing the original ore image; and extracting the contour information of the ore in the original ore image based on the binarization result.
[0011] In some other embodiments, merging the predicted recognition boxes located at the cropping locations of each of the image blocks in the original ore image based on the contour information to obtain the final recognition box of the ore includes: determining target recognition boxes that can be merged at the cropping locations of adjacent image blocks in the original ore image based on the contour information; and merging the mergeable target recognition boxes to obtain the final recognition box of the ore.
[0012] In some other embodiments, determining the target recognition boxes that can be merged at the cropping locations of adjacent image blocks in the original ore image based on the contour information includes: acquiring a group of predicted recognition boxes that intersect at the cropping locations of adjacent image blocks in the original ore image; determining, based on the contour information, whether each predicted recognition box in the predicted recognition box group intersects with the same contour; in response to the intersection of each predicted recognition box with the same contour, determining whether the center of the intersection region is located inside the contour; and in response to the center of the intersection region being located inside the contour, determining the predicted recognition boxes in the predicted recognition box group as the target recognition boxes that can be merged.
[0013] In some other embodiments, merging the mergeable target identification boxes to obtain the final identification box of the ore includes: determining the maximum identification box height of the target identification boxes as the height of the final identification box; determining the maximum horizontal distance between the target identification boxes as the width of the final identification box; and determining a new identification box based on the height and width of the final identification box to merge the mergeable target identification boxes to obtain the final identification box of the ore.
[0014] In a second aspect, this application provides an apparatus for locating ore in an ore image, comprising: a processor; and a memory storing program instructions for locating ore in an ore image, wherein when the program instructions are executed by the processor, the apparatus implements one or more embodiments of the first aspect described above.
[0015] In a third aspect, this application provides a computer-readable storage medium having stored thereon computer-readable instructions for locating ore in an ore image, which, when executed by one or more processors, implement one or more embodiments of the first aspect described above.
[0016] The above-described scheme for locating ore in ore images, in this embodiment, involves cropping the original ore image into multiple image blocks. First, a target recognition model is used to detect the ore and obtain predicted bounding boxes. Then, these predicted bounding boxes are mapped onto the original ore image, and the predicted bounding boxes at the cropped areas of the image blocks are merged using the ore's contour information to obtain the final ore bounding box. Based on this, the shape, size, and position of the ore particles, as well as the overall structural information of the image, can be comprehensively considered, achieving a more accurate merging result and further improving the accuracy of ore localization. Attached Figure Description
[0017] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0018] Figure 1 This is an exemplary flowchart illustrating a method for locating ore in an ore image according to an embodiment of this application;
[0019] Figure 2 This is an exemplary schematic diagram showing the original ore image and ore outline according to an embodiment of this application;
[0020] Figure 3 This is an exemplary schematic diagram illustrating image cropping according to an embodiment of this application;
[0021] Figure 4 This is an exemplary schematic diagram showing the predicted recognition box of minerals on each image block according to an embodiment of this application;
[0022] Figure 5 This is an exemplary schematic diagram illustrating the mapping of predicted recognition boxes of ore on each image block according to an embodiment of this application to the original ore image;
[0023] Figure 6 This is an exemplary schematic diagram illustrating a merged identification box according to an embodiment of this application;
[0024] Figure 7 This is an exemplary schematic diagram showing the final identification frame of all ores according to an embodiment of this application;
[0025] Figure 8 This is an exemplary structural block diagram illustrating an apparatus for locating ore in an ore image according to an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0027] It should be understood that the terms "comprising" and "including" as used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0028] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0029] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0030] It's important to understand that in actual ore sorting, to optimize ore utilization efficiency and equipment recognition capabilities, ore typically undergoes crushing to control particle size within the 10-20 mm range. Simultaneously, to meet the demands of high-speed sorting, the conveyor belt width is often set at approximately 1500 mm. This results in relatively small ore particles with low resolution, leading to a larger overall image (i.e., large image, small target), further increasing the complexity and challenge of sorting. As mentioned in the background section, when neural networks handle the problem of locating small targets in large images, they are prone to losing crucial image information during the downsampling process. For example, after multiple downsampling operations by the neural network, the ore region in the image may become a single point, leading to positioning errors or omissions. Furthermore, the ore image is relatively wide, while the input data for the neural network is relatively narrow. Therefore, inputting the ore image into the neural network inevitably results in image compression, further shrinking the ore region and causing positioning errors or omissions.
[0031] Currently, while image cropping and stitching can address the aforementioned issues by cropping to smaller images and increasing the proportion of the mineral region within the image, thus preserving more image information during the downsampling process of the neural network, existing methods often only consider the intersection and union of the bounding boxes during stitching, neglecting the contour information of the target, or failing to determine the target contour, thereby ignoring more contextual information and limiting the accuracy of the final stitching.
[0032] Based on this, this application provides a scheme for locating ore in ore images. By cropping the original ore image into multiple image blocks and combining the inference results of ore detection from the target recognition model with the contour information of the ore, the scheme comprehensively considers the global and local features of the ore image, achieving accurate image cropping, efficient inference, and precise stitching. This improves the accuracy of ore location and segmentation, and meets the high standards required for ore sorting.
[0033] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0034] Figure 1 This is an exemplary flowchart illustrating a method 100 for locating ore in an ore image according to an embodiment of this application. Figure 1 As shown, in step S101, an original ore image is acquired and cropped into multiple image blocks. In some embodiments, X-ray information can be obtained by scanning the ore transported on a conveyor belt using, for example, X-ray transmission technology, and then the X-ray information is converted into image information to obtain the original ore image (e.g., Figure 2 (As shown in Figure (a)). Based on the acquired original ore image, it was cropped into multiple image blocks to increase the proportion of the ore area in the image and retain more key image information.
[0035] In some embodiments, the original height of the original ore image is obtained, and the original height is used as the cropping width to crop the original ore image into multiple image blocks horizontally. Specifically, in some implementation scenarios, multiple squares with the same width and original height are cropped horizontally from the top left corner of the original ore image to obtain multiple image blocks (e.g., ...). Figure 3 (As shown). In other embodiments, when cropping the original ore image into multiple image blocks along the horizontal direction, the starting point for cropping the next image block is determined by advancing the last pixel of the previous image block forward by a target number of pixels. Preferably, the starting point for cropping the next image block is advanced two pixels from the end of the previous image block. That is, among the multiple image blocks obtained by cropping, except for the leftmost and rightmost image blocks, each image block intersects with the image blocks before and after it by two pixels in the horizontal direction.
[0036] In some other embodiments, when cropping the original ore image into multiple image blocks along the horizontal direction, in response to the cropping width of an image block being less than its original height, the corresponding image block is stitched together with its adjacent previous image block to form a single image block. That is, when the width of a cropped image block is less than the height of the original ore image, it indicates that it is already at the rightmost (i.e., the end) of the original ore image. In this scenario, the image block is combined with its adjacent previous image block to form a single image block.
[0037] Based on the multiple image patches obtained from the cropping, in step S102, an object recognition model is used to detect ore based on the multiple image patches to obtain the predicted recognition boxes of the ore on each image patch. In some implementation scenarios, the aforementioned object recognition model may include, but is not limited to, a convolutional neural network model, a single-stage object detection model, or a feature pyramid network model, etc., and this application does not impose any limitations in this regard. By inputting multiple image patches into the trained object recognition model, the predicted recognition boxes (i.e., inference results) of the ore on each image patch can be directly obtained.
[0038] Next, in step S103, the predicted recognition box is mapped onto the original ore image, and the contour information of the ore in the original ore image is extracted. In some implementations, the predicted recognition box can be mapped onto the original ore image based on its coordinate position. In some embodiments, the original ore image can be binarized to extract the contour information of the ore in the original ore image based on the binarization result. As an example, by setting a threshold, pixels above the threshold are assigned a value of 1, and pixels below the threshold are assigned a value of 0, to achieve the aforementioned binarization operation, thereby extracting the contour information of the ore in the original ore image. Alternatively, contour detection methods such as edge-based or region-based methods can be used to extract the contour information of the ore in the original ore image, and this application does not limit this. It is understood that the aforementioned contour information of the ore includes the edge contour of the ore.
[0039] Further, in step S104, the predicted recognition boxes located at the cropping locations of each image block in the original ore image are merged according to the contour information to obtain the final recognition box of the ore, thereby locating the ore in the ore image. In some embodiments, target recognition boxes that can be merged at the cropping locations of adjacent image blocks in the original ore image are determined according to the contour information, and the final recognition box of the ore is obtained by merging the mergeable target recognition boxes. More specifically, in some embodiments, a group of predicted recognition boxes that intersect at the cropping locations of adjacent image blocks in the original ore image is obtained, and it is determined according to the contour information whether each predicted recognition box in the predicted recognition box group intersects with the same contour. In response to the intersection of each predicted recognition box with the same contour, it is determined whether the center of the intersection region is located inside the contour, and in response to the center of the intersection region being located inside the contour, the predicted recognition boxes in the predicted recognition box group are determined as mergeable target recognition boxes.
[0040] In other words, firstly, predicted bounding boxes that intersect with adjacent image blocks are acquired to form a group of predicted bounding boxes. Then, it is determined whether each predicted bounding box in the group intersects with the contour of the same ore, and whether the center of the intersection region is located inside the contour. When each predicted bounding box intersects with the same contour and the center of the intersection region is located inside the contour, the predicted bounding boxes in this group are identified as mergeable target bounding boxes. It can be understood that the aforementioned intersection determination or the determination that the center of the intersection region is inside the contour is based on pixel coordinate positions. If pixels with the same coordinate positions exist, it is determined that there is an intersection or that the center of the intersection region is inside the contour.
[0041] In some embodiments, by determining the maximum height of the target recognition box as the height of the final recognition box, and determining the maximum horizontal distance between target recognition boxes as the width of the final recognition box, a new recognition box is determined based on the height and width of the final recognition box. This merges the mergeable target recognition boxes to obtain the final recognition box for the ore. In some implementations, the aforementioned maximum horizontal distance is the horizontal distance between the leftmost edge of one target recognition box and the rightmost edge of another. Therefore, by drawing a new recognition box using the maximum width from the leftmost edge of one target recognition box to the rightmost edge of another and the maximum recognition box height, recognition box merging can be completed to obtain the final recognition box. This will be discussed later in conjunction with... Figure 6 The process of merging the aforementioned recognition boxes is described in detail.
[0042] As described above, this embodiment of the application crops the original ore image into multiple image blocks, and then combines the inference results of ore detection from the target recognition model with the contour information of the ore to merge the recognition boxes, thus obtaining the final recognition box. Based on this, by comprehensively considering local information such as the shape, size, and position of the ore particles, as well as the overall structural information of the image, accurate merging of the recognition boxes is achieved, thereby further improving the accuracy of ore positioning.
[0043] Figure 2 This is an exemplary schematic diagram illustrating the original ore image and ore outline according to an embodiment of this application. Figure 2 Figure (a) shows the original ore image. As mentioned above, X-ray information can be obtained by scanning the ore transported on a conveyor belt using X-ray transmission technology, and the original ore image is obtained based on the X-ray information. The original ore image shows multiple ore particles 201. As can be seen from the figure, the ore particles are relatively small and have low resolution, which can lead to the loss of key image information during neural network downsampling. Therefore, this application increases the proportion of the ore region in the image by cropping the original ore image into multiple image blocks, thereby retaining more key information. Figure 2Figure (b) shows the extracted ore contour. As mentioned earlier, the contour information of the ore in the original ore image can be extracted by binarizing the original ore image.
[0044] Figure 3 This is an exemplary schematic diagram illustrating image cropping according to an embodiment of this application. Figure 3 The example illustrates cropping the original ore image into three image blocks. In some implementations, the original height H is used as the cropping width, and multiple squares with the same width and original height are cropped horizontally from the top-left corner P of the original ore image. The end of the previous image block is pushed forward two pixels to serve as the starting point for cropping the next image block. For example, pixel p1 in the previous image block serves as the starting point for cropping the next image block. Furthermore, image blocks with a cropping width smaller than the original ore image height are merged with the previous image block into a single image block. For example, the third image block in the figure merges image blocks with a cropping width w smaller than the original height h.
[0045] Figure 4 This is an exemplary schematic diagram illustrating the predicted recognition bounding boxes of minerals on various image blocks according to embodiments of this application. Figure 4 As shown, the rectangular boxes at the ore locations on each image patch are the predicted bounding boxes for the ore in each image patch. In some implementation scenarios, based on the above-mentioned cropped image patches, ore detection can be performed using a pre-trained object recognition model, such as a convolutional neural network model, a single-stage object detection model, or a feature pyramid network model, to obtain the predicted bounding boxes for the ore on each image patch.
[0046] Figure 5 This is an exemplary schematic diagram illustrating the mapping of predicted recognition boxes for ore on each image block according to embodiments of this application to the original ore image. For example... Figure 5 As shown in the figure, the predicted bounding boxes of the ore on each image block are mapped onto the original ore image. Intersecting bounding boxes will exist at the cropping points, as shown by arrows A, B, and C. Additionally, the figure also shows the intersecting bounding box indicated by arrow D. In this embodiment, by combining the contours of the ore to merge groups of intersecting bounding boxes, the shape, size, and position of the ore particles, as well as the overall structural information of the image, can be comprehensively considered to obtain an accurate merging result.
[0047] Figure 6 This is an exemplary schematic diagram illustrating a merged recognition box according to an embodiment of this application. In some embodiments, predicted recognition boxes where adjacent image blocks intersect are first obtained to form a group of predicted recognition boxes, such as... Figure 6 Figure (a) exemplarily shows two sets of intersecting predicted bounding boxes (i.e., the aforementioned) on the first and second image patches. Figure 5Taking the predicted bounding box groups (indicated by arrows A and B) as an example, the next step is to determine whether each predicted bounding box in the predicted bounding box group intersects with the contour of the same ore. For example, each predicted bounding box in the predicted bounding box group indicated by arrow A intersects with the contour S1 of the ore, and each predicted bounding box in the predicted bounding box group indicated by arrow B intersects with the contour S2 of the ore. Further, it is determined that the center of the intersection region is located inside the contour. For example, the figures show that the centers of the intersection regions o1 and o2 in the two predicted bounding box groups are located inside contours S1 and S2, respectively. Therefore, the predicted bounding boxes in these two groups are target bounding boxes that can be merged.
[0048] Figure 6 Figure (b) shows the final identified bounding boxes after merging. Specifically, taking the predicted identified bounding box group indicated by arrow A as an example, a new identified bounding box M is drawn by using the height of the largest identified bounding box in the predicted identified bounding box group as the height of the final identified bounding box, and using the maximum horizontal distance between the leftmost side of one target identified bounding box and the rightmost side of another target identified bounding box as the width of the final identified bounding box. For example, the height h1 of the predicted identified bounding box on the left side of the predicted identified bounding box group is used as the height of the final identified bounding box M, and the maximum horizontal distance w1 between the leftmost side of one target identified bounding box and the rightmost side of another target identified bounding box is used as the width of the final identified bounding box M. Similarly, the intersecting identified bounding boxes at arrows A, B, and C can be merged. For the intersecting identified bounding boxes at arrow D, since they do not intersect with the same ore contour, this group of identified bounding boxes is not merged.
[0049] Figure 7 This is an exemplary schematic diagram illustrating the final identification frame for all ores according to embodiments of this application. For example... Figure 7 As can be seen from the embodiments of this application, accurate merging results can be obtained, improving the accuracy of ore positioning. Subsequently, based on the ore positioning results, accurate ore segmentation can be achieved, thereby improving the accuracy of ore sorting.
[0050] Figure 8 This is an exemplary structural block diagram illustrating a device 800 for locating ore in an ore image according to an embodiment of this application. Figure 8As shown, the device 800 of this application may include a processor 801 and a memory 802, wherein the processor 801 and the memory 802 communicate via a bus. The memory 802 stores program instructions for locating ore in an ore image. When the program instructions are executed by the processor 801, the method steps described above in conjunction with the accompanying drawings are implemented as follows: acquiring an original ore image and cropping the original ore image into multiple image blocks; performing ore detection using a target recognition model based on the multiple image blocks to obtain predicted recognition boxes for the ore on each of the image blocks; mapping the predicted recognition boxes to the original ore image and extracting the contour information of the ore in the original ore image; and merging the predicted recognition boxes located at the cropping points of each of the image blocks in the original ore image according to the contour information to obtain the final recognition box of the ore, thereby locating the ore in the ore image.
[0051] Based on the foregoing description in conjunction with the accompanying drawings, those skilled in the art will understand that the embodiments of this application can also be implemented by software programs. Therefore, this application also provides a computer-readable storage medium. This computer-readable storage medium stores computer-readable instructions thereon for locating ore in an ore image. When these computer-readable instructions are executed by one or more processors, they implement the embodiments of this application in conjunction with the accompanying drawings. Figure 1 The method described is for locating ore in an ore image.
[0052] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0053] It should be noted that although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can be performed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0054] It should be understood that when the terms "first," "second," "third," and "fourth," etc., are used in the claims, specification, and drawings of this application, they are used only to distinguish different objects and not to describe a specific order. The terms "comprising" and "including" as used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0055] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0056] Although the embodiments of this application are described above, the content is merely an example adopted for the purpose of facilitating understanding of this application and is not intended to limit the scope and application scenarios of this application. Any person skilled in the art described in this application may make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be determined by the scope defined in the appended claims.
[0057] Furthermore, the collection and acquisition of various data in this application comply with relevant laws and regulations and are authorized by the data providers. Any organization or individual that needs to obtain external data shall obtain authorization in accordance with the law and ensure data security, and shall not illegally collect, use, process, or transmit unauthorized or unprotected data, nor shall it illegally buy, sell, provide, or disclose unauthorized or unprotected data.
Claims
1. A method for locating ores in an ore image, comprising: obtaining an original ore image and cropping the original ore image into a plurality of image blocks; based on the plurality of image blocks, performing ore detection using a target recognition model to obtain predicted bounding boxes of ores on each of the image blocks; mapping the predicted bounding boxes to the original ore image and extracting contour information of ores in the original ore image; and merging the predicted bounding boxes at the cropping positions of the image blocks in the original ore image according to the contour information to obtain a final bounding box of ores, so as to locate ores in the ore image, wherein the merging the predicted bounding boxes at the cropping positions of the image blocks in the original ore image according to the contour information to obtain the final bounding box of ores comprises: obtaining a group of predicted bounding boxes intersecting at adjacent cropping positions of image blocks in the original ore image; determining whether each of the predicted bounding boxes in the group of predicted bounding boxes intersects with a same contour according to the contour information; in response to each of the predicted bounding boxes intersecting with the same contour, determining whether a center of an intersection region is inside the contour; and in response to the center of the intersection region being inside the contour, determining that the predicted bounding boxes in the group of predicted bounding boxes are target bounding boxes that can be merged. merging the target bounding boxes that can be merged to obtain the final bounding box of ores. 2.The method of claim 1, wherein the original ore image is cropped into a plurality of image blocks by: obtaining an original height of the original ore image; and cropping the original ore image into the plurality of image blocks along a horizontal direction with the original height as a cropping width. 3.The method of claim 2, wherein the cropping the original ore image into the plurality of image blocks along the horizontal direction further comprises: determining a starting point of a next image block as a last pixel in a previous image block pushed forward by a target number of pixels. 4.The method of claim 2 or 3, wherein the cropping the original ore image into the plurality of image blocks along the horizontal direction further comprises: in response to a cropping width of an image block being less than the original height, splicing the image block and a previous image block adjacent to the image block into one image block. 5.The method of claim 1, wherein the contour information of ores in the original ore image is extracted by: binarizing the original ore image; and extracting the contour information of ores in the original ore image according to a binarization result. 6.The method of claim 1, wherein the merging the target bounding boxes that can be merged to obtain the final bounding box of ores comprises: determining a maximum bounding box height in the target bounding boxes as a height of the final bounding box; determining a maximum horizontal distance between the target bounding boxes as a width of the final bounding box; and determining a new bounding box based on the height of the final bounding box and the width of the final bounding box to merge the target bounding boxes that can be merged to obtain the final bounding box of ores. 7.An apparatus for locating ores in an ore image, comprising: a processor; and a memory coupled to the processor and storing instructions that, when executed by the processor, cause the processor to perform the method of any one of claims 1 to 6. a memory having stored therein program instructions for locating ore in ore images, which when executed by the processor cause the apparatus to implement the method according to any one of claims 1-6.
8. A computer readable storage medium having stored thereon computer readable instructions for locating ore in ore images, which when executed by one or more processors implement the method according to any one of claims 1-6.
Citation Information
Patent Citations
Method for human shielded contour detection based on rotational depth learning
CN108764186A
Hepatic space-occupying lesion identification method and device and implement device
CN109447969A