Target object protrusion detection method and target object detection model training method
By using image acquisition and target detection models, the positional relationship between the detection frames of the target and the reference object is determined, which solves the problem of high-precision installation in radio frequency technology and improves the applicability and accuracy of target protrusion detection.
Patent Information
- Application Number
- CN202510679629.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2026-11-24
AI Technical Summary
Existing target protrusion detection solutions rely on radio frequency technology, requiring high-precision installation of through-beam sensors to ensure accurate alignment, resulting in high overall installation accuracy requirements.
Images of the target and reference objects are acquired using image acquisition equipment, and the detection frames of the target and reference objects are determined using a target detection model. Prominent detection is then performed based on the positional relationship of the detection frames, reducing the installation accuracy requirements.
This approach improves the applicability and accuracy of target protrusion detection while reducing installation precision requirements.
Smart Images

Figure CN123160855A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent warehousing, and in particular to a method for detecting protruding objects and a method for training object detection models. Background Technology
[0002] In warehousing and logistics systems, current target object protrusion detection solutions primarily rely on radio frequency (RF) technology. This involves installing high-precision through-beam sensors in the collision risk zone of the workstation. When the through-beam sensor detects an obstruction, it determines a collision risk and issues a corresponding alarm. However, to achieve accurate through-beam detection over long distances, the accuracy of the RF sensors is typically crucial, resulting in high overall installation precision requirements. Summary of the Invention
[0003] This invention provides a method for detecting protruding objects and a method for training a target detection model, which can reduce the requirements for installation accuracy.
[0004] The embodiments of this application disclose the following technical solutions:
[0005] In a first aspect, embodiments of this application provide a method for detecting object protrusion, the method comprising:
[0006] Acquire at least one target image; wherein the at least one target image is acquired based on at least one acquisition direction, and the target image includes a target object and a reference object; detect the target object and the reference object in the at least one target image using a target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object; determine the prominence information of the target object relative to the reference object based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object.
[0007] In some embodiments, at least one target image includes a first target image; the first target image is acquired based on a first direction among at least one acquisition direction; when the first target image is acquired based on the first direction, the reference object includes a vehicle and a collision detection object; the detection box corresponding to the target object includes a first detection box, and the detection box corresponding to the reference object includes a second detection box corresponding to the vehicle and a third detection box corresponding to the collision detection object;
[0008] The target detection model is used to detect at least one target object and a reference object in a target image to obtain a detection box corresponding to the target object and a detection box corresponding to the reference object. This includes: detecting the target object and the reference object in a first target image using the target detection model to obtain a first detection box, a second detection box, and a third detection box.
[0009] In some embodiments, based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object, the salient information of the target object relative to the reference object is determined, including:
[0010] If the first boundary of the first detection frame is outside the second detection frame and there is no overlapping area between the first detection frame and the third detection frame, the protruding information is determined to be a target object protruding from the vehicle and there is no risk of collision; if the first boundary of the first detection frame is outside the second detection frame and there is an overlapping area between the first detection frame and the third detection frame, the protruding information is determined to be a target object protruding from the vehicle and there is a risk of collision.
[0011] In some embodiments, at least one target image further includes a second target image; the second target image is acquired based on a second direction in at least one acquisition direction, wherein the first direction and the second direction are different acquisition directions; when the second target image is acquired based on the second direction, the reference object includes a vehicle; the detection box corresponding to the target object includes a fourth detection box, and the detection box corresponding to the reference object includes a fifth detection box;
[0012] The target detection model is used to detect at least one target object and a reference object in a target image, resulting in detection boxes corresponding to the target object and the reference object, including:
[0013] The target object and reference object in the second target image are detected by the target detection model, and the fourth and fifth detection boxes are obtained.
[0014] In some embodiments, based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object, the salient information of the target object relative to the reference object is determined, including:
[0015] Based on the positional relationship between the first and second detection frames, the horizontal protrusion position of the target object relative to the carrier is determined; based on the positional relationship between the fourth and fifth detection frames, the vertical protrusion position of the target object relative to the reference object is determined; wherein, the protrusion information includes the horizontal protrusion position and the vertical protrusion position.
[0016] In some embodiments, a target detection model is used to detect at least one target object and a reference object in a target image to obtain a detection box corresponding to the target object and a detection box corresponding to the reference object, including:
[0017] At least one target image is convolutionally activated using an object detection model to obtain a first image; the first image is then segmented using the object detection model to obtain multi-layer feature maps; and the multi-layer feature maps are then sampled using the object detection model to obtain detection boxes corresponding to the target object and the reference object.
[0018] In some embodiments, the target protrusion detection method further includes:
[0019] Acquire the initial image captured by the image acquisition device; based on the intrinsic parameter matrix and distortion parameters corresponding to the image acquisition device, perform distortion correction processing on the initial image to obtain the target image.
[0020] In some embodiments, based on the intrinsic parameter matrix and distortion parameters corresponding to the image acquisition device, distortion correction processing is performed on the initial image to obtain the target image, including:
[0021] Based on the intrinsic parameter matrix, the pixel coordinates of multiple pixels to be processed in the image to be processed are converted into multiple normalized coordinates; where the image to be processed refers to a blank image with the same resolution as the initial image; based on multiple normalized coordinates, distortion parameters, and a preset distortion formula, multiple distortion coordinates are determined; the multiple distortion coordinates are mapped onto the initial image to obtain multiple target coordinates; through interpolation, the pixel values at the target coordinates in the initial image are assigned to the multiple pixels to be processed to obtain the target image.
[0022] Secondly, embodiments of this application provide a method for training an object detection model, the method comprising:
[0023] Acquire sample data, which includes sample images, and ground truth detection boxes corresponding to the target objects and reference objects in the sample images. Detect the target objects and reference objects in the sample images based on the initial detection model to obtain predicted detection boxes corresponding to the target objects and reference objects. Use the predicted detection boxes corresponding to the target objects and reference objects as the initial training output of the initial detection model, and the ground truth detection boxes corresponding to the target objects and reference objects as supervision information to iteratively train the initial detection model to obtain the target detection model.
[0024] In some embodiments, the detection of target objects and reference objects in a sample image is performed based on an initial detection model to obtain predicted detection boxes corresponding to the target objects and the reference objects, including:
[0025] The initial detection model is used to perform convolution activation processing on the sample image to obtain the processed image; the initial detection model is used to segment the processed image to obtain multi-layer sample feature maps; the initial detection model is used to sample the multi-layer sample feature maps to obtain the predicted detection boxes corresponding to the sample target object and the predicted detection boxes corresponding to the sample reference object.
[0026] In some embodiments, the multi-layer sample feature map is sampled using an initial detection model to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object, including:
[0027] The initial detection model performs downsampling on the multi-layer sample feature map to determine the features corresponding to the target object and the reference object. The initial detection model then performs upsampling on the features corresponding to the target object and the reference object to obtain the predicted detection boxes corresponding to the target object and the reference object, respectively.
[0028] Thirdly, embodiments of this application also provide a target protrusion detection device, the device comprising:
[0029] The first acquisition module is configured to: determine at least one target image; wherein the at least one target image is acquired based on at least one acquisition direction, and the target image includes a target object and a reference object;
[0030] The first detection module is configured to: detect at least one target object and a reference object in a target image, and obtain a detection box corresponding to the target object and a detection box corresponding to the reference object;
[0031] The determination module is configured to: determine the prominence information of the target object relative to the reference object based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object.
[0032] Fourthly, embodiments of this application also provide a target detection model training apparatus, comprising:
[0033] The second acquisition module is configured to acquire sample data; wherein the sample data includes sample images, as well as the ground truth detection boxes corresponding to the sample target objects and the ground truth detection boxes corresponding to the sample reference objects in the sample images;
[0034] The second detection module is configured to: detect the target object and the reference object in the sample image through the initial detection model, and obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object.
[0035] The iterative training module is configured to use the predicted detection boxes corresponding to the target objects and the predicted detection boxes corresponding to the reference objects as the initial training output of the initial detection model, and the real detection boxes corresponding to the target objects and the reference objects as supervision information to iteratively train the initial detection model and obtain the target detection model.
[0036] Fifthly, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the method in either the first aspect or the second aspect.
[0037] In a sixth aspect, embodiments of this application also provide a computer-readable storage medium storing computer instructions for causing the computer to perform the methods in any of the implementations of the first or second aspect described above.
[0038] In a seventh aspect, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the method in any of the implementations of the first or second aspect described above.
[0039] Eighthly, embodiments of this application also provide a computer program that, when executed by a processor, implements the method in any of the implementations of the first or second aspect described above.
[0040] This embodiment provides a target protrusion detection method, which includes: acquiring at least one target image; wherein the at least one target image is acquired based on at least one acquisition direction, and the target image includes a target object and a reference object; detecting the target object and the reference object in the at least one target image using a target detection model to obtain a detection box corresponding to the target object and a detection box corresponding to the reference object; determining the protrusion information of the target object relative to the reference object based on the positional relationship between the detection boxes corresponding to the target object and the detection boxes corresponding to the reference object; thus, by combining image acquisition equipment and a reference object to perform target protrusion detection, not only can the installation accuracy be reduced, but the applicability of this method can also be improved. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1A A schematic diagram of a warehousing system provided in an embodiment of this application;
[0043] Figure 1B This application provides a schematic diagram of the structure of a workstation according to an embodiment of the present application;
[0044] Figure 2 This is a schematic diagram illustrating an application scenario of a target protrusion detection method provided in an embodiment of this application.
[0045] Figure 3 A schematic flowchart of a target object protrusion detection method provided in an embodiment of this application;
[0046] Figure 4A schematic flowchart of another target object protrusion detection method provided in an embodiment of this application;
[0047] Figure 5 A schematic flowchart illustrating another target protrusion detection method provided in this application embodiment;
[0048] Figure 6 A schematic flowchart illustrating another target protrusion detection method provided in this application embodiment;
[0049] Figure 7A A schematic diagram illustrating the positional relationship between a first detection frame, a second detection frame, and a third detection frame, provided in an embodiment of this application;
[0050] Figure 7B A schematic diagram illustrating the positional relationship between a first detection frame, a second detection frame, and a third detection frame, provided in an embodiment of this application;
[0051] Figure 7C A schematic diagram of a first target image and a second target image provided for embodiments of this application;
[0052] Figure 8 A flowchart illustrating a target detection model training method provided in an embodiment of this application;
[0053] Figure 9 A flowchart illustrating another object detection model training method provided in this application embodiment;
[0054] Figure 10 This is a schematic diagram of the structure of a target object protrusion detection device provided in an embodiment of this application;
[0055] Figure 11 This is a schematic diagram of the structure of a target detection model training device provided in an embodiment of this application;
[0056] Figure 12 This application provides a schematic diagram of the internal structure of a robot.
[0057] Figure 13 This is a schematic diagram of the structure of a control device provided in an embodiment of this application. Detailed Implementation
[0058] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0059] In warehousing and logistics systems, current target object protrusion detection solutions primarily rely on radio frequency (RF) technology. This involves installing high-precision through-beam sensors in the collision risk zone of the workstation. When the through-beam sensor detects an obstruction, it determines a collision risk and issues a corresponding alarm. However, to achieve accurate through-beam detection over long distances, the accuracy of the RF sensors is typically crucial, resulting in high overall installation precision requirements.
[0060] Based on this, this application provides a method for detecting object protrusion. This method acquires images of the target object and a reference object using an image acquisition device, and determines the corresponding detection boxes for the target object and the reference object from the images using a detection model. The method detects the protrusion of the target object based on the positional relationship between the detection boxes corresponding to the target object and the reference object. In this way, the overall installation accuracy requirements can be reduced.
[0061] Figure 1A This is a schematic diagram of a warehousing system provided as an embodiment of this application. Figure 1A As shown, the warehousing system 100 includes multiple carriers 10, multiple handling devices 20, at least one workstation 30, and a control device ( Figure 1A (Not shown in the image).
[0062] Exemplarily, the carrier 10 may include multiple cargo positions (also referred to as storage positions). These positions can be used to place a target object, which may be a container, a cargo box, a material bin, goods, or the original packaging of goods. This application does not limit this; the following embodiments use a cargo box as an example for illustrative purposes.
[0063] For example, the cargo space can be a rectangular prism-shaped storage space, and multiple cargo spaces on the carrier 10 can be neatly arranged along the length, width, and height of the carrier 10. The cargo box can be a product specifically designed for the carrier 10, a regular cargo box (also called a material box), or packaging for goods (also called the original box); this application embodiment does not limit this.
[0064] In some embodiments, the carrier 10 may be a shelf, pallet, turnover cart, cage cart, etc.
[0065] For example, the carrier 10 can be a movable shelf. The movable shelf includes at least one partition that divides the carrier 10 into at least two layers. Each partition of the carrier 10 has at least one storage location, and each storage location can accommodate at least one cargo box. It should be noted that the carrier 10 includes, but is not limited to, partitioned shelves, fixed shelves, picking shelves, and movable shelves. The carrier 10 provided in this application embodiment can refer to any carrier used for placing cargo boxes.
[0066] For example, the carrier 10 can be either a high-density storage rack or a low-density storage rack. When the carrier 10 is a high-density storage rack, the gaps between the containers are smaller.
[0067] For example, the carrier 10 can be a single-sided carrier, a double-sided carrier, or a four-sided carrier (i.e., the goods can be retrieved from four sides). This application embodiment does not limit this; however, it uses a double-sided carrier 10 as an example for illustrative purposes. For instance, when the carrier 10 is a double-sided shelf, partitions can be provided between multiple storage locations along the vertical direction; each side of the carrier 10 can have 30 storage locations, for a total of 60 storage locations on both sides. This application embodiment does not limit the type of carrier 10 or the number of storage locations it includes; this is merely an illustrative example.
[0068] In some embodiments, the number of workstations 30 in the warehousing system 100 may be one or more. Each workstation 30 may be provided with a corresponding vehicle docking area, which includes one or more docking positions for parking vehicles 10.
[0069] In some embodiments, the handling device 20 may also be referred to as an automated handling device, a vehicle handling device, or a handling robot, and the handling device 20 is used to handle the vehicle 10.
[0070] For example, the handling device 20 can be a handling robot, such as an Automated Guided Vehicle (AGV). In some applications, the handling robot can move under the carrier 10 and then lift the carrier 10 off the ground, thereby carrying the carrier 10 for movement.
[0071] In some embodiments, the handling equipment 20 can move the vehicle 10 from the storage area to the corresponding docking position of the workstation 30, so that the workstation 30 can perform pick-and-place operations on the vehicle 10. For example, the workstation 30 can remove the cargo box from the vehicle 10 docked at the docking position, or place the cargo box on the cargo position of the vehicle 10.
[0072] In some embodiments, the control device may be coupled to the handling equipment 20 and the workstation 30 respectively, and used to control the operation of the handling equipment 20 and the workstation 30. For example, the control device may control the handling equipment 20 to move and handle the carrier 10, or control the workstation 30 to perform pick-up and put-down operations on the carrier 10 parked at the docking position.
[0073] For example, the control device can be a server or a terminal device, or a device deployed with a Warehouse Management System (WMS) and a Robot Management System (RMS). The terminal device can include at least one of a personal computer, laptop computer, smartphone, tablet computer, and portable wearable device; the server can include a standalone server or a server cluster consisting of multiple servers, and this application embodiment does not limit this.
[0074] In some examples, the control device communicates with the handling equipment 20 and the workstation 30 for data communication. For example, the control device can communicate with the handling equipment 20 and the workstation 30 via a local area network (LAN), a wireless local area network (WLAN), or other networks.
[0075] In some embodiments, Figure 1B A schematic diagram of the structure of a workstation provided in some embodiments of this application is shown below. (See attached diagram.) Figure 1B The structure and working principle of the workstation provided in the embodiments of this application will be described.
[0076] like Figure 1B As shown, the workstation 30 may include a support frame 31, a guide mechanism 32, and a pick-and-place device 33.
[0077] In some examples, a guide mechanism 32 is disposed to a support frame 31. The guide mechanism 32 is movable laterally and vertically relative to the support frame 31. A pick-and-place device 33 is disposed to the guide mechanism 32 so that the pick-and-place device 33 is movable laterally and / or vertically relative to the support frame 31.
[0078] In some examples, the pick-and-place device 33 is coupled to the control device. When the handling equipment 20 moves the carrier 10 to the docking position of the workstation 30 under the control of the control device, the pick-and-place device 33 moves laterally (e.g., in the L direction) and / or vertically (e.g., in the H direction) to reach the position corresponding to the storage location 15 in the carrier 10, thereby picking up or placing the cargo box at the storage location 15.
[0079] For example, the guiding mechanism 32 may include a lateral moving device 34, a moving rod 35, and a vertical moving device 36. The lateral moving device 34 is disposed to the support frame 31 and coupled to a control device. The lateral moving device 34 is laterally movable relative to the support frame 31. The moving rod 35 extends vertically and is disposed to the lateral moving device 34, thereby allowing the moving rod 35 to move laterally relative to the support frame 31. The vertical moving device 36 is disposed to the moving rod 35 and coupled to the control device. The vertical moving device 36 is vertically movable relative to the moving rod 35. A pick-and-place device 33 is disposed to the vertical moving device 36, thereby allowing the pick-and-place device 33 to move vertically relative to the moving rod 35. Therefore, the pick-and-place device 33 can move laterally and / or vertically on the support frame 31.
[0080] In some examples, workstation 30 may not have support frame 31. When workstation 30 does not have support frame 31, pick-and-place device 33 can move laterally and / or vertically via guide mechanism 32.
[0081] For example, when the workstation 30 is not equipped with the support frame 31, the workstation 30 may include at least one guide mechanism 32 and a pick-and-place device 33. The pick-and-place device 33 is disposed on the guide mechanism 32, and the pick-and-place device 33 can move laterally and / or vertically through the guide mechanism 32.
[0082] In some embodiments, the lateral moving device 34 is coupled to the moving rod 35 and configured to drive the moving rod 35 to move laterally; the moving rod 35 extends in a vertical direction, and the pick-and-place device 33 is disposed on the moving rod 35 so that the moving rod 35 drives the pick-and-place device 33 to move laterally; the vertical moving device 36 is coupled to the pick-and-place device 33 and configured to drive the pick-and-place device 33 to move vertically relative to the moving rod 35.
[0083] In some examples, the lateral moving device 34 can be disposed on the moving rod 35 or on the pick-and-place device 33; the vertical moving device 36 can be disposed on the moving rod 35. For example, the lateral moving device 34 and the vertical moving device 36 can be two drive motors. This application embodiment does not limit the specific positions of the lateral moving device 34 and the vertical moving device 36, as long as the lateral moving device 34 can drive the moving rod 35 to move laterally, and the vertical moving device 36 can drive the pick-and-place device 33 to move vertically relative to the moving rod 35.
[0084] In some examples, the guiding mechanism 32 can be a robotic arm (such as an automated robotic arm), and the pick-and-place device 33 can be connected to the robotic arm. The pick-and-place device 33 can move laterally and / or vertically via the robotic arm (for example, the robotic arm can move laterally and / or vertically with the pick-and-place device 33). The robotic arm can be fixed to the ground or a guide rail. The robotic arm can be permanently fixed to the ground or a guide rail, or it can be temporarily fixed to the ground or a guide rail. This application embodiment does not limit this.
[0085] In some embodiments, the pick-and-place device 33 may include a pick-and-place component that can move along the depth direction.
[0086] In some examples, when the pick-and-place device 33 reaches the position corresponding to the storage location 15 by lateral and / or vertical movement, the pick-and-place component can be controlled to extend along the depth direction, i.e., the pick-and-place component can extend into the storage location 15 in the direction toward the carrier, to pick up or place the container from the storage location 15. For example, as Figure 1B As shown, when the pick-and-place device 33 reaches the position corresponding to the storage location, the pick-and-place component (not shown in 2) can move along the depth direction (such as the Z direction) to the storage location 15 to pick up the box placed on the storage location 15.
[0087] Exemplarily, the picking and placing component can be a claw, a fork, or a suction cup connected to the picking and placing device 33. When the picking and placing component is a claw, it can pick up and place the cargo box from the cargo position of the carrier 10 by gripping; when the picking and placing component is a fork, it can pick up and place the cargo box from the cargo position of the carrier 10 by holding; when the picking and placing component is a suction cup, it can pick up and place the cargo box from the cargo position of the carrier 10 by suction. This application embodiment does not limit the specific structure of the picking and placing device 33. It should be noted that this application embodiment can be exemplarily described using a suction cup as the picking and placing component.
[0088] In some embodiments, Figure 1A In the warehousing system 100 shown, after the handling equipment moves the carrier 10 to the docking position of the workstation 30, the pick-and-place device 33 on the workstation 30 can move laterally and / or vertically relative to the carrier 10 to reach the target storage location on the carrier 10, and pick up or place containers such as boxes and pallets from the storage location, or pick up or place goods from the storage location. During this process, if there are protruding boxes on the carrier 10, the pick-and-place device 33 may collide with the protruding boxes during its movement. This not only reduces safety but also affects the continuation of the work.
[0089] For example, Figure 2 This illustrates an application scenario for a target protrusion detection method. For example... Figure 2As shown, if the cargo box A protrudes from the carrier 10, the loading / unloading device 33 may collide with the cargo box A during its upward movement. Therefore, to improve the safety of the warehousing system, it is necessary to detect whether a target object such as a cargo box or goods is protruding. It is understood that the target object can be a carrier, cargo box, or goods, etc., and the embodiments of this disclosure do not specifically limit the type of target object.
[0090] Figure 3 This is a flowchart illustrating a target protrusion detection method provided in an embodiment of this application. The following is a description of the method in conjunction with the accompanying drawings. Figure 3 This application describes the target object protrusion detection method provided in the embodiments of this application. It should be noted that the target object protrusion detection method provided in the embodiments of this application can be implemented by the control device in the aforementioned storage system 100, or by the controller in the workstation 30 of the aforementioned storage system 100. This application does not limit this implementation.
[0091] like Figure 3 As shown, in some embodiments, the target object protrusion detection method provided in this application includes S301-S303.
[0092] S301. Acquire at least one target image.
[0093] In some embodiments, at least one target image is acquired based on at least one acquisition direction. The target image includes a target object and a reference object. Taking a container protrusion detection scheme on a vehicle as an example, the target object is the container, and the reference object can be a shelf or other marker to detect whether the container protrudes from the shelf or other marker. Taking a vehicle protrusion detection scheme as an example, the reference object can be a marker line or marker pole to detect whether the shelf protrudes from the marker line or marker pole, etc.
[0094] In some embodiments, an image acquisition device (e.g., a camera) can capture images of a target object and a reference object from at least one acquisition direction to obtain at least one target image. The acquisition direction can refer to the direction in which the image acquisition device captures the target object and the reference object. For example, the acquisition direction can be from top to bottom (i.e., vertical), from left to right, or from right to left (i.e., horizontal), or other angles; this application embodiment does not limit this.
[0095] For example, when the acquisition direction is top-down, the target image will be a top view of the target and reference objects; when the acquisition direction is left-to-right or right-to-left, the target image will be a side view of the target and reference objects. It is understood that the acquisition direction can be adjusted according to actual needs, the location of the target object, or the relative positional relationship between the target and reference objects. For example, by acquiring images of the vehicle and containers from top to bottom, it can be determined which row of containers protrudes from the vehicle setup. Alternatively, by acquiring images of the vehicle and containers from left to right or right to left, it can be determined which row of containers protrudes from the vehicle setup.
[0096] In some embodiments, the target object can be used to represent the object to be detected. For example, the target object can be a container such as a box or pallet, a carrier such as a shelf, or other objects that need to be detected; this application embodiment does not limit this.
[0097] For example, when the target object is a cargo box, the target object protrusion detection method provided in this application embodiment can be used to detect whether the cargo box protrudes from the vehicle, so as to determine whether the pick-and-place device in the workstation will collide with the cargo box. When the target object is a vehicle, the target object protrusion detection method provided in this application embodiment can be used to detect whether the vehicle protrudes from a preset area, so as to determine whether the pick-and-place device in the workstation will collide with the vehicle.
[0098] In some embodiments, a reference object can be used to represent an object providing a spatial reference. In some applications, the reference object may include a vehicle and / or collision detection devices pre-installed within the warehousing system. This allows for determining whether a vehicle protrudes beyond its designated area based on the positional relationship between the vehicle and the cargo; and determining whether a cargo container exceeds the collision avoidance zone, i.e., determining whether there is a risk of collision, based on the positional relationship between the collision detection device and the cargo.
[0099] For example, the collision detection object can be a marking (e.g., warning tape, color strip, etc.), a structural feature (e.g., grooves, protrusions, or patterns on the ground), or a physical structure (e.g., a pole, etc.). This application embodiment does not limit the type of collision detection object. The collision detection object can be placed on the ground or on the side of the vehicle; this application embodiment does not limit the location of the collision detection object.
[0100] In some embodiments, to improve detection accuracy, the initial image acquired by the image acquisition device can be preprocessed, and the preprocessed initial image can be determined as the target image for target object protrusion detection. The preprocessing method can be image grayscale conversion, image distortion correction, or other image preprocessing methods; this application embodiment does not limit the specific methods used.
[0101] In some embodiments, the initial image acquired by the image acquisition device can be subjected to distortion correction processing, and the distortion-corrected initial image can be determined as the target image. For example... Figure 4 As shown, the target protrusion detection method provided in this application embodiment also includes S401-S402.
[0102] S401. Acquire the initial image captured by the image acquisition device.
[0103] S402. Based on the intrinsic parameter matrix and distortion parameters corresponding to the image acquisition device, the initial image is subjected to distortion removal processing to obtain the target image.
[0104] In some embodiments, the initial image may be used to represent the original, unprocessed image. The target image may represent the original image after distortion correction.
[0105] In some embodiments, at least one initial image can be acquired by an image acquisition device based on at least one acquisition direction, and then each initial image can be subjected to distortion correction processing to obtain at least one target image. The initial image acquired by the image acquisition device based on each acquisition direction can be one or more.
[0106] For example, when the image acquisition device acquires multiple initial images based on a first acquisition direction (e.g., from top to bottom), the initial image with the highest clarity among the multiple initial images can be subjected to distortion correction processing to obtain its corresponding target image.
[0107] In some embodiments, the intrinsic parameter matrix is used to describe the internal geometric characteristics of the image acquisition device, and the distortion parameter characterizes the degree of lens distortion of the image acquisition device. The intrinsic parameter matrix and the distortion parameter can be preset within the image acquisition device and / or control device.
[0108] In some embodiments, S401-S402 can be executed by an image acquisition device or by a control device. This application does not limit this aspect.
[0109] For example, when the control device executes S401-S402, the image acquisition device acquires an initial image and sends it to the control device. After receiving the initial image sent by the image acquisition device, the control device performs distortion correction processing on the initial image based on a pre-set intrinsic parameter matrix and distortion parameters to obtain the target image. When the image acquisition device executes S401-S402, after acquiring the initial image, it performs distortion correction processing on the initial image based on a pre-set intrinsic parameter matrix and distortion parameters to obtain the target image, and then sends the target image to the control device.
[0110] In some embodiments, a control device can send an acquisition command to an image acquisition device, which then acquires an image in response and sends the acquired image to the control device. Alternatively, sensors can be installed in the warehousing system to detect whether a vehicle has been moved to the corresponding docking point at the workstation. When the vehicle is moved to the docking point, the sensor can send a trigger signal to the image acquisition device, causing the image acquisition device to acquire an image, and the control device simultaneously acquires the image acquired by the image acquisition device. Alternatively, the image acquisition device can periodically acquire images and send them to the control device. This application does not limit the method of image acquisition.
[0111] For example, the control device can send an acquisition command to the image acquisition device, which in turn acquires an initial image and sends the acquired initial image to the control device. After receiving the initial image from the image acquisition device, the control device performs distortion correction processing on the initial image based on a pre-set intrinsic parameter matrix and distortion parameters to obtain the target image.
[0112] In some embodiments, such as Figure 5 As shown, S402 may include S4021-S4024.
[0113] S4021. Convert the pixel coordinates of multiple pixels to be processed in the image to be processed into multiple normalized coordinates. For example, based on the intrinsic parameter matrix, convert the pixel coordinates of multiple pixels to be processed in the image to be processed into multiple normalized coordinates.
[0114] S4022. Based on multiple normalized coordinates, distortion parameters, and preset distortion formulas, determine multiple distortion coordinates.
[0115] S4023. Map multiple distorted coordinates onto the initial image to obtain multiple target coordinates.
[0116] S4024. Assign the pixel value at the target coordinate in the initial image to multiple pixels to be processed to obtain the target image. For example, by using interpolation, assign the pixel value at the target coordinate in the initial image to multiple pixels to be processed to obtain the target image.
[0117] In some embodiments, the image to be processed refers to a blank image with the same resolution as the initial image. Normalized coordinates can be used to represent the coordinates of the coordinates to be processed on the normalized plane. Distorted coordinates can be used to represent the distorted normalized coordinates. Target coordinates can be used to represent the pixel values corresponding to the distorted coordinates in the initial image.
[0118] For example, a blank image with the same resolution as the initial image can be created to obtain the image to be processed. The image to be processed includes multiple pixels to be processed, and the initial pixel value of each pixel can be 0. If the pixel coordinates of the pixels to be processed in the image to be processed are (u', v'), the pixel coordinates (u', v') can first be converted to normalized coordinates (x', y') based on a pre-set intrinsic parameter matrix. Then, the distortion parameter D and the normalized coordinates (x', y') are substituted into a preset distortion formula to obtain the distorted coordinates (x', y'). undistort y undistort The distorted coordinates (x) are obtained. undistort y undistort After that, the distorted coordinates (x) undistort y undistort The distorted coordinates are mapped onto the initial image to obtain the corresponding pixel coordinates in the initial image, i.e., the target coordinates (u,v). After obtaining the target coordinates (u,v), interpolation can be used to assign the pixel value corresponding to the target coordinates (u,v) in the initial image to the pixel value corresponding to the pixel coordinates (u',v') in the image to be processed, thus obtaining the target image. For example, if the pixel value corresponding to the target coordinates (u,v) is 255, interpolation can be used to modify the pixel value corresponding to the pixel coordinates (u',v') in the image to be processed from the initial pixel value of 0 to 255.
[0119] It should be noted that the interpolation method can be bilinear interpolation or bicubic interpolation. This application does not limit the specific method used in its embodiments.
[0120] It is understandable that distortion correction can prevent the target object and reference object in the target image from being distorted, thereby improving the accuracy of subsequent detection.
[0121] S302. Detect at least one target object and reference object in a target image using a target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object.
[0122] In some embodiments, the target detection model can be used to identify target objects and reference objects in a target image, and to label the target objects and reference objects using detection boxes.
[0123] For example, at least one target image can be input into the target detection model. After receiving at least one target image, the target detection model detects the target object and the reference object in the at least one target image, obtains the detection box corresponding to the target object and the detection box corresponding to the reference object, and outputs them.
[0124] In some embodiments, the detection box corresponding to the target object can be used to represent the boundary of the target object, and the detection box corresponding to the reference object can be used to represent the boundary of the reference object.
[0125] In some embodiments, the target detection model may output the detection boxes corresponding to the target object and the reference object in the form of data (e.g., coordinate values), or it may output the detection boxes corresponding to the target object and the reference object in the form of images (e.g., generating detection boxes in the target image).
[0126] In some embodiments, the detection box can be rectangular or other shapes, and this application embodiment does not limit this.
[0127] In some embodiments, when the detection box is rectangular, the target detection model can output the detection box corresponding to the target object and the detection box corresponding to the reference object in the form of coordinates, or it can output the detection box corresponding to the target object and the detection box corresponding to the reference object in the form of coordinates combined with the length and width of the detection box.
[0128] For example, after obtaining a detection box using an object detection model, the coordinates of the two opposite vertices of the detection box can be determined and output using the object detection model; that is, the detection box can be represented as the top-left corner coordinates (x1, y1) and the bottom-right corner coordinates (x2, y2). After obtaining a detection box using an object detection model, the coordinates of the four vertices of the detection box can also be determined and output using the object detection model; that is, the detection box can be represented as the top-left corner coordinates (x1, y1), the bottom-left corner coordinates (x1, y2), the top-right corner coordinates (x2, y1), and the bottom-right corner coordinates (x2, y2). After obtaining a detection box using an object detection model, the center coordinates, length, and width of the detection box can also be determined and output using the object detection model. That is, the detection box can be represented as (x1, y1), (x2, y1), (x2, y2 ... center y center , w, h), where w represents the width of the detection box and h represents the length of the detection box.
[0129] Understandably, target detection models can determine the positions of target objects and reference objects, providing a data foundation for subsequent target prominence detection. Labeling target and reference objects with bounding boxes facilitates the subsequent determination of their spatial relationship.
[0130] In some embodiments, the object detection model may include convolutional layers, activation layers, segmentation layers, and sampling layers. The sampling layers may include downsampling layers and upsampling layers. For example... Figure 6 As shown, S302 may include S3021-S3023.
[0131] S3021. Perform convolution activation processing on at least one target image using a target detection model to obtain a first image.
[0132] In some embodiments, at least one target image is first convolved using a target detection model to obtain a convolved image, and then activation processing is performed on the convolved image to obtain the first image.
[0133] For example, a first image can be obtained by performing multiple convolutional activation processes on at least one target image using an object detection model. For instance, the first image can be obtained by performing 70 convolutional activation processes on at least one target image using an object detection model. The number of times the object detection model performs convolutional activation processes on the at least one target image can be set according to actual needs, and this embodiment does not limit this.
[0134] S3022. The first image is segmented using an object detection model to obtain a multi-layer feature map.
[0135] In some embodiments, the multi-layer feature map includes features of various resolutions.
[0136] For example, the first image can be segmented multiple times using an object detection model to obtain multi-layer feature maps. For instance, the first image can be segmented 30 times using an object detection model to obtain multi-layer feature maps. The number of times the object detection model segments the first image can be set according to actual needs, and this embodiment does not limit this.
[0137] S3023. The multi-layer feature map is sampled and processed by the target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object.
[0138] In some embodiments, the sampling process may include upsampling and downsampling.
[0139] In some embodiments, the multi-layer feature map is first downsampled by the object detection model to obtain high-level semantic features (e.g., cargo box location) in the multi-layer feature map. Then, the downsampled multi-layer feature map is upsampled by the object detection model to restore the resolution, thereby obtaining the detection box corresponding to the target object and the detection box corresponding to the reference object.
[0140] S303. Based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object, determine the prominence information of the target object relative to the reference object.
[0141] In some embodiments, the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object is determined, and based on the positional relationship between the detection boxes corresponding to the target object and the reference object, protrusion information of the target object relative to the reference object is determined. The protrusion information can be used to represent the protrusion state and / or protrusion position of the target object relative to the reference object.
[0142] For example, the protrusion information may include at least one of the following: the target object does not protrude from the vehicle, the target object protrudes from the vehicle and there is no collision risk, the target object protrudes from the vehicle and there is a collision risk, a horizontal protrusion position, and a vertical protrusion position. The terms "the target object does not protrude from the vehicle," "the target object protrudes from the vehicle and there is no collision risk," and "the target object protrudes from the vehicle and there is a collision risk" are used to indicate the protrusion state of the target object relative to a reference object, while the horizontal and vertical protrusion positions are used to indicate the protrusion positions of the target object relative to the reference object.
[0143] In some embodiments, the reference objects can be set according to the actual application scenario. Different application scenarios may have the same or different types of reference objects; different application scenarios may have the same or different numbers of reference objects. This application embodiment does not limit this.
[0144] In some embodiments, at least one target image includes a first target image; the first target image is acquired based on a first direction among at least one acquisition direction; when the first target image is acquired based on the first direction, the reference objects include a vehicle and a collision detection object; the detection box corresponding to the target object includes a first detection box, and the detection box corresponding to the reference object includes a second detection box corresponding to the vehicle and a third detection box corresponding to the collision detection object. Detecting the target object and the reference object in at least one target image using a target detection model to obtain the detection boxes corresponding to the target object and the reference object may include: detecting the target object and the reference object in the first target image using a target detection model to obtain the first detection box, the second detection box, and the third detection box.
[0145] In some embodiments, the first direction can be from top to bottom, and the first target image is a top view of the target object and the reference object. That is, the first target image can be obtained by taking a picture of the target object and the reference object from top to bottom using an image acquisition device.
[0146] In some embodiments, determining the protrusion information of the target object relative to the reference object based on the positional relationship between the detection frame corresponding to the target object and the detection frame corresponding to the reference object includes: when the first boundary of the first detection frame is outside the second detection frame and there is no overlapping area between the first detection frame and the third detection frame, determining that the protrusion information is that the target object is protruding from the vehicle and there is no collision risk; when the first boundary of the first detection frame is outside the second detection frame and there is an overlapping area between the first detection frame and the third detection frame, determining that the protrusion information is that the target object is protruding from the vehicle and there is a collision risk.
[0147] In some embodiments, the first boundary of the first detection frame can be used to represent the boundary of the first detection frame on the side closer to the collision detection object.
[0148] In some embodiments, the positional relationship between the detection frame corresponding to the target object and the detection frame corresponding to the reference object may be determined by determining the magnitude relationship between the coordinates of the detection frame corresponding to the target object and the coordinates of the detection frame corresponding to the reference object.
[0149] Illustratively, as Figure 7A shown, in some application scenarios, the first detection frame output by the object detection model has a top-left corner coordinate (x1, y1), a bottom-left corner coordinate (x1, y2), a top-right corner coordinate (x2, y1), and a bottom-right corner coordinate (x2, y2), the second detection frame has a top-left corner coordinate (x3, y3), a bottom-left corner coordinate (x3, y4), a top-right corner coordinate (x4, y3), and a bottom-right corner coordinate (x4, y4), and the third detection frame has a top-left corner coordinate (x5, y5), a bottom-left corner coordinate (x5, y6), a top-right corner coordinate (x6, y5), and a bottom-right corner coordinate (x6, y6). When y2 ≥ y4, it is determined that the first boundary of the first detection frame is located inside the second detection frame (as shown in Figure 7A a); when y2 < y4, it is determined that the first boundary of the first detection frame is located outside the second detection frame (as shown in Figure 7A b). When y2 < y5 and y2 > y6, or y2 < y6, it is determined that the first boundary of the first detection frame is located outside the second detection frame and has an overlapping area with the third detection frame (as shown in Figure 7A c).
[0150] In other embodiments, the positional relationship between the detection frame corresponding to the target object and the detection frame corresponding to the reference object may also be directly determined.
[0151] Illustratively, as Figure 7B shown, when the first boundary of the detection frame 71 (i.e., the first detection frame) corresponding to the cargo box A is located inside the detection frame 74 (i.e., the second detection frame) corresponding to the carrier, it may be determined that the cargo box A does not protrude from the carrier and there is no collision risk. When the first boundary of the detection frame 72 (i.e., the first detection frame) corresponding to the cargo box B is located outside the detection frame 74 corresponding to the carrier, and there is no overlapping area between the detection frame 72 corresponding to the cargo box B and the detection frame 75 (i.e., the third detection frame) corresponding to the collision detection object, it may be determined that the cargo box B protrudes from the carrier and there is no collision risk. When the first boundary of the detection frame 73 (i.e., the first detection frame) corresponding to the cargo box C is located outside the detection frame 74 corresponding to the carrier, and there is an overlapping area between the detection frame 73 corresponding to the cargo box C and the detection frame 75 corresponding to the collision detection object, it may be determined that the cargo box C protrudes from the carrier and there is a collision risk.
[0152] In some embodiments, when the salutation indicates that the target object is protruding from the vehicle and there is no risk of collision, the control device can control the workstation to continue operating and generate a warning message. This warning message can be used to indicate to the operator that there is currently a protruding cargo container that poses no risk of collision.
[0153] In some embodiments, when the protruding information indicates that a target object is protruding from the vehicle and there is a risk of collision, the control device can control the workstation to suspend operation and generate an alarm message. The alarm message may include audible and / or visual signals to indicate to the worker the presence of a protruding cargo container with a potential collision risk. After the worker has dealt with the protruding cargo container, the control device can receive a work instruction triggered by the worker and, in response to the work instruction, control the workstation to resume operation.
[0154] In some embodiments, at least one target image further includes a second target image; the second target image is acquired based on a second direction among at least one acquisition direction, wherein the first direction and the second direction are different acquisition directions; when the second target image is acquired based on the second direction, the reference object includes a vehicle; the detection box corresponding to the target object includes a fourth detection box, and the detection box corresponding to the reference object includes a fifth detection box; wherein, detecting the target object and the reference object in at least one target image using a target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object may include: detecting the target object and the reference object in the second target image using a target detection model to obtain the fourth detection box and the fifth detection box.
[0155] It should be noted that the acquisition direction in this embodiment can be one acquisition direction or at least two acquisition directions. At least two acquisition directions include a first direction and a second direction. The first direction and the second direction form a preset angle.
[0156] In some embodiments, the second direction can be from left to right or from right to left, and the second target image is a side view of the target object and the reference object. That is, the target object and the reference object can be photographed from left to right or from right to left by an image acquisition device to obtain the second target image.
[0157] In some embodiments, determining the protrusion information of the target object relative to the reference object based on the positional relationship between the detection frame corresponding to the target object and the detection frame corresponding to the reference object includes: determining the horizontal protrusion position of the target object relative to the vehicle based on the positional relationship between the first detection frame and the second detection frame; and determining the vertical protrusion position of the target object relative to the reference object based on the positional relationship between the fourth detection frame and the fifth detection frame; wherein the protrusion information includes the horizontal protrusion position and the vertical protrusion position.
[0158] In some embodiments, the horizontal protrusion position of the target object relative to the vehicle can be determined based on the positional relationship between the first detection box and the second detection box in the first target image, i.e., determining which column of the vehicle the target object is located in; and the vertical protrusion position of the target object relative to the reference object can be determined based on the positional relationship between the fourth detection box and the fifth detection box, i.e., determining which row of the vehicle the target object is located in.
[0159] For example, such as Figure 7C As shown, in Figure 7C In the first target image shown in Figure a, it can be determined that cargo box D is located in the second column from left to right of the vehicle; Figure 7C In the second target image shown in b, it can be determined that cargo box D is located in the second row from top to bottom of the vehicle.
[0160] In some embodiments, if the second boundary of the fourth detection frame is outside the fifth detection frame, it can be determined that the target object protrudes from the vehicle.
[0161] In some embodiments, the warning and / or alarm information generated by the control device may carry the horizontal and vertical protrusion positions of the target object relative to a reference object. This allows staff to quickly locate and handle protruding targets based on their horizontal and vertical protrusion positions, improving anomaly resolution efficiency and thus enhancing the overall operational efficiency of the warehousing system.
[0162] Understandably, combining image acquisition equipment with reference objects to perform salient detection of the target object can not only reduce installation accuracy but also improve the applicability of this method.
[0163] Figure 8 A schematic diagram of a target detection model training method is shown, such as... Figure 8 As shown, in some embodiments, the target detection model training method provided in this application includes S801-S803.
[0164] S801. Obtain sample data.
[0165] In some embodiments, sample data can be filtered from historical data according to requirements, or sample data can be filtered from a big data platform. This application does not limit the method of obtaining sample data.
[0166] In some embodiments, the sample data includes sample images, and ground truth bounding boxes corresponding to sample target objects and sample reference objects in the sample images. Specifically, the ground truth bounding boxes for the sample target objects can be obtained by manually annotating them in the sample images; similarly, the ground truth bounding boxes for the sample reference objects can be obtained by manually annotating them.
[0167] S802. Based on the initial detection model, detect the target objects and reference objects in the sample image to obtain the predicted detection boxes corresponding to the target objects and the predicted detection boxes corresponding to the reference objects.
[0168] like Figure 9 As shown, S802 may include S901-S903.
[0169] S901. Perform convolution activation processing on the sample image using the initial detection model to obtain the processed image.
[0170] S902. The processed image is segmented using the initial detection model to obtain multi-layer sample feature maps.
[0171] S903. The multi-layer sample feature map is sampled and processed by the initial detection model to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object.
[0172] It should be noted that S901-S903 are similar to S3021-S3023, and will not be described again here.
[0173] In some embodiments, sampling processing of multi-layer sample feature maps using an initial detection model to obtain predicted detection boxes corresponding to the target object and the reference object can include downsampling the multi-layer sample feature maps using the initial detection model to determine the features corresponding to the target object and the reference object from the multi-layer sample feature maps; and upsampling the features corresponding to the target object and the reference object respectively using the initial detection model to obtain predicted detection boxes corresponding to the target object and the reference object.
[0174] S803. Using the predicted detection boxes corresponding to the target object and the predicted detection boxes corresponding to the reference object as the initial training output of the initial detection model, and the real detection boxes corresponding to the target object and the reference object as the supervision information, the initial detection model is iteratively trained to obtain the target detection model.
[0175] In some embodiments, the initial detection model can be trained iteratively based on mean squared error or cross-entropy loss. The loss function can be selected according to actual needs for iterative training of the initial detection model. This application does not limit the loss function used for iterative training.
[0176] It should be noted that the executing entity for S801-S803 can be the same as or different from the executing entity for S301-S303. For example, S301-S303 can be executed by the control device in the warehousing system 100, and S801-S803 can also be executed by the control device in the warehousing system 100. Alternatively, S301-S303 can be executed by the control device in the warehousing system 100, and S801-S803 can be executed by other control devices. This application embodiment does not limit this.
[0177] Based on the same inventive concept, this application also provides a target object protrusion detection device for implementing the target object protrusion detection method described above. The solution provided by this device is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more control module embodiments provided below can be found in the limitations of the target object protrusion detection method described above, and will not be repeated here. Specifically, Figure 10 This is a schematic diagram of the structure of a target protrusion detection device according to an embodiment of this application. Figure 10 As shown, the target object protrusion detection device 1000 includes:
[0178] The first acquisition module 1010 is configured to: determine at least one target image; wherein the at least one target image is acquired based on at least one acquisition direction, and the target image includes a target object and a reference object;
[0179] The first detection module 1020 is configured to: detect the target object and the reference object in the at least one target image, and obtain a detection box corresponding to the target object and a detection box corresponding to the reference object;
[0180] The determination module 1030 is configured to: determine the protrusion information of the target object relative to the reference object based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object.
[0181] In some embodiments, at least one target image includes a first target image; the first target image is acquired based on a first direction among at least one acquisition direction; when the first target image is acquired based on the first direction, the reference objects include a vehicle and a collision detection object; the detection box corresponding to the target object includes a first detection box, and the detection box corresponding to the reference object includes a second detection box corresponding to the vehicle and a third detection box corresponding to the collision detection object; the first detection module 1020 is configured to: detect the target object and the reference object in the first target image through a target detection model to obtain a first detection box, a second detection box, and a third detection box.
[0182] In some embodiments, the determining module 1030 is further configured to: determine that the protrusion information is a target object protruding from a vehicle and there is no collision risk when the first boundary of the first detection frame is outside the second detection frame and there is no overlapping area between the first detection frame and the third detection frame; and determine that the protrusion information is a target object protruding from a vehicle and there is a collision risk when the first boundary of the first detection frame is outside the second detection frame and there is an overlapping area between the first detection frame and the third detection frame.
[0183] In some embodiments, at least one target image further includes a second target image; the second target image is acquired based on a second direction in at least one acquisition direction, wherein the first direction and the second direction are different acquisition directions; when the second target image is acquired based on the second direction, the reference object includes a vehicle; the detection box corresponding to the target object includes a fourth detection box, and the detection box corresponding to the reference object includes a fifth detection box; the first detection module 1020 is further configured to: detect the target object and the reference object in the second target image through a target detection model to obtain the fourth detection box and the fifth detection box.
[0184] In some embodiments, the determining module 1030 is further configured to: determine the horizontal protrusion position of the target object relative to the carrier based on the positional relationship between the first detection frame and the second detection frame; and determine the vertical protrusion position of the target object relative to the reference object based on the positional relationship between the fourth detection frame and the fifth detection frame; wherein the protrusion information includes the horizontal protrusion position and the vertical protrusion position.
[0185] In some embodiments, the first detection module 1020 is further configured to: perform convolutional activation processing on at least one target image using a target detection model to obtain a first image; perform segmentation processing on the first image using a target detection model to obtain a multi-layer feature map; and perform sampling processing on the multi-layer feature map using a target detection model to obtain a detection box corresponding to the target object and a detection box corresponding to the reference object.
[0186] In some embodiments, the target object protrusion detection device 1010 further includes: a processing module;
[0187] The first acquisition module 1010 is also configured to: acquire the initial image acquired by the image acquisition device;
[0188] The processing module is also configured to: perform distortion correction processing on the initial image based on the intrinsic parameter matrix and distortion parameters corresponding to the image acquisition device to obtain the target image.
[0189] In some embodiments, the processing module is further configured to: convert the pixel coordinates of multiple pixels to be processed in the image to be processed into multiple normalized coordinates based on the intrinsic parameter matrix; wherein the image to be processed refers to a blank image with the same resolution as the initial image; determine multiple distorted coordinates based on the multiple normalized coordinates, distortion parameters, and a preset distortion formula; map the multiple distorted coordinates onto the initial image to obtain multiple target coordinates; and assign the pixel values at the target coordinates in the initial image to the multiple pixels to be processed using interpolation to obtain the target image.
[0190] For specific limitations and beneficial effects of the target object protrusion detection device, please refer to the limitations of the target object protrusion detection method mentioned above, which will not be repeated here.
[0191] This application also provides a target detection model training apparatus for implementing the target detection model training method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more control module embodiments provided below can be found in the limitations of the target detection model training method described above, and will not be repeated here. Specifically, Figure 11 This is a schematic diagram of the structure of a target detection model training device according to an embodiment of this application. Figure 11 As shown, the target object protrusion detection device 1100 includes:
[0192] The second acquisition module 1110 is configured to acquire sample data; wherein the sample data includes sample images, and the real detection boxes corresponding to the sample target objects and the real detection boxes corresponding to the sample reference objects in the sample images;
[0193] The second detection module 1120 is configured to: detect the target object and the reference object in the sample image through the initial detection model, and obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object.
[0194] The iterative training module 1130 is configured to: use the predicted detection boxes corresponding to the sample target object and the predicted detection boxes corresponding to the sample reference object as the initial training output of the initial detection model, and use the real detection boxes corresponding to the sample target object and the real detection boxes corresponding to the sample reference object as supervision information to iteratively train the initial detection model and obtain the target detection model.
[0195] In some embodiments, the second detection module 1120 is further configured to: perform convolution activation processing on the sample image through the initial detection model to obtain the processed image; perform segmentation processing on the processed image through the initial detection model to obtain multi-layer sample feature maps; and perform sampling processing on the multi-layer sample feature maps through the initial detection model to obtain the predicted detection box corresponding to the sample target object and the predicted detection box corresponding to the sample reference object.
[0196] In some embodiments, the second detection module 1120 is further configured to: perform downsampling processing on the multi-layer sample feature map using an initial detection model to determine the features corresponding to the sample target object and the features corresponding to the sample reference object from the multi-layer sample feature map; and perform upsampling processing on the features corresponding to the sample target object and the features corresponding to the sample reference object using the initial detection model to obtain the predicted detection box corresponding to the sample target object and the predicted detection box corresponding to the sample reference object.
[0197] For specific limitations on the training device for the object detection model and the beneficial effects it can achieve, please refer to the limitations on the training method for the object detection model mentioned above, which will not be repeated here.
[0198] like Figure 12 The diagram shown illustrates the internal structure of a robot according to this embodiment. This robot, also known as a mobile device, includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The robot's processor provides computational and control capabilities. The robot's memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The robot's communication interface is used for wired or wireless communication with external terminals. Wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a target object protrusion detection method. The robot's display screen can be an electronic display screen, an LCD screen, or an e-ink display screen. The robot's input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the robot's shell, or an external keyboard, touchpad, or mouse.
[0199] like Figure 13The diagram shown is a schematic representation of the internal structure of a control device provided in this embodiment. This control device can also be called an electronic device, which may be a server. The electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores height parameters and 3D map data. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a target protrusion detection method or a target detection model training method.
[0200] Those skilled in the art will understand that Figure 12 and Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the robots and electronic devices to which the present application is applied. Specific robots and electronic devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0201] In a specific implementation, this application provides an electronic device, including a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, it implements the steps of the method in any of the above embodiments.
[0202] In a specific implementation, embodiments of this application provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0203] In a specific implementation, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0204] In a specific implementation, this application provides a computer program that, when executed by a processor, implements the steps of the method in any of the above embodiments.
[0205] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in this application may include at least one of relational databases and non-relational databases. Non-relational databases may include, but are not limited to, blockchain-based distributed databases, etc. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logic devices based on quantitative computation, etc., etc., and are not limited to these.
[0206] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0207] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for detecting the protrusion of a target object, characterized in that, The target object protrusion detection method includes: Acquire at least one target image; wherein the at least one target image is acquired based on at least one acquisition direction, and the target image includes a target object and a reference object; The target object and the reference object in the at least one target image are detected by the target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object; Based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object, the prominence information of the target object relative to the reference object is determined.
2. The target object protrusion detection method according to claim 1, characterized in that, The at least one target image includes a first target image; the first target image is acquired based on a first direction among the at least one acquisition direction; when the first target image is acquired based on the first direction, the reference object includes a vehicle and a collision detection object; the detection frame corresponding to the target object includes a first detection frame, and the detection frame corresponding to the reference object includes a second detection frame corresponding to the vehicle and a third detection frame corresponding to the collision detection object; The step of detecting the target object and the reference object in the at least one target image using a target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object includes: The target object and the reference object in the first target image are detected by the target detection model to obtain the first detection box, the second detection box and the third detection box.
3. The target object protrusion detection method according to claim 1, characterized in that, The step of determining the prominence information of the target object relative to the reference object based on the positional relationship between the detection frame corresponding to the target object and the detection frame corresponding to the reference object includes: If the first boundary of the first detection frame is outside the second detection frame and there is no overlapping area between the first detection frame and the third detection frame, the protrusion information is determined to be that the target object protrudes from the vehicle and there is no risk of collision. If the first boundary of the first detection frame is outside the second detection frame and there is an overlapping area between it and the third detection frame, the protrusion information is determined to be that the target object protrudes from the vehicle and there is a risk of collision.
4. The target object protrusion detection method according to claim 2 or 3, characterized in that, The at least one target image further includes a second target image; the second target image is acquired based on a second direction among the at least one acquisition direction, wherein the first direction and the second direction are different acquisition directions; when the second target image is acquired based on the second direction, the reference object includes the vehicle; the detection box corresponding to the target object includes a fourth detection box, and the detection box corresponding to the reference object includes a fifth detection box; The step of detecting the target object and the reference object in the at least one target image using a target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object includes: The target object and the reference object in the second target image are detected by the target detection model to obtain the fourth detection box and the fifth detection box.
5. The target object protrusion detection method according to claim 4, characterized in that, The step of determining the prominence information of the target object relative to the reference object based on the positional relationship between the detection frame corresponding to the target object and the detection frame corresponding to the reference object includes: Based on the positional relationship between the first detection frame and the second detection frame, the horizontal protrusion position of the target object relative to the vehicle is determined; Based on the positional relationship between the fourth and fifth detection frames, the vertical protrusion position of the target object relative to the reference object is determined; wherein, the protrusion information includes the horizontal protrusion position and the vertical protrusion position.
6. The target object protrusion detection method according to claim 1, characterized in that, The step of detecting the target object and the reference object in the at least one target image using a target detection model to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object includes: The target detection model is used to perform convolutional activation processing on the at least one target image to obtain a first image; The first image is segmented using the target detection model to obtain a multi-layer feature map; The target detection model samples the multi-layer feature map to obtain the detection box corresponding to the target object and the detection box corresponding to the reference object.
7. The target object protrusion detection method according to claim 1, characterized in that, The target object protrusion detection method also includes: Acquire the initial image captured by the image acquisition device; Based on the intrinsic parameter matrix and distortion parameters corresponding to the image acquisition device, the initial image is subjected to distortion removal processing to obtain the target image.
8. The target object protrusion detection method according to claim 7, characterized in that, The step of performing distortion correction processing on the initial image based on the intrinsic parameter matrix and distortion parameters corresponding to the image acquisition device to obtain the target image includes: Based on the intrinsic parameter matrix, the pixel coordinates of multiple pixels to be processed in the image to be processed are converted into multiple normalized coordinates; wherein, the image to be processed refers to a blank image with the same resolution as the initial image; Based on the multiple normalized coordinates, the distortion parameters, and the preset distortion formula, multiple distortion coordinates are determined; The multiple distorted coordinates are mapped onto the initial image to obtain multiple target coordinates; The pixel value at the target coordinate in the initial image is assigned to the plurality of pixels to be processed by interpolation to obtain the target image.
9. A method for training an object detection model, characterized in that, The object detection model training method includes: Acquire sample data; wherein, the sample data includes sample images, and the ground truth detection bounding boxes corresponding to the sample target objects and the sample reference objects in the sample images; Based on the initial detection model, the target object and the reference object in the sample image are detected to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object. The predicted detection boxes corresponding to the target object and the predicted detection boxes corresponding to the reference object are used as the initial training output of the initial detection model, and the real detection boxes corresponding to the target object and the reference object are used as supervision information. The initial detection model is iteratively trained to obtain the target detection model.
10. The target detection model training method according to claim 9, characterized in that, The step of detecting the target object and the reference object in the sample image based on the initial detection model to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object includes: The sample image is subjected to convolutional activation processing using the initial detection model to obtain the processed image; The processed image is segmented using the initial detection model to obtain a multi-layer sample feature map; The initial detection model is used to sample the feature map of the multi-layer sample to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object.
11. The target detection model training method according to claim 9, characterized in that, The step of sampling the multi-layer sample feature map using the initial detection model to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object includes: The initial detection model is used to downsample the multi-layer sample feature map to determine the features corresponding to the target object and the reference object from the multi-layer sample feature map. The initial detection model performs upsampling processing on the features corresponding to the target object and the features corresponding to the reference object to obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object.
12. A target object protrusion detection device, characterized in that, include: The first acquisition module is configured to: determine at least one target image; wherein the at least one target image is acquired based on at least one acquisition direction, and the target image includes a target object and a reference object; The first detection module is configured to: detect the target object and the reference object in the at least one target image, and obtain a detection box corresponding to the target object and a detection box corresponding to the reference object; The determination module is configured to: determine the prominence information of the target object relative to the reference object based on the positional relationship between the detection box corresponding to the target object and the detection box corresponding to the reference object.
13. A target detection model training device, characterized in that, include: The second acquisition module is configured to acquire sample data; wherein the sample data includes sample images, and the real detection boxes corresponding to the sample target objects and the real detection boxes corresponding to the sample reference objects in the sample images; The second detection module is configured to: detect the target object and the reference object in the sample image using the initial detection model, and obtain the predicted detection box corresponding to the target object and the predicted detection box corresponding to the reference object; The iterative training module is configured to: use the predicted detection boxes corresponding to the sample target object and the predicted detection boxes corresponding to the sample reference object as the initial training output of the initial detection model, and the real detection boxes corresponding to the sample target object and the real detection boxes corresponding to the sample reference object as supervision information, to iteratively train the initial detection model and obtain the target detection model.
14. An electronic device, characterized in that, The method includes a memory and a processor, the memory storing a computer program, characterized in that, when the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8, or implements the steps of the method according to any one of claims 9 to 11.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8, or implements the steps of the method according to any one of claims 9 to 11.
16. A computer program product, characterized in that, The method includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8, or implements the steps of the method according to any one of claims 9 to 11.
