CN108052949B - Item category statistical method, system, computer device and readable storage medium - Google Patents

Item category statistical method, system, computer device and readable storage medium Download PDF

Info

Publication number
CN108052949B
CN108052949B CN201711290798.8A CN201711290798A CN108052949B CN 108052949 B CN108052949 B CN 108052949B CN 201711290798 A CN201711290798 A CN 201711290798A CN 108052949 B CN108052949 B CN 108052949B
Authority
CN
China
Prior art keywords
target
picture
preset
target object
determining
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.)
Active
Application number
CN201711290798.8A
Other languages
Chinese (zh)
Other versions
CN108052949A (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.)
Guangdong Midea Intelligent Technologies Co Ltd
Original Assignee
Guangdong Midea Intelligent Technologies 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 Guangdong Midea Intelligent Technologies Co Ltd filed Critical Guangdong Midea Intelligent Technologies Co Ltd
Priority to CN201711290798.8A priority Critical patent/CN108052949B/en
Publication of CN108052949A publication Critical patent/CN108052949A/en
Application granted granted Critical
Publication of CN108052949B publication Critical patent/CN108052949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques

Abstract

The invention provides an article category statistical method, a system, computer equipment and a readable storage medium, wherein the article category statistical method comprises the following steps: acquiring a plurality of pictures corresponding to a preset position within preset time; determining the categories of all target articles in each picture in a plurality of preset categories within preset time; judging whether each target article appears in the previous picture or not in any two adjacent pictures, wherein the distance between the positions of the target articles appearing in the two adjacent pictures is smaller than the preset distance; and when the judgment result is negative, recording the type of the target object which does not appear in the previous picture in the next picture and/or recording the type of the target object which appears in two adjacent pictures and has the distance larger than or equal to the preset distance. By the technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistics process are reduced, and the effectiveness and reliability of article type statistics are improved.

Description

