Method and apparatus for processing an image

Through pre-trained key point detection models and machine learning technology, the location and visibility screening of key points in the image are automatically determined, solving the problem of cumbersome manual annotation in the existing technology and improving the efficiency and accuracy of image processing.

CN108986169BActive Publication Date: 2024-08-30DOUYIN VISION CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201810734681.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-07-06
Publication Date
2024-08-30
Estimated Expiration
2038-07-06

AI Technical Summary

Technical Problem

In the existing technology, manual annotation of key point locations in image geometric transformation is cumbersome and difficult to process automatically, resulting in low efficiency in determining correspondence relationships.

Method used

Using a pre-trained key point detection model, the machine learning method is used to obtain the set of captured images and location information of the target object, use the location information and visibility information to determine the location of the key points in the image, and filter out high visibility items based on the preset threshold. Key points.

Benefits of technology

It realizes automated image processing, improves the efficiency and accuracy of determining key point correspondences, simplifies manual annotation steps, and improves the automation level of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN108986169B
    Figure CN108986169B
Patent Text Reader

Abstract

The present application discloses a method and device for processing an image. A specific implementation of the method includes: obtaining a captured image of a target object; inputting the captured image into a pre-trained key point detection model corresponding to the target object to obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to indicate the position of the key point indicated by the key point information in the key point information set corresponding to the position in the captured image, and the key point is a predetermined point on the target object. This implementation realizes processing the captured image of the target object using the key point detection model to obtain the position of the key point on the target object corresponding to its captured image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method and apparatus for processing an image. Background Art

[0002] In the prior art, the corresponding relationship between pixels in two images is generally determined by using geometric transformation of images. Specifically, the positions of some key points are usually marked by manual annotation, and then the specific geometric transformation relationship is determined according to the positions of the marked key points. Summary of the invention

[0003] The embodiments of the present application provide a method and apparatus for processing an image.

[0004] In a first aspect, an embodiment of the present application provides a method for processing an image, the method comprising: obtaining a captured image of a target object; inputting the captured image into a pre-trained key point detection model corresponding to the target object to obtain a position information set, wherein the position information comprises position coordinates, and the position coordinates are used to represent the position in the captured image corresponding to the key point indicated by the key point information in the key point information set, and the key point is a predetermined point on the target object.

[0005] In some embodiments, the location information further includes visibility information, wherein the visibility information is used to indicate the probability that the key point indicated by the key point information in the key point information set is displayed in the captured image.

[0006] In some embodiments, the key point detection model is trained through the following steps: obtaining a training sample set, wherein the training samples include a captured image of the target object and a set of position information corresponding to the captured image; using a machine learning method, taking the captured image of the target object in the training sample set as input, and taking the set of position information corresponding to the input captured image as the expected output, to train the key point detection model.

[0007] In some embodiments, visibility information is represented by a numerical value between zero and one, inclusive.

[0008] In some embodiments, the above method also includes: for the location information in the obtained location information set, in response to determining that the visibility information included in the location information is greater than a preset visibility threshold, the location coordinates included in the location information are associated with the corresponding key point information and stored.

[0009] In a second aspect, an embodiment of the present application provides a device for processing an image, the device comprising: an acquisition unit, configured to acquire a captured image of a target object; a processing unit, configured to input the captured image into a pre-trained key point detection model corresponding to the target object, to obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to indicate a position in the captured image corresponding to a key point indicated by key point information in the key point information set, and the key point is a predetermined point on the target object.

[0010] In some embodiments, the location information further includes visibility information, wherein the visibility information is used to indicate the probability that the key point indicated by the key point information in the key point information set is displayed in the captured image.

[0011] In some embodiments, the key point detection model is trained through the following steps: obtaining a training sample set, wherein the training samples include a captured image of the target object and a set of position information corresponding to the captured image; using a machine learning method, taking the captured image of the target object in the training sample set as input, and taking the set of position information corresponding to the input captured image as the expected output, to train the key point detection model.

