Method, device and equipment for identifying objects in images

By combining the location information and confidence of the object, the problem of low recognition accuracy in the prior art is solved, and more accurate object recognition in the image is achieved, which is suitable for scenes with large lighting and environmental changes.

CN115035407BActive Publication Date: 2025-04-25ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210671835.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-06
Publication Date
2025-04-25
Estimated Expiration
2039-11-06

AI Technical Summary

Technical Problem

The prior art relies solely on confidence when identifying objects in images, resulting in low accuracy of recognition results, especially under the influence of lighting changes and environmental influences, recognition errors are prone to occur.

Method used

By combining the object's location information, categories and confidence, we determine whether the object's categories are the same, consider the influence of factors such as lighting and image quality, and improve the recognition accuracy.

Benefits of technology

The accuracy of object recognition in the image is improved, identification errors caused by lighting and environmental changes are reduced, and the categories of objects in the image can be determined more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115035407B_ABST
    Figure CN115035407B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device and equipment for identifying objects in images, wherein the method for identifying objects in images includes: detecting a first image and a second image respectively, obtaining position information of a first object in the first image, a number of corresponding categories and the confidence of each of the categories, and position information of a second object in the second image, a number of corresponding categories and the confidence of each of the categories; and determining whether the categories of the first object and the second object are the same based on the position information of the first object, a number of corresponding categories and the confidence of each of the categories, and the position information of the second object, a number of corresponding categories and the confidence of each of the categories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device and equipment for identifying objects in images. Background Art

[0002] In actual application scenarios, in order to determine the changes of objects in the monitoring area within a time interval, it is necessary to identify the objects in the images collected at different time points. Taking the unmanned visual container as an example, it is necessary to collect images of the container before and after the user opens the door. By identifying the objects in the two images, it can be determined whether the two objects belong to the same category.

[0003] Currently, visual algorithms are generally used to identify objects in two images, and whether the two objects belong to the same category is determined based on the identified categories and their confidence levels. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus and device for identifying an object in an image, which can improve the accuracy of the recognition result.

[0005] In a first aspect, an embodiment of the present invention provides a method for identifying an object in an image, comprising:

[0006] Detecting the first image and the second image respectively, obtaining position information of a first object in the first image, a number of corresponding categories and a confidence level of each of the categories, and position information of a second object in the second image, a number of corresponding categories and a confidence level of each of the categories;

[0007] Determine whether the first object and the second object are of the same category based on the location information of the first object, the corresponding categories and the confidence of each category, and the location information of the second object, the corresponding categories and the confidence of each category.

[0008] In a second aspect, an embodiment of the present invention provides a device for identifying an object in an image, comprising:

[0009] a detection unit configured to detect the first image and the second image respectively, and obtain the position information of the first object in the first image, the corresponding multiple categories and the confidence of each of the categories, and the position information of the second object in the second image, the corresponding multiple categories and the confidence of each of the categories;

[0010] A determination unit is configured to determine whether the categories of the first object and the second object are the same based on the location information of the first object, the corresponding multiple categories and the confidence of each of the categories, and the location information of the second object, the corresponding multiple categories and the confidence of each of the categories.

[0011] In a third aspect, an embodiment of the present invention provides a device for identifying an object in an image, including: a processor and a memory;

[0012] The memory is used to store execution instructions, and the processor is used to execute the execution instructions stored in the memory to implement the method described in any of the above embodiments.

[0013] At least one of the above-mentioned technical solutions adopted in the embodiments of the present invention can achieve the following beneficial effects: the method combines the location information of the object with the category corresponding to the object and its confidence level. Compared with the traditional method of identification based only on confidence level, the method can take into account the influence of factors such as the location of the object in the image and improve the recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0015] Figure 1 is a flow chart of a method for identifying an object in an image provided by an embodiment of the present invention;

[0016] Figure 2 is a flow chart of a method for identifying an object in an image provided by another embodiment of the present invention;

