CN114842068A - Image attribute processing method and device, electronic equipment and storage medium - Google Patents

Image attribute processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114842068A
CN114842068A CN202210503595.7A CN202210503595A CN114842068A CN 114842068 A CN114842068 A CN 114842068A CN 202210503595 A CN202210503595 A CN 202210503595A CN 114842068 A CN114842068 A CN 114842068A
Authority
CN
China
Prior art keywords
attribute
image
target
area
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210503595.7A
Other languages
Chinese (zh)
Inventor
黄乐平
刘博�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Apollo Intelligent Connectivity Beijing Technology Co Ltd
Original Assignee
Apollo Intelligent Connectivity Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Intelligent Connectivity Beijing Technology Co Ltd filed Critical Apollo Intelligent Connectivity Beijing Technology Co Ltd
Priority to CN202210503595.7A priority Critical patent/CN114842068A/en
Publication of CN114842068A publication Critical patent/CN114842068A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30236Traffic on road, railway or crossing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The present disclosure provides an image attribute processing method, apparatus, electronic device and storage medium, which relate to the technical field of computers, in particular to the technical field of artificial intelligence such as intelligent transportation and computer vision, and include: the method comprises the steps of obtaining initial attributes of an image, determining an area ratio value between the area of an image region of a target object in the image and the area of a reference image, determining object attributes of the target object according to the area ratio value, and processing the initial attributes according to the object attributes to obtain the target attributes. By the method and the device, the object attribute determined based on the area ratio value between the image area of the target object in the image and the area of the reference image can be optimized, and the target attribute capable of describing the image more accurately can be obtained, so that the processing effect of the image attribute can be effectively improved, and the image attribute processing requirement in an actual service scene can be effectively met.

Description