[0012] In some embodiments, visibility information is represented by a numerical value between zero and one, inclusive.

[0013] In some embodiments, the above-mentioned device also includes: a storage unit, which is configured to store the location coordinates included in the location information in the obtained location information set in response to determining that the visibility information included in the location information is greater than a preset visibility threshold, in association with the corresponding key point information.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation method in the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.

[0016] The method and apparatus for processing images provided in the embodiments of the present application obtain a captured image of a target object, input the captured image into a pre-trained key point detection model corresponding to the target object, and obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to represent the position in the captured image corresponding to the key point indicated by the key point information in the key point information set, and the key point is a point on the target object determined in advance, thereby realizing the processing of the captured image of the target object using the key point detection model to obtain the position in the captured image corresponding to the key point on the target object. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0018] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;

[0019] Figure 2 is a flow chart of an embodiment of a method for processing an image of the present application;

[0020] Figure 3 is a flowchart of another embodiment of a method for processing an image according to the present application;

[0021] Figure 4 is a schematic diagram of an application scenario of the method for processing an image according to the present application;

[0022] Figure 5 is a structural schematic diagram of an embodiment of a device for processing an image according to the present application;

[0023] Figure 6 It is a schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0024] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0026] Figure 1An exemplary architecture 100 of an embodiment of a method for processing an image or an apparatus for processing an image of the present application is shown.

[0027] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0028] The terminal devices 101, 102, 103 interact with the server 105 via the network 104 to receive or send messages, etc. Various client applications, such as web browser applications, image processing applications, etc., may be installed on the terminal devices 101, 102, 103.

[0029] Terminal devices 101, 102, 103 can be hardware or software. When terminal devices 101, 102, 103 are hardware, they can be various electronic devices that support image processing, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers and desktop computers, etc. When terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0030] The server 105 may be a server that provides various services, such as an image processing server that analyzes and processes images sent by the terminal devices 101, 102, and 103. The image processing server may process the image sent by the received terminal device and generate a processing result, and further, may feed back the processing result to the terminal device.

[0031] It should be noted that the server 105 can also directly store images locally. In this case, the server 105 can directly extract the locally stored graphics and process them. In this case, the terminal devices 101, 102, 103 and the network 104 may not exist.

[0032] It should be noted that the method for processing an image provided in the embodiment of the present application is generally executed by the server 105 , and accordingly, the device for processing an image is generally arranged in the server 105 .

[0033] It should also be noted that the terminal devices 101, 102, and 103 may also be installed with image processing applications, and the terminal devices 101, 102, and 103 may also process images based on the image processing applications. In this case, the method for processing images may also be executed by the terminal devices 101, 102, and 103, and accordingly, the apparatus for processing images may also be set in the terminal devices 101, 102, and 103. In this case, the exemplary system architecture 100 may not have the server 105 and the network 104.

[0034] It should be noted that the server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0035] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0036] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for processing an image according to the present application. The method for processing an image comprises the following steps:

[0037] Step 201: Acquire a captured image of a target object.

