Scene-based pose estimation method and apparatus, terminal device, and storage medium
By performing instance segmentation and outer contour labeling on the images to be evaluated, and calculating pose estimation values, the problem of inaccurate pose estimation in multiple display scene images is solved, and higher pose estimation accuracy is achieved.
Patent Information
- Application Number
- CN202311184714.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-09-13
AI Technical Summary
In existing technologies, when performing scene recognition and pose estimation on images containing multiple display scenes, it is impossible to accurately obtain the pose estimation value corresponding to each display scene, resulting in poor accuracy of pose estimation.
The image to be evaluated is segmented using a pre-defined instance segmentation model, the outer contour of each display scene is marked, and the pose estimate of each display scene is calculated. This includes training the instance segmentation model to generate MASK tags, calculating the length and coordinate data of the bounding rectangle and vertical line segments, calculating the pose estimate using the formula pose=(RH-LH)/(RX-LX), and performing deduplication on overlapping scenes.
It achieves accurate segmentation and attitude estimation for multiple display scenarios, improves the accuracy of attitude estimation, and is suitable for accurate identification and attitude evaluation of multiple display scenarios.
Smart Images

Figure CN117315656B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer scene pose estimation technology, and in particular to a scene-based pose estimation method, apparatus, terminal device, and storage medium. Background Technology
[0002] In the fast-moving consumer goods (FMCG) sector, brands often need to place products in various retail outlets. To achieve higher sales, they typically sign display contracts with stores based on factors such as store size, location, and customer traffic. If the product display in the selected stores is substandard or there is a shortage of products, it can lead to significant financial losses for the brands that have placed their products. Therefore, brands need their sales personnel to periodically visit various retail outlets to inspect and confirm the display of the placed freezers.
[0003] However, existing technologies often employ a global shelf attitude Euler angle estimation method to identify and estimate the attitude of displayed goods. This method, when identifying multiple display scenes in an image, treats all scenes as a single scene and then combines them into a single Euler angle to calculate the corresponding attitude estimate. Therefore, when performing scene recognition and attitude estimation on images containing multiple display scenes, this method cannot accurately obtain the attitude estimate for each individual scene in the image, resulting in poor attitude estimation accuracy. Summary of the Invention
[0004] This invention provides a scene-based pose estimation method, apparatus, terminal device, and storage medium, which can effectively solve the problem in the prior art that when performing scene recognition and pose estimation on images containing multiple display scenes, the pose estimation value corresponding to each display scene in an image cannot be accurately obtained, resulting in poor accuracy of pose estimation when performing pose estimation on display scenes in an image.
[0005] An embodiment of the present invention provides a scene-based pose estimation method, comprising:
[0006] Obtain images containing multiple display scenarios to be evaluated;
[0007] The image to be evaluated is input into a preset instance segmentation model so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour marks.
[0008] For each display scene, the posture estimate of the display scene is calculated based on the outer contour;
[0009] Based on the posture estimation values of each display scene, the scene posture in the image to be evaluated is determined.
[0010] Preferably, the training of the preset instance segmentation model includes:
[0011] Sample images with multiple scene MASK tags are used as training samples;
[0012] The MASK-based instance segmentation model is iteratively trained based on the training samples until the instance segmentation model converges.
[0013] In each training session, training samples are input into the instance segmentation model to be trained, so that the instance segmentation model to be trained outputs the prediction results corresponding to the training samples with multiple scene MASK labels.
[0014] The predicted results of the training samples with multiple scene mask labels are compared with the actual results of the training samples with multiple scene mask labels. The network parameters of the segmentation model for the training instances are adjusted based on the comparison results.
[0015] Preferably, calculating the pose estimate of the display scene based on the outer contour includes:
[0016] Based on the outer contour, generate the minimum bounding rectangle corresponding to the outer contour in the display scene;
[0017] The circumscribed rectangle is divided into a left horizontal region and a right horizontal region;
[0018] Several left vertical lines are generated in the vertical direction corresponding to the left horizontal region, and several right vertical lines are generated in the vertical direction corresponding to the right horizontal region.
[0019] Based on the first length of the first intersecting line segment corresponding to the intersection of each left vertical line with the outer contour, select the first target intersecting line segment corresponding to the largest first length;
[0020] Based on the second length of the second intersecting line segment corresponding to the intersection of each right vertical line with the outer contour, select the second target intersecting line segment corresponding to the largest second length;
[0021] Based on the coordinate data of the intersecting line segments of the first and second targets, the estimated pose of the display scene is calculated.
[0022] Preferably, generating a plurality of left vertical lines in the vertical direction corresponding to the left transverse region and a plurality of right vertical lines in the vertical direction corresponding to the right transverse region includes:
[0023] A first region is generated in the left horizontal region according to a preset ratio, and several left vertical lines are generated at equal intervals in the vertical direction corresponding to the first region; wherein, the first region is smaller than the left horizontal region;
[0024] A corresponding second region is generated in the right horizontal region according to a preset ratio, and several right vertical lines are generated at equal intervals in the vertical direction corresponding to the second region; wherein the second region is smaller than the right horizontal region.
[0025] Preferably, calculating the pose estimate of the display scene based on the coordinate data of the intersecting line segments of the first and second targets includes:
[0026] The first length of the first target intersecting line segment is calculated based on the coordinate data of the two intersection points of the first target intersecting line segment and the outer contour in a preset coordinate system; wherein, the preset coordinate system is a rectangular coordinate system with the lower left vertex of the circumscribed rectangle as the origin;
[0027] The second length of the second target intersecting line segment is calculated based on the coordinate data of the two intersection points of the second target intersecting line segment and the outer contour in the preset coordinate system.
[0028] Obtain the first abscissa value of the first target intersecting line segment in the preset coordinate system, and the second abscissa value of the second target intersecting line segment in the preset coordinate system;
[0029] The estimated pose of the display scene is calculated using the following formula:
[0030] pose = (RH - LH) / (RX - LX);
[0031] Where pose is the estimated pose value of the display scene, LH is the first length of the line segment intersecting the first target, RH is the second length of the line segment intersecting the second target, LX is the first abscissa value, and RX is the second abscissa value.
[0032] Preferably, after the instance segmentation model generates multiple images to be evaluated with specific outer contour markers, and before calculating the pose estimate of the display scene based on the outer contours, the method further includes:
[0033] Calculate the IOU value between each display scene and its corresponding adjacent display scenes;
[0034] Based on each IOU value, the overlapping display scenarios are identified;
[0035] Perform deduplication on overlapping display scenarios.
[0036] Preferably, it further includes:
[0037] The estimated posture value corresponding to each display scene is displayed on the display scene corresponding to the image to be evaluated.
[0038] Based on the above method embodiments, the present invention provides corresponding apparatus embodiments.
[0039] An embodiment of the present invention provides a scene-based pose estimation device, including: an image acquisition module, an outer contour marking module, a pose estimation value calculation module, and a scene pose determination module;
[0040] The image acquisition module is used to acquire images to be evaluated that contain multiple display scenes;
[0041] The outer contour marking module is used to input the image to be evaluated into a preset instance segmentation model, so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour markings.
[0042] The attitude estimation calculation module is used to calculate the attitude estimation value of each display scene based on the outer contour.
[0043] The scene pose determination module is used to determine the scene pose in the image to be evaluated based on the pose estimation values of each display scene.
[0044] Based on the above method embodiments, the present invention provides corresponding terminal device embodiments.
[0045] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a scene-based attitude estimation method as described in the above-described embodiment of the invention.
[0046] Based on the above method embodiments, the present invention provides corresponding storage medium embodiments.
[0047] Another embodiment of the present invention provides a storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the scene-based attitude estimation method described in the above-described embodiment of the invention.
[0048] The following benefits can be obtained by implementing the present invention:
[0049] This invention provides a scene-based pose estimation method, apparatus, terminal device, and storage medium. The method includes: acquiring an image to be evaluated containing multiple display scenes; inputting the image to be evaluated into a preset instance segmentation model, so that the instance segmentation model segments each display scene in the image to be evaluated, and then marks the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour markings; for each display scene, calculating the pose estimation value of the display scene based on the outer contour; and determining the scene pose in the image to be evaluated based on the pose estimation values of each display scene. Compared with the prior art, this invention can obtain multiple segmented display scenes when generating multiple images to be evaluated with specific outer contour markings by inputting the image to be evaluated into a preset instance segmentation model, so that the instance segmentation model marks and segments each display scene. Therefore, this invention can mark and segment multiple display scenes in an image, obtain multiple display scenes, and then calculate the pose estimation value of each display scene. When calculating the pose estimation value of each display scene, the pose estimation value corresponding to each display scene can be accurately calculated based on the outer contour of the display scene. Therefore, this invention can not only segment multiple display scenes in an image to be evaluated, but also accurately obtain the pose estimation value corresponding to each display scene in the image to be evaluated, thereby improving the pose estimation accuracy when estimating the pose of a display scene in an image. Attached Figure Description
[0050] Figure 1 This is a flowchart illustrating a scene-based pose estimation method provided in an embodiment of the present invention.
[0051] Figure 2 This is a schematic diagram showing the markings of various display scenes in the image to be evaluated, provided in an embodiment of the present invention.
[0052] Figure 3 This is another schematic diagram of the various display scenes in the image to be evaluated provided in an embodiment of the present invention.
[0053] Figure 4 This is a schematic diagram of the outer contour and minimum bounding rectangle corresponding to a display scene provided in an embodiment of the present invention.
[0054] Figure 5 This is a schematic diagram of the line segment corresponding to the longest intersecting line segment between the left and right perpendicular lines selected according to the length, provided by an embodiment of the present invention.
[0055] Figure 6This is a schematic diagram of the structure of a scene-based attitude estimation device provided in an embodiment of the present invention. Detailed Implementation
[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] like Figure 1 The diagram shown is a flowchart illustrating a scene-based pose estimation method according to an embodiment of the present invention. The scene-based pose estimation method includes:
[0058] Step S1: Obtain images containing multiple display scenarios to be evaluated;
[0059] Step S2: Input the image to be evaluated into a preset instance segmentation model so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour markings.
[0060] Step S3: For each display scene, calculate the pose estimation value of the display scene based on the outer contour;
[0061] Step S4: Determine the scene pose in the image to be evaluated based on the pose estimation values of each display scene.
[0062] For step S1, in a preferred embodiment, an image to be labeled is obtained, and this image contains multiple display scenes. Each display scene needs to be segmented and labeled before the pose estimation value of each display scene is calculated one by one. It should be noted that the display scenes include the following: shelves, endcaps, display racks, refrigerated display cases, upright freezers, hot beverage machines, display racks, horizontal freezers, floor stacks, hanging nets, etc. Segmenting and labeling the display scenes actually involves masking each display scene.
[0063] For step S2, in a preferred embodiment, the image to be evaluated is input into a preset instance segmentation model so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour markings.
[0064] The training of the preset instance segmentation model includes:
[0065] Sample images with multiple scene MASK tags are used as training samples;
[0066] The MASK-based instance segmentation model is iteratively trained based on the training samples until the instance segmentation model converges.
[0067] In each training session, training samples are input into the instance segmentation model to be trained, so that the instance segmentation model to be trained outputs the prediction results corresponding to the training samples with multiple scene MASK labels.
[0068] The predicted results of the training samples with multiple scene mask labels are compared with the actual results of the training samples with multiple scene mask labels. The network parameters of the segmentation model for the training instances are adjusted based on the comparison results.
[0069] This invention uses a trained mask-based instance segmentation model to mask each display scene within an image to be estimated, thereby generating the outer contour corresponding to each display scene. Figure 2 and Figure 3 The diagram shows the markings for each display scene. The corresponding posture estimation values can be calculated based on the outer contour.
[0070] In a preferred embodiment, after the instance segmentation model generates multiple images to be evaluated with specific outer contour markers, and before calculating the pose estimate of the display scene based on the outer contours, the method further includes:
[0071] Calculate the IOU value between each display scene and its corresponding adjacent display scenes;
[0072] Based on each IOU value, the overlapping display scenarios are identified;
[0073] Based on scene weights (e.g., endcap weights are greater than shelf weights under the same conditions) and the score value of scene recognition results, duplicate display scenes with overlap are deduplicated; wherein, the region weights and the score values are generated by the instance segmentation model.
[0074] This embodiment can remove duplicate display scenes that overlap, so that the posture estimation value of the display scene can be calculated more accurately when calculating the display scene based on the outer contour.
[0075] For step S3, in a preferred embodiment, for each display scene, the posture estimate value of the display scene can be calculated based on its corresponding outer contour.
[0076] Specifically, based on the outer contour, the pose estimation value of the display scene is calculated, including:
[0077] Based on the outer contour, generate the minimum bounding rectangle corresponding to the outer contour in the display scene;
[0078] The circumscribed rectangle is divided into a left horizontal region and a right horizontal region;
[0079] Several left vertical lines are generated in the vertical direction corresponding to the left horizontal region, and several right vertical lines are generated in the vertical direction corresponding to the right horizontal region.
[0080] Based on the first length of the first intersecting line segment corresponding to the intersection of each left vertical line with the outer contour, select the first target intersecting line segment corresponding to the largest first length;
[0081] Based on the second length of the second intersecting line segment corresponding to the intersection of each right vertical line with the outer contour, select the second target intersecting line segment corresponding to the largest second length;
[0082] Based on the coordinate data of the intersecting line segments of the first and second targets, the estimated pose of the display scene is calculated.
[0083] like Figure 4 The diagram showing the outer contour and minimum bounding rectangle first involves creating a minimum bounding rectangle for the outer contour of the display. Then, based on the horizontal direction of the bounding rectangle, i.e., the width of the scene, the display is divided into a left horizontal region and a right horizontal region. Next, several left vertical lines can be generated in the vertical direction corresponding to the left horizontal region, and several right vertical lines can be generated in the vertical direction corresponding to the right horizontal region.
[0084] In a preferred embodiment, illustratively, when generating the left and right vertical lines, a corresponding first region is generated in the left horizontal region according to a preset ratio, and a plurality of left vertical lines are generated at equal intervals in the vertical direction corresponding to the first region; a corresponding second region is generated in the right horizontal region according to a preset ratio, and a plurality of right vertical lines are generated at equal intervals in the vertical direction corresponding to the second region; wherein, the first region is smaller than the left horizontal region; and the second region is smaller than the right horizontal region. It should be noted that the preset ratio can be 1 / 3.
[0085] That is, the present invention can generate a combination of left vertical lines in the left horizontal region of the scene width direction (i.e., generate 10 left vertical lines at equal intervals from the leftmost point to the 1 / 3 point); and generate a combination of right vertical lines in the right horizontal region of the scene width direction (i.e., generate 10 right vertical lines at equal intervals from the rightmost point to the 1 / 3 point).
[0086] Therefore, in this embodiment, when drawing the smallest circumscribed rectangle of the outer contour, the first target intersecting line segment corresponding to the first maximum length and the second target intersecting line segment corresponding to the second maximum length are selected based on the length of the intersecting line segments corresponding to the intersection of the generated left or right vertical lines with the outer contour. Finally, the pose estimation value of the display scene is calculated based on the coordinate data of the first target intersecting line segment and the second target intersecting line segment.
[0087] Furthermore, in a preferred embodiment, the pose estimation value of the display scene is calculated based on the coordinate data of the first target intersection line segment and the second target intersection line segment, including:
[0088] Based on the coordinate data of the two intersection points of the first target intersecting line segment and the outer contour in the preset coordinate system, the first length LH of the first target intersecting line segment is calculated; wherein, the preset coordinate system is: a rectangular coordinate system with the lower left vertex of the circumscribed rectangle as the origin;
[0089] The second length RH of the second target intersecting line segment is calculated based on the coordinate data of the two intersection points of the second target intersecting line segment and the outer contour in the preset coordinate system.
[0090] Obtain the first abscissa value LX of the first target intersecting line segment in the preset coordinate system, and the second abscissa value RX of the second target intersecting line segment in the preset coordinate system;
[0091] The estimated pose of the display scene is calculated using the following formula:
[0092] pose = (RH - LH) / (RX - LX);
[0093] Where pose is the estimated pose value of the display scene, LH is the first length of the line segment intersecting the first target, RH is the second length of the line segment intersecting the second target, LX is the first abscissa value, and RX is the second abscissa value.
[0094] As discussed above, the longest intersection line segments of the first and second targets can be selected by measuring the length of the intersection line segments when the left and right vertical lines intersect with the outer contour.
[0095] like Figure 5As shown, a preset rectangular coordinate system is established with the lower left vertex of the circumscribed rectangle as the origin. Based on the coordinate data of the two intersection points of the first target intersecting line segment and the outer contour in the preset rectangular coordinate system, the first length LH of the first target intersecting line segment can be calculated. Based on the coordinate data of the two intersection points of the second target intersecting line segment and the outer contour in the preset coordinate system, the second length RH of the second target intersecting line segment can be calculated.
[0096] Based on the preset rectangular coordinate system, after obtaining the intersection line segments of the first target and the second target, the first abscissa value LX and the second abscissa value RX corresponding to these two line segments can be obtained.
[0097] Finally, based on the first length LH of the intersecting line segment of the first target, the second length RH of the intersecting line segment of the second target, the first abscissa value LX, and the second abscissa value RX, the attitude estimation value of the corresponding display scene can be calculated.
[0098] It is understandable that, because the present invention generates a first region or a second region smaller than the left or right horizontal region according to a preset ratio when generating the left or right horizontal region, the distance between the first target intersection line segment and the second target intersection line segment selected from the first and second regions will be relatively large. Therefore, when calculating based on the coordinate data of the first and second target intersection line segments, a more accurate tilt value can be obtained, that is, an accurate attitude estimation value can be obtained. Thus, the attitude estimation value corresponding to each display scene can be accurately calculated. Therefore, the present invention can not only perform scene segmentation on images of multiple display scenes in the image to be evaluated, but also accurately obtain the attitude estimation value corresponding to each display scene in the image to be evaluated, thereby improving the attitude estimation accuracy when performing attitude estimation on display scenes in an image.
[0099] Compared with existing technologies, this invention can not only accurately characterize the poses of various irregular scenes, but also evaluate multiple scenes under the same image, thereby greatly improving the applicability of the technology in actual business.
[0100] In a preferred embodiment, the present invention further includes:
[0101] The estimated pose value for each display scene is displayed on the display scene corresponding to the image to be evaluated. It should be noted that when calculating the pose evaluation coefficient of the display scene according to the formula pose = (RH-LH) / (RX-LX), the absolute value of pose indicates the degree of tilt of the scene pose. The larger the value, the more obvious the tilt. The positive or negative sign of the pose value indicates the direction of the tilt of the scene. A positive sign means the left side is inward and the right side is outward, and a negative sign is the opposite.
[0102] like Figure 6 As shown, based on the above embodiments of various scene-based pose estimation methods, the present invention provides corresponding device embodiments;
[0103] An embodiment of the present invention provides a scene-based pose estimation device, including: an image acquisition module, an outer contour marking module, a pose estimation value calculation module, and a scene pose determination module;
[0104] The image acquisition module is used to acquire images to be evaluated that contain multiple display scenes;
[0105] The outer contour marking module is used to input the image to be evaluated into a preset instance segmentation model, so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour markings.
[0106] The attitude estimation calculation module is used to calculate the attitude estimation value of each display scene based on the outer contour.
[0107] The scene pose determination module is used to determine the scene pose in the image to be evaluated based on the pose estimation values of each display scene.
[0108] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0109] Those skilled in the art will clearly understand that, for convenience and simplicity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0110] Based on the above embodiments of various scene-based attitude estimation methods, the present invention provides corresponding embodiments for terminal devices.
[0111] One embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a scene-based attitude estimation method as described in any embodiment of the present invention.
[0112] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0113] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0114] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0115] Based on the above embodiments of various scene-based attitude estimation methods, the present invention provides corresponding embodiments of storage medium items.
[0116] One embodiment of the present invention provides a storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a scene-based attitude estimation method according to any embodiment of the present invention.
[0117] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When executed by a processor, the computer program can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0118] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A scene-based pose estimation method, characterized in that, include: Obtain images containing multiple display scenarios to be evaluated; The image to be evaluated is input into a preset instance segmentation model so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour marks. For each display scene, based on the outer contour, generate the minimum bounding rectangle corresponding to the outer contour in the display scene; The circumscribed rectangle is divided into a left horizontal region and a right horizontal region; Several left vertical lines are generated in the vertical direction corresponding to the left horizontal region, and several right vertical lines are generated in the vertical direction corresponding to the right horizontal region. Based on the first length of the first intersecting line segment corresponding to the intersection of each left vertical line with the outer contour, select the first target intersecting line segment corresponding to the largest first length; Based on the second length of the second intersecting line segment corresponding to the intersection of each right vertical line with the outer contour, select the second target intersecting line segment corresponding to the largest second length; Based on the coordinate data of the intersecting line segments of the first and second targets, the attitude estimate of the display scene is calculated. Based on the posture estimation values of each display scene, the scene posture in the image to be evaluated is determined; The generation of several left vertical lines in the vertical direction corresponding to the left horizontal region and several right vertical lines in the vertical direction corresponding to the right horizontal region includes: A first region is generated in the left horizontal region according to a preset ratio, and several left vertical lines are generated at equal intervals in the vertical direction corresponding to the first region; wherein, the first region is smaller than the left horizontal region; A second region is generated in the right horizontal region according to a preset ratio, and several right vertical lines are generated at equal intervals in the vertical direction corresponding to the second region; wherein the second region is smaller than the right horizontal region.
2. The scene-based pose estimation method as described in claim 1, characterized in that, The training of the preset instance segmentation model includes: Sample images with multiple scene MASK tags are used as training samples; The MASK-based instance segmentation model is iteratively trained based on the training samples until the instance segmentation model converges. In each training session, training samples are input into the instance segmentation model to be trained, so that the instance segmentation model to be trained outputs the prediction results corresponding to the training samples with multiple scene MASK labels. The predicted results of the training samples with multiple scene mask labels are compared with the actual results of the training samples with multiple scene mask labels. The network parameters of the segmentation model for the training instances are adjusted based on the comparison results.
3. The scene-based pose estimation method as described in claim 2, characterized in that, The step of calculating the pose estimate of the display scene based on the coordinate data of the intersecting line segments of the first and second targets includes: The first length of the first target intersecting line segment is calculated based on the coordinate data of the two intersection points of the first target intersecting line segment and the outer contour in a preset coordinate system; wherein, the preset coordinate system is a rectangular coordinate system with the lower left vertex of the circumscribed rectangle as the origin; The second length of the second target intersecting line segment is calculated based on the coordinate data of the two intersection points of the second target intersecting line segment and the outer contour in the preset coordinate system. Obtain the first abscissa value of the first target intersecting line segment in the preset coordinate system, and the second abscissa value of the second target intersecting line segment in the preset coordinate system; The estimated pose of the display scene is calculated using the following formula: pose=(RH-LH) / (RX-LX); Where pose is the estimated pose value of the display scene, LH is the first length of the line segment intersecting the first target, RH is the second length of the line segment intersecting the second target, LX is the first abscissa value, and RX is the second abscissa value.
4. The scene-based pose estimation method as described in claim 1, characterized in that, After the instance segmentation model generates multiple images to be evaluated with specific outer contour markers, and before calculating the pose estimate of the display scene based on the outer contours, the process further includes: Calculate the IOU value between each display scene and its corresponding adjacent display scenes; Based on each IOU value, the overlapping display scenarios are identified; Perform deduplication on overlapping display scenarios.
5. The scene-based pose estimation method as described in claim 1, characterized in that, Also includes: The estimated posture value corresponding to each display scene is displayed on the display scene corresponding to the image to be evaluated.
6. A scene-based pose estimation device, characterized in that, include: The module includes an image acquisition module, an outer contour marking module, a pose estimation calculation module, and a scene pose determination module. The image acquisition module is used to acquire images to be evaluated that contain multiple display scenes; The outer contour marking module is used to input the image to be evaluated into a preset instance segmentation model, so that the instance segmentation model can segment each display scene in the image to be evaluated, and then mark the outer contour of each display scene to generate multiple images to be evaluated with specific outer contour markings. The posture estimation calculation module is used to generate, for each display scene, the minimum bounding rectangle corresponding to the outer contour in the display scene according to the outer contour; divide the bounding rectangle into a left horizontal region and a right horizontal region; generate a number of left vertical lines in the vertical direction corresponding to the left horizontal region, and generate a number of right vertical lines in the vertical direction corresponding to the right horizontal region; and select the first target intersecting line segment corresponding to the largest first length based on the first length of the first intersecting line segment corresponding to the first intersection line segment when each left vertical line intersects with the outer contour. Based on the second length of the second intersecting line segment corresponding to the intersection of each right vertical line with the outer contour, select the second target intersecting line segment corresponding to the largest second length; Based on the coordinate data of the intersecting line segments of the first and second targets, the attitude estimate of the display scene is calculated. The scene pose determination module is used to determine the scene pose in the image to be evaluated based on the pose estimation value of each display scene. The attitude estimation calculation module is used to generate several left vertical lines in the vertical direction corresponding to the left lateral region, and several right vertical lines in the vertical direction corresponding to the right lateral region, including: A first region is generated in the left horizontal region according to a preset ratio, and several left vertical lines are generated at equal intervals in the vertical direction corresponding to the first region; wherein, the first region is smaller than the left horizontal region; A second region is generated in the right horizontal region according to a preset ratio, and several right vertical lines are generated at equal intervals in the vertical direction corresponding to the second region; wherein the second region is smaller than the right horizontal region.
7. A terminal device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements a scene-based pose estimation method as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the storage medium is located to perform a scene-based attitude estimation method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Commodity display analysis method, device and equipment and storage medium
CN112990095A