Image attribute processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of artificial intelligence technologies such as intelligent transportation and computer vision, and in particular, to an image attribute processing method and apparatus, an electronic device, and a storage medium.
Background
Artificial intelligence is the subject of research that makes computers simulate some human mental processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), both at the hardware level and at the software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
In the related art, the image attribute refers to information for specifically describing features of an image, and the image attribute may be, for example, a truncation attribute, which may be used to describe whether an object described by the image is completely presented in the image.
Disclosure of Invention
The disclosure provides an image attribute processing method, an image attribute processing device, an electronic device, a storage medium and a computer program product.
According to a first aspect of the present disclosure, there is provided an image attribute processing method, including: acquiring initial attributes of the image; determining an area ratio value between the image area of the target object in the image and the area of the reference image; determining the object attribute of the target object according to the area proportion value; and processing the initial attribute according to the object attribute to obtain a target attribute.
According to a second aspect of the present disclosure, there is provided an image attribute processing apparatus including: the first acquisition module is used for acquiring the initial attribute of the image; the first determination module is used for determining an area ratio value between the image area of the target object in the image and the area of the reference image; the second determining module is used for determining the object attribute of the target object according to the area proportion value; and the first processing module is used for processing the initial attribute according to the object attribute to obtain the target attribute.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the image property processing method according to the first aspect of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the image property processing method as the first aspect of the present disclosure.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the image property processing method as in the first aspect of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure
FIG. 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a sixth embodiment of the present disclosure;
FIG. 7 shows a schematic block diagram of an example electronic device to implement the image property processing method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure.
It should be noted that an execution subject of the image attribute processing method of this embodiment is an image attribute processing apparatus, the apparatus may be implemented by software and/or hardware, the apparatus may be configured in an electronic device, and the electronic device may include, but is not limited to, a terminal, a server, and the like.
The embodiment of the disclosure relates to the technical field of artificial intelligence such as intelligent transportation and computer vision.
Wherein, Artificial Intelligence (Artificial Intelligence), english is abbreviated as AI. The method is a new technical science for researching and developing theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
The intelligent transportation means that advanced information technology, data communication technology, sensor technology, electronic control technology, computer technology and the like are effectively and comprehensively applied to the whole transportation management system, so that a real-time, accurate and efficient comprehensive transportation and management system which can play a role in a large range and all around is established.
Computer vision, which means that a camera and a computer are used to replace human eyes to perform machine vision such as identification, tracking and measurement on a target, and further image processing is performed, so that the computer processing becomes an image more suitable for human eye observation or transmitted to an instrument for detection.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
As shown in fig. 1, the image attribute processing method includes:
s101: initial attributes of the image are obtained.
The image attribute may be used to describe a certain specific feature of the image, and the image attribute may specifically be, for example, a sharpness attribute of the image, an occlusion attribute of the image (where the occlusion attribute may be used to describe whether the acquired image is occluded), and a truncation attribute of the image (where the truncation attribute may be used to describe whether an object described by the image is completely presented in the image), which is not limited to this.
In an initial stage of the image attribute processing method, the obtained image attribute is obtained, which may be referred to as an initial attribute of the image, and the initial attribute may be one or more attributes of the image predetermined for the image in the initial stage of the image attribute processing method, and the one or more attributes obtained by the determination are used as the initial attribute of the image, which is not limited herein.
That is, in the embodiment of the present disclosure, acquiring the initial attribute of the image may be performing parsing processing on the image to determine one or more attributes of the image as the initial attribute of the image.
In another embodiment, the initial attribute of the image may be obtained, or a corresponding data transmission interface may be configured in advance for the image attribute processing apparatus, and the annotation information of the image is received via the data transmission interface, where the annotation information may be used to characterize some attribute of the image (for example, the annotation information may be used to describe a truncated attribute of the image (for example, when the image is truncated, the annotation information is 1, and when the image is not truncated, the annotation information is 0, which is not limited), and then the truncated attribute of the image is determined as the initial attribute according to the obtained annotation information of the image, which is not limited.
In the embodiment of the present disclosure, the image may be, for example, a traffic light image acquired by a traffic light, and accordingly, a specific application scenario of the processing method for image attributes described in the embodiment of the present disclosure may be that an initial truncation attribute of the acquired traffic light image is processed, for example, the traffic light image is acquired, and then, according to labeling information of a light frame in the traffic light image, it is determined whether the traffic light image is truncated to obtain the initial attribute of the traffic light image, but in an actual service scenario, there may be a case that the traffic light frame is truncated but a light head of the traffic light is not truncated, so that if it is determined whether the traffic light image is truncated according to the labeling information of the light frame in the traffic light image, a certain slice property may be obtained, so that labeling information of the light head in the traffic light image may be acquired again, and processing the initial attribute according to the lamp cap labeling information, thereby obtaining a target attribute which can more accurately represent the truncation condition of the traffic light image.
The following description of the embodiments of the present disclosure will specifically explain the application scenario as an example, and of course, the embodiments of the present disclosure may also be applied to any other possible business scenarios of image attribute processing, which is not limited to this.
S102: an area ratio value between an image area of a target object in the image and a reference image area is determined.
The image may be acquired for one and/or more objects, that is, the image may include one and/or more objects, where one and/or more objects may be used to perform a subsequent image property processing method, that is, may be referred to as a target object.
In the embodiment of the present disclosure, if the image is acquired for a traffic light, the target object may be an image area corresponding to a light frame of the traffic light, or may also be an image area corresponding to a single light head of the traffic light, which is not limited to this.
For example, when in the application scenario for processing the cutoff attribute of the acquired traffic light image, the target image may be specifically the traffic light head which lights up in the acquired traffic light image, and the traffic light head which lights up is identified from the acquired traffic light image as the target object, so that invalid processing on the lamp head which does not light up can be effectively avoided, and thus, the calculation resources can be effectively saved while the effect of processing the attribute of the subsequent image is effectively ensured.
The image area corresponding to the target object, which can be used as a reference in the subsequent image attribute processing method, may be referred to as a reference image area.
For example, when the traffic light image is in an application scene in which the cutoff attribute of the acquired traffic light image is processed, the reference image area may be specifically an image area of a target object without a cutoff condition, that is, the reference image area may be an image area of a traffic light head that is completely presented, which is not limited to this.
The area of the region image corresponding to the target object in the image may be referred to as an image region area.
The ratio between the image area and the reference image area may be referred to as an area ratio.
In some embodiments, the determining the area ratio value between the image area of the target object in the image and the reference image area may be, without limitation, acquiring the image area of the target object in the image and the reference image area via the data transmission interface of the image attribute processing apparatus, and further determining the ratio value between the image area of the target object and the reference image area, and taking the ratio value as the area ratio value.
In the embodiment of the present disclosure, the area ratio value between the image area of the target object in the image and the reference image area may be determined by identifying the target object from the image by using an object detection frame, further determining the image area of the target object in the image, determining, from the acquired image of the target object, the image area corresponding to the target object without the truncation attribute as the reference image area, and then determining the ratio value between the image area and the reference image area, and taking the ratio value as the area ratio value, which is not limited.
S103: and determining the object attribute of the target object according to the area proportion value.
The attribute used for describing a specific feature of the image region corresponding to the target object may be referred to as an object attribute.
In some embodiments, the object attribute of the target object is determined according to the area ratio value, and the object attribute of the target object may be determined according to the area ratio value by combining with a pre-trained attribute analysis model, that is, the determined area ratio value may be input into the pre-trained attribute analysis model to obtain the object attribute of the target object output by the attribute analysis model, which is not limited herein.
In other embodiments, the object attribute of the target object is determined according to the area ratio value, the area ratio value may be compared with a preset condition (where the preset condition may be configured adaptively according to the image attribute processing requirement in the actual service scene, and is not limited thereto), and when the area ratio value satisfies the preset condition, the target object is determined to have the object attribute corresponding to the preset condition, or any other possible manner may be adopted to determine the object attribute of the target object according to the area ratio value, and is not limited thereto.
S104: and processing the initial attribute according to the object attribute to obtain a target attribute.
After determining the object attribute of the target object in the image, the embodiment of the present disclosure may process the initial attribute according to the object attribute, and use the attribute obtained by the foregoing processing as the target attribute.
That is to say, the embodiment of the present disclosure may support determining the object attribute of the target object in the image after determining the initial attribute of the image, and then may support processing the initial attribute according to the object attribute, thereby implementing adjustment of the initial attribute and obtaining a more accurate target attribute.
In some embodiments, the processing of the initial attribute according to the object attribute may be, after the initial attribute of the image and the object attribute of the target object are obtained, adjusting the initial attribute according to the object attribute, for example, generating a corresponding attribute adjustment coefficient (the adjustment coefficient may support the correction of the initial attribute) according to the object attribute, and correcting the initial attribute to obtain the target attribute, which is not limited herein.
In other embodiments, the initial attribute is processed according to the object attribute to obtain the target attribute, or the initial attribute of the image and the object attribute of the target object are obtained, and then the initial attribute of the image is directly adjusted to the object attribute, and the adjusted object attribute is used as the target attribute, which is not limited to this.
In this embodiment, an initial attribute of an image is obtained, an area ratio value between an image area of a target object in the image and a reference image area is determined, an object attribute of the target object is determined according to the area ratio value, and the initial attribute is processed according to the object attribute to obtain the target attribute.
Fig. 2 is a schematic diagram according to a second embodiment of the present disclosure.
As shown in fig. 2, the image attribute processing method includes:
s201: object frame information of a target object in an image is determined.
The target object in the image may have a corresponding object frame, and taking the target object as a single lighthead of a traffic light as an example, the object frame of the target object may be a lighthead of a traffic light, which is not limited herein.
The object frame of the target object may have some related information, which may be referred to as object frame information, and the object frame information may specifically be, for example, label information of the object frame and feature information of the object frame, which is not limited in this respect.
In the embodiment of the present disclosure, the determining of the object frame information of the target object in the image may be, without limitation, acquiring the annotation information of the image via the data transmission interface of the image attribute processing apparatus, determining the annotation information corresponding to the object frame from the annotation information of the image, and using the information as the object frame information of the target object in the image.
S202: and determining initial attributes according to the object frame information.
After determining the object frame information of the target object in the image, the embodiment of the disclosure may determine the initial attribute of the image according to the object frame information.
After determining annotation information corresponding to an object frame from annotation information of an image and taking the information as object frame information of a target object in the image, the embodiment of the present disclosure may perform parsing on the object frame information to determine an initial attribute of the image, which is not limited to this.
For example, taking the traffic light image acquired by the image for the traffic light collection as an example, the determining of the object frame information of the target object in the image may be to acquire the label information of the traffic light frame in the image (the label information may be used to describe whether the traffic light frame is cut off or not (for example, when the traffic light frame is cut off, the label information may be marked as 1, and when the traffic light frame is not cut off, the label information may be marked as 0, which is not limited)), then, the cutoff attribute of the traffic light image may be determined based on the label information of the traffic light frame (for example, when the label information is 0, the cutoff attribute of the traffic light image is determined to be not cutoff, and when the label information is 1, the cutoff attribute of the traffic light image is determined to be cutoff), and the cutoff attribute obtained by the determination is used as the initial attribute, which is not limited to this.
In the embodiment, the object frame information of the target object in the image is determined, so that the initial attribute of the image can be accurately determined based on the object frame information, and in addition, the initial attribute is determined by combining the object frame information of the target object, so that the initial attribute of the image can be initially judged based on the object frame information with less information, so that the image without the initial attribute can not participate in the subsequent image attribute processing, and further, the computing resource is effectively saved.
S203: initial attributes of the image are obtained.
S204: an area ratio value between an image area of a target object in the image and a reference image area is determined.
S205: and determining the object attribute of the target object according to the area proportion value.
S206: and processing the initial attribute according to the object attribute to obtain a target attribute.
For the description of S203-S206, reference may be made to the above embodiments, which are not described herein again.
In the embodiment, by determining the object frame information of the target object in the image and determining the initial attribute according to the object frame information, the initial attribute of the image can be accurately determined based on the object frame information by determining the object frame information of the target object in the image, and furthermore, by determining the initial attribute in combination with the object frame information of the target object, the initial attribute of the image can be initially determined based on the object frame information with less information amount, so that the calculation resources can be effectively saved while the image without the initial attribute is not involved in the subsequent image attribute processing, the initial attribute of the image is acquired again, the area ratio value between the image area of the target object in the image and the reference image area is determined, the object attribute of the target object is determined according to the area ratio value, and the initial attribute is processed according to the object attribute, the target attribute is obtained, the object attribute determined based on the area ratio value between the image area of the target object in the image and the area of the reference image can be realized, the initial attribute is optimized, and the target attribute capable of describing the image more accurately is obtained, so that the processing effect of the image attribute can be effectively improved, and the image attribute processing requirement in an actual service scene can be effectively met.
Fig. 3 is a schematic diagram according to a third embodiment of the present disclosure.
As shown in fig. 3, the image attribute processing method includes:
s301: initial attributes of the image are obtained.
S302: an area ratio value between an image area of a target object in the image and a reference image area is determined.
For the description of S301 to S302, reference may be made to the above embodiments, which are not described herein again.
S303: if the area proportion value is less than or equal to the proportion threshold value, determining that the object attribute is a first object attribute, wherein the first object attribute describes that the target object is locally presented in the image.
The preset critical value for the area ratio value between the image area and the reference image area may be referred to as a ratio threshold, and the ratio threshold may be configured adaptively according to the image attribute processing requirement in the actual service scene, for example, when the application scene is in an application scene in which the cutoff attribute of the acquired traffic light image is processed, the ratio threshold may be configured adaptively according to whether the usage requirement for normal use of the traffic light image is affected, and the ratio threshold is not limited.
In this case, since the target object cannot be completely presented, the area of the image region corresponding to the target object image is smaller than the area of the reference image.
After the area proportion value between the area of the image region and the area of the reference image is determined, the area proportion value can be compared with the proportion threshold value, and if the area proportion value is smaller than or equal to the proportion threshold value, the object attribute is determined to be the first object attribute.
S304: and if the area proportion value is larger than the proportion threshold value, determining that the object attribute is a second object attribute, wherein the second object attribute describes the condition that the target object is completely presented in the image.
The second object attribute describes a situation that the target object is completely presented in the image, that is, the object image corresponding to the target object has no truncation.
After the area proportion value between the area of the image region and the area of the reference image is determined, the area proportion value can be compared with the proportion threshold, and if the area proportion value is larger than the proportion threshold, the object attribute is determined to be the second object attribute.
In the embodiment of the disclosure, since the object attribute is determined to be the first object attribute when the area ratio value is less than or equal to the ratio threshold, or the object attribute is determined to be the second object attribute when the area ratio value is greater than the ratio threshold, and since the object attribute of the target object is determined by combining the ratio threshold, the first object attribute and the second object attribute can be accurately defined and distinguished, and in addition, since the ratio threshold can be configured adaptively in combination with the image attribute processing requirement in the actual service scene, the image attribute processing requirement in different service scenes can be effectively met based on the adjustment of the ratio threshold.
S305: if the object property is the first object property, the initial property is taken as the target property.
The disclosed embodiments may take the initial attribute as the target attribute after determining that the object attribute is the first object attribute.
For example, when the traffic light image is in an application scene in which the cut-off attribute of the acquired traffic light image is processed, because the cut-off attribute described by the initial attribute of the acquired traffic light image is determined according to the traffic light frame information (that is, the traffic light cannot be completely presented in the image), under such a situation, the traffic light frame may be cut off, and the single traffic light head may not be cut off, so that the normal use of the traffic light is not affected, the object attribute of the traffic light head (target object) can be determined, and when the cut-off of the traffic light head is determined (that is, the traffic light head cannot be completely presented in the image), the cut-off of the traffic light image is determined, so that the initial attribute is taken as the target attribute.
S306: and if the object attribute is a second object attribute, processing the initial attribute according to the second object attribute to obtain a target attribute.
After determining that the object attribute is the second object attribute, the embodiment of the present disclosure may process the initial attribute according to the second object attribute to obtain the target attribute.
For example, when the traffic light image is in an application scene in which the cutoff attribute of the acquired traffic light image is processed, it may be determined that the initial attribute of the acquired image describes the cutoff attribute (i.e., the traffic light cannot be completely presented in the image) according to the traffic light frame information, in this case, the traffic light frame is cut off, but the traffic light head is not cut off, so that the normal use of the traffic light is not affected, and therefore, the object attribute of the traffic light head (target object) can be determined, and when it is determined that the traffic light head is cut off (i.e., the traffic light head can be completely presented in the image), it is determined that the traffic light image can support normal use, that is, the traffic light image does not need to be identified as having the cutoff, and therefore, the initial attribute can be processed according to the second object attribute, so as to obtain the target attribute.
In some embodiments, the processing the initial attribute according to the second object attribute to obtain the target attribute may be to adjust the initial attribute according to the second object attribute, for example, a corresponding attribute adjustment coefficient may be generated according to the second object attribute (the adjustment coefficient may support the correction of the initial attribute), and the initial attribute is corrected to obtain the target attribute, which is not limited herein.
Optionally, in some embodiments, the processing the initial attribute according to the second object attribute to obtain the target attribute may be to replace the initial attribute with a second object attribute and use the replaced second object attribute as the target attribute, where the replacing the initial attribute with the second object attribute and use the replaced second object attribute as the target attribute and the second object attribute can describe the image attribute more accurately, so that when the replaced second object attribute is used as the target attribute, the referenceability of the target attribute is effectively improved, and the image can clearly characterize the attribute of the image based on the target attribute.
In the embodiment of the present disclosure, since the initial attribute is taken as the target attribute when the object attribute is the first object attribute, because the image attributes described by the initial attribute and the first object attribute are the same, when the initial attribute is taken as the target attribute, the invalidation processing of the initial attribute can be avoided, thereby saving the time and computing resources for processing the image attribute, processing the initial attribute according to the second object attribute to obtain the target attribute when the object attribute is the second object attribute, because the second object attribute is different from the initial attribute, and the second object attribute can more accurately represent the attribute of the image than the initial attribute, therefore, when the initial attribute is processed according to the second object attribute, the initial attribute can be corrected based on the second object attribute, the accuracy of the target attribute is effectively improved, and the processing effect of the image attribute is effectively improved.
In the embodiment, by acquiring an initial attribute of an image, determining an area ratio value between an image area of a target object in the image and a reference image area, determining that the object attribute is a first object attribute when the area ratio value is less than or equal to a ratio threshold, or determining that the object attribute is a second object attribute when the area ratio value is greater than the ratio threshold, the object attribute of the target object is determined by combining the ratio threshold, so that the first object attribute and the second object attribute can be defined and distinguished accurately, in addition, the ratio threshold can be configured adaptively in combination with image attribute processing requirements in actual service scenes, so that the image attribute processing requirements in different service scenes can be effectively met based on adjustment of the ratio threshold, and then when the object attribute is the first object attribute, the initial attribute is taken as the target attribute, the image attribute described by the initial attribute and the first object attribute is the same, so that when the initial attribute is taken as a target attribute, invalid processing on the initial attribute can be avoided, the image attribute processing time and calculation resources can be saved, and when the object attribute is a second object attribute, the initial attribute is processed according to the second object attribute to obtain the target attribute.
Fig. 4 is a schematic diagram according to a fourth embodiment of the present disclosure.
As shown in fig. 4, the image attribute processing method includes:
s401: initial attributes of the image are obtained.
For the description of S401, reference may be made to the above embodiments, which are not described herein again.
S402: and acquiring a reference image area corresponding to the target object.
That is to say, in the embodiment of the present disclosure, a reference image area corresponding to the target object may be obtained, and then the object attribute of the target object may be determined based on the reference image area, which may be specifically referred to in the subsequent embodiments.
S403: and identifying and obtaining an object image of the target object from the image.
The region image corresponding to the target object in the image may be referred to as an object image.
In the embodiment of the present disclosure, the object image of the target object may be obtained by identifying the target object from the image, then the region image corresponding to the target object is cut to obtain the object image, and then a subsequent image attribute processing method may be performed based on the object image, which may be specifically referred to in the subsequent embodiments.
For example, when in the application scenario in which the cutoff attribute of the acquired traffic light image is processed, the object image of the target object is identified from the image, which may be that a light head with a bright light is identified from the acquired traffic light image as the target object, and an area image corresponding to the target object is determined as the object image.
S404: the image area of the object image is taken as the image area of the target object.
The image area of the target object can be used as the image area of the target object after the target image of the target object is identified from the image.
In the embodiment of the disclosure, since the area of the reference image corresponding to the target object is obtained, the target image of the target object is identified from the image, and then the image area of the target image is taken as the area of the image region of the target object, the image corresponding to the non-target object can be effectively prevented from being subjected to the invalidation processing, so that the calculation resources can be effectively saved while the effect of the subsequent image attribute processing can be effectively ensured.
S405: an area ratio value between an image area of a target object in the image and a reference image area is determined.
S406: and determining the object attribute of the target object according to the area proportion value.
S407: and processing the initial attribute according to the object attribute to obtain a target attribute.
For the description of S405-S407, reference may be made to the above embodiments, which are not described herein again.
In this embodiment, the initial attribute of the image is obtained, the reference image area corresponding to the target object is obtained, the object image of the target object is identified from the image, and the image area of the object image is taken as the image area of the target object, so that the image corresponding to the non-target object is effectively prevented from being invalidated, thereby effectively saving the computing resources while effectively ensuring the effect of processing the subsequent image attributes And the determined object attributes are optimized to obtain target attributes which can describe the image more accurately, so that the processing effect of the image attributes can be effectively improved, and the image attribute processing requirements in actual service scenes can be effectively met.
Fig. 5 is a schematic diagram according to a fifth embodiment of the present disclosure.
As shown in fig. 5, the image attribute processing apparatus 50 includes:
a first obtaining module 501, configured to obtain an initial attribute of an image;
a first determining module 502, configured to determine an area ratio value between an image area of a target object in an image and a reference image area;
a second determining module 503, configured to determine an object attribute of the target object according to the area ratio value; and
the first processing module 504 is configured to process the initial attribute according to the object attribute to obtain a target attribute.
In some embodiments of the present disclosure, as shown in fig. 6, fig. 6 is a schematic diagram according to a sixth embodiment of the present disclosure, the image attribute processing apparatus 60, including: the device comprises a first obtaining module 601, a first determining module 602, a second determining module 603, and a first processing module 604, wherein the first determining module 602 is further configured to:
if the area proportion value is smaller than or equal to the proportion threshold value, determining that the object attribute is a first object attribute, wherein the first object attribute describes the condition that the target object is locally presented in the image; or
And if the area proportion value is larger than the proportion threshold value, determining that the object attribute is a second object attribute, wherein the second object attribute describes the condition that the target object is completely presented in the image.
In some embodiments of the present disclosure, the first processing module 604, comprises:
a first processing sub-module 6041 configured to, when the object attribute is the first object attribute, take the initial attribute as the target attribute;
and a second processing sub-module 6042, configured to, when the object attribute is a second object attribute, process the initial attribute according to the second object attribute to obtain a target attribute.
In some embodiments of the present disclosure, the second processing sub-module 6042, further configured to:
and replacing the initial attribute with a second object attribute, and taking the replaced second object attribute as the target object attribute.
In some embodiments of the present disclosure, the image attribute processing device 60 further includes:
a second obtaining module 605, configured to obtain a reference image area corresponding to the target object before determining an area ratio between an image area of the target object in the image and the reference image area;
an identifying module 606, configured to identify an object image of the target object from the image;
a second processing module 607, configured to use the image area of the object image as the image area of the target object.
In some embodiments of the present disclosure, the image attribute processing device 60 further includes:
a third determining module 608, configured to determine object frame information of the target object in the image before acquiring the initial attribute of the image;
a fourth determining module 609, configured to determine the initial attribute according to the object box information.
It is understood that the image attribute processing apparatus 60 in fig. 6 of the present embodiment and the image attribute processing apparatus 50 in the foregoing embodiment, the first obtaining module 601 and the first obtaining module 501 in the foregoing embodiment, the first determining module 602 and the first determining module 502 in the foregoing embodiment, the second determining module 603 and the second determining module 503 in the foregoing embodiment, and the first processing module 604 and the first processing module 504 in the foregoing embodiment may have the same functions and structures.
It should be noted that the explanation of the image attribute processing method described above is also applicable to the image attribute processing apparatus of the present embodiment.
In this embodiment, the initial attribute of the image is obtained, the area ratio value between the image area of the target object in the image and the reference image area is determined, the object attribute of the target object is determined according to the area ratio value, and the initial attribute is processed according to the object attribute to obtain the target attribute, so that the object attribute determined based on the area ratio value between the image area of the target object in the image and the reference image area can be realized, the initial attribute is optimized, the target attribute capable of describing the image more accurately is obtained, the processing effect of the image attribute can be effectively improved, and the image attribute processing requirement in an actual service scene is effectively met.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 shows a schematic block diagram of an example electronic device to implement the image property processing method of an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 executes the respective methods and processes described above, such as the image attribute processing method. For example, in some embodiments, the image attribute processing method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When the computer program is loaded into the RAM703 and executed by the computing unit 701, one or more steps of the image property processing method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the image property processing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (15)

1. An image attribute processing method, comprising:
acquiring initial attributes of the image;
determining an area ratio value between an image area of a target object in the image and a reference image area;
determining the object attribute of the target object according to the area proportion value; and
and processing the initial attribute according to the object attribute to obtain a target attribute.
2. The method of claim 1, wherein said determining object properties of the target object from the area ratio value comprises:
determining that the object attribute is a first object attribute if the area proportion value is less than or equal to a proportion threshold value, wherein the first object attribute describes that the target object is locally represented in the image; or
Determining that the object attribute is a second object attribute if the area proportion value is greater than the proportion threshold, wherein the second object attribute describes a condition that the target object is completely represented in the image.
3. The method of claim 2, wherein said processing said initial attributes according to said object attributes to obtain target attributes comprises:
if the object attribute is the first object attribute, taking the initial attribute as the target attribute;
and if the object attribute is the second object attribute, processing the initial attribute according to the second object attribute to obtain the target attribute.
4. The method of claim 3, wherein said processing the initial attribute according to the second object attribute to obtain the target attribute comprises:
replacing the initial attribute with the second object attribute, and taking the replaced second object attribute as the target object attribute.
5. The method of claim 1, further comprising, prior to said determining an area ratio value between an image region area of a target object in the image and a reference image area:
acquiring a reference image area corresponding to the target object;
identifying an object image of the target object from the image;
and taking the image area of the object image as the image area of the target object.
6. The method of any of claims 1-5, further comprising, prior to the obtaining initial attributes of the image:
determining object frame information of the target object in the image;
and determining the initial attribute according to the object frame information.
7. An image attribute processing apparatus comprising:
the first acquisition module is used for acquiring the initial attribute of the image;
the first determination module is used for determining an area ratio value between the image area of the target object in the image and the area of the reference image;
the second determination module is used for determining the object attribute of the target object according to the area proportion value; and
and the first processing module is used for processing the initial attribute according to the object attribute to obtain a target attribute.
8. The apparatus of claim 7, wherein the first determining module is further configured to:
determining that the object attribute is a first object attribute if the area proportion value is less than or equal to a proportion threshold value, wherein the first object attribute describes that the target object is locally represented in the image; or
Determining that the object attribute is a second object attribute if the area proportion value is greater than the proportion threshold, wherein the second object attribute describes a condition that the target object is completely represented in the image.
9. The apparatus of claim 8, wherein the first processing module comprises:
a first processing sub-module, configured to, when the object attribute is the first object attribute, take the initial attribute as the target attribute;
and the second processing submodule is used for processing the initial attribute according to the second object attribute to obtain the target attribute when the object attribute is the second object attribute.
10. The apparatus of claim 9, wherein the second processing submodule is further configured to:
replacing the initial attribute with the second object attribute, and taking the replaced second object attribute as the target object attribute.
11. The apparatus of claim 7, further comprising:
a second obtaining module, configured to obtain a reference image area corresponding to a target object before determining an area ratio between an image area of the target object in the image and the reference image area;
the identification module is used for identifying and obtaining an object image of the target object from the image;
and the second processing module is used for taking the image area of the object image as the image area of the target object.
12. The apparatus of any of claims 7-11, further comprising:
a third determining module, configured to determine object frame information of the target object in the image before the initial attribute of the acquired image is obtained;
and the fourth determining module is used for determining the initial attribute according to the object frame information.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when being executed by a processor, carries out the steps of the method according to any one of claims 1-6.
CN202210503595.7A 2022-05-09 2022-05-09 Image attribute processing method and device, electronic equipment and storage medium Pending CN114842068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210503595.7A CN114842068A (en) 2022-05-09 2022-05-09 Image attribute processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210503595.7A CN114842068A (en) 2022-05-09 2022-05-09 Image attribute processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114842068A true CN114842068A (en) 2022-08-02

Family

ID=82569051

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210503595.7A Pending CN114842068A (en) 2022-05-09 2022-05-09 Image attribute processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114842068A (en)

Similar Documents

Publication Publication Date Title
CN112633384A (en) Object identification method and device based on image identification model and electronic equipment
CN113177469A (en) Training method and device for human body attribute detection model, electronic equipment and medium
CN113591864B (en) Training method, device and system for text recognition model framework
CN112988727B (en) Data annotation method, device, equipment, storage medium and computer program product
CN113361572A (en) Training method and device of image processing model, electronic equipment and storage medium
CN113313962A (en) Signal lamp fault monitoring method and device, electronic equipment and storage medium
CN114417780A (en) State synchronization method and device, electronic equipment and storage medium
CN113780297A (en) Image processing method, device, equipment and storage medium
CN114186680A (en) Network structure processing method and device, electronic equipment and storage medium
CN113836462A (en) Page description file generation method, device, equipment and storage medium
CN113344214A (en) Training method and device of data processing model, electronic equipment and storage medium
US20220309763A1 (en) Method for identifying traffic light, device, cloud control platform and vehicle-road coordination system
CN114415997B (en) Display parameter setting method and device, electronic equipment and storage medium
CN114842068A (en) Image attribute processing method and device, electronic equipment and storage medium
CN115830268A (en) Data acquisition method and device for optimizing perception algorithm and storage medium
CN114445668A (en) Image recognition method and device, electronic equipment and storage medium
CN114882313A (en) Method and device for generating image annotation information, electronic equipment and storage medium
CN113379750A (en) Semi-supervised learning method of semantic segmentation model, related device and product
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN112988932A (en) High-precision map labeling method, device, equipment, readable storage medium and product
JP2022006180A (en) Hand shaking correction method of image, device, electronic device, storage media, computer program product, roadside machine and cloud control platform
CN113869317A (en) License plate recognition method and device, electronic equipment and storage medium
CN113032251A (en) Method, device and storage medium for determining service quality of application program
CN114119990A (en) Method, apparatus and computer program product for image feature point matching
CN113642612B (en) Sample image generation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination