[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114581672A - Image identification method and device and electronic equipment - Google Patents

Image identification method and device and electronic equipment Download PDF

Info

Publication number
CN114581672A
CN114581672A CN202210231187.0A CN202210231187A CN114581672A CN 114581672 A CN114581672 A CN 114581672A CN 202210231187 A CN202210231187 A CN 202210231187A CN 114581672 A CN114581672 A CN 114581672A
Authority
CN
China
Prior art keywords
target
image
target image
line
segmentation
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.)
Granted
Application number
CN202210231187.0A
Other languages
Chinese (zh)
Other versions
CN114581672B (en
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210231187.0A priority Critical patent/CN114581672B/en
Publication of CN114581672A publication Critical patent/CN114581672A/en
Application granted granted Critical
Publication of CN114581672B publication Critical patent/CN114581672B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The disclosure provides an image recognition method, an image recognition device and electronic equipment, relates to the technical field of computer vision, and particularly relates to the technical field of image processing. The specific implementation scheme is as follows: acquiring a target image and energy values of a plurality of pixel points in the target image; determining a target tangent line in the target image, wherein the energy value of a pixel point of the target tangent line is smaller than a first threshold value; segmenting the target image by using the target segmentation line to obtain a plurality of segmented images; and respectively identifying the plurality of segmentation images to obtain the identification result of the target image. The image recognition method and the device can improve the accuracy of image recognition.

Description

Image identification method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer vision technologies, and in particular, to the field of image processing technologies, and in particular, to an image recognition method and apparatus, and an electronic device.
Background
With the development and progress of science and technology, when the image content is identified, the image can be identified by adopting a computer vision model. When an image with a large size needs to be recognized, the large image is usually scaled to a small size and then input into a recognition model for recognition.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, and storage medium for image recognition.
According to a first aspect of the present disclosure, there is provided an image recognition method including:
acquiring a target image and energy values of a plurality of pixel points in the target image;
determining a target tangent line in the target image, wherein the energy value of a pixel point where the target tangent line is located is smaller than a first threshold value;
segmenting the target image by using the target segmentation line to obtain a plurality of segmented images;
and respectively identifying the plurality of segmentation images to obtain the identification result of the target image.
According to a second aspect of the present disclosure, there is provided an image recognition apparatus comprising:
the acquisition module is used for acquiring a target image and energy values of a plurality of pixel points in the target image;
the determining module is used for determining a target tangent line in the target image, and the energy value of a pixel point where the target tangent line is located is smaller than a first threshold value;
the segmentation module is used for segmenting the target image by using the target segmentation line to obtain a plurality of segmented images;
and the identification module is used for respectively identifying the plurality of segmentation images so as to obtain the identification result of the target image.
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 any of the methods of the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of the first aspects.
In the embodiment of the disclosure, the target image is segmented by using the target segmentation line in the target image, and the energy value of the pixel point where the target segmentation line is located is smaller than the first threshold, so that a plurality of segmented images obtained by segmentation are identified, and the accuracy of image identification can be improved.
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 flow chart of an image recognition method according to a first embodiment of the present disclosure;
FIG. 2 is one of the schematic diagrams of image segmentation according to a first embodiment of the present disclosure;
FIG. 3 is a second schematic diagram of image segmentation according to the first embodiment of the present disclosure;
FIG. 4 is a schematic flow chart of risk identification according to a second embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an image recognition apparatus according to a third embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing an image recognition method according to 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.
As shown in fig. 1, the present disclosure provides an image recognition method, including the steps of:
step S101: acquiring a target image and energy values of a plurality of pixel points in the target image.
In this embodiment, the image identification method may be applied to a risk content audit scenario. For example: when the image is required to be checked whether risk content exists, a larger-size image may exist for identification, or a risk content part in the image only occupies a smaller part, and the target image is the image to be identified.
The energy value of each pixel point can represent the degree of change between each pixel point and surrounding pixel points, and if the difference between the pixel value of a certain pixel point and the surrounding pixel points is small, the change between the pixel point and the surrounding pixel points can be understood to be small, and the position of the pixel point has no important content; if the pixel value difference between a certain pixel point and the surrounding pixel points is large, it can be understood that the change between the pixel point and the surrounding pixel points is large, and the position of the pixel point has important content.
Step S102: and determining a target tangent line in the target image, wherein the energy value of a pixel point where the target tangent line is located is smaller than a first threshold value.
The first threshold may be preset, for example: the size of the first threshold may be adjusted according to the precision of image segmentation, or the first threshold may be set directly according to an empirical value. By determining the target segmentation lines of which the energy values of the pixel points are all smaller than the first threshold, the situation that no important content exists on the target segmentation lines can be ensured, and the target segmentation lines can be used as the segmentation lines of the images.
Step S103: and segmenting the target image by using the target segmentation line to obtain a plurality of segmented images.
It is to be understood that the target segmentation line may be one or more, and if only one target segmentation line exists in the target image, the target image is segmented into two segmented images; and if the target image has a plurality of target segmentation lines, segmenting the target image to obtain a plurality of segmented images. When the target image is sliced by using a plurality of slicing lines, the target image may be sliced for a plurality of times according to the sequence of the target slicing lines, or the target image may be sliced by using a plurality of slicing lines simultaneously to obtain a plurality of sliced images, and the disclosure is not limited to a specific slicing manner.
Step S104: and respectively identifying the plurality of segmentation images to obtain the identification result of the target image.
After the target image is segmented into a plurality of segmented images, the images can be identified one by one, and the segmented images can be respectively sent to a plurality of image identification models for identification according to identification types. For example: in order to confirm whether a certain recognition target exists in the target image, the plurality of split images can be recognized one by one, and if one of the split images exists in the recognition target, the target image can be considered to exist in the recognition target; or, the regions of the plurality of segmented images may be determined in advance, a partial segmented image corresponding to the region in which the recognition target may exist is selected, and the recognition of the recognition target is performed only on the partial segmented image.
In the embodiment of the disclosure, based on the energy values of a plurality of pixel points in the target image, a target segmentation line in which the energy value of the pixel point in the target image is smaller than a first threshold is determined, the target segmentation line is used for segmenting the target image, and the plurality of segmentation images are identified to obtain an identification result of the target image. Therefore, the target image can be segmented into a plurality of images with smaller sizes, and the target segmentation line based on the pixel point with the energy value smaller than the first threshold value can avoid segmenting the content to be identified into two segmented images, so that the segmentation of the target image is realized, and the accuracy of the identification result of the segmented target image is improved.
In addition, the target image is divided into a plurality of divided images, and the plurality of divided images are respectively identified, so that the proportion of the target to be identified in the image to be identified can be increased, and the accuracy and the recall rate of image identification are improved.
Optionally, the target dividing line includes a dividing line in a first direction and a dividing line in a second direction;
in step 103, the segmenting the target image by using the target segmentation line to obtain a plurality of segmented images may specifically include:
and respectively segmenting the target image by using the segmentation line in the first direction and the segmentation line in the second direction to obtain a plurality of segmented images.
The size of the target image is rectangular, and when the target image is cut, the first direction and the second direction may be understood as a horizontal direction and a vertical direction of the image, respectively, so that the size of the obtained cut image is rectangular. The length of the cut line in the horizontal direction of the target image may be smaller than or equal to the horizontal dimension of the target image, and the length of the cut line in the vertical direction of the target image may be smaller than or equal to the vertical dimension of the target image.
It is understood that the dividing line in the first direction and the dividing line in the second direction may be any number, and the specific number is determined based on different images. In the process of splitting the target image by using the splitting line in the first direction and the splitting line in the second image, splitting may be switched between splitting by using the splitting line in the first direction and splitting by using the splitting line in the second direction, for example: as shown in fig. 2, image 1 represents the above target image, and taking the case where the dividing line 1 and the dividing line 2 represent the dividing lines in the first direction and the dividing lines 3, 4 and 5 represent the dividing lines in the second direction as an example, the first division may be performed by dividing the image 1 using the dividing line 1 and the dividing line 2 in the first direction, and since the length of the dividing line 2 cannot divide the image 1, the image 1 is actually divided this time by using only the dividing line 1, the second division may be performed by using the dividing line 3, the dividing line 4 and the dividing line 5 in the second direction, and similarly, the division may be performed this time by using the dividing line 3 and the dividing line 5, the division may be performed again by using the dividing line 2 that is not used in the first direction for the third time, the division may be performed by using the dividing line 4 that is not used in the second direction for the fourth time, 10 segmented images were obtained. In addition, the cutting may be performed by using the cutting line in the first direction, or may be performed by using the cutting line in the second direction.
In this embodiment, a plurality of segmented images can be obtained quickly by segmenting the target image using the segmentation line in the first direction and the segmentation line in the second direction, respectively.
Optionally, the determining the target dividing line in the target image in step 102 may specifically include the following steps:
acquiring a plurality of segmentation lines of the target image and a plurality of areas formed by the plurality of segmentation lines, wherein the energy values of pixel points of the plurality of segmentation lines are all smaller than the first threshold value;
determining the target cutline based on the plurality of cutlines and the plurality of regions;
wherein the target bisection line includes at least one of:
a first bisector line of the plurality of bisector lines that is entirely located at an edge line of an area;
and the part of a second splitting line in the plurality of splitting lines is split, and only the part of the second splitting line is split into the edge line in one area.
Taking fig. 3 as an example, the image 2 represents the target image, and the plurality of broken lines in fig. 3 represent a plurality of dividing lines, and the image 2 can be divided into an area a, an area B, an area C, an area D, an area E, an area F, and an area G based on the plurality of dividing lines. It can be understood that the energy values of the pixel points where the plurality of slicing lines are located in fig. 3 are all smaller than the first threshold, but not every slicing line may be used for slicing the image, for example: for the segmentation line which passes through the region D and the region G and is partially segmented and is simultaneously located on the edge lines of the region E and the region F in fig. 3, only the partial segmentation line located on the edge lines of the region E and the region F may be used as the target segmentation line of the image 2; similarly, a partial cut that passes through the region C and partially cuts the edge line located in the region E, and a partial cut that partially cuts the edge line located in the region F may be used as the target cut line of the image 2.
In this embodiment, the target dividing line is determined based on the plurality of dividing lines and the plurality of regions, and a target dividing line of the plurality of dividing lines can be determined quickly to divide the target image.
Optionally, the determining the target dividing line in the target image in step 102 may specifically include:
acquiring a plurality of adjacent lines of which the energy values of the pixel points in the target image are smaller than the first threshold;
determining a line at an edge of the plurality of adjacent lines as the target tangent line.
In the process of determining the target dividing line, if the energy values of the pixel points where a plurality of adjacent lines are located are all smaller than the first threshold, only the line located at the edge may be taken as the target dividing line, specifically, when it is detected that the energy values of the pixel points where a plurality of continuous lines are located are all smaller than the first threshold, two lines located at the edge may be identified, and if one line located at the edge may be simultaneously also a line at the edge of the target image, only the line not located at the edge of the image may be taken as the target dividing line.
In this embodiment, by obtaining a plurality of adjacent lines in the target image, where the energy value of the pixel point is smaller than the first threshold, and determining a line located at an edge of the plurality of adjacent lines as the target segmentation line, excessive segmentation of the target image when the plurality of adjacent segmentation lines exist can be reduced, and the segmentation speed is increased.
Optionally, the energy values of a plurality of pixel points in the target image are obtained based on an energy map of the target image;
the energy map of the target image comprises any one of:
performing edge detection on the target image to obtain an energy map;
carrying out salient region detection on the target image to obtain an energy map;
and carrying out texture recognition on the target image to obtain an energy map.
It can be understood that the energy value is a value of a pixel point in an energy map, and whether important content exists at the position of the pixel points and whether the important content can be used as the position of a segmentation line can be determined by obtaining the values of the pixel points in the energy map.
In the edge detection process, for an area with a large pixel value change, the area may be considered to have more edges, for example: the edge detection of the target image can be realized by using a Sobel operator (Sobel operator) and a Canny operator (Canny operator).
The saliency region can be understood as a region with a large change in pixel point, and the result obtained by performing saliency region detection on the target image can also be used as an energy map of the target image, for example: detection algorithms such as a Histogram-based Contrast (HC) algorithm and a Region-based Contrast (RC) algorithm realize the detection of the salient Region of the image. Similarly, the texture recognition result of the target image may also reflect the degree of change of the pixel points in the target image, and thus the present disclosure may also use the texture recognition result as the energy map of the target image.
In this embodiment, the energy map of the target image may be obtained by performing edge detection, salient region detection, or texture recognition on the target image, and the obtained energy map may reflect the pixel value variation degree of a pixel point in the target image.
Optionally, the identifying the multiple sliced images in step S104 to obtain the identification result of the target image may specifically include:
obtaining a target segmentation image in the plurality of segmentation images;
inputting the target segmentation image into an image recognition model for recognition to obtain a recognition result of the target image;
and the sum of the energy values of the pixel points in the target segmentation image is less than a second threshold value.
It can be understood that the energy values of the pixels can be used for judging whether the important content exists in the pixels, whether the important content exists in a certain region can be judged through the sum of the energy values of all the pixels in the region, and if the sum of the energy values of the pixels in the region is smaller, the important content does not exist in the region.
Before the target segmentation image is input to the image recognition model, the target segmentation image can be scaled according to the size of the target segmentation image, so that the size of the target segmentation image conforms to the image recognition model.
In this embodiment, by identifying the target segmented image of which the sum of the energy values of the pixel points is smaller than the second threshold value, and taking the obtained identification result as the identification result of the target image, the image with the identifiable content part can be extracted for identification, so that the data amount of image identification is reduced, and the identification efficiency of the target image is improved.
As shown in fig. 4, the present disclosure provides a flowchart of risk identification based on picture segmentation, including the following processes:
the picture input unit is used for acquiring a large picture to be checked from a local image library or a network environment;
the energy map generating unit is used for generating an energy map of the large map due to the complexity of the area content in the judgment map;
the picture segmentation unit is used for segmenting the large graph according to the result of the energy graph;
and the risk judgment unit is used for carrying out risk identification on the split pictures.
The energy map generation unit and the picture segmentation unit can be realized by a picture segmentation model. In the energy map generating unit, the generated energy map may represent a change degree of a comparison between pixel values of each pixel point and pixel points around the pixel point in the image, that is, a pixel with a higher value in the energy map represents that a change in the pixel value around the pixel point in the image is larger, and otherwise, the change in the pixel value around the pixel point in the image is smaller. Specifically, the generation of the energy map may be implemented by using an image edge detection operator or an image salient region extraction algorithm.
If the values of all the pixel points on a certain line in the energy map are smaller, the pixel values on the line in the picture can be considered to be basically unchanged, that is, no key content exists on the line, and the key content can be used for cutting the map. The line may be a line extending through the entire picture or a line segment extending through only a part of the picture.
In this embodiment, in the process of segmenting the picture, the selection may be performed according to the horizontal rows, that is, if the values of the pixels in one horizontal row in the energy map are all smaller than a threshold, the horizontal row may be segmented first, then the sum of the values of all the pixels in the energy map in each region obtained by the segmentation is calculated, and if the sum is smaller than another threshold, the sum is discarded; for the horizontal rows after cutting, the rows in which the value of the pixel points in a column in the energy diagram is smaller than a threshold value can be selected for longitudinal cutting. Similarly, if the sum of the values of all the pixel points in the energy diagram obtained by cutting is less than another threshold value, discarding the pixel points; for the picture obtained by cutting, the content of the picture is reserved to the maximum extent, and the size of the picture can be sent to an image recognition model after the picture is zoomed. For example: in the current auditing flow, different risk identification models exist according to different risks, so that the cut pictures can be sequentially sent into the risk identification models, and the risk condition judgment of the whole picture is realized.
In the embodiment of the disclosure, aiming at the problem of difficult identification of the long-image large-scale graph, the pictures are segmented based on the energy graph, and the pictures obtained by segmentation are respectively identified, so that the size of the pictures is reduced, and meanwhile, the complete content can be prevented from being segmented into different pictures, thereby improving the accuracy and recall rate of an image identification method and reducing the risk of the risk content of the long-image large-scale graph.
As shown in fig. 5, the present disclosure also provides an image recognition apparatus including:
an obtaining module 501, configured to obtain a target image and energy values of multiple pixel points in the target image;
a determining module 502, configured to determine a target dividing line in the target image, where an energy value of a pixel point where the target dividing line is located is smaller than a first threshold;
a segmentation module 503, configured to segment the target image by using the target segmentation line to obtain a plurality of segmented images;
the identifying module 504 is configured to identify the multiple sliced images respectively to obtain an identification result of the target image.
Optionally, the target dividing line includes a dividing line in a first direction and a dividing line in a second direction;
the dividing module 503 may specifically include:
and the segmentation unit is used for segmenting the target image by using the segmentation line in the first direction and the segmentation line in the second direction respectively to obtain a plurality of segmented images.
Optionally, the determining module 502 may specifically include:
the first obtaining unit is used for obtaining a plurality of segmentation lines of the target image and a plurality of areas formed by the segmentation lines, and the energy values of pixel points where the segmentation lines are located are all smaller than the first threshold;
a first determination unit configured to determine the target dividing line based on the plurality of dividing lines and the plurality of regions;
wherein the target bisection line includes at least one of:
a first bisector line of the plurality of bisector lines that is entirely located at an edge line of an area;
and a part of a second splitting line in the plurality of splitting lines is split, and only the part of the second splitting line is split into edge lines in one area.
Optionally, the determining module 502 may specifically include:
the second obtaining unit is used for obtaining a plurality of adjacent lines of which the energy values of the pixel points in the target image are smaller than the first threshold;
a second determining unit configured to determine a line located at an edge among the plurality of adjacent lines as the target dividing line.
Optionally, the identifying module 504 may specifically include:
a third acquiring unit configured to acquire a target segmented image of the plurality of segmented images;
the identification unit is used for inputting the target segmentation image into an image identification model for identification so as to obtain an identification result of the target image;
and the sum of the energy values of the pixel points in the target segmentation image is smaller than a second threshold value.
Optionally, the energy value of each pixel point in the target image is obtained based on an energy map of the target image;
the energy map of the target image comprises any one of:
performing edge detection on the target image to obtain an energy map;
carrying out salient region identification on the target image to obtain an energy map;
and carrying out texture recognition on the target image to obtain an energy map.
The image recognition apparatus 500 provided in the present disclosure can implement each process of the image recognition method embodiment, and can achieve the same technical effect, and for avoiding repetition, the details are not repeated here.
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. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments 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. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, and the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated 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 601 performs the respective methods and processes described above, such as an image recognition method. For example, in some embodiments, the image recognition method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the image recognition method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the image recognition method in any other suitable way (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), and the Internet.
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 may be a cloud server, a server of a distributed system, or a server with a combined 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 or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
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 recognition method, comprising:
acquiring a target image and energy values of a plurality of pixel points in the target image;
determining a target tangent line in the target image, wherein the energy value of a pixel point of the target tangent line is smaller than a first threshold value;
segmenting the target image by using the target segmentation line to obtain a plurality of segmented images;
and respectively identifying the plurality of segmentation images to obtain the identification result of the target image.
2. The method of claim 1, wherein the target cutline comprises a first direction cutline and a second direction cutline;
the segmenting the target image by using the target segmenting line to obtain a plurality of segmented images comprises the following steps:
and respectively segmenting the target image by using the segmentation line in the first direction and the segmentation line in the second direction to obtain a plurality of segmented images.
3. The method of claim 1, wherein the determining a target tangent line in the target image comprises:
acquiring a plurality of segmentation lines of the target image and a plurality of areas formed by the plurality of segmentation lines, wherein the energy values of pixel points of the plurality of segmentation lines are all smaller than the first threshold value;
determining the target cutline based on the plurality of cutlines and the plurality of regions;
wherein the target bisection line includes at least one of:
a first bisector line of the plurality of bisector lines that is entirely located at an edge line of an area;
and a part of a second splitting line in the plurality of splitting lines is split, and only the part of the second splitting line is split into edge lines in one area.
4. The method of claim 1, wherein the determining an object bisector in the object image comprises:
acquiring a plurality of adjacent lines of which the energy values of the pixel points in the target image are smaller than the first threshold;
determining a line at an edge of the plurality of adjacent lines as the target tangent line.
5. The method of claim 1, wherein the respectively identifying the plurality of sliced images to obtain the identification result of the target image comprises:
acquiring a target segmentation image in a plurality of segmentation images;
inputting the target segmentation image into an image recognition model for recognition to obtain a recognition result of the target image;
and the sum of the energy values of the pixel points in the target segmentation image is smaller than a second threshold value.
6. The method of any one of claims 1 to 5, wherein the energy value of each pixel point in the target image is derived based on an energy map of the target image;
the energy map of the target image comprises any one of:
performing edge detection on the target image to obtain an energy map;
carrying out salient region identification on the target image to obtain an energy map;
and carrying out texture recognition on the target image to obtain an energy map.
7. An image recognition apparatus comprising:
the acquisition module is used for acquiring a target image and energy values of a plurality of pixel points in the target image;
the determining module is used for determining a target tangent line in the target image, and the energy value of a pixel point where the target tangent line is located is smaller than a first threshold value;
the segmentation module is used for segmenting the target image by using the target segmentation line to obtain a plurality of segmented images;
and the identification module is used for respectively identifying the plurality of segmented images so as to obtain the identification result of the target image.
8. The apparatus of claim 7, wherein the target cutline comprises a first direction cutline and a second direction cutline;
the dicing module includes:
and the segmentation unit is used for segmenting the target image by using the segmentation line in the first direction and the segmentation line in the second direction respectively to obtain a plurality of segmented images.
9. The apparatus of claim 7, wherein the means for determining comprises:
the first obtaining unit is used for obtaining a plurality of segmentation lines of the target image and a plurality of areas formed by the segmentation lines, and the energy values of pixel points where the segmentation lines are located are all smaller than the first threshold;
a first determination unit configured to determine the target dividing line based on the plurality of dividing lines and the plurality of regions;
wherein the target bisection line includes at least one of:
a first bisector line of the plurality of bisector lines that is entirely located at an edge line of an area;
and a part of a second splitting line in the plurality of splitting lines is split, and only the part of the second splitting line is split into edge lines in one area.
10. The apparatus of claim 7, wherein the means for determining comprises:
the second obtaining unit is used for obtaining a plurality of adjacent lines of which the energy values of the pixel points in the target image are smaller than the first threshold;
a second determination unit configured to determine a line located at an edge among the plurality of adjacent lines as the target dividing line.
11. The apparatus of claim 7, wherein the identification module comprises:
a third acquiring unit configured to acquire a target segmented image of the plurality of segmented images;
the identification unit is used for inputting the target segmentation image into an image identification model for identification so as to obtain an identification result of the target image;
and the sum of the energy values of the pixel points in the target segmentation image is less than a second threshold value.
12. The apparatus according to any one of claims 7 to 11, wherein the energy value of each pixel point in the target image is obtained based on an energy map of the target image;
the energy map of the target image comprises any one of:
performing edge detection on the target image to obtain an energy map;
carrying out salient region identification on the target image to obtain an energy map;
and carrying out texture recognition on the target image to obtain an energy map.
13. 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 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 executed by a processor, implements the method according to any one of claims 1-6.
CN202210231187.0A 2022-03-10 2022-03-10 Image recognition method and device and electronic equipment Active CN114581672B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210231187.0A CN114581672B (en) 2022-03-10 2022-03-10 Image recognition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210231187.0A CN114581672B (en) 2022-03-10 2022-03-10 Image recognition method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN114581672A true CN114581672A (en) 2022-06-03
CN114581672B CN114581672B (en) 2024-08-16

Family

ID=81773239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210231187.0A Active CN114581672B (en) 2022-03-10 2022-03-10 Image recognition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114581672B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060029275A1 (en) * 2004-08-06 2006-02-09 Microsoft Corporation Systems and methods for image data separation
US20150332469A1 (en) * 2014-05-14 2015-11-19 International Business Machines Corporation Static Image Segmentation
US20170116744A1 (en) * 2015-10-23 2017-04-27 International Business Machines Corporation Imaging segmentation using multi-scale machine learning approach
CN111553339A (en) * 2019-02-11 2020-08-18 北京京东尚科信息技术有限公司 Image unit determination method, small target detection method and computer equipment
CN112541911A (en) * 2020-12-23 2021-03-23 北京百度网讯科技有限公司 Image processing method and device
CN113724137A (en) * 2021-09-08 2021-11-30 深圳壹账通智能科技有限公司 Image recognition method, device and equipment based on image segmentation and storage medium
CN113822150A (en) * 2021-08-06 2021-12-21 北京百度网讯科技有限公司 Image recognition method and device, electronic equipment and storage medium
CN114066900A (en) * 2021-11-12 2022-02-18 北京百度网讯科技有限公司 Image segmentation method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060029275A1 (en) * 2004-08-06 2006-02-09 Microsoft Corporation Systems and methods for image data separation
US20150332469A1 (en) * 2014-05-14 2015-11-19 International Business Machines Corporation Static Image Segmentation
US20170116744A1 (en) * 2015-10-23 2017-04-27 International Business Machines Corporation Imaging segmentation using multi-scale machine learning approach
CN111553339A (en) * 2019-02-11 2020-08-18 北京京东尚科信息技术有限公司 Image unit determination method, small target detection method and computer equipment
CN112541911A (en) * 2020-12-23 2021-03-23 北京百度网讯科技有限公司 Image processing method and device
CN113822150A (en) * 2021-08-06 2021-12-21 北京百度网讯科技有限公司 Image recognition method and device, electronic equipment and storage medium
CN113724137A (en) * 2021-09-08 2021-11-30 深圳壹账通智能科技有限公司 Image recognition method, device and equipment based on image segmentation and storage medium
CN114066900A (en) * 2021-11-12 2022-02-18 北京百度网讯科技有限公司 Image segmentation method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SHAI AVIDAN ET AL.: "Seam Carving for Content-Aware Image Resizing", 《ACM TRANSACTIONS ON GRAPHICS》, 29 July 2017 (2017-07-29), pages 1 - 9 *

Also Published As

Publication number Publication date
CN114581672B (en) 2024-08-16

Similar Documents

Publication Publication Date Title
CN112801164A (en) Training method, device and equipment of target detection model and storage medium
CN112560862B (en) Text recognition method and device and electronic equipment
EP3876201B1 (en) Object detection and candidate filtering system
CN112597837A (en) Image detection method, apparatus, device, storage medium and computer program product
CN112802037A (en) Portrait extraction method, device, electronic equipment and storage medium
CN113378696A (en) Image processing method, device, equipment and storage medium
CN113378958A (en) Automatic labeling method, device, equipment, storage medium and computer program product
CN114004840A (en) Image processing method, training method, detection method, device, equipment and medium
CN112488060B (en) Target detection method, device, equipment and medium
CN113392794A (en) Vehicle over-line identification method and device, electronic equipment and storage medium
CN115719356A (en) Image processing method, apparatus, device and medium
CN113971728B (en) Image recognition method, training method, device, equipment and medium for model
CN113780297B (en) Image processing method, device, equipment and storage medium
CN114283398A (en) Method and device for processing lane line and electronic equipment
CN114461720A (en) Method, apparatus, device, storage medium and program product for processing map data
CN113837194A (en) Image processing method, image processing apparatus, electronic device, and storage medium
CN113377998A (en) Data loading method and device, electronic equipment and storage medium
CN112541911A (en) Image processing method and device
CN114581672B (en) Image recognition method and device and electronic equipment
CN112541934A (en) Image processing method and device
CN115409856A (en) Lung medical image processing method, device, equipment and storage medium
CN115690143A (en) Image segmentation method and device, electronic equipment and storage medium
CN113947146A (en) Sample data generation method, model training method, image detection method and device
CN113435257A (en) Method, device and equipment for identifying form image and storage medium
CN113362438A (en) Panorama rendering method, device, electronic apparatus, medium, and program

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
GR01 Patent grant
GR01 Patent grant