[0038] In this embodiment, the execution subject of the method for processing an image (such as Figure 1 The server 105 shown in the figure) can be connected to the local or other storage devices (such as Figure 1 The terminal devices 101, 102, and 103 shown in the figure obtain the captured image of the target object. Optionally, a captured video of the target object can be obtained first, and any frame of image extracted from the captured video can be used as the captured image of the target object.

[0039] Among them, the object can refer to any entity. For example, the object can include various items related to food, clothing, housing, transportation, and use. For example, cars, stadiums, etc. Objects can also include people, animals, plants, etc. It should be noted that the object is illustrative, and the present application is not limited to this. Any entity that can be photographed falls within the scope of protection of the present application.

[0040] The target object may be any object specified in advance. The target object may also be an object determined according to a preset condition. For example, the preset condition is an object photographed by a certain photographing device within a preset time period. Then the object photographed by a certain photographing device within the above preset time period is the target object.

[0041] Step 202: Input the captured image into a pre-trained key point detection model corresponding to the target object to obtain a set of position information.

[0042] In this embodiment, the captured image obtained in the above step 201 can be input into a pre-trained key point detection model corresponding to the target object to obtain a position information set. The position information can be information related to the position of the key point indicated by the key point information in the key point information set corresponding to the captured image. The position information can include position coordinates. The position coordinates can be used to indicate the position of the key point indicated by the key point information in the key point information set corresponding to the captured image.

[0043] Among them, the key point can be a point on the target object that is predetermined. The key point information can be information related to the key point and can represent a key point. For example, for 10 key points on the target object, they can be numbered from 1 to 10, and the numbers can be used as key point information representing the key points. Generally, the corresponding relationship between the key point and the key point information can be stored in advance.

[0044] In some cases, the captured image may capture only some of the key points. For example, the captured image captures only half of the target object, while the other half of the target object that is not captured also has preset key points. For example, the captured image captures only one side of the target object, while the side of the target object that is not captured also has preset key points.

[0045] Optionally, each key point on the target object corresponds to a position information, that is, the key point that is not photographed can also correspond to the position information. In this case, if there are N preset key points on the target object, then for the captured image, a position information set containing N position information can be obtained. Specifically, the position coordinates of the key points that are not photographed corresponding to the captured image can be uniformly represented by a special coordinate such as (-1, -1), or the position of the key points that are not photographed in the coordinate system on the plane where the captured image is located can be used as the position coordinates corresponding to the key points that are not photographed.

[0046] Optionally, the obtained position information set may also only include the position information corresponding to the key points captured by the captured image. In this case, if there are N preset key points on the target object, and the captured image captures M key points, then the obtained position information set may only include the position coordinates corresponding to the M captured key points. In this case, the position information may also include key point information, that is, the key point information and position coordinates of each key point captured by each captured image may be obtained.

[0047] In this embodiment, the key point detection model usually corresponds to the target object, that is, for different target objects, different key point detection models corresponding to the target objects can be trained respectively. Among them, the key point detection model can be used to characterize the corresponding relationship between the captured image of the target object and the information of the position of the key points on the target object corresponding to the captured image. Specifically, various methods can be used to obtain the above key point detection model.

[0048] Optionally, a key point detection model can be obtained by the following steps:

[0049] In the first step, a large number of images taken from various angles of the target object can be obtained.

[0050] The second step is to obtain a set of position information corresponding to each captured image, that is, information related to the position of each key point preset on the target object corresponding to the captured image. When the position information includes position coordinates, for each captured image, the position of each key point preset on the target object corresponding to the captured image can be obtained.

[0051] The third step is to establish a correspondence table storing the captured images and the position information sets corresponding to the captured images through statistical analysis of the large number of captured images obtained in the first and second steps and the position information sets corresponding to each captured image, and use the established correspondence table as the key point detection model.

[0052] Afterwards, when a captured image of the target object is obtained, the captured image can be compared with each captured image in the above correspondence table in turn, and the position information set corresponding to the captured image in the above correspondence table that is consistent with the captured image or has the highest similarity to the captured image can be used as the position information set corresponding to the captured image of the obtained target object.

[0053] Optionally, a key point detection model can be trained using a machine learning method through the following steps:

[0054] The first step is to obtain a set of training samples, wherein the training samples may include a captured image of the target object and a set of position information corresponding to the captured image.

[0055] In the second step, a machine learning method is used to take the captured images in the training samples in the training sample set as input, and the position information set corresponding to the input captured images as the expected output, so as to train a key point detection model.

[0056] In the second step above, specifically, the key point detection model can be trained through the following steps:

[0057] First, obtain an initial key point detection model. The initial key point detection model can be various types of untrained or incompletely trained artificial neural networks or a model obtained by combining multiple untrained or incompletely trained artificial neural networks for processing images (such as image detection, image feature extraction, etc.). For example, the initial key point detection model can be a deep learning model, a convolutional neural network, etc. for processing images. The initial key point detection model can also be an existing open source, already trained, artificial neural network model of various types for processing images. The initial key point detection model can also be a neural network model constructed using an existing neural network API according to actual application requirements.

[0058] Then, the captured images in the training samples in the training sample set are used as the input of the above-mentioned initial key point detection model, and based on the difference between the output of the initial key point detection model and the preset loss function, the parameters of each layer of the initial key point detection model are adjusted by using a back propagation algorithm, etc., until a certain preset end condition is met, and then the key point detection model is determined to be obtained. Among them, the preset end condition can be that during the training process, the difference between the position information set output by the initial key point detection model and the position information set corresponding to the input captured image is less than a certain threshold.

[0059] The method for processing images provided by the above-mentioned embodiments of the present application obtains a captured image of the target object, inputs the captured image into a pre-trained key point detection model corresponding to the target object, and obtains a position information set, wherein the position information includes position coordinates, and the position coordinates are used to represent the position in the captured image corresponding to the key point indicated by the key point information in the key point information set, and the key point is a point on the target object determined in advance, thereby realizing the processing of the captured image of the target object using the key point detection model to obtain the position of the key point on the target object corresponding to its captured image.

[0060] Further references Figure 3 , which shows a process 300 of another embodiment of a method for processing an image. The process 300 for processing an image comprises the following steps:

[0061] Step 301: Acquire a captured image of a target object.

[0062] The specific execution process of this step can be found in Figure 2 The relevant description of step 201 in the corresponding embodiment will not be repeated here.

[0063] Step 302: Input the captured image into a pre-trained key point detection model corresponding to the target object to obtain a set of position information, wherein the position information includes position coordinates and visibility information.

[0064] In this embodiment, the position information may also include visibility information, wherein the visibility information may be used to indicate the probability that the key point indicated by the key point information in the key point information set is displayed in the captured image.

[0065] In some optional implementations of this embodiment, the visibility information is represented by a value between zero and one, including zero and one. A larger value indicates a greater probability that the corresponding key point is displayed in the captured image.

[0066] The specific execution process of this step can be found in Figure 2 The relevant description of step 202 in the corresponding embodiment will not be repeated here.

[0067] Step 303 , for the location information in the obtained location information set, in response to determining that the visibility information included in the location information is greater than a preset visibility threshold, the location coordinates included in the location information are associated with the corresponding key point information and stored.

[0068] In this embodiment, for each location information in the location information set obtained in the above step 302, the visibility information included in the location information can be compared with the preset visibility threshold. If the visibility information included in the location information is greater than the preset visibility threshold, the location coordinates included in the location information can be associated with the key point information corresponding to the location information and stored.

[0069] Through this step, the preset visibility threshold can be used to filter the location information in the output location information set, that is, the preset key points on the target object can be filtered, and the key points whose corresponding visibility is greater than the visibility threshold can be filtered out, and the key point information of the filtered key points and the corresponding location coordinates can be associated and stored.

[0070] The visibility threshold can be determined based on historical experience or the accuracy of the visibility information output by the key point detection model, so that it is possible to determine whether each key point is displayed in the captured image based on the visibility information corresponding to each key point. If the visibility information corresponding to the key point is greater than the visibility threshold, it can be considered that the key point is displayed in the captured image. If the visibility information corresponding to the key point is less than the visibility threshold, it can be considered that the key point may not be captured and thus is not displayed in the captured image.

[0071] Continue to see Figure 4 , Figure 4 FIG. 1 is a schematic diagram of an application scenario of the method for processing an image according to this embodiment. Figure 4 In the application scenario, 8 key points are preset on a football field 401. Each key point is numbered from 1 to 8. A captured image 402 of the football field is obtained. The captured image 402 is input into a pre-trained key point detection model 403 corresponding to the football field to obtain a position information set 404.

[0072] Among them, the position information set 404 includes visibility information and position coordinates of 8 key points corresponding to the positions in the captured image 402. As shown in the figure, a coordinate system can be established with a vertex of the captured image 402 as the coordinate origin. The position coordinates can represent the coordinates in the established coordinate system. Among them, the visibility information corresponding to the key point numbered 1 is V1, and the position coordinates are C1, the visibility information corresponding to the key point numbered 2 is V2, and the position coordinates are C2, the visibility information corresponding to the key point numbered 3 is V3, and the position coordinates are C3, the visibility information corresponding to the key point numbered 4 is V4, and the position coordinates are C4, the visibility information corresponding to the key point numbered 5 is V5, and the position coordinates are C5, the visibility information corresponding to the key point numbered 6 is V6, and the position coordinates are C6, the visibility information corresponding to the key point numbered 7 is V7, and the position coordinates are C7, and the visibility information corresponding to the key point numbered 8 is V8, and the position coordinates are C8.

[0073] Afterwards, each position information in the obtained position information set 404 can be compared with the preset visibility threshold 405 in turn. The key points whose corresponding visibility information is greater than the visibility threshold 405 are selected to include the key point numbered 5, the key point numbered 6, and the key point numbered 7, as shown by the reference numeral 406 in the figure. Afterwards, the position coordinates corresponding to the selected key points numbered 5, the key points numbered 6, and the key points numbered 7 can be stored in association with their numbers, as shown by the reference numeral 407 in the figure.

[0074] from Figure 3 It can be seen that Figure 2Compared with the corresponding embodiment, the process 300 of the information push method in this embodiment highlights that the location information in the obtained location information set includes not only location coordinates but also visibility information. Afterwards, the location information including visibility information greater than the visibility threshold can be selected from the location information set according to the preset visibility threshold, and the location coordinates included in the selected location information are associated with the corresponding key point information and stored, thereby realizing the processing of the captured image of the target object using the key point detection model corresponding to the target object, and further screening the processing results according to the visibility threshold to obtain the location of the key point corresponding to the captured image.

[0075] Further references Figure 5 As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for processing an image. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0076] like Figure 5 As shown, the apparatus 500 for processing an image provided by this embodiment includes an acquisition unit 501 and a processing unit 502. The acquisition unit 501 is configured to acquire a captured image of a target object. The processing unit 502 is configured to input the captured image into a pre-trained key point detection model corresponding to the target object to obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to indicate the position of the key point indicated by the key point information in the key point information set corresponding to the position in the captured image, and the key point is a predetermined point on the target object.

[0077] In the apparatus 500 for processing an image in this embodiment, the specific processing of the acquisition unit 501 and the processing unit 502 and the technical effects thereof can be referred to in Figure 2 The relevant descriptions of step 201 and step 202 in the corresponding embodiment are not repeated here.

[0078] In some optional implementations of this embodiment, the above-mentioned position information also includes visibility information, wherein the visibility information is used to indicate the probability that the key point indicated by the key point information in the key point information set is displayed in the captured image.

[0079] In some optional implementations of the present embodiment, the above-mentioned key point detection model is trained through the following steps: obtaining a training sample set, wherein the training samples include a captured image of the target object and a set of position information corresponding to the captured image; using a machine learning method, taking the captured image of the target object in the training samples in the training sample set as input, and taking the set of position information corresponding to the input captured image as the expected output, to train the key point detection model.

[0080] In some optional implementations of this embodiment, the visibility information is represented by a numerical value between zero and one, including zero and one.

[0081] In some optional implementations of the present embodiment, the above-mentioned device also includes: a storage unit (not shown in the figure), which is configured to store the position coordinates included in the position information in the obtained position information set in response to determining that the visibility information included in the position information is greater than a preset visibility threshold, in association with the corresponding key point information.

[0082] The device provided by the above-mentioned embodiment of the present application acquires a captured image of the target object through an acquisition unit, and the processing unit inputs the captured image into a pre-trained key point detection model corresponding to the target object to obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to represent the position in the captured image corresponding to the key point indicated by the key point information in the key point information set, and the key point is a point on the target object determined in advance, thereby realizing the processing of the captured image of the target object using the key point detection model to obtain the position of the key point on the target object corresponding to its captured image.