[0017] Figure 3 It is a schematic diagram of the structure of a device for identifying an object in an image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0019] Traditional recognition methods only determine whether two objects are of the same category based on confidence. For example, through traditional recognition methods, the confidence that the first object in the first image is commodity A is 90%, the confidence that it is commodity B is 80%, and the confidence that it is commodity C is 70%. The confidence that the second object in the second image is commodity A is 5%, the confidence that it is commodity B is 3%, and the confidence that it is commodity C is 2%. Since the category corresponding to the maximum confidence corresponding to the first object is commodity A, which is the same as the category corresponding to the maximum confidence corresponding to the second object, based on the traditional recognition method, the recognition result obtained is: the first object and the second object are of the same category.

[0020] However, in actual application scenarios, the obtained confidence level may be low. If it is determined whether the categories of two objects are the same based only on the confidence level, the accuracy of the recognition result is low.

[0021] For example, the first row and first column of a container contains commodity A, and the first row and second column contains commodity B. Assuming that the commodities in the container remain unchanged, the first image and the second image are acquired under different environments, wherein the quality of the first image is poor due to the influence of light. When identifying the first object in the first row and first column of the first image and the second object in the first row and first column of the second image, the confidence that the first object is commodity A is 9%, the confidence that it is commodity B is 10%, the confidence that the second object is commodity A is 90%, and the confidence that it is commodity B is 80%. Therefore, based on the traditional recognition method, it is determined that the categories of the first object and the second object are different, and this recognition result is obviously inconsistent with the actual situation.

[0022] In view of this, an embodiment of the present invention provides a method for identifying an object in an image, such as Figure 1 As shown, the method may include the following steps:

[0023] Step 101: Detect a first image and a second image respectively to obtain position information of a first object in the first image, corresponding categories and the confidence of each category, and position information of a second object in the second image, corresponding categories and the confidence of each category.

[0024] In actual application scenarios, visual algorithms can be used to detect the position information of each object in the first image, the several categories corresponding to each object, and the confidence level of each category. However, the embodiment of the present invention only takes the recognition process of the first object and the second object as an example for explanation. The recognition process of other objects in the first image and the second image can refer to the recognition process of the first object and the second object, which will not be repeated here.

[0025] Step 102: Determine whether the first object and the second object are of the same category based on the location information of the first object, the corresponding categories and the confidence of each category, and the location information of the second object, the corresponding categories and the confidence of each category.

[0026] This method combines the location information of the object with the category corresponding to the object and its confidence. Compared with the traditional method of recognition based only on confidence, this method can take into account the influence of factors such as the location of the object in the image and improve recognition accuracy.

[0027] In one embodiment of the present invention, considering the influence of factors such as illumination and the number of objects in the image, the image features may be combined with the confidence level and the position information to determine whether the categories of the first object and the second object are the same.

[0028] At this time, step 102 includes: determining whether the categories of the first object and the second object are the same based on the position information, image features, corresponding categories and confidence of each category of the first object, and the position information, image features, corresponding categories and confidence of each category of the second object.

[0029] In one embodiment of the present invention, step 102 specifically includes:

[0030] A1: Determine the overlap between the first object and the second object according to the position information of the first object and the position information of the second object.

[0031] A2: Determine whether the overlap is greater than a first threshold, if so, execute step A3.

[0032] A3: Determine whether the category corresponding to the confidence level of the first object and ranked in the first set positions is completely different from the category corresponding to the confidence level of the second object and ranked in the first set positions. If not, execute step A4.

[0033] For example, the confidences are arranged in descending order, and the first set order is 1, 2, and 3. If the categories corresponding to the confidences of the first object ranked 1-3 are a, b, and c, respectively, and the categories corresponding to the confidences of the second object ranked 1-3 are c, d, and e, respectively, since c exists in the categories corresponding to both the first object and the second object, execute step A4.

[0034] A4: Determine that the first object and the second object have the same category, wherein the confidences corresponding to the first object and the second object are sorted according to the same sorting logic.

[0035] The method provided in this embodiment is applicable to the recognition of two objects whose positions have not changed or have only slightly changed in a first image and a second image.