Item category statistical method, system, computer device and readable storage medium
Technical Field
The present invention relates to an item category statistical method, and more particularly, to an item category statistical method, an item category statistical system, a computer device, and a computer-readable storage medium.
Background
With the development of scientific technology, the application of image detection and identification technology is becoming more extensive, such as identifying commodity names, analyzing commodity categories, and the like. In the prior art, a training model can be established in advance, then the target object is detected and identified through the training model, and whether the target object exists in other images or not is identified according to the training model. However, when the image detection is used for the item category statistics, the phenomena of missing statistics and repeated statistics still exist, the accuracy of the statistical result is greatly influenced, and the difficulty is increased for subsequent screening.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art or the related art.
To this end, it is an object of the present invention to provide an item class statistical method.
Another object of the present invention is to provide an item class counting system.
It is another object of the present invention to provide a computer apparatus.
It is another object of the present invention to provide a computer-readable storage medium.
In order to achieve the above object, according to an embodiment of the first aspect of the present invention, there is provided an item category statistical method, including: acquiring a plurality of pictures corresponding to a preset position within preset time; determining the categories of all target articles in each picture in a plurality of preset categories within preset time; judging whether each target article appears in the previous picture or not in any two adjacent pictures, and generating a judgment result, wherein the distance between the positions of the target articles appearing in the two adjacent pictures is smaller than the preset distance; and when the judgment result is negative, recording the type of the target object which does not appear in the previous picture in the next picture and/or recording the type of the target object which appears in two adjacent pictures and has the distance larger than or equal to the preset distance.
According to the technical scheme, the types of the target objects in two adjacent pictures are detected and analyzed by acquiring a plurality of pictures at the same position within the preset time, namely, the same position is sampled for a plurality of times within the preset time, the sampling interval time is short every time, the integrity of sample collection is ensured, the types of the target objects which do not appear in the previous picture in the next picture are recorded by comparing the target objects in any two adjacent pictures, when the target objects do not appear in the previous picture in the next picture, the next statistics is carried out until all the pictures are completely counted, and when any target object appears in the previous picture in the next picture, the type of the target object with the distance larger than or equal to the preset distance is recorded. By the technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistics process are reduced, and the effectiveness and reliability of article type statistics are improved.
Specifically, the category of the target object whose distance is greater than or equal to the preset distance may be recorded separately, and in addition, the category of the target object whose distance is greater than or equal to the preset distance may be recorded completely.
Specifically, it is determined that any target object in the next picture appears in the previous picture, a distance is determined according to a distance between a position of the target object in the previous picture and a position of the target object in the next picture, and when the distance is greater than or equal to a preset distance, a category of the target object in the next picture is recorded, which means that the target object in the next picture and the target object in the previous picture are not the same target object, otherwise, the target object is the same target object.
It can be understood that, when the categories of the target articles are counted within the preset time, the number of the categories is counted from zero, and every time a non-repeating target article (i.e. not the same target article) is recorded, 1 is added to the number of the categories corresponding to the target article. The two adjacent pictures can be understood as two pictures which are continuously shot according to the time sequence, or can be understood as two adjacent frames in the video.
In any of the above technical solutions, preferably, the method further includes: determining a detection frame corresponding to the target object in each picture according to a preset algorithm; and determining the position of the target object in each detection frame.
In the technical scheme, in the process of counting the object types, the object objects in the pictures need to be detected and identified to determine the object types, in order to reduce the influence of irrelevant factors as much as possible, before the object types are detected and identified, the detection frame corresponding to the object objects in each picture can be determined according to a preset algorithm, and then the feature information of the object objects in the detection frames in the pictures can be extracted according to the preset algorithm and classified in the identification process. Therefore, the detection frame corresponding to the target object in the picture is determined through the preset algorithm, the characteristic information of the target object can be rapidly and accurately acquired, the influence of irrelevant factors is effectively reduced, and the detection precision is improved.
In addition, the detection frame corresponding to the target object in the picture is the position of the target object in the picture, which also means that the position of the target object in the picture can be determined while the position of the detection frame is determined.
In any one of the above technical solutions, preferably, before obtaining a plurality of pictures corresponding to the preset position within the preset time, the method further includes: determining a plurality of training pictures of each preset category and label information of each training picture; and determining a training model corresponding to the label information and the detection frame according to the object detection algorithm and the label information, wherein the label information comprises all preset categories and positions corresponding to all target objects in each training picture.
In the technical scheme, before the process of article category statistics, a preset algorithm needs to be detected and trained to obtain a training model corresponding to the label information and the detection frame, so that the accuracy and the recognition efficiency of article detection are improved. Therefore, by setting a plurality of training pictures, the label information and the detection frame of each training picture are determined, and then the training model corresponding to the label information and the detection frame is obtained according to the object detection algorithm. The object detection algorithm is a preset algorithm.
Specifically, the label information includes all preset categories and positions of all target objects in each training picture, and the positions of all target objects and the positions of the detection frames have a certain corresponding relationship, preferably, a plurality of detection frames exist in the training pictures, and only one target object exists in each detection frame.
In any of the above technical solutions, preferably, determining the detection frame corresponding to the target object in each picture according to a preset algorithm specifically includes: determining the horizontal limit size and the vertical limit size of the target object in the picture according to an object detection algorithm; determining an upper left coordinate and a lower right coordinate corresponding to the target item according to the horizontal limit size, the vertical limit size and the position of the target item; and determining a detection frame according to the upper left coordinate, the lower right coordinate and the training model.
According to the technical scheme, the corresponding position of the target object is determined according to the horizontal limit size and the vertical limit size of the target object in the picture, which are determined according to the object detection algorithm, and the position of the target object, and then the detection frame corresponding to the target object is determined according to the training model, so that all feature information of the target object is included in the detection frame, and the effectiveness and the accuracy of the detection result are improved.
The upper left coordinate and the lower right coordinate corresponding to the target object are determined according to the horizontal limit size, the vertical limit size and the position of the target object, and then the detection frame is determined by the upper left coordinate, the lower right coordinate and the training model, namely the size and the position of the detection frame are determined through two points, so that the generation time of the detection frame is reduced, and the statistical efficiency is improved.
In any one of the above technical solutions, preferably, before determining whether each target article in a subsequent picture appears in a previous picture in any two adjacent pictures, the method further includes: and recording the categories of all target objects in the first picture corresponding to the preset position within the preset time.
In the technical scheme, the method comprises the step of comparing the category of the target object in the previous picture with the category of the next target object in the process of counting the object categories, and the first picture at the preset position has no previous picture to be compared, so that the omission of counting is avoided, and therefore, the accuracy of the object category counting result is effectively ensured by recording the categories of all the target objects in the first picture corresponding to the preset position within the preset time.
According to a second aspect of the present invention, there is provided an item classification statistical system, comprising: the image acquisition unit is used for acquiring a plurality of images corresponding to preset positions within preset time; the category determining unit is used for determining the categories of all target articles in each picture in a plurality of preset categories within preset time; the category judgment unit is used for judging whether each target article appears in the previous picture or not in any two adjacent pictures, and the distance between the positions of the target articles appearing in the two adjacent pictures is smaller than the preset distance to generate a judgment result; and the storage unit is used for recording the type of the target object which does not appear in the previous picture in the next picture and/or recording the type of the target object which appears in the two adjacent pictures and has the distance larger than or equal to the preset distance when the judgment result is negative.
According to the technical scheme, the types of the target objects in two adjacent pictures are detected and analyzed by acquiring a plurality of pictures at the same position within the preset time, namely, the same position is sampled for a plurality of times within the preset time, the sampling interval time is short every time, the integrity of sample collection is ensured, the types of the target objects which do not appear in the previous picture in the next picture are recorded by comparing the target objects in any two adjacent pictures, when the target objects do not appear in the previous picture in the next picture, the next statistics is carried out until all the pictures are completely counted, and when any target object appears in the previous picture in the next picture, the type of the target object with the distance larger than or equal to the preset distance is recorded. By the technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistics process are reduced, and the effectiveness and reliability of article type statistics are improved.
Specifically, it is determined that any target object in the next picture appears in the previous picture, a distance is determined according to a distance between a position of the target object in the previous picture and a position of the target object in the next picture, and when the distance is greater than or equal to a preset distance, a category of the target object in the next picture is recorded, which means that the target object in the next picture and the target object in the previous picture are not the same target object, otherwise, the target object is the same target object.
It can be understood that, when the categories of the target articles are counted within the preset time, the number of the categories is counted from zero, and every time a non-repeating target article (i.e. not the same target article) is recorded, 1 is added to the number of the categories corresponding to the target article.
The two adjacent pictures can be understood as two pictures which are continuously shot according to the time sequence, or can be understood as two adjacent frames in the video.
In any of the above technical solutions, preferably, the method further includes: the detection frame determining unit is used for determining a detection frame corresponding to the target object in each picture according to a preset algorithm; and the position determining unit is used for determining the position of the target object in each detection frame.
In the technical scheme, in the process of counting the object types, the object objects in the pictures need to be detected and identified to determine the object types, in order to reduce the influence of irrelevant factors as much as possible, before the object types are detected and identified, the detection frame corresponding to the object objects in each picture can be determined according to a preset algorithm, and then the feature information of the object objects in the detection frames in the pictures can be extracted according to the preset algorithm and classified in the identification process. Therefore, the detection frame determining unit determines the detection frame corresponding to the target object in the picture through the preset algorithm, the characteristic information of the target object can be rapidly and accurately acquired, the influence of irrelevant factors is effectively reduced, and the detection precision is improved.
In addition, the detection frame corresponding to the target object in the picture is the position of the target object in the picture, which also means that the position of the target object in the picture can be determined while the position of the detection frame is determined by the position determination unit.
In any of the above technical solutions, preferably, the method further includes: the label determining unit is used for determining a plurality of training pictures of each preset category and label information of each training picture before acquiring a plurality of pictures corresponding to preset positions in preset time; and the model determining unit is used for determining a training model corresponding to the label information and the detection frame according to the object detection algorithm and the label information, wherein the label information comprises all preset categories and positions corresponding to all target objects in each training picture.
In the technical scheme, before the process of article category statistics, a preset algorithm needs to be detected and trained to obtain a training model corresponding to the label information and the detection frame, so that the accuracy and the recognition efficiency of article detection are improved. Therefore, by setting a plurality of training pictures, the label information and the detection frame of each training picture are determined, and then the training model corresponding to the label information and the detection frame is obtained according to the object detection algorithm. The object detection algorithm is a preset algorithm.
Specifically, the label information includes all preset categories and positions of all target objects in each training picture, and the positions of all target objects and the positions of the detection frames have a certain corresponding relationship, preferably, a plurality of detection frames exist in the training pictures, and only one target object exists in each detection frame.
In any one of the above technical solutions, preferably, the detection frame determining unit specifically includes: the size determining unit is used for determining the horizontal limit size and the vertical limit size of the target object in the picture according to an object detection algorithm; a coordinate determination unit for determining an upper left coordinate and a lower right coordinate corresponding to the target item according to the horizontal limit size, the vertical limit size, and the position of the target item; and the model detection determining unit is used for determining the detection frame according to the upper left coordinate, the lower right coordinate and the training model.
According to the technical scheme, the corresponding position of the target object is determined according to the horizontal limit size and the vertical limit size of the target object in the picture, which are determined according to the object detection algorithm, and the position of the target object, and then the detection frame corresponding to the target object is determined according to the training model, so that all feature information of the target object is included in the detection frame, and the effectiveness and the accuracy of the detection result are improved.
The size determining unit determines the upper left coordinate and the lower right coordinate corresponding to the target object according to the horizontal limit size, the vertical limit size and the position of the target object, and the model detecting and determining unit determines the detecting frame according to the upper left coordinate, the lower right coordinate and the training model, namely the size and the position of the detecting frame are determined through two points, so that the generating time of the detecting frame is reduced, and the statistical efficiency is improved.
In any of the above technical solutions, the method further includes: and the first recording unit is used for recording the categories of all target objects in the first picture corresponding to the preset position within the preset time before judging whether each target object in the next picture appears in the previous picture or not in any two adjacent pictures.
In the technical scheme, in the process of counting the object types, the step of comparing the types of the target objects in the previous picture with the types of the next target objects is included, and no previous picture can be compared in the first picture at the preset position, so that in order to avoid counting omission, the types of all the target objects in the first picture corresponding to the preset position within the preset time are recorded by the first recording unit, and the accuracy of the object type counting result is effectively ensured.
According to a third aspect of the present invention, there is provided a computer device, comprising a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the item classification statistical method defined in any one of the above-mentioned technical solutions when executing the computer program.
In the technical scheme, the article type statistical method defined by the technical scheme is stored in a computer program, when the processor executes the computer program to realize the steps of the article type statistical method defined by any one technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistical process are reduced, the effectiveness and the reliability of article type statistics are improved, the detection frame corresponding to the target article in the picture is determined through a preset algorithm, the characteristic information of the target article can be quickly and accurately acquired, the influence of irrelevant factors is effectively reduced, and the detection precision is improved.
According to an aspect of the fourth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored, wherein a processor executes the steps of the method for counting item categories defined in any one of the above aspects when the computer program is executed by the processor.
In the technical scheme, the article type statistical method defined in the technical scheme is stored in a computer readable storage medium, when a processor executes a computer program to realize the steps of the article type statistical method defined in any technical scheme, the types of target articles in the same position can be accurately recorded, missing statistics or repeated statistics in the statistical process are reduced, the effectiveness and reliability of article type statistics are improved, a detection frame corresponding to the target article in a picture is determined through a preset algorithm, the characteristic information of the target article can be quickly and accurately acquired, the influence of irrelevant factors is effectively reduced, and the detection precision is improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 shows a schematic flow diagram of an item category statistics method according to one embodiment of the invention;
FIG. 2 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention;
FIG. 3 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention;
FIG. 4 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention;
FIG. 5 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention;
FIG. 6 shows a schematic block diagram of an item category statistics system according to an embodiment of the invention;
FIG. 7 shows a schematic block diagram of an item category statistics system according to another embodiment of the invention;
FIG. 8 shows a schematic block diagram of a computer device according to an embodiment of the invention.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
The first embodiment,
FIG. 1 shows a schematic flow diagram of an item category statistics method according to one embodiment of the invention.
As shown in fig. 1, the item category statistical method according to the embodiment of the present invention includes: step S102, acquiring a plurality of pictures corresponding to preset positions within preset time; step S104, determining the categories of all target articles in each picture in a plurality of preset categories within preset time; step S106, judging whether each target object appears in the previous picture in any two adjacent pictures, and generating a judgment result, wherein the distance between the positions of the target object appearing in the two adjacent pictures is smaller than the preset distance; and step S108, when the judgment result is negative, recording the type of the target object which does not appear in the previous picture in the next picture and/or recording the type of the target object which appears in the two adjacent pictures and has the distance larger than or equal to the preset distance.
The method comprises the steps of acquiring a plurality of pictures at the same position within a preset time, detecting and analyzing the category of a target object in each two adjacent pictures, namely sampling the same position for a plurality of times within the preset time, wherein the sampling interval time of each time is short so as to ensure the integrity of sample acquisition, recording the category of the target object which does not appear in the previous picture in the next picture by comparing the target objects in any two adjacent pictures, performing next statistics after the statistics of all pictures is completed when each target object does not appear in the previous picture in the next picture, and recording the category of the target object of which the distance between the target object and the target object is larger than or equal to the preset distance when any target object appears in the previous picture in the next picture. By the technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistics process are reduced, and the effectiveness and reliability of article type statistics are improved.
Specifically, the category of the target object whose distance is greater than or equal to the preset distance may be recorded separately, and in addition, the category of the target object whose distance is greater than or equal to the preset distance may be recorded completely.
Specifically, it is determined that any target object in the next picture appears in the previous picture, a distance is determined according to a distance between a position of the target object in the previous picture and a position of the target object in the next picture, and when the distance is greater than or equal to a preset distance, a category of the target object in the next picture is recorded, which means that the target object in the next picture and the target object in the previous picture are not the same target object, otherwise, the target object is the same target object.
It can be understood that, when the categories of the target articles are counted within the preset time, the number of the categories is counted from zero, and every time a non-repeating target article (i.e. not the same target article) is recorded, 1 is added to the number of the categories corresponding to the target article.
For example, two adjacent pictures may be understood as two pictures taken consecutively in chronological order, or may be understood as two adjacent frames in a video.
Example II,
Fig. 2 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention.
As shown in fig. 2, the item category statistical method according to the embodiment of the present invention further includes: step S202, acquiring a plurality of pictures corresponding to preset positions within preset time; step S204, determining a detection frame corresponding to the target object in each picture according to a preset algorithm; step S206, determining the position of the target object in each detection frame; step S208, determining the categories of all target articles in each picture in a plurality of preset categories within preset time; step S210, judging whether each target article appears in the previous picture in any two adjacent pictures, and generating a judgment result, wherein the distance between the positions of the target articles appearing in the two adjacent pictures is smaller than a preset distance; and step S212, when the judgment result is negative, recording the type of the target object which does not appear in the previous picture in the next picture and/or recording the type of the target object which appears in the two adjacent pictures and has the distance larger than or equal to the preset distance.
In the process of article category statistics, the target articles in the pictures need to be detected and identified to determine the article categories, in order to reduce the influence of irrelevant factors as much as possible, before the categories of the identified target articles are detected, the detection frames corresponding to the target articles in each picture can be determined according to a preset algorithm, and then in the identification process, the feature information of the target articles in the detection frames in the pictures can be extracted according to the preset algorithm and classified. Therefore, the detection frame corresponding to the target object in the picture is determined through the preset algorithm, the characteristic information of the target object can be rapidly and accurately acquired, the influence of irrelevant factors is effectively reduced, and the detection precision is improved.
In addition, the detection frame corresponding to the target object in the picture is the position of the target object in the picture, which also means that the position of the target object in the picture can be determined while the position of the detection frame is determined.
For example, the predetermined algorithm may be RCNN detection algorithm, Fast-RCNN detection algorithm, or SPP net detection algorithm.
Example III,
Fig. 3 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention.
As shown in fig. 3, before acquiring a plurality of pictures corresponding to preset positions within a preset time, the method for counting item categories according to the embodiment of the present invention further includes: step S302, determining a plurality of training pictures of each preset category and label information of each training picture; step S304, determining a training model corresponding to the label information and the detection frame according to the object detection algorithm and the label information, wherein the label information comprises all preset categories and positions corresponding to all target objects in each training picture.
Before the process of object category statistics, a preset algorithm needs to be detected and trained to obtain a training model corresponding to the label information and the detection frame, so that the accuracy and the recognition efficiency of object detection are improved. Therefore, by setting a plurality of training pictures, the label information and the detection frame of each training picture are determined, and then the training model corresponding to the label information and the detection frame is obtained according to the object detection algorithm. The object detection algorithm is a preset algorithm.
Specifically, the label information includes all preset categories and positions of all target objects in each training picture, and the positions of all target objects and the positions of the detection frames have a certain corresponding relationship, preferably, a plurality of detection frames exist in the training pictures, and only one target object exists in each detection frame.
For example, the target items include five types of beverages, i.e., nestle coffee, coca-cola, fenda, orange, and iced black tea, and 3000 training samples can be set for each type of beverage to ensure sample diversity. When the object detection algorithm is a fast-RCNN algorithm, the training mode can adopt an end-to-end training mode.
Example four,
Fig. 4 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention.
As shown in fig. 4, according to the item category statistical method of the embodiment of the present invention, the determining, according to a preset algorithm, a detection frame corresponding to a target item in each picture specifically includes: step S404, determining the horizontal limit size and the vertical limit size of the target object in the picture according to an object detection algorithm; step S406, determining an upper left coordinate and a lower right coordinate corresponding to the target object according to the horizontal limit size, the vertical limit size and the position of the target object; and step S408, determining a detection frame according to the upper left coordinate, the lower right coordinate and the training model.
According to the horizontal limit size and the vertical limit size of the target object in the picture determined by the object detection algorithm, the corresponding position of the target object is determined according to the horizontal limit size, the vertical limit size and the position of the target object, and then the detection frame corresponding to the target object is determined according to the training model, so that all feature information of the target object is included in the detection frame, and the validity and the accuracy of the detection result are improved.
The upper left coordinate and the lower right coordinate corresponding to the target object are determined according to the horizontal limit size, the vertical limit size and the position of the target object, and then the detection frame is determined by the upper left coordinate, the lower right coordinate and the training model, namely the size and the position of the detection frame are determined through two points, so that the generation time of the detection frame is reduced, and the statistical efficiency is improved.
For example, when the object detection algorithm is the fast-RCNN algorithm, nine detection frame sizes determined by three areas and three proportions corresponding to the anchor points in the original algorithm can be adjusted during model training, and a variety of detection frames based on target sizes can be obtained.
Example V,
Fig. 5 shows a schematic flow diagram of an item category statistics method according to another embodiment of the invention.
As shown in fig. 5, the item category statistical method according to the embodiment of the present invention further includes: if yes, executing step S516 to determine a distance between the position of the target object in the previous picture and the position of the target object in the next picture; step S518, determining whether the distance is greater than a preset distance, if the distance is greater than or equal to the preset distance, executing step S520, and recording the category of the target object, otherwise executing step S522, and not recording the category of the target object.
The method comprises the steps of comparing the type of a target object in a previous picture with the type of a next target object, judging whether the types of the target objects are the same, determining the distance according to the distance between the position of a detection frame of the target object in the previous picture and the position of a detection frame of the target object in the next picture when the type of the target object in the previous picture is judged to be the same as the type of the next target object, recording the type of the target object when the distance is larger than or equal to a preset distance, and otherwise, not recording the type of the target object, which means that the target object in the next picture and the target object in the previous picture are not the same target object, otherwise, the target object is the same target object. Therefore, according to the technical scheme, only one picture is counted for the same target article, the influence of repeated counting on article type counting is reduced, and the effectiveness and the reliability of the article type counting are further improved.
In any of the above embodiments, preferably, before determining, in any two adjacent pictures, whether each target item in the next picture appears in the previous picture, the method further includes: and recording the categories of all target objects in the first picture corresponding to the preset position within the preset time.
In the process of counting the object types, the step of comparing the types of the target objects in the previous picture with the types of the target objects in the next picture is included, and no previous picture can be compared in the first picture at the preset position, so that the omission of counting is avoided, and therefore, the accuracy of the object type counting result is effectively ensured by recording the types of all the target objects in the first picture corresponding to the preset position within the preset time.
Example six,
Based on the fifth embodiment, the number statistics of the counted article types can be performed, and the statistical data is pushed to the seller, wherein the statistical data comprises the article types and the recording times of the same article. For example, in a statistical cinema, the types of beverages held by film watching users can be counted within a preset time, so that the requirements of the film watching users can be known in time, and the shopping of sellers for the commodities is facilitated.
Example seven,
FIG. 6 shows a schematic block diagram of an item category statistics system 600 according to one embodiment of the invention.
As shown in fig. 6, an item category statistics system 600 according to an embodiment of the invention includes: a picture acquiring unit 602, configured to acquire multiple pictures corresponding to preset positions within a preset time; a category determining unit 604, configured to determine categories of all target items in each picture in a plurality of preset categories within a preset time; a category judgment unit 606, configured to judge, in any two adjacent pictures, whether each target article in a subsequent picture appears in a previous picture, and a distance between positions where the target article appears in the two adjacent pictures is smaller than a preset distance, so as to generate a judgment result; and the storage unit 608 is configured to, when the determination result is negative, record a category of the target item that does not appear in the previous picture in the next picture and/or record a category of the target item that appears in two adjacent pictures and has a distance greater than or equal to a preset distance.
The method comprises the steps of acquiring a plurality of pictures at the same position within a preset time, detecting and analyzing the category of a target object in each two adjacent pictures, namely sampling the same position for a plurality of times within the preset time, wherein the sampling interval time is short every time to ensure the integrity of sample acquisition, comparing the target object in any two adjacent pictures through a category judgment unit 606, recording the category of the target object which does not appear in the previous picture in the next picture through a storage unit 608 when the target object does not appear in the previous picture in the next picture, counting the next time after all the pictures are counted, and recording the category of the target object with the distance larger than or equal to the preset distance when any target object appears in the previous picture in the next picture. By the technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistics process are reduced, and the effectiveness and reliability of article type statistics are improved.
Specifically, it is determined that any target object in the next picture appears in the previous picture, a distance is determined according to a distance between a position of the target object in the previous picture and a position of the target object in the next picture, and when the distance is greater than or equal to a preset distance, a category of the target object in the next picture is recorded, which means that the target object in the next picture and the target object in the previous picture are not the same target object, otherwise, the target object is the same target object.
It can be understood that, when the categories of the target articles are counted within the preset time, the number of the categories is counted from zero, and every time a non-repeating target article (i.e. not the same target article) is recorded, 1 is added to the number of the categories corresponding to the target article.
The two adjacent pictures can be understood as two pictures which are continuously shot according to the time sequence, or can be understood as two adjacent frames in the video.
In any of the above embodiments, preferably, the method further includes: a detection frame determining unit 610, configured to determine a detection frame corresponding to the target item in each picture according to a preset algorithm; a position determining unit 612, configured to determine a position of the target item in each detection frame.
In the process of article category statistics, the target articles in the pictures need to be detected and identified to determine the article categories, in order to reduce the influence of irrelevant factors as much as possible, before the categories of the identified target articles are detected, the detection frames corresponding to the target articles in each picture can be determined according to a preset algorithm, and then in the identification process, the feature information of the target articles in the detection frames in the pictures can be extracted according to the preset algorithm and classified. Therefore, the detection frame determining unit 610 determines the detection frame corresponding to the target object in the picture through the preset algorithm, and can quickly and accurately acquire the feature information of the target object, thereby effectively reducing the influence of irrelevant factors and improving the detection precision.
In addition, the detection frame corresponding to the target item in the picture is the position of the target item in the picture, which also means that the position of the target item in the picture can be determined at the same time when the position of the detection frame is determined by the position determining unit 612.
In any of the above embodiments, preferably, the method further includes: a label determining unit 614, configured to determine multiple training pictures of each preset category and label information of each training picture before multiple pictures corresponding to preset positions within preset time are acquired; a model determining unit 616, configured to determine, according to the object detection algorithm and the tag information, a training model corresponding to the tag information and the detection frame, where the tag information includes all preset categories and positions corresponding to all target items in each training picture.
Before the process of object category statistics, a preset algorithm needs to be detected and trained to obtain a training model corresponding to the label information and the detection frame, so that the accuracy and the recognition efficiency of object detection are improved. Thus, by setting a plurality of training pictures, the label determination unit 614 determines the label information and the detection frame of each training picture, and the model determination unit 616 obtains the training model corresponding to the label information and the detection frame according to the object detection algorithm. The object detection algorithm is a preset algorithm.
Specifically, the label information includes all preset categories and positions of all target objects in each training picture, and the positions of all target objects and the positions of the detection frames have a certain corresponding relationship, preferably, a plurality of detection frames exist in the training pictures, and only one target object exists in each detection frame.
Example eight,
As shown in fig. 7, according to the item category statistics system 600 of the embodiment of the present invention, the detection frame determining unit 610 specifically includes: a size determination unit 6102, configured to determine a horizontal limit size and a vertical limit size of the target object in the picture according to an object detection algorithm; a coordinate determination unit 6106 for determining an upper left coordinate and a lower right coordinate corresponding to the target item according to the horizontal limit size, the vertical limit size, and the position of the target item; a model detection determining unit 6104, configured to determine the detection frame according to the upper left coordinate, the lower right coordinate, and the training model.
According to the horizontal limit size and the vertical limit size of the target object in the picture determined by the object detection algorithm, the corresponding position of the target object is determined according to the horizontal limit size, the vertical limit size and the position of the target object, and then the detection frame corresponding to the target object is determined according to the training model, so that all feature information of the target object is included in the detection frame, and the validity and the accuracy of the detection result are improved.
The size determination unit 6102 determines the upper left coordinate and the lower right coordinate corresponding to the target object according to the horizontal limit size, the vertical limit size, and the position of the target object, and the model detection determination unit 6104 determines the detection frame according to the upper left coordinate, the lower right coordinate, and the training model, that is, the size and the position of the detection frame are determined through two points, so that the generation time of the detection frame is reduced, and the statistical efficiency is improved.
In any of the above embodiments, preferably, the method further includes: a distance determining unit 618, configured to determine, when the determination result is yes, a distance between the position of the target object in the previous picture and the position of the target object in the next picture; and the distance judging unit 620 is configured to record the category of the target object in the subsequent picture when the distance is greater than the preset distance, and otherwise, delete the subsequent picture.
Whether the type of the target object in the previous picture is the same as that of the next target object can be judged by comparing the type of the target object in the previous picture with that of the next target object, when the type of the target object in the previous picture is judged to be the same as that of the next target object, the distance determining unit 618 determines the distance according to the distance between the position of the detection frame of the target object in the previous picture and the position of the detection frame of the target object in the next picture, and when the distance is judged to be larger than the preset distance by the distance judging unit 620, the type of the target object in the next picture is recorded, otherwise, the next picture is deleted, which means that the target object in the next picture and the target object in the previous picture are not the same target object, otherwise, the target object is the same target object. Therefore, according to the embodiment, only one picture is counted for the same target article, so that the storage pressure of the memory is reduced, the statistical sample ratio of the effective pictures is improved, and the effectiveness and the reliability of the article type statistics are further improved.
In any of the above embodiments, preferably, the method further includes: the first recording unit 622 is configured to record the categories of all the target items in the first picture corresponding to the preset position within the preset time before determining whether each target item in the next picture appears in the previous picture in any two adjacent pictures.
In the process of counting the object types, the step of comparing the type of the target object in the previous picture with the type of the next target object is included, and no previous picture can be compared in the first picture at the preset position, so as to avoid missing the counting, and therefore, the first recording unit 622 records the types of all the target objects in the first picture corresponding to the preset position within the preset time, and the accuracy of the object type counting result is effectively ensured.
Examples nine,
FIG. 8 shows a schematic block diagram of a computer device 800 according to an embodiment of the invention.
As shown in fig. 8, a computer apparatus 800 according to an embodiment of the present invention includes: a memory 802, a processor 804 and a computer program stored on the memory 802 and executable on the processor 804, the processor 804 implementing the steps defined by the item classification statistical method when executing the computer program.
According to the computer readable storage medium of the embodiment of the invention, a computer program is stored on the computer readable storage medium, and the processor realizes the steps defined by the item class statistical method when executing the computer program.
The technical scheme of the invention is explained in detail in the above with the accompanying drawings, the invention provides an article category statistical method, a system, a computer device and a readable storage medium, by acquiring a plurality of pictures at the same position within the preset time, the type of the target object in each two adjacent pictures is detected and analyzed, namely within the preset time, the same position is sampled for a plurality of times, and the sampling interval time of each time is shorter, so as to ensure the integrity of sample collection, by comparing the target objects in any two adjacent pictures and judging that each target object in the latter picture does not appear in the former picture, recording the category of the target object which does not appear in the previous picture in the next picture, carrying out the next counting after all the pictures are counted, and when any target object appears in the previous picture in the next picture, recording the category of the target object with the distance larger than or equal to the preset distance. By the technical scheme, the types of the target articles at the same position can be accurately recorded, missing statistics or repeated statistics in the statistics process are reduced, and the effectiveness and reliability of article type statistics are improved.
The steps in the method of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the device of the invention can be merged, divided and deleted according to actual needs.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
In the description herein, the description of the terms "one embodiment," "some embodiments," "specific embodiments," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. An item category statistical method, comprising:
acquiring a plurality of pictures corresponding to a preset position within preset time;
determining the categories of all target articles in each picture in a plurality of preset categories within the preset time;
judging whether each target article appears in a previous picture in any two adjacent pictures, and generating a judgment result when the distance between the positions of the target articles appearing in the two adjacent pictures is smaller than a preset distance, wherein the distance is determined according to the distance between the position of the target article in the previous picture and the position of the target article in the next picture;
when the judgment result is negative, recording the type of the target object which does not appear in the previous picture in the next picture and/or recording the type of the target object which appears in two adjacent pictures and has the distance larger than or equal to the preset distance;
before the step of judging whether each target article appears in the previous picture in the next picture in any two adjacent pictures, the method further comprises the following steps:
and recording the categories of all the target objects in the first picture corresponding to the preset position in the preset time.
2. The item class statistics method of claim 1, further comprising:
determining a detection frame corresponding to a target object in each picture according to a preset algorithm;
and determining the position of the target object in each detection frame.
3. The item category statistic method according to claim 2, further comprising, before the obtaining the plurality of pictures corresponding to the preset positions within the preset time, the steps of:
determining a plurality of training pictures of each preset category and label information of each training picture;
determining a training model corresponding to the label information and the detection box according to an object detection algorithm and the label information,
wherein the label information includes all of the preset categories and positions corresponding to all of the target items in each of the training pictures.
4. The item category statistical method according to claim 3, wherein the determining a detection frame corresponding to the target item in each of the pictures according to a preset algorithm specifically comprises:
determining a horizontal limit size and a vertical limit size of the target object in the picture according to the object detection algorithm;
determining an upper left coordinate and a lower right coordinate corresponding to the target item according to the horizontal limit size, the vertical limit size and the position of the target item;
and determining the detection frame according to the upper left coordinate, the lower right coordinate and the training model.
5. An item category statistics system, comprising:
the image acquisition unit is used for acquiring a plurality of images corresponding to preset positions within preset time;
the category determining unit is used for determining the categories of all target articles in each picture in a plurality of preset categories within the preset time;
the category judgment unit is used for judging whether each target article appears in a previous picture in any two adjacent pictures, and the distance between the positions of the target article appearing in the two adjacent pictures is smaller than a preset distance to generate a judgment result, wherein the distance is determined according to the distance between the position of the target article in the previous picture and the position of the target article in the next picture;
a storage unit, configured to record, when the determination result is negative, a category of the target item that does not appear in the previous picture in the subsequent picture and/or a category of the target item that appears in two adjacent pictures and has the distance greater than or equal to the preset distance;
further comprising:
and the first recording unit is used for recording the categories of all the target objects in the first picture corresponding to a preset position in the preset time before judging whether each target object appears in the previous picture in any two adjacent pictures.
6. The item category statistics system of claim 5, further comprising:
the detection frame determining unit is used for determining a detection frame corresponding to the target object in each picture according to a preset algorithm;
and the position determining unit is used for determining the position of the target object in each detection frame.
7. The item category statistics system of claim 6, further comprising:
the label determining unit is used for determining a plurality of training pictures of each preset category and label information of each training picture before acquiring a plurality of pictures corresponding to preset positions in preset time;
a model determination unit for determining a training model corresponding to the label information and the detection frame based on an object detection algorithm and the label information,
wherein the label information includes all of the preset categories and positions corresponding to all of the target items in each of the training pictures.
8. The item category statistic system according to claim 7, wherein the detection frame determining unit specifically includes:
the size determining unit is used for determining the horizontal limit size and the vertical limit size of the target object in the picture according to the object detection algorithm;
a coordinate determination unit for determining an upper left coordinate and a lower right coordinate corresponding to the target item according to the horizontal limit size, the vertical limit size, and the position of the target item;
and the model detection determining unit is used for determining the detection frame according to the upper left coordinate, the lower right coordinate and the training model.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the item class counting method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the item category statistical method according to any one of claims 1 to 4.
CN201711290798.8A 2017-12-08 2017-12-08 Item category statistical method, system, computer device and readable storage medium Active CN108052949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711290798.8A CN108052949B (en) 2017-12-08 2017-12-08 Item category statistical method, system, computer device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711290798.8A CN108052949B (en) 2017-12-08 2017-12-08 Item category statistical method, system, computer device and readable storage medium

Publications (2)

Publication Number Publication Date
CN108052949A CN108052949A (en) 2018-05-18
CN108052949B true CN108052949B (en) 2021-08-27

Family

ID=62123196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711290798.8A Active CN108052949B (en) 2017-12-08 2017-12-08 Item category statistical method, system, computer device and readable storage medium

Country Status (1)

Country Link
CN (1) CN108052949B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109003390B (en) * 2018-06-29 2021-08-10 深圳和而泰数据资源与云技术有限公司 Commodity identification method, unmanned vending machine and computer-readable storage medium
CN108985359B (en) * 2018-06-29 2021-07-13 深圳和而泰数据资源与云技术有限公司 Commodity identification method, unmanned vending machine and computer-readable storage medium
CN108960238B (en) * 2018-07-02 2020-10-27 百度在线网络技术(北京)有限公司 Multi-camera-based commodity identification processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150631A (en) * 2013-03-11 2013-06-12 苏州斯普锐智能系统有限公司 Image-matching-based automatic article management method and system
CN106104610A (en) * 2014-03-12 2016-11-09 日本电气株式会社 Display status analysis equipment, display state analyzing method and program recorded medium
CN106447695A (en) * 2016-09-23 2017-02-22 广州视源电子科技股份有限公司 Same object determining method and device in multi-object tracking
CN106650580A (en) * 2016-09-23 2017-05-10 南京理工大学 Image processing based goods shelf quick counting method
CN107145816A (en) * 2017-02-24 2017-09-08 北京悉见科技有限公司 Object identifying tracking and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8953882B2 (en) * 2012-05-31 2015-02-10 Apple Inc. Systems and methods for determining noise statistics of image data
US20160117382A1 (en) * 2013-06-19 2016-04-28 Hewlett-Packard Development Company, L.P. Document topic identification
CN104715023B (en) * 2015-03-02 2018-08-03 北京奇艺世纪科技有限公司 Method of Commodity Recommendation based on video content and system
CN107180074A (en) * 2017-03-31 2017-09-19 北京奇艺世纪科技有限公司 A kind of video classification methods and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103150631A (en) * 2013-03-11 2013-06-12 苏州斯普锐智能系统有限公司 Image-matching-based automatic article management method and system
CN106104610A (en) * 2014-03-12 2016-11-09 日本电气株式会社 Display status analysis equipment, display state analyzing method and program recorded medium
CN106447695A (en) * 2016-09-23 2017-02-22 广州视源电子科技股份有限公司 Same object determining method and device in multi-object tracking
CN106650580A (en) * 2016-09-23 2017-05-10 南京理工大学 Image processing based goods shelf quick counting method
CN107145816A (en) * 2017-02-24 2017-09-08 北京悉见科技有限公司 Object identifying tracking and device

Also Published As

Publication number Publication date
CN108052949A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN108320404B (en) Commodity identification method and device based on neural network and self-service cash register
US20190166397A1 (en) Method and system for identifying relevant media content
CN108052949B (en) Item category statistical method, system, computer device and readable storage medium
US20170178686A1 (en) Method and system for overlaying image in video stream
CN110348360B (en) Detection report identification method and equipment
CN108235122A (en) The monitoring method and device of video ads
CN108376242A (en) For the characteristics of SSTA persistence descriptor of video
CN111126122B (en) Face recognition algorithm evaluation method and device
CN110458126B (en) Pantograph state monitoring method and device
CN110276295A (en) Vehicle identification number detection recognition method and equipment
CN110348392B (en) Vehicle matching method and device
CN108765405A (en) A kind of image authenticating method and system
CN111488847B (en) Sports game video ball-feeding segment acquisition system, method and terminal
WO2023123924A1 (en) Target recognition method and apparatus, and electronic device and storage medium
CN113468914B (en) Method, device and equipment for determining purity of commodity
CN110033027A (en) A kind of item identification method, device, terminal and readable storage medium storing program for executing
CN110119675B (en) Product identification method and device
CN111914648A (en) Vehicle detection and identification method and device, electronic equipment and storage medium
CN112184751A (en) Object identification method and system and electronic equipment
JP2011203790A (en) Image verification device
CN114973065A (en) Method and system for detecting article moving and leaving based on video intelligent analysis
CN110969054A (en) Container number identification method and device
US9798932B2 (en) Video extraction method and device
CN114648720A (en) Neural network training method, image detection method, device, equipment and medium
CN111860261B (en) Passenger flow value statistical method, device, equipment and medium

Legal Events

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