[0083] Reference below Figure 6 , which shows an electronic device (eg Figure 1 A schematic diagram of the structure of a computer system 600 (a terminal device or server in FIG. 6 ). Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0084] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0085] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0086] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-mentioned functions defined in the method of the present application are executed.

[0087] It should be noted that the computer-readable medium of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0088] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0089] The units involved in the embodiments described in the present application may be implemented by software or hardware. The units described may also be set in a processor, for example, may be described as: a processor including an acquisition unit and a processing unit. The names of these units do not constitute limitations on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit for acquiring a captured image of a target object".

[0090] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the device, the device: obtains a captured image of the target object; inputs the captured image into a pre-trained key point detection model corresponding to the target object, and obtains a position information set, wherein the position information includes position coordinates, and the position coordinates are used to indicate the position in the captured image corresponding to the key point indicated by the key point information in the key point information set, and the key point is a predetermined point on the target object.

[0091] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A method for processing an image, comprising: Acquire a captured image of a target object, wherein the target object includes a specified object and / or an object captured by a shooting device within a preset time period, and the target object includes a court; Input the captured image into a pre-trained key point detection model corresponding to the target object to obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to indicate the position of the key point indicated by the key point information in the key point information set corresponding to the position in the captured image, and the key point is a predetermined point on the target object, and different target objects correspond to different key point detection models, and the key point detection model is trained based on the captured image of the target object and the position information set corresponding to the captured image; The position information further includes visibility information, wherein the visibility information is used to indicate the probability that the key point indicated by the key point information in the key point information set is displayed in the captured image.