[0036] Among them, the first threshold value can be a preset value, for example, 0.8. The above-mentioned sorting logic can be from large to small, or from small to large, etc. The first setting order can be one or more. In one application scenario, the first setting order is 1, and the sorting logic is from large to small. In another application scenario, the first setting order is 1-3, and the sorting logic is from large to small. The following second setting order and fourth setting order are similar to the first setting order, and will not be repeated below.

[0037] In actual application scenarios, A3 is not limited to the above-mentioned implementation method. For example, A3 specifically includes: determining whether the categories corresponding to the confidence levels of the first object ranked in several first set positions are the same as the categories corresponding to the confidence levels of the second object ranked in the corresponding positions. If so, executing step A4.

[0038] At this time, the category corresponding to the first-digit confidence level corresponding to the first object is compared with the category corresponding to the first-digit confidence level corresponding to the second object, the category corresponding to the second-digit confidence level corresponding to the first object is compared with the category corresponding to the second-digit confidence level corresponding to the second object, and the category corresponding to the third-digit confidence level corresponding to the first object is compared with the category corresponding to the third-digit confidence level corresponding to the second object.

[0039] In one embodiment of the present invention, A1 specifically includes: determining the area of ​​the intersection and the area of ​​the union of the outer contours of the first object and the second object according to the position of the outer contour of the first object and the position of the outer contour of the second object; and determining the degree of overlap according to the area of ​​the intersection and the area of ​​the union.

[0040] The overlap is the ratio of the area of ​​the intersection to the area of ​​the union.

[0041] In the embodiment of the present invention, the position information is the position of the external contour. In other application scenarios, the position information may also be the position of the minimum circumscribed rectangle, etc.

[0042] When the position information is the position of the minimum circumscribed rectangle, A1 specifically includes: determining the area of ​​the intersection and the area of ​​the union of the minimum circumscribed rectangles of the first object and the second object according to the position of the minimum circumscribed rectangle of the first object and the position of the minimum circumscribed rectangle of the second object; determining the degree of overlap according to the area of ​​the intersection and the area of ​​the union.

[0043] In one embodiment of the present invention, the method further comprises:

[0044] B1: If the degree of overlap is not greater than the first threshold, or the category corresponding to the confidence level of the first object and ranked in the first set positions is completely different from the category corresponding to the confidence level of the second object and ranked in the first set positions, then determine whether the first object and the second object meet the position correspondence condition based on the position information of the first object and the position information of the second object. If so, execute B2.

[0045] B2: Determine whether the category corresponding to the confidence level of the first object and ranked in the second set positions is completely different from the category corresponding to the confidence level of the second object and ranked in the second set positions. If not, execute B3.

[0046] B2 is similar to A2 and will not be described in detail here.

[0047] B3: Determine that the first object and the second object have the same category.

[0048] The method provided in this embodiment is applicable to the recognition of two objects whose positions have changed to a certain extent in a first image and a second image. Compared with the above-mentioned “slight change”, in this embodiment, the change amplitude of the position is larger.

[0049] In one embodiment of the present invention, the position correspondence condition includes: the ratio of the area of ​​the intersection of the outer contours of the first object and the second object to the target area is greater than a second threshold; wherein the target area is the smaller area of ​​the outer contours of the first object and the second object.

[0050] The second threshold is a preset value.

[0051] Of course, in other application scenarios, the position correspondence condition may also be in other forms. For example, the target area in the above position correspondence condition is the larger area of ​​the outer contours of the first object and the second object.

[0052] It should be noted that if the position information is the position of the minimum enclosing rectangle, the above position correspondence condition includes: the ratio of the area of ​​the intersection of the minimum enclosing rectangle of the first object and the second object to the target area is greater than the second threshold; wherein the target area is the smaller area of ​​the minimum enclosing rectangle of the first object and the second object.

[0053] In one embodiment of the present invention, the method further comprises:

[0054] C1: If the category corresponding to the confidence level of the first object and ranked in several second set positions is completely different from the category corresponding to the confidence level of the second object and ranked in several second set positions, determine whether the category corresponding to the confidence level of the first object and ranked in the third set position is the same as one of the categories corresponding to the confidence level of the second object and ranked in several fourth set positions. If so, execute step C2.

[0055] C2: Determine the similarity between the first object and the second object according to the image feature of the first object and the image feature of the second object. If the similarity is greater than a third threshold, execute step C3.

[0056] C3: Determine that the first object and the second object have the same category.

[0057] The method provided by the embodiment of the present invention is applicable to the recognition of the first object and the second object when the first image or the second image is affected by lighting or human factors. Taking the recognition process of two commodities in the application scenario of "unattended visual container" as an example, in the second image, the user replaces commodity M with commodity N, and the method provided by the embodiment of the present invention can recognize commodity M in the first image and commodity N in the second image.

[0058] Image features include, but are not limited to, color features, texture features, shape features, and spatial relationship features.

[0059] like Figure 2 As shown, the embodiment of the present invention takes the recognition of two commodities in a container as an example to describe in detail the method for recognizing objects in an image. The method includes the following steps:

[0060] Step 201: Detect the first image and the second image respectively to obtain the location information of commodity 1 in the first image, the corresponding categories and the confidence of each category, and the location information of commodity 2 in the second image, the corresponding categories and the confidence of each category.

[0061] Step 202: Determine the intersection area and the union area of ​​the outer contours of the goods 1 and 2 according to the positions of the outer contours of the goods 1 and 2, and determine the degree of overlap according to the intersection area and the union area.

[0062] Step 203: Determine whether the overlap is greater than 0.9, if so, execute step 204, otherwise, execute step 206.

[0063] Step 204: Determine whether the category corresponding to the confidence level ranked 1-2 for product 1 is completely different from the category corresponding to the confidence level ranked 1-2 for product 2. If so, execute step 206; otherwise, execute step 205.

[0064] Among them, the confidences corresponding to product 1 and product 2 are sorted according to the same sorting logic.

[0065] Step 205: Determine that the categories of commodity 1 and commodity 2 are the same.

[0066] Step 206: Determine whether the location correspondence condition is met between the product 1 and the product 2 according to the location information of the product 1 and the location information of the product 2. If yes, execute step 207; otherwise, execute step 211.

[0067] The position corresponding condition is that the ratio of the area of ​​the intersection of the outer contours of product 1 and product 2 to the target area is greater than 0.5; wherein the target area is the smaller area of ​​the outer contours of product 1 and product 2.

[0068] Step 207: Determine whether the category corresponding to the third-ranked confidence level corresponding to product 1 is the same as the category corresponding to the third-ranked confidence level corresponding to product 2. If so, execute step 205; otherwise, execute step 208.

[0069] Step 208: Determine whether the category corresponding to the confidence level ranked first for product 1 is the same as the category corresponding to the confidence level ranked third or fourth for product 2; if so, execute step 209; otherwise, execute step 211.

[0070] Step 209: Determine the similarity between product 1 and product 2 based on the image features of product 1 and the image features of product 2.

[0071] Step 210: Determine whether the similarity is greater than 90%, if so, execute step 205, otherwise, execute step 211.

[0072] Step 211: Determine that the categories of commodity 1 and commodity 2 are different.

[0073] It should be noted that the embodiment of the present invention only takes the application scenario of a container as an example, but the method is not limited to determining whether the categories of goods are the same. For example, the method can also be used to identify whether the first object in the first image and the second object in the second image are the same person. In this scenario, the confidence that the first object / the second object is each person can be determined by a visual algorithm.

[0074] The above embodiment only takes the recognition of two objects as an example to illustrate the method for recognizing objects in an image. In actual application scenarios, any object in the first image and any object in the second image can be recognized by the method provided in the above embodiment.

[0075] like Figure 3As shown, an embodiment of the present invention provides a device for identifying an object in an image, comprising:

[0076] A detection unit 301 is configured to detect the first image and the second image respectively, and obtain the position information of the first object in the first image, the corresponding several categories and the confidence of each category, and the position information of the second object in the second image, the corresponding several categories and the confidence of each category;

[0077] The determination unit 302 is configured to determine whether the categories of the first object and the second object are the same based on the location information of the first object, the corresponding categories and the confidence of each category, and the location information of the second object, the corresponding categories and the confidence of each category.

[0078] In one embodiment of the present invention, the determination unit 302 is configured to determine the degree of overlap between the first object and the second object based on the position information of the first object and the position information of the second object; determine whether the degree of overlap is greater than a first threshold, and if so, determine whether the category corresponding to the confidence level of the first object and ranked in a number of first set positions is completely different from the category corresponding to the confidence level of the second object and ranked in a number of first set positions; if not, determine that the categories of the first object and the second object are the same; wherein the confidence levels corresponding to the first object and the second object are sorted according to the same sorting logic.

[0079] In one embodiment of the present invention, the determination unit 302 is configured to determine the area of ​​the intersection and the area of ​​the union of the outer contours of the first object and the second object based on the position of the outer contour of the first object and the position of the outer contour of the second object; and determine the degree of overlap based on the area of ​​the intersection and the area of ​​the union.

[0080] In one embodiment of the present invention, the determination unit 302 is further configured to determine whether the first object and the second object meet the position correspondence condition based on the position information of the first object and the position information of the second object if the overlap is not greater than a first threshold, or the category corresponding to the confidence level of the first object and ranked in several first set positions is completely different from the category corresponding to the confidence level of the second object and ranked in several first set positions; if so, determine whether the category corresponding to the first object and ranked in several second set positions is completely different from the category corresponding to the confidence level of the second object and ranked in several second set positions; if not, determine that the categories of the first object and the second object are the same.

[0081] In one embodiment of the present invention, the position correspondence condition includes: the ratio of the area of ​​the intersection of the outer contours of the first object and the second object to the target area is greater than a second threshold; wherein the target area is the smaller area of ​​the outer contours of the first object and the second object.

[0082] In one embodiment of the present invention, the determination unit 302 is further configured to determine whether the category corresponding to the confidence level of the first object and ranked in a third set position is the same as one of the categories corresponding to the confidence level of the second object and ranked in a fourth set position if the category corresponding to the confidence level of the first object and ranked in a second set position is completely different from the category corresponding to the confidence level of the second object and ranked in a second set position; if so, determine the similarity between the first object and the second object based on the image features of the first object and the image features of the second object; if the similarity is greater than a third threshold, determine that the categories of the first object and the second object are the same.

[0083] An embodiment of the present invention provides a device for identifying an object in an image, including: a processor and a memory;

[0084] The memory is used to store execution instructions, and the processor is used to execute the execution instructions stored in the memory to implement the method of any of the above embodiments.

[0085] An embodiment of the present invention provides a computer-readable storage medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method of any of the above embodiments.

[0086] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0087] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0088] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0089] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0090] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0091] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0092] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0093] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0094] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0095] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0096] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0097] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0098] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0099] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0100] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for identifying an object in an image, comprising: Detecting a first image, obtaining position information of a first object in the first image, corresponding first category information, and confidence information corresponding to each first category information in the first category information; Detecting a second image to obtain position information of a second object in the second image, corresponding second category information, and confidence information corresponding to each second category in the second category information; Determine the overlap information between the first object and the second object according to the position information of the first object and the position information of the second object; According to the plurality of first category information, the confidence information corresponding to each first category information, the plurality of second category information, the confidence information corresponding to each second category information and the overlap information, determine whether the categories of the first object and the second object are the same; if the overlap between the first object and the second object represented by the overlap information is greater than a first preset threshold; and the category corresponding to the confidence of the first object and ranked in the plurality of first set positions is not completely different from the category corresponding to the second object and ranked in the plurality of first set positions, then it indicates that the first object and the second object are of the same category. 2 . The method according to claim 1 , determining the overlap information between the first object and the second object according to the position information of the first object and the position information of the second object.

