CN113688717A - Image recognition method and device and electronic equipment - Google Patents

Image recognition method and device and electronic equipment Download PDF

Info

Publication number
CN113688717A
CN113688717A CN202110958926.1A CN202110958926A CN113688717A CN 113688717 A CN113688717 A CN 113688717A CN 202110958926 A CN202110958926 A CN 202110958926A CN 113688717 A CN113688717 A CN 113688717A
Authority
CN
China
Prior art keywords
area
image
target
outputting
result
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
CN202110958926.1A
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.)
Yunxiang Shanghai Intelligent Technology Co ltd
Original Assignee
Yunxiang Shanghai Intelligent 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 Yunxiang Shanghai Intelligent Technology Co ltd filed Critical Yunxiang Shanghai Intelligent Technology Co ltd
Priority to CN202110958926.1A priority Critical patent/CN113688717A/en
Publication of CN113688717A publication Critical patent/CN113688717A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas

Abstract

The application discloses an image identification method, an image identification device and electronic equipment, wherein the method comprises the steps of obtaining a plurality of images, wherein each image comprises a first area; identifying whether a target is present in the image; if the target exists in the image, acquiring a second area from the image, wherein the second area is used for representing the area where the target is located; and outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.

Description

Image recognition method and device and electronic equipment
Technical Field
The application relates to the technical field of image recognition, and further relates to an image recognition method, an image recognition device and electronic equipment.
Background
At present, with the continuous improvement of the national standard of living, the automobile keeping quantity in China is gradually increased, with the increase of the number of automobiles, the number of parking spaces in cities is limited, the problem of difficult parking is formed, and most of the time of a user going out in rush hours is spent on finding the parking spaces. In the prior art, the modes of geomagnetism, video piles and the like are adopted to manage vehicle parking, however, the mode can bring the problems of damage to roads, parking spaces and the like, inconvenience in maintenance and the like at the beginning of equipment installation. In the use process, the mode can only detect the parking space and cannot detect the behavior information of the vehicle, the detection accuracy is low, and the user experience is poor.
Disclosure of Invention
One advantage of the present invention is to provide an image recognition method, an image recognition apparatus, and an electronic device, where the method can recognize whether an object exists in an image and behavior information of the object, which is beneficial to improving user experience.
In a first aspect, an advantage of the present invention is to provide an image recognition method, including:
acquiring a plurality of images, wherein each image comprises a first area;
identifying whether a target is present in the image;
if the target exists in the image, acquiring a second area from the image, wherein the second area is used for representing the area where the target is located;
and outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.
In one possible implementation manner, the outputting the recognition result based on the first region and the second region may include:
judging whether the plurality of sub-areas are overlapped with the second area or not, and selecting a target sub-area from the plurality of sub-areas according to a judgment result;
and outputting a recognition result based on the target sub-area and the second area.
In one possible implementation manner, each of the images includes a shooting time, and outputting a recognition result based on the first area and the second area includes:
obtaining the overlapping degree of the second area and the first area;
obtaining a plurality of variation trends of the overlapping degree according to the shooting time of each image;
and outputting a recognition result based on the overlapping degree and a plurality of variation trends of the overlapping degree.
In one possible implementation manner, the outputting the recognition result based on the overlapping degree and a variation trend of the overlapping degrees includes:
if the overlapping degree is larger than or equal to a preset first threshold value, outputting the first result;
if the overlapping degree is equal to a preset second threshold value, outputting the second result;
if the overlapping degree is smaller than or equal to a preset third threshold value and the variation trend of the overlapping degrees is reduced, outputting a third result;
and if the overlapping degree is greater than or equal to a preset fourth threshold value and the variation trend of the overlapping degrees is increased, outputting the fourth result.
In one possible implementation manner, the acquiring the plurality of images includes:
shooting the first area to obtain a video;
and selecting one or more images from the video every preset frame number or preset time length.
In one possible implementation manner, the acquiring a second region from the image when a plurality of targets exist in the image includes:
and acquiring the area where each target is located and the identification of each target from the image.
In one possible implementation manner, the identifying whether the target exists in the image includes:
and inputting the image into a preset neural network recognition model, and determining whether a target exists according to an output result.
In one possible implementation manner, the method further includes:
and if the target does not exist in the image, outputting a fifth result.
In a second aspect, the present application provides an image recognition apparatus, the apparatus comprising:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a plurality of images, and each image comprises a first area;
the identification module is used for identifying whether a target exists in the image or not;
the processing module is used for acquiring a second area from the image if the target exists in the image, wherein the second area is used for representing the area where the target is located;
and the output module is used for outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.
In a third aspect, another advantage of the present invention is to provide an electronic device, comprising:
one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the method of the first aspect.
In a fourth aspect, another advantage of the present invention is to provide a computer-readable storage medium having stored therein a computer program, which, when run on a computer, causes the computer to perform the method according to the first aspect.
In a fifth aspect, the present application provides a computer program for performing the method of the first aspect when the computer program is executed by a computer.
In a possible design, the program of the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.
Drawings
Fig. 1 shows a method schematic diagram of an embodiment of the image recognition method of the present invention.
Fig. 2 shows a schematic image of an embodiment of the image recognition method of the present invention.
Fig. 3 is a flow chart illustrating the output of the recognition result in one embodiment of the image recognition method of the present invention.
Fig. 4 is a schematic structural diagram of an embodiment of the image recognition apparatus of the present invention.
Fig. 5 shows a schematic structural diagram of an embodiment of the electronic device of the present invention.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
It is understood that the terms "a" and "an" should be interpreted as meaning that a number of one element or element is one in one embodiment, while a number of other elements is one in another embodiment, and the terms "a" and "an" should not be interpreted as limiting the number.
Summary of the application
In the prior art, the modes of geomagnetism, video piles and the like are adopted to manage vehicle parking, however, the mode can bring the problems of damage to roads, parking spaces and the like, inconvenience in maintenance and the like at the beginning of equipment installation. In the use process, the mode can only detect the parking space and cannot detect the behavior information of the vehicle, the detection accuracy is low, and the user experience is poor.
Accordingly, the present application provides an image recognition method, which may include: acquiring a plurality of images, wherein each image comprises a first area; identifying whether a target is present in the image; if the target exists in the image, acquiring a second area from the image, wherein the second area is used for representing the area where the target is located; and outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target. Therefore, the method provided by the application can identify whether the target exists in the image and the behavior information of the target. For example, the image may be captured by a camera device, the first area may include a parkable area, a no-parking area, and the like, the target is a vehicle, and the recognition result may be used to indicate whether the vehicle is in the first area, and behavior information of the vehicle relative to the first area, such as that the vehicle enters the first area, or the vehicle leaves the first area, and the like, so as to manage parking of the vehicle, avoid damage to a road or a parking space, and the like, and facilitate improvement of user experience.
Exemplary image recognition method applied to electronic device
Referring to fig. 1, an image recognition method according to an embodiment of the present invention, as shown in fig. 1, may include:
s101, acquiring a plurality of images, wherein each image comprises a first area.
In this embodiment, the first area may include a parkable area, a parking prohibition area, and the like, the parkable area may be a roadside parking area, a small-area parking area, a parking lot, an underground garage, and the like, and the parking prohibition area may be a roadside parking prohibition area, a small-area parking prohibition area, and the like.
As shown in fig. 2, the image capturing device may capture a first area to obtain a plurality of images. The camera device needs to be kept at a fixed position so that the first area in the captured image is kept at the same position.
That is, the first region may be a preset region in the image, i.e., the first region is defined as a preset region or range in the image, etc.
In other alternative embodiments, the image may be identified to obtain the first area, for example, a special mark, such as a color or an object mark, is set at an edge of the first area, and after the image is captured by the image capturing device, the first area is identified according to the special mark in the image.
In one possible implementation manner, step S101 may include:
s201, shooting the first area to obtain a video (or a video stream and the like);
s202, one or more images are selected from the video at intervals of preset frame numbers or preset duration.
That is, the image pickup device can pick up a video including a plurality of frames of images on the first area.
Generally, the time interval for capturing the multi-frame images by the camera device is short (for example, the number of capturing frames in a certain time period is high), and the time period for the vehicle to enter the first area or for the vehicle to leave the first area is much longer than the time interval. Therefore, in order to reduce the amount of computation and improve the processing performance, one or more images are selected from the multi-frame images in the video every preset number of frames or preset time (which may be preset according to the time for the vehicle to enter the first area or for the vehicle to leave the first area), an image queue (such as a queue structure) is formed according to the shooting time, the image queue includes the selected plurality of images, and then steps S102 to S104 are performed according to the plurality of images existing in the image queue.
Preferably, in step S202, a plurality of images may be selected from the video by using a frame skipping method (e.g., selecting one frame of image from a plurality of frames of images every preset number of frames).
Specifically, step S202 may include:
s2021, creating a temporary counting variable;
s2022, selecting a frame of image from the video;
s2023, after the temporary counting variable is left over with the preset number of frames, if the remainder is 1, the frame image is stored in the image queue, and if the remainder is not 1, the next frame image is selected from the video according to the shooting number of frames, the temporary counting variable is incremented (for example, the temporary counting variable is incremented by 1, etc.), and step S2023 is repeatedly executed.
Optionally, in step S202, a frame of image is selected from the video shooting durations at intervals of a preset duration according to the shooting time sequence, and stored in the image queue.
It should be noted that, after step S101, in order to further reduce the amount of computation and improve the processing performance, the method may further include: the resolution of the image is reduced, for example, the resolution of the image is reduced to a preset resolution range, such as 1080P and below.
And S102, identifying whether the target exists in the image.
That is, when a vehicle enters the range of the imaging device, the vehicle is present in the image captured by the imaging device.
Preferably, step S102 may include:
and inputting the image into a preset neural network recognition model, and determining whether a target exists according to an output result.
The preset neural network recognition model can be obtained by inputting a plurality of training images (preferably images of vehicles entering the first area or images of vehicles leaving the first area, etc.) into the convolutional neural network model for training. For example, the training images may be divided into a training set and a test set according to a preset ratio, each training image is provided with a corresponding label (for example, a target exists or does not exist), the training set is input into the convolutional neural network model for training, and a parameter adjustment of the convolutional neural network model and a verification result of the test set are combined, so that a training effect is optimal, and a preset neural network recognition model is obtained. Further, the neural network recognition model may be loaded into a GPU (image processor).
In a traditional image identification method, after an object is extracted by image binarization and a maximum inter-class variance method, the object is modeled by an optical flow method and a frame difference method, and a time sequence relation between adjacent upper and lower frame images is constructed to identify whether the object exists in the image. However, the traditional image recognition method is not very high in robustness to the environment, is greatly influenced by environmental noise, and often needs to perform special threshold setting or even code modification on a single environment, so that the recognition accuracy under different environments is greatly reduced, and the applicability is low. The neural network recognition model is adopted to recognize the image, the robustness to the environment is high, the influence of environmental noise is small, the recognition accuracy under different environments cannot be greatly reduced, and the applicability is high.
In step S102, after the image actually captured by the imaging device is input into the preset neural network recognition model, the result is output as the presence or absence of the target.
If the output result is that the target exists in the image, step S103 to step S104 are executed.
S103, if the target exists in the image, acquiring a second area from the image, wherein the second area is used for representing the area where the target is located.
The second area may include a contour of the target (or a contour of the target after being occluded), a position (e.g., coordinates) where the target is located, and the like, such as a contour of the vehicle and a position of the vehicle. It should be noted that, due to the limitation of the shooting angle of the camera, a part of the vehicle may be blocked by other vehicles, obstacles, or the like, and therefore, the second area may also represent an area where the target is not blocked, or a partial area of the target (such as a display area of the target in the image), or the like.
In one possible implementation manner, when there are multiple targets in the image, step S103 may include:
and acquiring the area where each target is located and the identification of each target from the image.
That is, when a plurality of vehicles enter the shooting range of the image pickup device, the image pickup device shoots an image in which the plurality of vehicles exist. The identification of each target may include an identification of the number, model or license plate number of the vehicle. The region where each target is located can be labeled according to the identifier of the target, so that the behavior information of the target can be identified conveniently according to the region where each target is located and the corresponding target identifier.
Preferably, in step S103, an image semantic segmentation algorithm may be adopted to extract the identifier of the target and the contour of the target (or the contour after the target is blocked) in the image, so as to obtain the second region corresponding to each target, the identifier of each target, and the like. The image semantic segmentation algorithm may include, but is not limited to, one or more of MASK-RCNN, Yolact, SOLO series, deep Lab series, and the like.
And S104, outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.
Preferably, the recognition result may include behavior information of the object, status information of the object, and the like. The behavior information of the target may include that the vehicle is in the first area, the vehicle is not in the first area, the vehicle enters the first area, or the vehicle leaves the first area, and the like, and the state information of the target may include that the vehicle is a passing vehicle, is parked, is suspected to enter the first area, or leaves the first area, and the like, so that the vehicle parking is managed, damage to a road, a parking space, and the like is avoided, and the user experience is improved.
For example, if the first area is a parking permitted area and the vehicle is not in the first area as a result of the recognition, it indicates that the vehicle is not parked in the first area. Further, the recognition result may include position information of the first area (or position information of a parking space within the first area, etc.), and the method may further include: and sending the position information of the first area to a user terminal (such as a vehicle terminal to be parked) so that the vehicle to be parked can navigate and park in the first area according to the position of the first area, and the parking space searching time length is shortened.
If the first area is a parking prohibition area and the recognition result is that the vehicle is in the first area, it indicates that the vehicle is parked in the first area, and further, the method may further include: and sending prompt information, for example, prompting that the area is a parking prohibition area, for example, sending an alarm through a sound alarm device to prompt a vehicle owner, or uploading parking related information of the vehicle to a cloud or an illegal parking complaint system, for example, information such as license plate number, parking image and parking duration, so as to facilitate subsequent complaint processing and achieve the illegal parking fear effect.
In one possible implementation manner, the first region may include a plurality of sub-regions, and step S104 may include:
s301, judging whether the plurality of sub-regions are overlapped with the second region, and selecting a target sub-region from the plurality of sub-regions according to a judgment result;
s302, outputting a recognition result based on the target sub-area and the second area.
Preferably, the sub-regions may include parking spaces, each sub-region may be configured with a corresponding number or position (e.g., a parking space number, etc.), and the plurality of sub-regions do not overlap with each other.
In step S301, if a certain sub-region overlaps with the second region (if the intersection is not 0), the sub-region is selected as a target sub-region, that is, the target sub-region is used to indicate a parking space where a vehicle is parked. If all the sub-areas are not overlapped with the second area (if the intersection is 0), it indicates that no vehicle is parked in all the parking spaces.
In step S302, the recognition result may include that the vehicle enters the parking space, the vehicle is in the parking space, and the vehicle leaves the parking space.
In one possible implementation manner, step S104 may include:
s401, obtaining the overlapping degree of the second area and the first area;
s402, obtaining the change trends of the multiple overlapping degrees according to the shooting time of each image;
and S403, outputting a recognition result based on the overlapping degree and a plurality of variation trends of the overlapping degree.
In step S401, the overlapping degree of the first region (or the target sub-region in the first region) and the second region may be used to indicate the overlapping degree of the vehicle and the first region (or the target sub-region). If the overlap is 0, it indicates that the vehicle is not in the first region, and if the overlap is not 0, it indicates that the vehicle is wholly or partially in the first region. With the change of the image capturing time, the overlapping degree of the second area and the first area in the image may change.
Preferably, the degree of overlap IOU of the first area and the second area may be represented by the formula:
Figure BDA0003221437070000071
calculating to obtain;
the IOU is the overlapping degree, A is the first area, and B is the second area.
In step S402, it is indicated that the vehicle leaves the first area when the trend of the plurality of overlapping degrees decreases, and that the vehicle enters the first area when the trend of the plurality of overlapping degrees increases, in accordance with the image capturing time.
It should be noted that, if multiple targets exist in the image, a tracker (such as a tracking algorithm based on kalman filtering or hungarian algorithm) is used to track the overlapping degrees of the second region marked by the same target identifier and the first region in the multiple images, and then the change trend of the multiple overlapping degrees corresponding to the targets is obtained according to the overlapping degrees of the second region marked by the same target identifier and the first region.
In one possible implementation manner, as shown in fig. 3, the recognition result includes a first result, a second result, a third result, and a fourth result, and step S403 may include:
s501, if the overlapping degree is larger than or equal to a preset first threshold value M1, outputting the first result;
s502, if the overlapping degree is equal to a preset second threshold value M2, outputting a second result;
s503, if the overlapping degree is smaller than or equal to a preset third threshold value M3 and the change trend of the overlapping degree is reduced, outputting a third result;
s504, if the overlapping degree is larger than or equal to a preset fourth threshold value M4 and the change trend of the overlapping degree is increased, outputting a fourth result.
That is, in step S501, the first threshold value M1 may be set in advance according to the degree of overlap that the vehicles are all within the first region. The first result may include an identifier of the vehicle (such as a license plate number, etc.), a time when the vehicle is in the first area, a duration when the vehicle is in the first area, and the like (obtained according to the image capturing time), or a number of a parking space where the vehicle is in the first area, an occupied state of the parking space, and the like. Further, if the vehicle is in the first area and the position of the vehicle is not changed (e.g., the plurality of second areas are not changed), the output first result may further include that the vehicle is parked and the parking time period is long. Further, if the vehicle is in the first area and the vehicle gradually leaves the first area (e.g., the position change of the plurality of second areas gradually increases), the output second result may further include that the vehicle is suspected to leave the first area, and the like.
In step S502, a second threshold M2 is preset to be 0, the second result is an identifier (such as a license plate number) of the vehicle, a time and duration (obtained according to the picture shooting time) when the vehicle is not in the first area and the vehicle is not in the first area, for example, the vehicle is a passing vehicle. Further, if the vehicle is not in the first area and the position of the vehicle changes, the output second result may further include that the vehicle state is a passing vehicle or the like. Furthermore, if the vehicle is not located in the first area and the vehicle gradually approaches the first area (e.g., the position change of the plurality of second areas gradually decreases and the distance from the plurality of second areas gradually decreases), the output second result may further include that the vehicle is suspected to enter the first area, and the like. Further, if the vehicle is not located in the first area and the position of the vehicle is not changed (e.g., the positions of the plurality of second areas are not changed), the output second result may further include that the vehicle does not have a parking behavior in the first area, such as a parking behavior in a road. Further, the method may further include: and sending prompt information, for example, prompting that the vehicle is not stopped in the first area, for example, sending an alarm through a sound alarm device to prompt a vehicle owner, or uploading parking related information of the vehicle to a cloud or an illegal parking complaint system, for example, information such as license plate number, parking image and parking time, so as to facilitate subsequent complaint treatment and achieve the illegal parking fear effect.
In step S503, the preset third threshold may be preset according to the overlapping degree of the vehicle leaving the first area. The third result may include an identifier of the vehicle (e.g., a license plate number, etc.), a time when the vehicle leaves the first area, a duration when the vehicle leaves the first area, and the like (obtained from the image capturing time), or a number of a parking space where the vehicle leaves the first area, and the parking space is in an idle state.
In step S504, the preset fourth threshold may be preset according to the overlapping degree of the vehicle entering the first area. The fourth result may include an identifier of the vehicle (e.g., a license plate number, etc.), a time when the vehicle enters the first area, a duration when the vehicle enters the first area, and the like (obtained according to the image capturing time), or a number of a parking space where the vehicle enters the first area, and an occupied state of the parking space.
In one possible implementation manner, the method may further include:
and if the target does not exist in the image, outputting a fifth result.
That is, the fifth result is that the vehicle is not stopped in the first area. Further, if the first area is a parking allowed area and the recognition result is the second result, the third result, or the fifth result, the method may further include: and sending the position information of the first area to a user terminal (such as a vehicle terminal to be parked) so that the vehicle to be parked can navigate and park in the first area according to the position of the first area, and the parking space searching time length is shortened.
It can be understood that the recognition result obtained by the method provided by the application can be uploaded to a cloud or an electronic device, for example, time information is drawn at the lower right corner of an image, and a plurality of images are synthesized, for example, 3 panoramas of the image of the vehicle and 1 close-up view (or close-up view, enlarged view, etc.) of the vehicle are synthesized into one image according to an image synthesis rule by a square matrix of 2 × 2 and uploaded to the cloud, etc. It can be understood that the image identification method can also be applied to other vehicle parking management scenes to realize smart city construction, and is not limited herein.
It is to be understood that some or all of the steps or operations in the above-described embodiments are merely examples, and other operations or variations of various operations may be performed by the embodiments of the present application. Further, the various steps may be performed in a different order presented in the above-described embodiments, and it is possible that not all of the operations in the above-described embodiments are performed.
Exemplary image recognition apparatus
As shown in fig. 4, an embodiment of the present application provides an image recognition apparatus 100, where the apparatus 100 includes:
an obtaining module 10, configured to obtain a plurality of images, where each of the images includes a first region;
an identifying module 20, configured to identify whether an object exists in the image;
a processing module 30, configured to, if the target exists in the image, acquire a second region from the image, where the second region is used to represent a region where the target is located;
an output module 40, configured to output a recognition result based on the first area and the second area, where the recognition result is used to represent behavior information of the target.
In one possible implementation manner, the first region may include a plurality of sub-regions, and the output module 40 is further configured to:
judging whether the plurality of sub-areas are overlapped with the second area or not, and selecting a target sub-area from the plurality of sub-areas according to a judgment result;
and outputting a recognition result based on the target sub-area and the second area.
In one possible implementation manner, each of the images includes a shooting time, and the output module 40 is further configured to:
obtaining the overlapping degree of the second area and the first area;
obtaining the variation trend of the overlapping degree according to the shooting time of each image;
and outputting a recognition result based on the overlapping degree and the variation trend of the overlapping degree.
In one possible implementation manner, the recognition result includes a first result, a second result, a third result, and a fourth result, and the output module 40 is further configured to:
if the overlapping degree is larger than or equal to a preset first threshold value, outputting the first result;
if the overlapping degree is equal to a preset second threshold value, outputting the second result;
if the overlapping degree is smaller than or equal to a preset third threshold value and the variation trend of the overlapping degree is reduced, outputting a third result;
and if the overlapping degree is greater than or equal to a preset fourth threshold value and the variation trend of the overlapping degree is increased, outputting the fourth result.
In one possible implementation manner, the obtaining module 10 is further configured to:
shooting the first area to obtain a video;
and selecting one or more images from the video every preset frame number or preset time length.
In one possible implementation manner, a plurality of the targets exist in the image, and the processing module 30 is further configured to:
and acquiring the area where each target is located and the identification of each target from the image.
In one possible implementation manner, the identification module 20 is further configured to:
and inputting the image into a preset neural network recognition model, and determining whether a target exists according to an output result.
In one possible implementation manner, the output module 40 is further configured to:
and if the target does not exist in the image, outputting a fifth result.
It is understood that the image recognition apparatus provided in the embodiment shown in fig. 4 can be used to implement the technical solution of the method embodiment shown in fig. 1 of the present application, and the implementation principle and technical effects thereof can be further referred to the related description in the method embodiment.
It should be understood that the division of the modules of the image recognition apparatus shown in fig. 4 is merely a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the processing module may be a separate processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
Exemplary electronic device
Fig. 5 is a schematic structural diagram of an embodiment of an electronic device according to the present application, and as shown in fig. 5, the electronic device may include: one or more processors; a memory; and one or more computer programs.
The electronic equipment can be a computer, a server, a mobile terminal (mobile phone), a cash register, a computer, an Intelligent screen, an unmanned aerial Vehicle, an Intelligent Internet Vehicle (ICV), an Intelligent car (smart/interactive car) or a Vehicle-mounted device.
Wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the steps of:
acquiring a plurality of images, wherein each image comprises a first area;
identifying whether a target is present in the image;
if the target exists in the image, acquiring a second area from the image, wherein the second area is used for representing the area where the target is located;
and outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.
In one possible implementation manner, the first region may include a plurality of sub-regions, and when the instruction is executed by the apparatus, the apparatus is caused to perform the outputting of the recognition result based on the first region and the second region, including:
judging whether the plurality of sub-areas are overlapped with the second area or not, and selecting a target sub-area from the plurality of sub-areas according to a judgment result;
and outputting a recognition result based on the target sub-area and the second area.
In one possible implementation manner, each of the images includes a shooting time, and when the instruction is executed by the apparatus, the apparatus is caused to perform the outputting of the recognition result based on the first area and the second area, including:
obtaining the overlapping degree of the second area and the first area;
obtaining the variation trend of the overlapping degree according to the shooting time of each image;
and outputting a recognition result based on the overlapping degree and the variation trend of the overlapping degree.
In one possible implementation manner, the identifying result includes a first result, a second result, a third result, and a fourth result, and when the instruction is executed by the apparatus, the apparatus executes the outputting of the identifying result based on the overlapping degree and the variation trend of the overlapping degree, including:
if the overlapping degree is larger than or equal to a preset first threshold value, outputting the first result;
if the overlapping degree is equal to a preset second threshold value, outputting the second result;
if the overlapping degree is smaller than or equal to a preset third threshold value and the variation trend of the overlapping degree is reduced, outputting a third result;
and if the overlapping degree is greater than or equal to a preset fourth threshold value and the variation trend of the overlapping degree is increased, outputting the fourth result.
In one possible implementation manner, when the instructions are executed by the apparatus, the apparatus is caused to perform the acquiring the plurality of images, including:
shooting the first area to obtain a video;
and selecting one or more images from the video every preset frame number or preset time length.
In one possible implementation manner, the acquiring, by the apparatus, a second region from the image includes:
and acquiring the area where each target is located and the identification of each target from the image.
In one possible implementation manner, when the instructions are executed by the apparatus, the apparatus is caused to perform the identifying whether the target exists in the image, including:
and inputting the image into a preset neural network recognition model, and determining whether a target exists according to an output result.
In one possible implementation manner, when the instruction is executed by the apparatus, the apparatus is further caused to perform:
and if the target does not exist in the image, outputting a fifth result.
The electronic device shown in fig. 5 may be a terminal device or a server, or may be a circuit device built in the terminal device or the server. The apparatus may be used to perform the functions/steps of the image recognition method provided by the embodiment of fig. 1 of the present application.
As shown in fig. 5, the electronic device 900 includes a processor 910 and a memory 920. Wherein, the processor 910 and the memory 920 can communicate with each other through the internal connection path to transmit control and/or data signals, the memory 920 is used for storing computer programs, and the processor 910 is used for calling and running the computer programs from the memory 920.
The memory 920 may be a read-only memory (ROM), other types of static storage devices that can store static information and instructions, a Random Access Memory (RAM), or other types of dynamic storage devices that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disc storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, etc.
The processor 910 and the memory 920 may be combined into a processing device, and more generally, independent components, and the processor 910 is configured to execute the program codes stored in the memory 920 to realize the functions. In particular implementations, the memory 920 may be integrated with the processor 910 or may be separate from the processor 910.
It should be understood that the electronic device 900 shown in fig. 5 is capable of implementing the processes of the methods provided by the embodiments shown in fig. 1 of the present application. The operations and/or functions of the respective modules in the electronic device 900 are respectively for implementing the corresponding flows in the above-described method embodiments. Reference may be made specifically to the description of the embodiment of the method illustrated in fig. 1 of the present application, and a detailed description is appropriately omitted herein to avoid redundancy.
In addition, in order to further improve the functions of the electronic apparatus 900, the electronic apparatus 900 may further include one or more of a camera 930, a power supply 940, an input unit 950, and the like.
Optionally, the power supply 950 is used to provide power to various devices or circuits in the electronic device.
It should be understood that the processor 910 in the electronic device 900 shown in fig. 5 may be a system on chip SOC, and the processor 910 may include a Central Processing Unit (CPU), and may further include other types of processors, such as: an image Processing Unit (hereinafter, referred to as GPU), and the like.
In summary, various parts of the processors or processing units within the processor 910 may cooperate to implement the foregoing method flows, and corresponding software programs for the various parts of the processors or processing units may be stored in the memory 920.
The application also provides an electronic device, the device includes a storage medium and a central processing unit, the storage medium may be a non-volatile storage medium, a computer executable program is stored in the storage medium, and the central processing unit is connected with the non-volatile storage medium and executes the computer executable program to implement the method provided by the embodiment shown in fig. 1 of the application.
In the above embodiments, the processors may include, for example, a CPU, a DSP, a microcontroller, or a digital Signal processor, and may further include a GPU, an embedded Neural Network Processor (NPU), and an Image Signal Processing (ISP), and the processors may further include necessary hardware accelerators or logic Processing hardware circuits, such as an ASIC, or one or more integrated circuits for controlling the execution of the program according to the technical solution of the present application. Further, the processor may have the functionality to operate one or more software programs, which may be stored in the storage medium.
Embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is enabled to execute the method provided by the embodiment shown in fig. 1 of the present application.
Embodiments of the present application also provide a computer program product, which includes a computer program, when the computer program runs on a computer, causing the computer to execute the method provided by the embodiment shown in fig. 1 of the present application.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present disclosure, and all the changes or substitutions should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.
It will be appreciated by persons skilled in the art that the embodiments of the invention described above and shown in the drawings are given by way of example only and are not limiting of the invention. The advantages of the present invention have been fully and suitably realized. The functional and structural principles of the present invention have been shown and described in the examples, and any variations or modifications of the embodiments of the present invention may be made without departing from the principles.

Claims (11)

1. An image recognition method, comprising:
acquiring a plurality of images, wherein each image comprises a first area;
identifying whether a target is present in the image;
if the target exists in the image, acquiring a second area from the image, wherein the second area is used for representing the area where the target is located;
and outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.
2. The method of claim 1, wherein the first region comprises a plurality of sub-regions, and wherein outputting the recognition result based on the first region and the second region comprises:
judging whether the plurality of sub-areas are overlapped with the second area or not, and selecting a target sub-area from the plurality of sub-areas according to a judgment result;
and outputting a recognition result based on the target sub-area and the second area.
3. The method of claim 1, wherein each of the images includes a capture time, and wherein outputting a recognition result based on the first region and the second region comprises:
obtaining the overlapping degree of the second area and the first area;
obtaining a plurality of variation trends of the overlapping degree according to the shooting time of each image;
and outputting a recognition result based on the overlapping degree and a plurality of variation trends of the overlapping degree.
4. The method according to claim 3, wherein the recognition result comprises a first result, a second result, a third result and a fourth result, and the outputting the recognition result based on the overlapping degree and a plurality of variation trends of the overlapping degree comprises:
if the overlapping degree is larger than or equal to a preset first threshold value, outputting the first result;
if the overlapping degree is equal to a preset second threshold value, outputting the second result;
if the overlapping degree is smaller than or equal to a preset third threshold value and the variation trend of the overlapping degrees is reduced, outputting a third result;
and if the overlapping degree is greater than or equal to a preset fourth threshold value and the variation trend of the overlapping degrees is increased, outputting the fourth result.
5. The method of claim 1, wherein the acquiring a plurality of images comprises:
shooting the first area to obtain a video;
and selecting one or more images from the video every preset frame number or preset time length.
6. The method according to claim 1, wherein a plurality of the objects are present in the image, and wherein the obtaining a second region from the image comprises:
and acquiring the area where each target is located and the identification of each target from the image.
7. The method of claim 1, wherein the identifying whether an object is present in the image comprises:
and inputting the image into a preset neural network recognition model, and determining whether a target exists according to an output result.
8. The method according to any one of claims 1 to 7, further comprising:
and if the target does not exist in the image, outputting a fifth result.
9. An image recognition apparatus, characterized in that the apparatus comprises:
the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a plurality of images, and each image comprises a first area;
the identification module is used for identifying whether a target exists in the image or not;
the processing module is used for acquiring a second area from the image if the target exists in the image, wherein the second area is used for representing the area where the target is located;
and the output module is used for outputting a recognition result based on the first area and the second area, wherein the recognition result is used for representing the behavior information of the target.
10. An electronic device, comprising:
one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the apparatus, cause the apparatus to perform the method of any of claims 1 to 8.
11. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1 to 8.
CN202110958926.1A 2021-08-20 2021-08-20 Image recognition method and device and electronic equipment Pending CN113688717A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110958926.1A CN113688717A (en) 2021-08-20 2021-08-20 Image recognition method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110958926.1A CN113688717A (en) 2021-08-20 2021-08-20 Image recognition method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN113688717A true CN113688717A (en) 2021-11-23

Family

ID=78580909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110958926.1A Pending CN113688717A (en) 2021-08-20 2021-08-20 Image recognition method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113688717A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114333356A (en) * 2021-11-30 2022-04-12 中交第二公路勘察设计研究院有限公司 Road plane intersection traffic volume statistical method based on video multi-region marks
CN114566063A (en) * 2022-01-24 2022-05-31 深圳市捷顺科技实业股份有限公司 Intelligent parking space guiding management method and device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112258668A (en) * 2020-10-29 2021-01-22 成都恒创新星科技有限公司 Method for detecting roadside vehicle parking behavior based on high-position camera
CN112507813A (en) * 2020-11-23 2021-03-16 北京旷视科技有限公司 Event detection method and device, electronic equipment and storage medium
CN112907982A (en) * 2021-04-09 2021-06-04 济南博观智能科技有限公司 Method, device and medium for detecting vehicle illegal parking behavior
CN113205691A (en) * 2021-04-26 2021-08-03 超级视线科技有限公司 Method and device for identifying vehicle position

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112258668A (en) * 2020-10-29 2021-01-22 成都恒创新星科技有限公司 Method for detecting roadside vehicle parking behavior based on high-position camera
CN112507813A (en) * 2020-11-23 2021-03-16 北京旷视科技有限公司 Event detection method and device, electronic equipment and storage medium
CN112907982A (en) * 2021-04-09 2021-06-04 济南博观智能科技有限公司 Method, device and medium for detecting vehicle illegal parking behavior
CN113205691A (en) * 2021-04-26 2021-08-03 超级视线科技有限公司 Method and device for identifying vehicle position

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114333356A (en) * 2021-11-30 2022-04-12 中交第二公路勘察设计研究院有限公司 Road plane intersection traffic volume statistical method based on video multi-region marks
CN114333356B (en) * 2021-11-30 2023-12-15 中交第二公路勘察设计研究院有限公司 Road plane intersection traffic volume statistical method based on video multi-region marking
CN114566063A (en) * 2022-01-24 2022-05-31 深圳市捷顺科技实业股份有限公司 Intelligent parking space guiding management method and device and storage medium

