Biological anti-counterfeiting identification method, device, equipment and storage medium

By performing frame processing and removing invalid image frames on video files to be processed, effective image frames are sampled and valid image frames are obtained, and biological anti-counterfeiting identification is used to solve the problem of large processing overhead in the prior art and the detection efficiency and accuracy are improved.

CN114764932BActive Publication Date: 2025-07-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202011633105.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-31
Publication Date
2025-07-11
Estimated Expiration
2040-12-31

AI Technical Summary

Technical Problem

The face recognition method in the prior art requires processing all image frames in the video file to be processed, resulting in high processing overhead and low efficiency of computer equipment.

Method used

By performing frame processing on video files to be processed, invalid image frames are identified and removed, and a rated number of valid image frames are sampled to obtain, and the pre-trained biological anti-counterfeiting recognition model is used for anti-counterfeiting, reducing the number of image frames for processing video files.

Benefits of technology

It reduces the processing overhead of computer equipment, improves the detection efficiency of the organisms to be detected, and ensures the accuracy of the detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114764932B_ABST
    Figure CN114764932B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and storage medium for anti-counterfeiting identification of organisms, belonging to the technical field of computers and the Internet. The method includes: obtaining a to-be-processed video file containing an organism to be detected; performing frame splitting processing on the to-be-processed video file to obtain an initial image frame sequence; performing invalid image frame identification and removal processing on the initial image frame sequence to obtain a valid image frame sequence; performing quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, thereby obtaining a to-be-processed image frame sequence; and using a pre-trained anti-counterfeiting identification model for organisms to perform anti-counterfeiting identification processing on the organism to be detected in the processed image frame sequence, so as to obtain an anti-counterfeiting identification result of the organism to be detected. In the present application, the processing overhead of computer equipment is reduced, the detection efficiency for the organism to be detected is improved, and the accuracy of the obtained to-be-processed image frame sequence is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer and Internet technologies, and particularly relates to a method, device, equipment, and storage medium for anti-counterfeiting identification of organisms. Background Art

[0002] Currently, face recognition plays a very important role in face authentication technology. In the related art, face recognition is performed frame by frame on each image frame in the collected video file to be processed to determine whether there is an image frame containing a face in the video file to be processed. If there is an image frame containing a face in the video file to be processed, it is determined that the video file to be processed includes a face.

[0003] However, in the above related art, it is necessary to perform face recognition on all image frames in the video file to be processed, resulting in a large processing overhead. Summary of the Invention

[0004] Embodiments of this application provide a method, device, equipment, and storage medium for anti-counterfeiting identification of organisms, which can reduce the processing overhead of computer equipment and improve the detection efficiency for organisms to be detected. The technical solution is as follows:

[0005] According to one aspect of the embodiments of this application, a method for anti-counterfeiting identification of organisms is provided. The method includes:

[0006] Obtain a video file to be processed containing an organism to be detected, where the video file to be processed includes at least one image frame containing the organism to be detected;

[0007] Perform frame splitting on the video file to be processed to obtain an initial image frame sequence, where the initial image frame sequence includes multiple image frames;

[0008] Perform invalid image frame recognition and removal processing on the initial image frame sequence to obtain a valid image frame sequence;

[0009] Perform quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, and obtain an image frame sequence to be processed;

[0010] Use a pre-trained anti-counterfeiting identification model for organisms to perform anti-counterfeiting identification processing on the organism to be detected in the image frame sequence to be processed, and obtain an anti-counterfeiting identification result of the organism to be detected.

[0011] According to one aspect of the embodiments of this application, an anti-counterfeiting identification device for organisms is provided. The device includes:

[0012] A video acquisition module, configured to acquire a to-be-processed video file including a biological organism to be detected, where the to-be-processed video file includes at least one image frame containing the biological organism to be detected;

[0013] A video frame splitting module, configured to perform frame splitting on the to-be-processed video file to obtain an initial image frame sequence, where the initial image frame sequence includes a plurality of image frames;

[0014] An image removal module, configured to perform invalid image frame recognition and removal processing on the initial image frame sequence to obtain a valid image frame sequence;

[0015] An image sampling module, configured to sample and obtain a rated number of image frames from the valid image frame sequence to obtain a to-be-processed image frame sequence;

[0016] A generation and recognition module, configured to perform anti-counterfeiting recognition processing on the biological organism to be detected in the to-be-processed image frame sequence by using a pre-trained biological organism anti-counterfeiting recognition model to obtain an anti-counterfeiting recognition result of the biological organism to be detected.

[0017] According to one aspect of the embodiments of the present application, the embodiments of the present application provide a computer device, where the computer device includes a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the above-mentioned biological organism anti-counterfeiting recognition method.

[0018] According to one aspect of the embodiments of the present application, the embodiments of the present application provide a computer-readable storage medium, where at least one instruction, at least one program, a code set or an instruction set is stored in the readable storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the above-mentioned biological organism anti-counterfeiting recognition method.

[0019] According to one aspect of the embodiments of the present application, there is provided a computer program product or a computer program, where the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned biological organism anti-counterfeiting recognition method.

[0020] The technical solution provided by the embodiments of the present application can bring the following beneficial effects:

[0021] A sequence of image frames to be processed is obtained by sampling a rated number of image frames from a video file to be processed, and this sequence of image frames to be processed is used to determine whether a biological organism to be detected is included in the video file to be processed. That is to say, when the computer device determines whether a biological organism to be detected is included in the video file to be processed, it does not need to process the entire video file to be processed. Only a part of the image frames in the video file to be processed is required to determine whether the video file to be processed contains the biological organism to be detected, reducing the processing overhead of the computer device and improving the detection efficiency for the biological organism to be detected. Moreover, the rated number of image frames is sampled from the effective image frame sequence of the video file to be processed. The effective image frame sequence is obtained by removing invalid image frames from the image frames of the video file to be processed, and the invalid image frames include the image frames located at the head and tail of the initial image frame sequence. By obtaining the rated number of image frames from the middle part of the video file to be processed and removing the inaccurate image frames at the head and tail, the accuracy of the obtained sequence of image frames to be processed is ensured, and further the accuracy of the detection result for the biological organism to be detected is effectively ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0023] Figure 1 is a schematic diagram of a video processing system provided by an embodiment of the present application;

[0024] Figure 2 is a flowchart of a biological organism anti-counterfeiting identification method provided by an embodiment of the present application;

[0025] Figure 3 is a flowchart of a biological organism anti-counterfeiting identification method provided by another embodiment of the present application;

[0026] Figure 4 Exemplarily shows a schematic diagram of a biological organism anti-counterfeiting identification method;

[0027] Figure 5 Exemplarily shows a schematic diagram of the process of a biological organism anti-counterfeiting identification method;

[0028] Figure 6 is a block diagram of a biological organism anti-counterfeiting identification device provided by an embodiment of the present application;

[0029] Figure 7 is a block diagram of a biological organism anti-counterfeiting identification device provided by another embodiment of the present application;

[0030] Figure 8 It is a structural block diagram of a computer device provided by an embodiment of the present application. Detailed implementation manners

[0031] To make the objectives, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0032] Please refer to Figure 1 , which shows a schematic diagram of a video processing system provided by an embodiment of the present application. The video processing system may include an image acquisition device 10 and an image processing device 20.

[0033] The image acquisition device 10 is used to acquire images in the environment and generate video files. Among them, the image acquisition device 10 may be an electronic device such as a camera, a video camera, or a face scanner, etc., and the embodiments of the present application do not make any limitations in this regard. Optionally, the image acquisition device 10 may be set in a real scenario, and the number of image acquisition devices 10 in different scenarios may be the same or different. In the embodiments of the present application, the image acquisition device 10 may acquire images from the environment in real time or at a certain time interval, generate a video file to be processed, and send the video file to be processed to the image processing device 20.

[0034] The image processing device 20 is used to determine whether the video file to be processed contains a biological organism to be detected. Among them, the image processing device 20 refers to an electronic device with the function of processing data, such as a mobile phone, a tablet computer, a PC (Personal Computer), or a server, etc., and the embodiments of the present application do not make any limitations in this regard. In the embodiments of the present application, after acquiring the above-mentioned video file to be processed, the image processing device 20 extracts a sequence of image frames to be processed from the video file to be processed, and determines whether the video file to be processed contains a biological organism to be detected based on the sequence of image frames to be processed. Optionally, the image processing device 20 may acquire video files to be processed sent by multiple image acquisition devices 10, and the embodiments of the present application do not make any limitations in this regard.

[0035] Optionally, the above-mentioned image acquisition device 10 and the above-mentioned image processing device 20 are connected through a network. Of course, in an exemplary embodiment, the image acquisition device 10 and the image processing device 20 may be the same device, such as a mobile phone, a face-swiping payment terminal, etc., and the embodiments of the present application do not make any limitations in this regard.

[0036] Next, the technical solutions of the present application will be introduced and described in detail in conjunction with several embodiments.

[0037] Please refer to Figure 2 , which shows a flowchart of a biological organism anti-counterfeiting identification method provided by an embodiment of the present application. The method can be applied to a computer device, and the computer device may beFigure 1 In the image processing device 20 of the video processing system shown. The method may include the following steps (201-204):

[0038] Step 201, obtaining a video file to be processed that contains a biological organism to be detected.

[0039] The video file to be processed includes a video composed of multiple image frames. Among them, the video file to be processed may include at least one image frame containing the biological organism to be detected. Optionally, in the video file to be processed, different image frames may include the same biological organism to be detected, or may include different biological organisms to be detected. Of course, the same image frame may also include different biological organisms to be detected. The embodiments of the present application do not limit this. In the case where the video file to be processed includes multiple biological organisms to be detected, the computer device may use different markings for different biological organisms to be detected in each image frame of the video file to be processed. For example, the first biological organism to be detected is marked with a green rectangular frame, and the second biological organism to be detected is marked with a red rectangular frame.

[0040] In the embodiments of the present application, the computer device obtains a video file to be processed that contains a biological organism to be detected through an image acquisition device. Among them, the image acquisition device may be an electronic device independent of the computer device and connected to the computer device through a network; or, the image acquisition device may also be an image acquisition component directly embedded in the computer device. The embodiments of the present application do not limit this.

[0041] In a possible implementation manner, the computer device obtains the above-mentioned video file to be processed in real time. Optionally, after the image acquisition device collects image frames from the environment and generates a video file to be processed, it sends the video file to be processed to the computer device in real time. Further, the computer device processes the video file to be processed to determine whether the video file to be processed contains a biological organism to be detected.

[0042] In another possible implementation manner, the computer device obtains the above-mentioned video file to be processed according to a certain time period. Optionally, after the image acquisition device collects image frames from the environment and generates a video file to be processed, it sends multiple video files to be processed obtained during the current time period to the computer device according to a certain time period. Further, the computer device processes the multiple video files to be processed to respectively determine whether the multiple video files to be processed contain a biological organism to be detected. Among them, the above time period may be any value, and the staff can adjust the time period according to the actual situation. The embodiments of the present application do not limit this.

[0043] It should be noted that the processing of the computer device for the above-mentioned video file to be processed can be real-time or non-real-time, and the embodiments of the present application do not limit this.

[0044] Step 202: Perform frame division processing on the video file to be processed to obtain an initial image frame sequence.

[0045] In the embodiments of the present application, after the computer device obtains the above-mentioned video file to be processed, it performs frame division processing on the video file to be processed to obtain an initial image frame sequence. Among them, the initial image frame sequence contains multiple image frames. Optionally, when the computer device performs frame division processing on the video file to be processed, it determines the total number of image frames included in the video file to be processed, and performs frame division processing on the video file to be processed based on the total number of image frames to obtain an initial image frame sequence. Optionally, the number of image frames included in the initial image frame sequence is the same as the above-mentioned total number of image frames. Among them, for different video files to be processed, the number of image frames included in the initial image frame sequence may be different.

[0046] Step 203: Perform invalid image frame recognition and removal processing on the initial image frame sequence to obtain a valid image frame sequence.

[0047] In the embodiments of the present application, after the computer device obtains the above-mentioned initial image frame sequence, it recognizes and removes invalid image frames from the initial image frame sequence, and uses the remaining image frames as valid image frames, thereby obtaining a valid image frame sequence. Among them, the invalid image frames include the image frames located at the head and / or tail of the initial image frame sequence. That is, after the computer device obtains the above-mentioned initial image frame sequence, it performs recognition and removal processing on the invalid image frames located at the head and / or tail of the initial image frame sequence to obtain the above-mentioned valid image frame sequence.

[0048] In a possible implementation manner, the above-mentioned invalid image frames include the image frames located at the head of the initial image frame. Optionally, after the computer device obtains the above-mentioned initial image frame sequence, it obtains the set ratio between the number of invalid image frames and the number of image frames included in the initial image frame sequence, and then determines the number of invalid image frames based on the set ratio, and selects and removes the invalid image frames from the image frames at the head of the initial image frame sequence according to the number of invalid image frames to obtain a valid image frame sequence.

[0049] In another possible implementation, the above-mentioned invalid image frames include the image frames located at the tail of the initial image frame. Optionally, after the computer device obtains the above-mentioned initial image frame sequence, it obtains the set ratio between the number of invalid image frames and the number of image frames included in the initial image frame, and then determines the number of invalid image frames based on this set ratio. According to the number of invalid image frames, it selects and removes the invalid image frames from the image frames located at the tail of the initial image frame sequence to obtain a valid image frame sequence.

[0050] In yet another possible implementation, the above-mentioned invalid image frames include the image frames located at the head and tail of the initial image frame. Optionally, after the computer device obtains the above-mentioned initial image frame sequence, it obtains the first set ratio and the second set ratio between the number of invalid image frames and the number of image frames included in the initial image frame, and then determines the first number and the second number of invalid image frames based on the first set ratio and the second set ratio. According to the first number, it selects and removes the invalid image frames from the image frames at the head of the initial image frame, and according to the second number, it selects and removes the invalid image frames from the image frames at the tail of the initial image frame to obtain a valid image frame sequence. Wherein, the above-mentioned first number and the above-mentioned second number may be the same or different.

[0051] Step 204: Perform quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, and obtain a sequence of image frames to be processed.

[0052] In the embodiments of the present application, after the computer device obtains the above-mentioned valid image frame sequence, it performs quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, and uses the rated number of image frames as the image frames to be processed to obtain a sequence of image frames to be processed.

[0053] In one possible implementation, the computer device performs random sampling processing on the valid image frame sequence. Optionally, when the computer device obtains the sequence of image frames to be processed, it obtains the rated number of image frames in the sequence of image frames to be processed, and randomly samples and obtains a rated number of image frames from the valid image frame sequence based on this rated number to obtain a sequence of image frames to be processed.

[0054] In another possible implementation, the computer device samples the valid image frame sequence according to a preset rule. Optionally, when the computer device obtains the sequence of image frames to be processed, it obtains the rated number of image frames in the sequence of image frames to be processed, determines the sampling step size for the valid image frame sequence based on the number of image frames included in the valid image frame sequence and this rated number, and then samples each image frame in the valid image frame sequence according to the sampling step size to obtain a rated number of image frames, and obtains a sequence of image frames to be processed.

[0055] Of course, in practical applications, the computer device can sample and obtain a rated number of image frames from the image frames at the head of the valid image frame sequence, so as to obtain the to-be-processed image frame sequence; or, the computer device can sample and obtain a rated number of image frames from the image frames at the tail of the valid image frame sequence, so as to obtain the to-be-processed image frame sequence; or, the computer device can sample and obtain a rated number of image frames from the image frames in the middle part of the valid image frame sequence, so as to obtain the to-be-processed image frame sequence.

[0056] Step 205, use the pre-trained organism anti-counterfeiting recognition model to perform anti-counterfeiting recognition processing on the organisms to be detected in the to-be-processed image frame sequence, so as to obtain the anti-counterfeiting recognition results of the organisms to be detected.

[0057] In the embodiments of the present application, when the computer device obtains the above-mentioned to-be-processed image frame sequence, it uses the pre-trained organism anti-counterfeiting recognition model to perform anti-counterfeiting recognition on the organisms to be detected in the to-be-processed image frame sequence, so as to obtain the anti-counterfeiting recognition results of the organisms to be detected. Optionally, in different scenarios, the computer device can use different machine learning models to perform anti-counterfeiting recognition processing on the organisms to be detected in the to-be-processed image frame sequence, and the embodiments of the present application do not limit this.

[0058] Of course, in practical applications, the computer device can also determine whether the to-be-processed video file contains the above-mentioned organisms to be detected based on the above-mentioned to-be-processed image frame sequence in other ways, and the embodiments of the present application do not limit this.

[0059] In summary, in the technical solution provided by the embodiments of the present application, the to-be-processed image frame sequence is obtained by sampling and obtaining a rated number of image frames from the to-be-processed video file, and the to-be-processed image frame sequence is used to determine whether the to-be-processed video file contains the organisms to be detected. That is to say, when the computer device determines whether the to-be-processed video file contains the organisms to be detected, it does not need to process the entire to-be-processed video file, and only needs some image frames in the to-be-processed video file to determine whether the to-be-processed video file contains the organisms to be detected, reducing the processing overhead of the computer device and improving the detection efficiency for the organisms to be detected; moreover, the rated number of image frames is sampled and obtained from the valid image frame sequence of the to-be-processed video file, and the valid image frame sequence is obtained by removing the invalid image frames from the image frames of the to-be-processed video file, and the invalid image frames include the image frames at the head and tail of the initial image frame sequence. Obtaining a rated number of image frames from the middle part of the to-be-processed video file and removing the inaccurate image frames at the head and tail ensure the accuracy of the obtained to-be-processed image frame sequence, and thus effectively ensure the accuracy of the detection results for the organisms to be detected.

[0060] Next, the method for obtaining the above-mentioned image frame sequence to be processed will be introduced.

[0061] In an exemplary embodiment, step 204 above includes the following steps:

[0062] 1. Determine the sampling step for the image frames in the valid image frame sequence based on the number of image frames and the rated number included in the valid image frame sequence.

[0063] The sampling step refers to the sampling interval for image frames. It should be noted that the sampling interval here is not the interval in time, but the interval between image frames. For example, for 13 image frames, if the sampling step is 3, then the sampling interval for image frames is 3. When sampling, one image frame is sampled from every three image frames. In the embodiment of the present application, after the computer device obtains the above-mentioned valid image frame sequence, it determines the number of image frames included in the valid image frame sequence and obtains the rated number, and then determines the sampling step for the image frames in the valid image frame sequence based on the number of frames of the valid image frame sequence and the rated number. Among them, the above-mentioned rated number refers to the maximum number of image frames included in the image frame sequence to be processed, and this rated number can be any value. The staff can adjust this rated number according to the actual situation, and the embodiment of the present application does not limit this.

[0064] Optionally, when determining the sampling step, the computer device can obtain the sampling step by taking the integer after dividing the number of image frames included in the valid image frame sequence by the rated number.

[0065] 2. Determine the time order in which each image frame in the valid image frame sequence appears in the video file to be processed.

[0066] In the embodiment of the present application, after the computer device obtains the above-mentioned valid image frame sequence, based on the image frames included in the valid image frame sequence and the image frames included in the video file to be processed, it determines the time order in which each image frame in the valid image frame sequence appears in the video file to be processed.

[0067] 3. Number each image frame in the valid image frame sequence in the order from front to back, and determine the index value corresponding to each image frame in the valid image frame sequence.

[0068] In the embodiments of the present application, after the computer device obtains the above time sequence, based on the time sequence, it numbers each image frame in the above valid image frame sequence to determine the index value corresponding to each image frame in the valid image frame sequence. Optionally, a single index value can be used to indicate a unique label; or, a single index value is numerically the same as a certain label. Exemplarily, the label of the first valid image frame that appears in the video file to be processed is 0, and its corresponding index value is 0; the label of the second valid image frame is 0, and its corresponding index value is 1; the label of the third valid image frame is 2, and its corresponding index value is 2, and so on.

[0069] 4. Based on the sampling step size and in combination with the current sampling times, determine the index value of the target image frame obtained by sampling.

[0070] In the embodiments of the present application, after the computer device obtains the above sampling step size, based on the sampling step size and in combination with the current sampling times, it determines the index value of the target image frame obtained by sampling. Wherein, the target image frame is the image frame to be processed.

[0071] Optionally, in the embodiments of the present application, the computer device multiplies the above sampling step size by the above current sampling times to obtain a first value. Further, when the first value is less than or equal to the maximum value of the labels of each image frame in the valid image frame sequence, the first value is determined as the index value of the target image frame; when the first value is greater than the maximum value of the labels of each image frame in the valid image frame sequence, the maximum index value is determined as the index value of the target image frame.

[0072] 5. Based on the index value of the target image frame, perform sampling processing on the valid image frame sequence to obtain the target image frame, and add the target image frame to the sequence of image frames to be processed as the image frame to be processed.

[0073] In the embodiments of the present application, after the computer device obtains the above index value of the target image frame, based on the index value of the target image frame and in combination with the labels of each image frame in the valid image frame sequence, it performs sampling processing on the valid image frame sequence to obtain the target image frame, and adds the target image frame to the sequence of image frames to be processed as the image frame to be processed. Wherein, when obtaining the target image frame, the computer device determines that the image frame corresponding to the label corresponding to the index value in the valid image frame sequence is the target image frame based on the index value of the target image frame. Optionally, the label corresponding to the index value is numerically the same as the index value.

[0074] It should be noted that in the embodiments of the present application, the computer device determines whether the sampling process for the valid image frame sequence is successful based on the relationship between the current sampling times and the above-mentioned rated quantity. Optionally, when the current sampling times is less than the rated quantity, the current sampling times is updated (such as incrementing the current sampling times by one), and the process starts again from the step of determining the index value of the target image frame obtained by sampling based on the above-mentioned sampling step and in combination with the current sampling times; when the current sampling times is equal to the rated quantity, the sampling process for the above-mentioned valid image frames is ended to obtain the image frame sequence to be processed. Then, the computer device determines whether the video file to be processed contains the organism to be detected based on the image frame sequence to be processed. Among them, the image frame sequence to be processed includes at least one image frame.

[0075] Next, the method for obtaining the valid image frame sequence will be introduced.

[0076] In an exemplary embodiment, step 203 above includes the following steps:

[0077] 1. Obtain the set ratio between the number of invalid image frames and the number of image frames included in the initial image frame sequence.

[0078] In the embodiments of the present application, after the computer device obtains the above-mentioned initial image frame sequence, it obtains the set ratio between the number of invalid image frames and the number of image frames included in the initial image frame sequence. Among them, the set ratio can be any value, and the staff can adjust the set ratio according to the actual situation. The embodiments of the present application do not limit this.

[0079] 2. Based on the set ratio and in combination with the number of image frames included in the initial image frame sequence, determine the number n of invalid image frames.

[0080] In the embodiments of the present application, after the computer device obtains the above-mentioned set ratio, it determines the number n of invalid image frames based on the set ratio and the number of image frames included in the initial image frame sequence. Among them, n is a positive integer, and the above-mentioned rated quantity refers to the maximum number of frames of the image frame sequence to be processed.

[0081] Optionally, when the computer device determines the number n of invalid image frames, it can multiply the number of image frames included in the initial image frame sequence by the above-mentioned set ratio to obtain the number n of the above-mentioned invalid image frames.

[0082] 3. Remove the first n image frames at the head of the initial image frame sequence as invalid image frames to obtain the first remaining image frame sequence.

[0083] In an embodiment of the present application, after the computer device determines the number n of the above-mentioned invalid image frames, it removes the first n image frames at the head of the initial image frame sequence as invalid image frames to obtain a first remaining image frame sequence.

[0084] 4. When the number of image frames included in the first remaining image frame sequence is greater than the rated number, the last n image frames at the tail of the initial image frame sequence are removed as invalid image frames to obtain a second remaining image frame sequence.

[0085] In an embodiment of the present application, after the computer device obtains the above-mentioned first remaining image frame sequence, it determines the number of image frames included in the first remaining image frame sequence. Then, when the number of image frames included in the first remaining image frame sequence is greater than the above-mentioned rated number, it determines that the removal of the invalid image frames is not completed, and removes the last n image frames at the tail of the initial image frame sequence as invalid image frames to obtain a second remaining image frame sequence.

[0086] Optionally, when the number of image frames included in the above-mentioned first remaining image frame sequence is less than or equal to the above-mentioned rated number, the computer device determines that the removal of the invalid image frames is completed. And because the number of image frames included in the first remaining image frame sequence is too small, it determines the first remaining image frame sequence as the above-mentioned image frame sequence to be processed. Then, the computer device determines whether the image frame sequence to be processed contains the organism to be detected through the image frame sequence to be processed.

[0087] 5. When the number of image frames included in the second remaining image frame sequence is greater than the rated number, the second remaining image frame sequence is determined as the valid image frame sequence.

[0088] In an embodiment of the present application, after the computer device obtains the above-mentioned second remaining image frame sequence, it determines the number of image frames included in the second remaining image frame sequence. Then, when the number of image frames included in the second remaining image frame sequence is greater than the above-mentioned rated number, it determines the second remaining image frame sequence as the above-mentioned valid image frame sequence. Then, the computer device samples and obtains the above-mentioned image frame sequence to be processed from the valid image frame sequence.

[0089] Optionally, when the number of image frames included in the above-mentioned second remaining image frame sequence is less than or equal to the above-mentioned rated number, because the number of image frames included in the second remaining image frame sequence is too small, it skips the sampling step for the valid image frame sequence, directly determines the second remaining image frame sequence as the image frame sequence to be processed, and then the computer device determines whether the image frame sequence to be processed contains the organism to be detected through the image frame sequence to be processed.

[0090] It should be noted that in the embodiments of the present application, after the computer device obtains the above-mentioned sequence of to-be-processed image frames, it can process the to-be-processed image frames to determine whether the to-be-processed video file contains the to-be-detected organism.

[0091] Please refer to Figure 3 , which shows a flowchart of a biological anti-counterfeiting identification method provided by an embodiment of the present application. This method can be applied to a computer device, and the computer device can be Figure 1 the image processing device 20 in the video processing system shown. This method may include the following steps (301 to 307):

[0092] Step 301, obtain a to-be-processed video file containing the to-be-detected organism.

[0093] Step 302, perform frame splitting processing on the to-be-processed video file to obtain an initial image frame sequence.

[0094] Step 303, perform invalid image frame recognition and removal processing on the initial image frame sequence to obtain a valid image frame sequence.

[0095] Step 304, perform quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, and obtain a to-be-processed image frame sequence.

[0096] The above steps 301-304 are the same as Figure 2 the steps 201-204 in the Figure 2 embodiment. For details, please refer to

[0097] embodiment, and details will not be elaborated here.

[0098] The first biological anti-counterfeiting identification model refers to a biological detection model for a single image frame. In the embodiments of the present application, after the computer device obtains the above-mentioned sequence of to-be-processed image frames, it uses the pre-trained first biological anti-counterfeiting identification model to perform image processing on each to-be-processed image frame in the to-be-processed image frame sequence, and outputs the probability that each to-be-processed image frame contains the to-be-detected organism.

[0099] In a possible implementation, the computer device performs image processing on each image frame to be processed through a machine learning model. Optionally, after obtaining the sequence of image frames to be processed, the computer device inputs each image frame to be processed in the sequence of image frames to be processed into the first biological anti-counterfeiting recognition model, and then obtains the output result of the first biological anti-counterfeiting recognition model, so as to obtain the probability of the biological organism to be detected in each image frame to be processed. Among them, the first biological anti-counterfeiting recognition model can be set in the computer device or in other electronic devices associated with the computer device, and the embodiments of the present application do not limit this.

[0100] Of course, in another possible implementation, the computer device performs image processing on each image frame to be processed through image processing rules. Optionally, after obtaining the sequence of image frames to be processed, the computer device extracts feature points from each image frame to be processed in the sequence of image frames to be processed, and then determines the probability of the biological organism to be detected in each image frame to be processed based on the feature information corresponding to each image frame to be processed.

[0101] Step 306: Determine the discrimination probability of the biological organism to be detected in the video file to be processed based on the probability of the biological organism to be detected in each image frame to be processed.

[0102] In the embodiments of the present application, after obtaining the probability of the biological organism to be detected in each image frame to be processed, the computer device determines the discrimination probability of the biological organism to be detected in the video file to be processed based on the probability of the biological organism to be detected in each image frame to be processed. Among them, the discrimination probability refers to the probability that the video file to be processed contains the biological organism to be detected.

[0103] In a possible implementation, when obtaining the discrimination probability, the computer device performs an averaging process on the probability of the biological organism to be detected in each image frame to be processed to obtain the discrimination probability.

[0104] In another possible implementation, when obtaining the discrimination probability, the computer device determines the largest a probabilities from the probabilities of the biological organism to be detected in each image frame to be processed, and performs an averaging process on the a probabilities to obtain the discrimination probability. Among them, a is any positive integer, and the staff can adjust the value of a according to the actual situation, and the embodiments of the present application do not limit this.

[0105] In yet another possible implementation, when the computer device obtains the above discrimination probability, it determines the b smallest probabilities from the probabilities of the above-mentioned respective to-be-processed image frames that contain the organism to be detected, and performs an averaging process on these b probabilities to obtain the above discrimination probability. Here, b is any positive integer, and the staff can adjust the value of b according to the actual situation, and the embodiments of the present application do not limit this.

[0106] In yet another possible implementation, when the computer device obtains the above discrimination probability, it determines the chronological order in which the to-be-processed image frame appears in the above to-be-processed video file, and then, based on this chronological order, determines the weight values corresponding to the probabilities of the above-mentioned respective to-be-processed image frames that contain the organism to be detected, and performs a weighted summation process on each probability based on the weight values corresponding to each probability to obtain the above discrimination probability. Optionally, if the chronological order in which the to-be-processed image frame appears in the above to-be-processed video file is the central position in terms of time, the weight value corresponding to the probability corresponding to this to-be-processed image frame is large.

[0107] Step 307, if the discrimination probability is greater than the threshold, it is determined that the to-be-processed video file contains the organism to be detected.

[0108] In the embodiments of the present application, after the computer device obtains the above discrimination probability, it determines whether the to-be-processed video file contains the above-mentioned organism to be detected based on this discrimination probability. Optionally, if the discrimination probability is greater than the threshold, it is determined that the above to-be-processed video file contains the organism to be detected, that is, the to-be-processed video file passes the above anti-counterfeiting identification process; if the discrimination probability is less than or equal to the threshold, it is determined that the above to-be-processed video file does not contain the organism to be detected, that is, the to-be-processed video file fails the anti-counterfeiting identification process. Here, the above threshold can be any value, and the staff can adjust this threshold according to the actual situation, and the embodiments of the present application do not limit this.

[0109] Exemplarily, with reference to Figure 4, a brief introduction to the biological anti-counterfeiting identification method in this application is given. The computer device obtains the video file 41 to be processed, and performs frame splitting on the video file 41 to be processed to obtain the initial image frame sequence 42. Among them, the initial image frame sequence 42 includes multiple image frames. Further, n invalid image frames at the head and n invalid image frames at the tail are removed from the initial image frame sequence 42 to obtain the valid image frame sequence 43. After that, based on the number of frames of the valid image frame sequence 43 and the rated quantity, the valid image frame sequence 43 is sampled to obtain the image frame sequence 44 to be processed. Among them, the rated quantity refers to the maximum number of image frames included in the image frame sequence 44 to be processed. Then, the image frames to be processed in the image frame sequence 44 to be processed are respectively input into the biological anti-counterfeiting identification model 45, and the probability 46 of the target image included in each image frame to be processed output by the biological anti-counterfeiting identification model 45 is obtained. Furthermore, based on the probability 46 of the target image included in each image frame to be processed, the discrimination probability 47 of the biological body to be detected included in the video file 41 to be processed is determined. If the discrimination probability 47 is greater than the threshold, it is determined that the video file 41 to be processed includes the biological body to be detected; if the discrimination probability 47 is less than or equal to the threshold, it is determined that the video file 41 to be processed does not include the biological body to be detected.

[0110] In summary, in the technical solution provided by the embodiment of this application, the discrimination probability of the biological body to be detected included in the video file to be processed is determined by the probability of the biological body to be detected included in each image frame to be processed, and the final result is determined by multiple frames of images in the video file to be processed, improving the accuracy of the detection result for the biological body to be detected; moreover, a rated number of image frames are sampled from the video file to be processed to obtain the image frame sequence to be processed. When the computer device determines whether the video file to be processed includes the biological body to be detected, it does not need to process the entire video file to be processed, and only needs some image frames in the video file to be processed to determine whether the video file to be processed includes the biological body to be detected, reducing the processing overhead of the computer device and improving the detection efficiency for the biological body to be detected.

[0111] Of course, the above processing of the image frame sequence to be processed is only exemplary and explanatory. In actual applications, the computer device can also use other methods to obtain the discrimination probability of the biological body to be detected included in the above video file to be processed.

[0112] Optionally, after the computer device obtains the above image frame sequence to be processed, it uses a pre-trained second biological anti-counterfeiting identification model to perform image frame processing on the image frame sequence to be processed to obtain the discrimination probability of the biological body to be detected included in the video file to be processed. If the discrimination probability of the biological body to be detected included in the video file to be processed is greater than the above threshold, it is determined that the video file to be processed includes the biological body to be detected.

[0113] In a possible implementation, the computer device inputs the sequence of image frames to be processed into a pre-trained second biological anti-counterfeiting recognition model, and then obtains the discrimination probability output by the second biological anti-counterfeiting recognition model. It should be noted that the various machine learning models mentioned in this application can be different machine learning models. For example, the machine learning model for a single image frame and the machine learning model for multiple image frames can be different. Optionally, the staff can flexibly adjust the machine learning model in the detection process of the subsequent biological organism to be detected according to the actual situation, and this application embodiment does not limit this.

[0114] In another possible implementation, the computer device determines the target image frame to be processed from the sequence of image frames to be processed, and then uses the pre-trained second biological anti-counterfeiting recognition model to perform image processing on the target image frame to be processed to obtain the above-mentioned discrimination probability. Optionally, the target image frame to be processed can be any randomly selected image frame from the sequence of image frames to be processed, or an image frame extracted from the sequence of image frames to be processed according to a specific rule (such as selecting the image frame with the most central appearance time).

[0115] In yet another possible implementation, the computer device performs image fusion processing on each image frame to be processed in the sequence of image frames to be processed to obtain a fused image frame, and uses the pre-trained second biological anti-counterfeiting recognition model to perform image processing on the fused image frame to obtain the above-mentioned discrimination probability. In a possible implementation, when the computer device obtains the fused image frame, it can respectively perform pixel value extraction processing on each image frame to be processed in the sequence of image frames to be processed to obtain the pixel information of each pixel point in each image frame to be processed. Further, using the same position marking method, the positions of each pixel point in each image frame to be processed are marked, and the pixel values of the pixel points with the same position marking are fused to obtain the fused pixel value, and then based on the fused pixel values corresponding to the pixel points corresponding to each position marking, the above-mentioned fused image frame to be processed is obtained. Optionally, when the computer device obtains the above-mentioned fused pixel value, it can perform an averaging process on the pixel values of the pixel points at the same position in different image frames to be processed to obtain the fused pixel value. In another possible implementation, when the computer device obtains the fused image frame, it can respectively perform feature extraction processing on each image frame to be processed in the sequence of image frames to be processed to obtain the feature information of each image frame to be processed, and perform feature fusion on the feature information of each image frame to be processed to obtain the fused feature information, and then use the fused feature information as the feature information of the fused image frame to obtain the fused image frame.

[0116] In addition, with reference toFigure 5 , a complete introduction to the biological anti-counterfeiting identification method in this application is provided. The specific steps are as follows:

[0117] Step 501, the computer device acquires the video file to be processed.

[0118] Step 502, the computer device performs frame-by-frame processing on the video file to be processed to obtain an initial image frame sequence.

[0119] Step 503, the computer device determines whether the number of image frames included in the initial image frame sequence is greater than the rated number. If the number of image frames included in the initial image frame sequence is greater than the rated number, step 404 is executed; if the number of image frames included in the initial image frame sequence is less than or equal to the rated number, step 515 is executed.

[0120] Step 504, the computer device determines the number n of invalid image frames based on the number of image frames included in the initial image frame sequence and the set ratio corresponding to the invalid image frames.

[0121] Step 505, the computer device removes the first n image frames at the head of the initial image frame sequence as invalid image frames to obtain a first remaining image frame sequence.

[0122] Step 506, the computer device determines whether the number of frames of the first remaining image frame sequence is greater than the rated number. If the number of frames of the first remaining image frame sequence is greater than the rated number, step 507 is executed; if the number of frames of the first remaining image frame sequence is less than or equal to the rated number, the first remaining image frame sequence is used as the image frame sequence to be processed, and step 515 is executed.

[0123] Step 507, the computer device removes the last n image frames at the tail of the initial image frame sequence as invalid image frames to obtain a second remaining image frame sequence.

[0124] Step 508, the computer device determines whether the number of frames of the second remaining image frame sequence is greater than the rated number. If the number of frames of the second remaining image frame sequence is greater than the rated number, step 509 is executed; if the number of frames of the second remaining image frame sequence is less than or equal to the rated number, the second remaining image frame sequence is used as the image frame sequence to be processed, and step 515 is executed.

[0125] Step 509, the computer device uses the second remaining image frame sequence as a valid image frame sequence and determines the sampling step for the valid image frame sequence based on the number of frames of the valid image frame sequence and the rated number.

[0126] Step 510, the computer device determines the index values corresponding to the respective image frames in the valid image frame sequence based on the order of the appearance times of the respective image frames in the to-be-processed video file from the front to the back.

[0127] Step 511, the computer device determines the index value of the target image frame obtained by sampling based on the sampling step size and the current sampling count.

[0128] Step 512, the computer device samples and obtains the target image frame from the valid image frame sequence based on the index value of the target image frame, and adds the target image frame as a to-be-processed image frame to the to-be-processed image frame sequence.

[0129] Step 513, the computer device determines whether the current sampling count is less than the rated quantity. If the current sampling count is less than the rated quantity, then execute Step 514; if the current sampling count is greater than or equal to the rated quantity, then determine that the acquisition of the to-be-processed image frame sequence is completed, and execute Step 515.

[0130] Step 514, the computer device updates the current sampling count and starts to execute again from Step 511.

[0131] Step 515, the computer device performs image processing on each to-be-processed image frame in the to-be-processed image frame sequence, and determines the probability that each to-be-processed image frame contains the organism to be detected.

[0132] Step 516, the computer device determines whether the to-be-processed video file includes the organism to be detected based on the probability that each to-be-processed image frame contains the organism to be detected.

[0133] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the method embodiment of the present application.

[0134] Please refer to Figure 6 , which shows a block diagram of a biological anti-counterfeiting identification device provided by an embodiment of the present application. The device has the function of implementing the above-mentioned biological anti-counterfeiting identification method, and the function can be implemented by hardware or by hardware executing corresponding software. The device can be a computer device or can be set in a computer device. The device 600 may include: a video acquisition module 610, a video frame division module 620, an image removal module 630, and an image sampling module 640.

[0135] The video acquisition module 610 is configured to acquire a to-be-processed video file containing an organism to be detected.

[0136] The video frame splitting module 620 is configured to split the to-be-processed video file into a sequence of image frames, obtaining an initial image frame sequence, where the initial image frame sequence includes a plurality of image frames.

[0137] The image removal module 630 is configured to identify and remove invalid image frames from the initial image frame sequence, obtaining a valid image frame sequence.

[0138] The image sampling module 640 is configured to perform quantitative sampling on the image frames in the valid image frame sequence, acquiring a rated number of image frames, obtaining a to-be-processed image frame sequence.

[0139] The generation and recognition module 650 is configured to perform anti-counterfeiting recognition on the to-be-detected organism in the to-be-processed image frame sequence by using a pre-trained organism anti-counterfeiting recognition model, obtaining the anti-counterfeiting recognition result of the to-be-detected organism.

[0140] In an exemplary embodiment, as Figure 7 shown, the image sampling module 640 includes: a step size acquisition unit 641 and an image sampling unit 642.

[0141] The step size acquisition unit 641 is configured to determine the sampling step size for the image frames in the valid image frame sequence based on the number of image frames included in the valid image frame sequence and the rated number.

[0142] The image sampling unit 642 is configured to perform quantitative sampling on the image frames in the valid image frame sequence according to the sampling step size, acquiring the rated number of image frames, obtaining the to-be-processed image frame sequence.

[0143] In an exemplary embodiment, the image sampling unit 642 is configured to determine the chronological order in which each image frame in the valid image frame sequence appears in the video file to be processed; number each image frame in the valid image frame sequence based on the chronological order from front to back to determine the index value corresponding to each image frame in the valid image frame sequence; based on the sampling step and in combination with the current sampling count, determine the index value of the target image frame obtained by sampling; based on the index value of the target image frame, perform sampling processing on the valid image frame sequence to obtain the target image frame, and add the target image frame as the image frame to be processed to the sequence of image frames to be processed; in the case where the current sampling count is less than the rated quantity, perform an update process on the current sampling count, and start executing again from the step of determining the index value of the target image frame obtained by sampling based on the sampling step and in combination with the current sampling count; in the case where the current sampling count is equal to the rated quantity, end the sampling process for the image frames in the valid image frame sequence to obtain the sequence of image frames to be processed including at least one image frame to be processed.

[0144] In an exemplary embodiment, the image sampling unit 642 is further configured to multiply the sampling step by the current sampling count to obtain a first value; in the case where the first value is less than or equal to the maximum value of the numbers of each image frame in the valid image frame sequence, determine the first value as the index value of the target image frame; in the case where the first value is greater than the maximum value of the numbers of each image frame in the valid image frame sequence, determine the maximum index value as the index value of the target image frame.

[0145] In an exemplary embodiment, as Figure 7 shown, the image removal module 630 includes: a proportion obtaining unit 631, a quantity determining unit 632, and an image removing unit 633.

[0146] The proportion obtaining unit 631 is configured to obtain a set proportion between the number of invalid image frames and the number of image frames included in the initial image frame sequence.

[0147] The quantity determining unit 632 is configured to, based on the set proportion and in combination with the number of image frames included in the initial image frame sequence, determine the number n of invalid image frames, where n is a positive integer;

[0148] An image removal unit 633, configured to, when the number of image frames included in the first remaining image frame sequence is greater than the rated number, remove the last n image frames located at the tail of the initial image frame sequence as the invalid image frames, so as to obtain a second remaining image frame sequence; and when the number of image frames included in the second remaining image frame sequence is greater than the rated number, determine the second remaining image frame sequence as the valid image frame sequence.

[0149] In an exemplary embodiment, the image removal unit 633 is further configured to, when the number of image frames included in the first remaining image frame sequence is less than or equal to the rated number, determine the first remaining image frame sequence as the to-be-processed image frame sequence; or, when the number of image frames included in the second remaining image frame sequence is less than or equal to the rated number, determine the second remaining image frame sequence as the to-be-processed image frame sequence.

[0150] In an exemplary embodiment, as Figure 7 shown, the generation and recognition module 650 includes: an image recognition unit 651, a probability determination unit 652, and a result determination unit 653.

[0151] The image recognition unit 651 is configured to perform image processing on each to-be-processed image frame in the to-be-processed image frame sequence by using a pre-trained first biological anti-counterfeiting recognition model, and output the probability of the to-be-detected organism included in each to-be-processed image frame.

[0152] The probability determination unit 652 is configured to determine the discrimination probability of the to-be-detected organism included in the to-be-processed video file based on the probability of the to-be-detected organism included in each to-be-processed image frame.

[0153] The result determination unit 653 is configured to, if the discrimination probability is greater than a threshold, determine that the to-be-processed video file includes the to-be-detected organism.

[0154] In an exemplary embodiment, the probability determination unit 652 is configured to average the probabilities of the to-be-detected organisms included in each of the to-be-processed image frames to obtain the discrimination probability; alternatively, determine a maximum number of a probabilities from the probabilities of the to-be-detected organisms included in the to-be-processed image frames, average the maximum number of a probabilities to obtain the discrimination probability, where a is a positive integer; alternatively, determine a minimum number of b probabilities from the probabilities of the to-be-detected organisms included in the to-be-processed image frames, average the minimum number of b probabilities to obtain the discrimination probability, where b is a positive integer; alternatively, determine the time sequence of the to-be-processed image frames appearing in the to-be-processed video file, based on the time sequence, determine the weight values corresponding to the probabilities of the to-be-detected organisms included in each of the to-be-processed image frames, and perform a weighted summation process on the probabilities of the to-be-detected organisms included in each of the to-be-processed image frames based on the weight values corresponding to the probabilities of the to-be-detected organisms included in each of the to-be-processed image frames, to obtain the discrimination probability.

[0155] In an exemplary embodiment, as Figure 7 shown, the generation recognition module 650 further includes: a probability acquisition unit 654.

[0156] The probability acquisition unit 654 is configured to perform image frame processing on the to-be-processed image frame sequence by using a pre-trained second biological organism anti-counterfeiting recognition model to obtain the discrimination probability of the to-be-detected organism included in the to-be-processed video file.

[0157] The result determination unit 653 is configured to determine that the to-be-processed video file includes the to-be-detected organism if the discrimination probability is greater than a threshold.

[0158] In an exemplary embodiment, the probability acquisition unit 654 is configured to input the to-be-processed image frame sequence into a pre-trained second biological organism anti-counterfeiting recognition model, obtain the discrimination probability output by the pre-trained second biological organism anti-counterfeiting recognition model; alternatively, determine a target to-be-processed image frame from the to-be-processed image frame sequence, perform image processing on the target to-be-processed image frame by using a pre-trained second biological organism anti-counterfeiting recognition model, and output the discrimination probability; alternatively, perform image fusion processing on each image frame in the to-be-processed image frame sequence to obtain a fused to-be-processed image frame, and perform image processing on the fused to-be-processed image frame by using a pre-trained second biological organism anti-counterfeiting recognition model, and output the discrimination probability.

[0159] In an exemplary embodiment, the probability acquisition unit 654 is further configured to perform pixel value extraction processing on each of the to-be-processed image frames in the to-be-processed image frame sequence to obtain the pixel values of each pixel point in each of the to-be-processed image frames; use the same position marking method to mark the positions of each pixel point in each of the to-be-processed image frames; perform pixel value fusion on the pixel points with the same position marking to obtain the fused pixel values; and obtain the fused to-be-processed image frame based on the fused pixel values corresponding to the pixel points corresponding to each position marking.

[0160] In an exemplary embodiment, the probability acquisition module 680 is further configured to perform feature extraction processing on each of the to-be-processed image frames in the to-be-processed image frame sequence to obtain the feature information of each of the to-be-processed image frames; perform feature fusion on the feature information of each of the to-be-processed image frames to obtain the fused feature information; and obtain the fused to-be-processed image frame based on the fused feature information.

[0161] In summary, in the technical solution provided by the embodiment of the present application, a to-be-processed image frame sequence is obtained by sampling a rated number of image frames from a to-be-processed video file, and the to-be-processed image frame sequence is used to determine whether the to-be-processed video file contains a to-be-detected organism. That is to say, when a computer device determines whether the to-be-processed video file contains a to-be-detected organism, it does not need to process the entire to-be-processed video file, and only needs some image frames in the to-be-processed video file to determine whether the to-be-processed video file contains a to-be-detected organism, reducing the processing overhead of the computer device and improving the detection efficiency for the to-be-detected organism; moreover, the rated number of image frames is sampled from the valid image frame sequence of the to-be-processed video file, the valid image frame sequence is obtained by removing invalid image frames from the image frames of the to-be-processed video file, and the invalid image frames include the image frames located at the head and tail of the initial image frame sequence. By obtaining the rated number of image frames from the middle part of the to-be-processed video file and removing the inaccurate image frames at the head and tail, the accuracy of the obtained to-be-processed image frame sequence is ensured, and further the accuracy of the detection result for the to-be-detected organism is effectively ensured.

[0162] It should be noted that when the device provided in the above embodiment realizes its functions, only the above-mentioned division of each functional module is used for illustration. In actual application, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0163] Please refer to Figure 8, which shows a structural block diagram of a computer device provided by an embodiment of the present application. This computer device can be used to implement the functions of the above-mentioned biological anti-counterfeiting identification method. Specifically:

[0164] The computer device 800 includes a central processing unit (CPU) 801, a system memory 804 including a random access memory (RAM) 802 and a read only memory (ROM) 803, and a system bus 805 connecting the system memory 804 and the central processing unit 801. The computer device 800 also includes a basic input / output system (Input / Output, I / O system) 806 that helps transfer information between various components within the computer, and a mass storage device 807 for storing an operating system 813, application programs 814, and other program modules 815.

[0165] The basic input / output system 806 includes a display 808 for displaying information and input devices 809 such as a mouse and a keyboard for user input of information. Among them, both the display 808 and the input devices 809 are connected to the central processing unit 801 through an input / output controller 810 connected to the system bus 805. The basic input / output system 806 may also include an input / output controller 810 for receiving and processing inputs from multiple other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 810 also provides output to a display screen, a printer, or other types of output devices.

[0166] The mass storage device 807 is connected to the central processing unit 801 through a mass storage controller (not shown) connected to the system bus 805. The mass storage device 807 and its associated computer-readable medium provide non-volatile storage for the computer device 800. That is to say, the mass storage device 807 may include computer-readable media (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0167] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic tape cartridges, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will know that computer storage media is not limited to the above several types. The above-mentioned system memory 804 and mass storage device 807 can be collectively referred to as memory.

[0168] According to various embodiments of the present application, the computer device 800 can also run on a remote computer on the network through a network such as the Internet. That is, the computer device 800 can be connected to the network 812 through the network interface unit 811 connected to the system bus 805, or in other words, the network interface unit 811 can also be used to connect to other types of networks or remote computer systems (not shown).

[0169] The memory further includes a computer program, which is stored in the memory and is configured to be executed by one or more processors to implement the above-mentioned biological anti-counterfeiting identification method.

[0170] In an exemplary embodiment, a computer-readable storage medium is also provided. At least one instruction, at least one segment of program, code set or instruction set is stored in the storage medium. When the at least one instruction, the at least one segment of program, the code set or the instruction set is executed by a processor, the above-mentioned biological anti-counterfeiting identification method is implemented.

[0171] Optionally, the computer-readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives), or optical discs, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0172] In an exemplary embodiment, there is also provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned biological anti-counterfeiting identification method.

[0173] It should be noted that, when collecting and processing relevant data (including video files to be processed, human faces, etc.) in the actual application of this application, the informed consent or separate consent of the personal information subject should be obtained strictly in accordance with the requirements of relevant national laws and regulations, and subsequent data use and processing behaviors should be carried out within the scope authorized by laws and regulations and the personal information subject.

[0174] It should be understood that the term "a plurality of" mentioned herein refers to two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after. In addition, the step numbers described in this document only exemplarily show a possible execution sequence between steps. In some other embodiments, the above steps may not be executed in the order of the numbers. For example, two steps with different numbers may be executed simultaneously, or two steps with different numbers may be executed in the reverse order of the illustration. The embodiments of this application do not limit this.

[0175] The above are only exemplary embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included in the protection scope of this application.

Claims

1. A method for anti-counterfeiting identification of organisms, characterized in that, The method includes: Obtaining a to-be-processed video file containing a biological organism to be detected, where the to-be-processed video file includes at least one image frame containing the biological organism to be detected; Performing frame splitting on the to-be-processed video file for an image frame sequence to obtain an initial image frame sequence, where the initial image frame sequence contains multiple image frames; Performing invalid image frame recognition and removal processing on the initial image frame sequence to obtain a valid image frame sequence; Performing quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, resulting in a to-be-processed image frame sequence; Performing pixel value extraction processing on each to-be-processed image frame in the to-be-processed image frame sequence to obtain the pixel values of each pixel point in each to-be-processed image frame; using the same position marking method, marking the positions of each pixel point in each to-be-processed image frame; performing pixel value fusion on pixel points with the same position marking to obtain a fused pixel value; based on the fused pixel values corresponding to the pixel points corresponding to each position marking, obtaining a fused to-be-processed image frame; Using a pre-trained second biological organism anti-counterfeiting recognition model to perform image processing on the fused to-be-processed image frame and output a discrimination probability; If the discrimination probability is greater than a threshold, it is determined that the to-be-processed video file contains the biological organism to be detected.

2. The method according to claim 1, wherein The performing quantitative sampling processing on the image frames in the valid image frame sequence to obtain a rated number of image frames, resulting in a to-be-processed image frame sequence, includes: Based on the number of image frames contained in the valid image frame sequence and the rated number, determining a sampling step for the image frames in the valid image frame sequence; Performing quantitative sampling processing on the image frames in the valid image frame sequence according to the sampling step to obtain the rated number of image frames, resulting in the to-be-processed image frame sequence.

3. The method according to claim 2, wherein The performing quantitative sampling processing on the image frames in the valid image frame sequence according to the sampling step to obtain the rated number of image frames, resulting in the to-be-processed image frame sequence, includes: Determining the time order in which each image frame in the valid image frame sequence appears in the to-be-processed video file; Based on the time order from front to back, numbering each image frame in the valid image frame sequence to determine the index value corresponding to each image frame in the valid image frame sequence; Based on the sampling step and in combination with the current sampling times, determining the index value of the target image frame to be sampled; Based on the index value of the target image frame, performing sampling processing on the valid image frame sequence to obtain the target image frame, and adding the target image frame as a to-be-processed image frame to the to-be-processed image frame sequence; In the case where the current sampling times is less than the rated number, performing update processing on the current sampling times, and starting to execute again from the step of determining the index value of the target image frame to be sampled based on the sampling step and in combination with the current sampling times; When the current sampling count is equal to the rated quantity, end the sampling process for the image frames in the sequence of valid image frames, and obtain the sequence of to-be-processed image frames including at least one of the to-be-processed image frames.

4. The method according to claim 3, wherein Determining the index value of the target image frame obtained by sampling based on the sampling step and in combination with the current sampling count includes: Multiplying the sampling step by the current sampling count to obtain a first value; When the first value is less than or equal to the maximum value of the labels of the respective image frames in the sequence of valid image frames, determining the first value as the index value of the target image frame; When the first value is greater than the maximum value of the labels of the respective image frames in the sequence of valid image frames, determining the maximum index value as the index value of the target image frame.

5. The method according to claim 1, characterized in that, Performing invalid image frame identification and removal processing on the initial image frame sequence to obtain a sequence of valid image frames includes: Obtaining a set ratio between the number of invalid image frames and the number of image frames included in the initial image frame sequence; Based on the set ratio and in combination with the number of image frames included in the initial image frame sequence, determining the number n of invalid image frames, where n is a positive integer; Removing the first n image frames at the head of the initial image frame sequence as the invalid image frames to obtain a first remaining image frame sequence; When the number of image frames included in the first remaining image frame sequence is greater than the rated quantity, removing the last n image frames at the tail of the initial image frame sequence as the invalid image frames to obtain a second remaining image frame sequence; When the number of image frames included in the second remaining image frame sequence is greater than the rated quantity, determining the second remaining image frame sequence as the sequence of valid image frames.

6. The method according to claim 5, characterized in that, The method further includes: When the number of image frames included in the first remaining image frame sequence is less than or equal to the rated quantity, determining the first remaining image frame sequence as the sequence of to-be-processed image frames; Or, When the number of image frames included in the second remaining image frame sequence is less than or equal to the rated quantity, determining the second remaining image frame sequence as the sequence of to-be-processed image frames.

7. A biological anti-counterfeiting identification device, characterized in that, The apparatus includes: A video acquisition module, configured to acquire a to-be-processed video file including a to-be-detected organism, where the to-be-processed video file includes at least one image frame containing the to-be-detected organism; A video frame splitting module, configured to perform frame splitting processing on the to-be-processed video file to obtain an initial image frame sequence, where the initial image frame sequence includes a plurality of image frames; An image removal module, configured to perform invalid image frame identification and removal processing on the initial image frame sequence to obtain a sequence of valid image frames; An image sampling module, configured to perform quantitative sampling processing on the image frames in the sequence of valid image frames to acquire a rated quantity of image frames and obtain a sequence of to-be-processed image frames; A generation and recognition module is configured to perform pixel value extraction processing on each of the to-be-processed image frames in the to-be-processed image frame sequence, so as to obtain the pixel values of each pixel point in each of the to-be-processed image frames; use the same position marking method to mark the positions of each pixel point in each of the to-be-processed image frames; perform pixel value fusion on pixel points with the same position marking to obtain the fused pixel values; and obtain the fused to-be-processed image frame based on the fused pixel values corresponding to the pixel points corresponding to each position marking. The generation and recognition module is further configured to perform image processing on the fused to-be-processed image frame by using a pre-trained second biological organism anti-counterfeiting recognition model, and output a discrimination probability. The generation and recognition module is further configured to determine that the to-be-processed video file contains the to-be-detected biological organism if the discrimination probability is greater than a threshold.

8. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the biological organism anti-counterfeiting recognition method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, At least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement the biological organism anti-counterfeiting recognition method according to any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the biological organism anti-counterfeiting recognition method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cartoon video identification method and device

    CN105844251A

  • Streaming data positioning method and apparatus

    CN105912274A

  • Face anti-counterfeiting detection method based on random image features

    CN110866470A

  • Sampling image frame based image stabilization device and image stabilization method using same

    KR1020140042283A