2. The method according to claim 1, wherein: The key point detection model is trained by the following steps: Acquire a training sample set, wherein the training sample includes a captured image of the target object and a set of position information corresponding to the captured image; By using a machine learning method, the captured images of the target objects in the training samples in the training sample set are taken as input, and the position information set corresponding to the input captured images is taken as the expected output, so as to train and obtain the key point detection model.

3. The method according to claim 1, wherein: The visibility information is represented by a numerical value between zero and one, inclusive.

4. The method according to claim 1, wherein: The method further comprises: For the position information in the obtained position information set, in response to determining that the visibility information included in the position information is greater than a preset visibility threshold, the position coordinates included in the position information are associated with the corresponding key point information and stored.

5. A device for processing an image, comprising: an acquisition unit, configured to acquire a captured image of a target object, wherein the target object includes a designated object and / or an object captured by a shooting device within a preset time period, and the target object includes a court; A processing unit is configured to input the captured image into a pre-trained key point detection model corresponding to the target object to obtain a position information set, wherein the position information includes position coordinates, and the position coordinates are used to indicate the position of a key point indicated by key point information in the key point information set corresponding to the position in the captured image, and a key point is a predetermined point on the target object, and different target objects correspond to different key point detection models, and the key point detection model is trained based on the captured image of the target object and the position information set corresponding to the captured image; The position information further includes visibility information, wherein the visibility information is used to indicate the probability that the key point indicated by the key point information in the key point information set is displayed in the captured image.

6. The device according to claim 5, wherein: The key point detection model is trained by the following steps: Acquire a training sample set, wherein the training sample includes a captured image of the target object and a set of position information corresponding to the captured image; By using a machine learning method, the captured images of the target objects in the training samples in the training sample set are taken as input, and the position information set corresponding to the input captured images is taken as the expected output, so as to train and obtain the key point detection model.

7. The device according to claim 5, wherein: The visibility information is represented by a numerical value between zero and one, inclusive.

8. The device according to claim 5, wherein: The device also includes: The storage unit is configured to store, for the location information in the obtained location information set, the location coordinates included in the location information in association with the corresponding key point information in response to determining that the visibility information included in the location information is greater than a preset visibility threshold.

9. An electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4.

10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Image processing method and apparatus

    CN108038880A

  • Apparatus and method for recognizing objects

    US20180032793A1

  • Method and device for detecting image quality

    CN107590807A

  • Method and apparatus of detecting image quality

    CN107679490A