Similar Documents

Publication Publication Date Title
Grassi et al. Parkmaster: An in-vehicle, edge-based video analytics service for detecting open parking spaces in urban environments
US11380104B2 (en) Method and device for detecting illegal parking, and electronic device
WO2020042349A1 (en) Positioning initialization method applied to vehicle positioning and vehicle-mounted terminal
CN110910655A (en) Parking management method, device and equipment
CN113688717A (en) Image recognition method and device and electronic equipment
CN109389622B (en) Vehicle tracking method, device, identification equipment and storage medium
CN113055823B (en) Method and device for managing shared bicycle based on road side parking
CN112907867A (en) Early warning method and device based on image recognition and server
CN110991215A (en) Lane line detection method, lane line detection device, storage medium, and electronic apparatus
CN111142402A (en) Simulation scene construction method and device and terminal
CN112733598A (en) Vehicle law violation determination method and device, computer equipment and storage medium
CN108847031A (en) Traffic behavior monitoring method, device, computer equipment and storage medium
CN112862856A (en) Method, device and equipment for identifying illegal vehicle and computer readable storage medium
CN111401143A (en) Pedestrian tracking system and method
CN113112813B (en) Illegal parking detection method and device
CN111724607B (en) Steering lamp use detection method and device, computer equipment and storage medium
CN110880205B (en) Parking charging method and device
JP7203587B2 (en) Image processing device and image processing method
CN115909314A (en) License plate shielding detection method, illegal parking detection method and equipment thereof
CN115952531A (en) Image processing method, device, equipment and storage medium
CN115861916A (en) Abnormal parking behavior detection method and device, computer equipment and storage medium
KR102160677B1 (en) Parking enforcement apparatus using mutiple vehicles tracking technology, and control method thereof
CN115409874A (en) Vehicle matching method and device and electronic equipment
CN113076261A (en) Automatic parking test method, automatic parking test equipment, storage medium and automatic parking test device
CN111639640A (en) License plate recognition method, device and equipment based on artificial intelligence

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