3. The method according to claim 2, wherein judging whether the categories of the first object and the second object are the same based on the plurality of first category information, the confidence information corresponding to each first category information, the plurality of second category information, the confidence information corresponding to each second category information, and the overlap information, specifically comprises: Determining whether the degree of overlap is greater than a first threshold; When the overlap is greater than the first threshold, determining whether the category corresponding to the first object and the confidence level ranked in the first set positions is completely different from the category corresponding to the second object and the confidence level ranked in the first set positions; If they are not completely different, determining that the first object and the second object are of the same category; The confidences corresponding to the first object and the second object are sorted according to the same sorting logic.

4. The method according to claim 2, Determining the overlap between the first object and the second object according to the position information of the first object and the position information of the second object includes: Determining an area of ​​an intersection and an area of ​​a union of the outer contours of the first object and the second object according to a position of the outer contour of the first object and a position of the outer contour of the second object; The degree of overlap is determined according to the area of ​​the intersection and the area of ​​the union.

5. The method of claim 3, further comprising: If the overlap is not greater than a first threshold, or the category corresponding to the confidence level ranked in a number of first set positions corresponding to the first object is completely different from the category corresponding to the confidence level ranked in the number of first set positions corresponding to the second object, determining whether the first object and the second object meet a position correspondence condition based on the position information of the first object and the position information of the second object; When the first object and the second object meet the position correspondence condition, determining whether the category corresponding to the confidence level of the first object and ranked in a number of second set positions is completely different from the category corresponding to the confidence level of the second object and ranked in the number of second set positions; If they are not completely different, it is determined that the first object and the second object are of the same category.

6. The method according to claim 5, The position corresponding conditions include: A ratio of an area of ​​an intersection of the outer contours of the first object and the second object to a target area is greater than a second threshold; wherein the target area is a smaller area of ​​the outer contours of the first object and the second object.

7. The method of claim 5 or 6, further comprising: If the category corresponding to the confidence level of the first object and ranked in the second set positions is completely different from the category corresponding to the confidence level of the second object and ranked in the second set positions, determining whether the category corresponding to the confidence level of the first object and ranked in the third set position is the same as one of the categories corresponding to the confidence level of the second object and ranked in the fourth set positions; When the category corresponding to the confidence level of the first object and ranked in the third set position is the same as one of the categories corresponding to the confidence levels of the second object and ranked in several fourth set positions, the similarity between the first object and the second object is determined based on the image features of the first object and the image features of the second object. If the similarity is greater than a third threshold, it is determined that the first object and the second object are of the same category.

8. A device for identifying an object in an image, comprising: a detection unit, configured to detect a first image, obtain position information of a first object in the first image, corresponding first category information, and confidence information corresponding to each first category information in the first category information; and detecting a second image to obtain position information of a second object in the second image, corresponding second category information, and confidence information corresponding to each second category in the second category information; an overlap information determining unit, configured to determine overlap information between the first object and the second object according to the position information of the first object and the position information of the second object; A category determination unit is used to determine whether the categories of the first object and the second object are the same based on the plurality of first category information, the confidence information corresponding to each first category information, the plurality of second category information, the confidence information corresponding to each second category information, and the overlap information; if the overlap between the first object and the second object represented by the overlap information is greater than a first preset threshold; and the category corresponding to the confidence of the first object and ranked in the plurality of first set positions is not completely different from the category corresponding to the second object and ranked in the plurality of first set positions, then it indicates that the first object and the second object are of the same category.

9. The device according to claim 8, wherein the overlap information determining unit is specifically configured to determine the overlap information between the first object and the second object according to the position information of the first object and the position information of the second object.

10. A device for identifying an object in an image, comprising: Processor and memory; The memory is used to store execution instructions, and the processor is used to execute the execution instructions stored in the memory to implement any one of the methods in claims 1-7.

Citation Information

Patent Citations

  • Method, apparatus, apparatus and storage medium for recognizing video action

    CN109344755A